Import Firefox bookmarks file as Zotero collection
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
For Zotero 2.1 betas and standalone, use: http://github.com/ajlyon/zotero-bits/raw/master/Bookmarks.js
For Zotero 2.0.9, use: http://github.com/ajlyon/zotero-bits/raw/master/Bookmarks-2.0.9.js and save the file as "Bookmarks.js"
ajilyon, your script doesn't working - i have an error when try to import bookmarks to Zotero
pls check your email for email from me (doctorlans [аt] gmail [d0т] com)
I just managed to import 1050 Firefox bookmarks to Zotero, and even if it's not really a direct way it's quite simple.
First, I imported my bookmarks on Bibsonomy ( http://www.bibsonomy.org/settings?selTab=2 ) Then, they appear in the MyBibsonomy tab and you can export them in BibTex clicking on the corresponding button (it opens a page with lot of text, which you have to copy).
Normally, you can import this directly in Zotero, but for some reason it didn't work for me. So I used another tool (BibDesk) to import my BibTex and export it (RIS worked in Zotero for me).
Conclusion : you can work it out but Zotero definitely need some upgrade here...
I can't say why bibtex import didn't work, I'd suspect a file handling bug in FF5
It should start working again. If this works for you, please post here so that I can submit this change to be pushed to all users.
This version worked on everything that Teodor sent me, and it even creates collections using the categories in the file.
I tried to import my firefox 5.0 bookmarks which i exported as bookmarks.html and bookmarks.json, but I always get the message:
"An Error was reported during import of the file. Please check, whether the file is correct and try again!"
Does anybody knwo what's wrong?
thanks for your answer, here is the link
https://gist.github.com/1173093
thanks a lot
Sure,
report-ID: 905467835
error-text: [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIHttpChannel.getResponseHeader]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: chrome://flashfirebug/content/flashfirebug.js :: :: line 705" data: no]"]
I'm using flashfirebug in version 3.0.3, should I deactivate this addon?
after deactivating flashfirebug, I got the following error message when trying to import bookmarks.html:
Report ID:941463988
JavaScript Error: "nicht wohlgeformt" {file: "moz-nullprincipal:{250ef1c6-128e-47a4-8b64-61e26dea8858}" line: 10 column: 52 source: " Kürzlich als Lesezeichen gesetzt"}]
did you find anything already?
However, I haven't seen a way to convert bookmarks, exported in html format, into zotero, but there are a ton of converters, and zotero will import numerous other formats. It's just a matter of going through an intermediary format.
You can convert to zotero from Endnote, albeit a bit of a complex process, and I'm pretty sure Endnote would import html bookmarks alright.
At the end of the day, I looked at a lot of the documentation and I'm sure I can write a script to do the conversion. Unfortunately, I'm in the red, and this task doesn't exactly help out my finances, so it'll be a while before I can come back to it. Sorry :-/
I've updated the bookmark import translator so it can handle nested directories. See [1].
However, it is a work in progress:
* "LAST_MODIFIED" is not yet parsed (correctly that Zotero will accept it),
* bookmarks from the toolbar are a subcollection inside the top-level collection, not an extra top-level collection.
There are maybe more because I did not test it thoroughly until now. Please help me with it.
It (should) also work with tags for the bookmarks, for example in an export file from delicious.com. Until now, Firefox does not include tags in the HTML export file [2].
Regards,
Dominik
[1] https://gist.github.com/2313088
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=423197
Zotero v.4.0.20
Firefox v29.0
When I attempt to import the aforementioned file, I get the following response, "The selected file is not in a supported format." I submitted a debugging log to the Zotero server, per the feature provided in the Zotero preferences.
I should note that Zotero can import bookmark files in an html format, right out-of-the-box, yet unfortunately the firefox html file only includes bookmark URLs and titles; omitting keywords, tags, and all other available information. It is only via the "backup" feature that firefox will include all the information in an exportable format, but as stated, the default format is JSON.
This information is also stored in the Places.sqlite file in the firefox profile directory, and using an ff add-on, "Places to CSV" (v0.5), I converted that file into a text-based CSV file. Zotero does not like the CSV file, and even if I use another program to save the CSV as an HTML file, Zotero will not have it. That is the odd part as it can import ff's standard bookmark.html file.
I tried ajlyon's translator, even though I am not sure if it is even compatible with Zotero v4, but I did not notice any difference between it, and the default bookmarks.js file in the translators directory.
In any case, I shall keep trying.
It would be possible to write an import translator for the back-up JSON, but you or somone else 3rd party would have to do that.
Zotero cannot (for obvious reasons if you think about it) import random CSV or HTML files.
<DT><A HREF="zotero://debug/" ADD_DATE="1364630040" LAST_MODIFIED="1398957351" SHORTCUTURL="kw1 kw2" LAST_CHARSET="UTF-8">zotero://debug/</A>
<DD>description
"Zotero cannot (for obvious reasons if you think about it) import random CSV or HTML files. "
I was naively hoping that Zotero might be able to handle data imported from database files, which seems to actually be uncommon with such citation and information management systems. In retrospect, that would be an entirely different sort of system, but it would be sort of awesome if Zotero could be given some of that functionality through a plugin.
"It would be possible to write an import translator for the back-up JSON, but you or somone else 3rd party would have to do that."
Yes, it seems I will be going in that direction, maybe hopefully using some of ajlyon's code or something, but I would be new to developing Zotero plugins and translators so I have to read up on the documentation first.
This is really a persistent problem on mozilla's side with their bookmark system that people have been complaining about since forever, but it does not seem like they are going to fix that anytime soon.
Secondary wish: make bookmark import incremental (i.e. don't create duplicates). Currently repeated import of 'bookmarks.html' will create 'bookmarks DATESTAMP', which is better than dumping them all into the same folder, but even better would be to not import bookmarks that are already imported (e.g. look at `LAST_MODIFIED`).