2015-02-24 140 views
2

我在使用Firefox中的标准导出功能将我的成千上万个Firefox书签导出为HTML文件时出现问题。我得到这个错误:从places.sqlite文件中恢复书签

************************* 
A coding exception was thrown and uncaught in a Task. 

Full message: TypeError: root is undefined 
Full stack: [email protected]://gre/modules/BookmarkHTMLUtils.jsm:980:1 
BHU_exportToFile/<@resource://gre/modules/BookmarkHTMLUtils.jsm:228:22 
[email protected]://gre/modules/Task.jsm:314:40 
[email protected]://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:865:23 
[email protected]://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:7 

************************* 

看到https://gist.github.com/rubo77/12ef9be4060c7935c74c

有出口在控制台上我的书签的方式,所以我可以将它们导入新新的Firefox配置文件?

更新:我设法将firefox实例的“manage bookmarks”菜单中的所有书签与旧配置文件复制并粘贴到另一个实例中,同时打开新配置文件(使用命令行选项-no-remote)。但不幸的是,这仍然不会复制用于我的书签的标签,这也是一个很大的损失。

回答

1

的书签(以类似于~/.mozilla/firefox/rbbfa46q.default的地方例如在Linux下)存储在文件places.sqlite,一个SQLite 3.x数据库中[1]保持设定档目录下。您可以将其作为每个SQLite数据库文件进行管理。

由于可能在键中有冲突,至少在原则上,我建议导出为html链接列表,并在第二个Firefox帐户后导入。

以下是实际能够创建此列表的命令,如另一个回答[2]中报告。

sqlite3 places.sqlite "select '<a href=''' || url || '''>' || moz_bookmarks.title || '</a><br/>' as ahref from moz_bookmarks left join moz_places on fk=moz_places.id where url<>'' and moz_bookmarks.title<>''" > t1.html 

然后你可以使用你觉得更舒适的导入方法。


注意

  • 当然也有插件为“SQLite的经理”从内部管理的Netscape吧...