Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

combining bookmarks .html files, and sorting

  • 8 отговора
  • 3 имат този проблем
  • 1 изглед
  • Последен отговор от cor-el

more options

Hi,

(1) I know how to import bookmarks, but, once I import all of my bookmark .html files, (have 6)... than I go to show all bookmarks, I have 6 "unsorted bookmarks" folder tabs, and one "unsorted bookmarks" tab of my current bookmarks. How do I combine all of these into 1 giant .html file? Or is it automatically combined once I imported, to where I can export and it'll have all 6 old .html files and my current bookmarks?

(2) I know how to sort bookmarks, and I like sorting by "location", but is there a way to export as .html file so it saves the .html book mark file by "location"?

(3) In the .html file there is some sub description for each bookmark, such as "Twitter is a social networking site, where users tweet to other users blah blah", is there any way to delete this? I'd like it only to display the bookmark name and the URL (usually I'll have to click on the name and it'll open up the website), but I like the website to be typed out.

Hi, (1) I know how to import bookmarks, but, once I import all of my bookmark .html files, (have 6)... than I go to show all bookmarks, I have 6 "unsorted bookmarks" folder tabs, and one "unsorted bookmarks" tab of my current bookmarks. How do I combine all of these into 1 giant .html file? Or is it automatically combined once I imported, to where I can export and it'll have all 6 old .html files and my current bookmarks? (2) I know how to sort bookmarks, and I like sorting by "location", but is there a way to export as .html file so it saves the .html book mark file by "location"? (3) In the .html file there is some sub description for each bookmark, such as "Twitter is a social networking site, where users tweet to other users blah blah", is there any way to delete this? I'd like it only to display the bookmark name and the URL (usually I'll have to click on the name and it'll open up the website), but I like the website to be typed out.

Всички отговори (8)

more options

-1-
Yes all those bookmarks.html files will be merged into Firefox, and when you 'export' from Firefox those 6 files will be in one html file. No those extra 'unsorted bookmarks' folders won't be automatically combined, you need to do that yourself.

-2-
No, 'location' sorting isn't reflected in an exported bookmarks.html file. That type of 'sort' is temporary in the Library view, and doesn't rearrange bookmarks in the places.sqlite file which is what is exported in html format.

Save this code as a Bookmarklet and click on it to make an HTML page editable.
 javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200

Once the page is 'editable', you will be able to cut and paste bookmarks from one place on the page to another.

-3-
This code when run in the URL bar (or saved as a bookmarklet) while a bookmarks.html file is being displayed in Firefox will strip the extraneous information from that bookmarks file. Just save the bookmarks file when the 'strip' is completed.

javascript:%20(function(){%20var%20ls=document.getElementsByTagName('*'),%20lsl=ls.length;%20for%20(var%20i=0;%20i<lsl;%20i++)%20{l=ls[i];%20l.removeAttribute('id');%20l.removeAttribute('last_charset');%20l.removeAttribute('icon');%20l.removeAttribute('ICON_URI');l.removeAttribute('last_modified');%20l.removeAttribute('last_visit');%20l.removeAttribute('add_date');%20l.removeAttribute('personal_toolbar_folder');}%20var%20e=document.getElementsByTagName('dd');%20el=e.length;%20for(var%20i=el-1;i>=0;i--)%20e[i].parentNode.removeChild(e[i]);%20alert('Cleanup%20Complete%20-%20Save%20as%20Web%20Page,%20Complete\n'+'('+lsl+'%20bookmarks,%20'+el+'%20descriptions)')})();

- brief explanation of Bookmarklets -
http://www.bookmarklets.com/
http://en.wikipedia.org/wiki/Bookmarklet

more options

Sorry I am very lost on this part:

Save this code as a Bookmarklet and click on it to make an HTML page editable.

javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200


do I type that javascript into the box where I put website URL? And how do I do a bookmarklet, it says to drag it to my bookmarklet place, what do I drag?

more options

Easiest is to import each of the bookmark HTML backups in Firefox in the Library.

  • Bookmarks > Show All Bookmarks > Import & Backup > Import Bookmarks from HTML

This should place them in the correct folders.
You can also create a new profile and do the import in this profile.
Then you can check the result and if it is OK then you can export them all once again to one HTML backup.

more options

Hi,

That doesn't answer my question. I have multiple .html files. I know how to import them. I am asking how can I sort the bookmarks inside each .html file? One person said use bookmarklet , but I am not sure how to do that, nor am I able to find directions.

more options

I think the implication of cor-el's post is that Firefox can sort the bookmarks as bookmarks more easily than you could sort the contents of a static HTML file. the-edmeister's bookmarklet changes the static HTML to editable, so you could manually edit the file. But this is far from an automated sorting solution.

Note: to create a bookmarklet, see the steps in this post as an example (skim down to the third heading): https://support.mozilla.org/en-US/questions/940979#answer-379216

more options

Yes. You would have to merge all 6 HTML files manually in a text editor or by making the file editable in Firefox or rich text editor area and merge each of the main sections to their corresponding main folder (Bookmarks Toolbar folder, Bookmarks Menu folder, Unsorted folder). This would be a lot of work that Firefox should do automatically if there aren't any problems. I can't guarantee this, but it shouldn't be to difficult to use cut and paste to merge multiple main folders.

more options

You can brute force flatten your bookmark folders using SQLite Manager. This leaves them without proper sequence numbers so the order may be arbitrary.

UPDATE moz_bookmarks
SET parent = 2
WHERE type = 1 and parent > 4

Please do not run this on a currently active profile since the consequences may be unpredictable.

more options

This bookmarklet will extract all the links from a file opened in a tab and sort them by name or alternatively by href (BM=BM.sort(soh))

(function(){
function bm(h,t){with(this){href=h;name=t}}
bm.prototype={href:"",name:""};

function soh(a,b) {return(a.href>b.href)}
function son(a,b) {return(a.name.toLowerCase()>b.name.toLowerCase())}

var BM=[],T=[]; T.push("<html><body>");
var e=document.querySelectorAll("a[href]");
for(i=0;E=e[i];i++){ BM.push(new bm(E.href,E.innerHTML));}
BM=BM.sort(son);

for(i=0;B=BM[i];i++){T.push('<a href="'+B.href+'">'+B.name+'</a>');}
T.push("</body></html>");
window.location="data:text/html;base64,"+btoa(T.join('\n<br>'));
})()