How do I import a bookmark html from the command line?
I have a bookmark file that I have exported to an HTML. I am using Firefox 31.4.0 in Linux and I would like to know how I can import the bookmark from the command line. I would not like to use the mouse & pointer to do this as I have to automate creating/placing bookmarks for a kickstart installation of linux
- User Agent: Mozilla/5.0 (Windows NT 6.1; rv:42.0) Gecko/20100101 Firefox/42.0
To open the Bookmarks Manager, press the Alt or F10 key bring up the tool bar, and select Bookmarks. Hot key is <Control>(Mac=<Command>) <Shift> B.
Once the window is open, at the top of the page, press the button labeled Import and Backup. Select Export Bookmarks To HTML, and follow the prompts and save it to a HTML file. Copy the file to another computer. Repeat the instructions above, BUT select Import Bookmarks From HTML,
Firefox can automatically import the bookmarks from a bookmarks.html file in the Firefox profile folder when you delete the places.sqlite files in case there are no compressed .jsonlz4 backups in the bookmarkbackups folder. Firefox normally keeps up to 15 backups (browser.bookmarks.max_backups) in the bookmarkbackups folder.
Deleting the places.sqlite file will also delete the browsing history.
You can use this button to go to the current Firefox profile folder:
- Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
Thanks, but what I am looking for is to do stuff from command line.. like placing some files in certain locations which would mirror what I would normally do using GUI.
I don't think that is possible. Maybe open the Bookmarks Manager (Library) via a modified desktop shortcut by appending -chrome "chrome://browser/content/places/places.xul" to the command line.
32 bit Windows:
- "C:\Program Files\Mozilla Firefox\" -chrome "chrome://browser/content/places/places.xul"