A quicker way to get thousands of unorganized bookmarks into Zotero collections?
I have more than 3,500 bookmarks that are poorly/unorganized that I want to quickly get into the appropriate Zotero collections. Can anyone think of a way or a tool to quickly organize them into collections that mimic my Zotero collections and upload them to Zotero?
Do you have titles/authors/etc. already, or do you need to retrieve that info during the upload? Are you at least slightly comfortable with a command line?
Assuming you just have URLs but want the complete records as if you'd added them using the browser, I suggest an undocumented API function (https://groups.google.com/g/zotero-dev/c/7a94WUhlQWE/m/hHqiozX6CAAJ) :
curl -d '{ "url": "https://example.com" }' -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" https://api.zotero.org/users/USER_ID/items
You'll need to replace USER_ID with your own (it's not the same as your username) and YOUR_API_KEY with a key with write access. You can get both at https://www.zotero.org/settings/security#applications On Windows, you may also need to replace curl with curl.exe.
Stick it in a loop in your favorite scripting tool to run through your list one at a time, replacing http://example.com and leaving the rest constant.
If you have partial categories, you can use them to chunk your uploads and do an initial sort after each chunk.
If your library has items at the root level that you don't want to get mixed up, I would move them into a collection first, do the upload/sorting, and then put them back. I don't know how to upload to a collection with this route.
This approach imports them as Web Pages. It doesn't run the translator as if you'd hit Save to Zotero while reading the page. I don't know of a no-code way to automate sending them through a translator.
If they're just a list of URLs not browser bookmarks, try a web search for "bookmarks html generator" -- I've never used one but found a couple of options: you paste in your list of URLs and it outputs a bookmarks file like you'd get from Firefox. Then you should be able to import that into Zotero.