我在使用 Firefox 中的标准导出功能将 Firefox 中的数千个书签导出到 HTML 文件时遇到问题。我收到此错误:
*************************
A coding exception was thrown and uncaught in a Task.
Full message: TypeError: root is undefined
Full stack: BookmarkExporter@resource://gre/modules/BookmarkHTMLUtils.jsm:980:1
BHU_exportToFile/<@resource://gre/modules/BookmarkHTMLUtils.jsm:228:22
TaskImpl_run@resource://gre/modules/Task.jsm:314:40
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:865:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:7
*************************
见 https://gist.github.com/rubo77/12ef9be4060c7935c74c
有没有办法在控制台上导出我的书签,以便我可以将它们导入到新的 firefox 配置文件中?
更新:我设法将带有旧配置文件的 firefox 实例的“管理书签”菜单中的所有书签复制并粘贴到另一个同时打开新配置文件的实例中(使用命令行选项
-no-remote
)。但不幸的是,这仍然没有复制用于我的书签的标签,这也将是一个巨大的损失。 最佳答案
书签保存在您的配置文件目录 [ 1 ] 下(例如,在 Linux 下类似于 ~/.mozilla/firefox/rbbfa46q.default
的位置)存储在文件 places.sqlite
中,这是一个 SQLite 3.x 数据库。您可以将其作为每个 SQLite 数据库文件进行管理。
由于 key 可能存在冲突,至少原则上,我建议导出为 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 - 从places.sqlite 文件中恢复书签,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28702121/