Convert exported chrome bookmarks to JSON made by two silly Chinese.
For Python Version:
- Python 2 or higher installed
For C++ Version
- You hand and your device, nothing else...
-
Run the following Command:
python html2json.py path_to_bookmark.html path_to_save_json.json
-
(Add sudo if writting to a path that needs root permissions)
-
Or
python html2json.py
, enter the path to exported bookmark, then enter the path for saving the json file
Use it just like a Linux software, call the program with parameters:
-i or --input-file Specify source file. i.e. Your bookmark HTML file exported from Google Chrome.
-o or --output-file Specify output file name. i.e. ToadJiangPlusOneSecond.json
# Python Version
python html2json.py chromeBookMark.html ToadJiangPlusOneSecond.json
# C++ Version
html2json -i chromeBookMark.html -o ToadJiangPlusOneSecond.json
In Python Version, because Chrome does not count "Other bookmarks" as a bookmark folder in the exported html file, the folders under "Other bookmarks" will be under "Bookmarks" folder.
"Bookmarks":
{
"FolderA":
{
"LINK":'BOOKMARK_NAME'
}
"FolderB":
{
"LINK":'BOOKMARK_NAME'
}
"LINK": 'BOOKMARK_NAME'
}