We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Can I make a folder structure for FF bookmarks outside of firefox?

  • 5 回覆
  • 1 有這個問題
  • 10 次檢視
  • 最近回覆由 cor-el

more options

I want to make about 100 bookmark folders for firefox bookmarks. Is there some way I can create the list in a word processing doc or spreadsheet and then import it into FF? It is a little time consuming in FF to make so many folders.

I want to make about 100 bookmark folders for firefox bookmarks. Is there some way I can create the list in a word processing doc or spreadsheet and then import it into FF? It is a little time consuming in FF to make so many folders.

所有回覆 (5)

more options

You can import Bookmarks from an HTML File. If you export your bookmarks to HTML you can see the structure to work with, but it can be pared down quite a bit:


 <!DOCTYPE NETSCAPE-Bookmark-file-1>
 <H1>Bookmarks Menu</H1>
 <DL>
 <DT><A HREF="http://www.yahoo.com">Link in main Bookmarks menu</A>
 </DL>
 <DT><H3>SubFolder 1</H3>
 <DT><H3>SubFolder 2</H3>
 <DT><H3>SubFolder 3</H3>
 <DL>
 <DT><A HREF="http://www.yahoo.com">Link in Subfolder 3</A>
 </DL>
 <DT><H3>SubFolder 4</H3>
more options

additional information:

Firefox stores bookmarks in a single Sqlite file - places.sqlite; and HTML is a "transactional" file type in Firefox (used for importing and exporting bookmarks in a "common" format).

http://www.sqlite.org/

more options

Thank you! If I make it in a spreadsheet and export it to html, do I just add that coding to the front end of it? and how do I specify sub-sub folders? and sub-sub-sub folders? i.e. folders within folders within folders?

由 haopengyou 於 修改

more options

I'm not sure exactly how the HTML would come out of a spreadsheet application, so your mileage may vary there.

The forum has sadly stripped the indentation out, which would make it easier to read how folders relate, so I've placed a further example with indentation and sub-sub-folders on PasteBin. Hopefully this clarifies how to create your own: http://pastebin.com/Gv8BBSgD

more options

A possibility is to use JavaScript in Firefox to create the main structure and edit that file.

Run the script as a bookmark or in the Scratchpad with an about:blank page in the current tab.

var head = '<!DOCTYPE NETSCAPE-Bookmark-file-1>';
var meta = '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">';
var title = '<TITLE>Bookmarks</TITLE>';
var menu = '<H1>Bookmarks Menu</H1>';

var dls = '<DL>';
var dle = '</DL>';
var folder = '<DT><H3>Folder #</H3>';
var link = '<DT><A HREF="http://">Link #1 in Folder #2</A>';
var text = [];

var maxF = 100;
var maxL = 1;

text.push(head);
text.push(meta);
text.push(title);
text.push("");

text.push(menu);
text.push(dls);
text.push("");

for(var i=0; i<maxF; i++){
text.push(folder.replace(/#/, i+1));
text.push(dls);

for(var j=0; j<maxL; j++){ 
text.push(link.replace(/#1/, j+1).replace(/#2/, i+1));
}

text.push(dle);
text.push("");
}

text.push(dle);
text=text.join("\n");

var URI="data:text/html;charset=utf-8,";
location.href = URI + text;