Exporting Bookmarks to Clean HTML
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
Exporting Bookmarks to Clean HTML
I'd like to export my Firefox bookmarks to HTML. The bookmarks.html file is currently at 2mb due to all the propriety code and I found no way of automatically removing that code.
Is there any extension or feature to export my bookmarks in that way, or rather to clean the bookmarks.html file?
Thank you
Is there any extension or feature to export my bookmarks in that way, or rather to clean the bookmarks.html file?
Thank you
-
- Posts: 3826
- Joined: November 14th, 2004, 4:41 am
- Location: Alberta, Canada
- Contact:
It's not because of the proprietary code, it's more likely you simply have a lot of bookmarks with custom favicons. I don't know how to prevent the favicon from being stored, but I think the max size of each favicon is like 16kb.
I'm moving to Theory, everything works there.
Most issues are solved by going through the Standard Diagnostic
Most issues are solved by going through the Standard Diagnostic
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
-
- Posts: 3826
- Joined: November 14th, 2004, 4:41 am
- Location: Alberta, Canada
- Contact:
Remove all the attributes in the "a" element except the href attribute.
and change:
to
and at the very end add:
and change:
Code: Select all
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
to
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Bookmarks</title>
</head>
<body>
and at the very end add:
Code: Select all
</body>
</html>
I'm moving to Theory, everything works there.
Most issues are solved by going through the Standard Diagnostic
Most issues are solved by going through the Standard Diagnostic
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
-
- Posts: 3826
- Joined: November 14th, 2004, 4:41 am
- Location: Alberta, Canada
- Contact:
Use a RegEx find/replace, most modern text editors have this functionality.
I'm moving to Theory, everything works there.
Most issues are solved by going through the Standard Diagnostic
Most issues are solved by going through the Standard Diagnostic
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
- logan
- Posts: 3453
- Joined: May 22nd, 2003, 3:51 pm
- Location: NGC 2403
- Contact:
Code: Select all
<DT><A HREF="http://www.mozilla.com/products/firefox/central.html" ICON="data:image/png;base64,..." LAST_CHARSET="ISO-8859-1" ID="rdf:#$GvPhC3">Getting Started</A>
easily accomplished with perl:
Code: Select all
while(<>) {
s/ICON="[^\"]*" //;
print;
}
or with vi(m):
Code: Select all
:g/ICON="[^\"]*" /s///g
http://www.gozer.org/mozilla/extensions/ for deleteicons.
I disable favicons completely; about:config -> browser.chrome.{favicons,site_icons} -> false.
-
- Posts: 696
- Joined: December 10th, 2003, 1:20 am
To turn bookmark files into valid code, I've had success following these steps.
Start by running the bookmarks through <a href="http://infohound.net/tidy/">HTML Tidy Online</a>. On the web page, above the settings, follow the ">> Advanced" link. Check the box that says "Drop proprietary attributes", then run Tidy.
That'll clean out all the junk except the IDs. (They're standard code.) To get rid of those, I open my tidied file in a text editor that handles regular expressions (in my case, mi), then do a find and replace. In the find box, type...
Make sure the 'replace with' box is empty. Then hit the 'replace all' button.
The addition of a decent doctype, head information, and ending body and html tags should finish up the job.
Start by running the bookmarks through <a href="http://infohound.net/tidy/">HTML Tidy Online</a>. On the web page, above the settings, follow the ">> Advanced" link. Check the box that says "Drop proprietary attributes", then run Tidy.
That'll clean out all the junk except the IDs. (They're standard code.) To get rid of those, I open my tidied file in a text editor that handles regular expressions (in my case, mi), then do a find and replace. In the find box, type...
Code: Select all
id.*"
Make sure the 'replace with' box is empty. Then hit the 'replace all' button.
The addition of a decent doctype, head information, and ending body and html tags should finish up the job.
- scratch
- Posts: 4942
- Joined: November 6th, 2002, 1:27 am
- Location: Massachusetts
- Grist
- Posts: 836
- Joined: January 27th, 2006, 9:20 pm
Load bookmarks.html in Firefox then execute this bookmarklet:
When finished, save as "Web Page, Complete".
Code: Select all
javascript:(function(){ var ls=document.getElementsByTagName('*'); for (var i=0; i<ls.length; i++) {l=ls[i]; l.removeAttribute('id'); l.removeAttribute('last_charset'); l.removeAttribute('icon'); l.removeAttribute('last_modified'); l.removeAttribute('last_visit'); l.removeAttribute('add_date'); l.removeAttribute('personal_toolbar_folder');} alert('Cleanup Complete - Save as Web Page, Complete')})();
When finished, save as "Web Page, Complete".
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm