Skip to content

gordon-zhao/Chrome_bookmarks_to_json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrome bookmarks to json

Convert exported chrome bookmarks to JSON made by two silly Chinese.

Perequisites

For Python Version:

  • Python 2 or higher installed

For C++ Version

  • You hand and your device, nothing else...

Usage

Python Version

  • 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

C++ Version

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

Examples

  # Python Version
  python html2json.py chromeBookMark.html ToadJiangPlusOneSecond.json

  # C++ Version
  html2json -i chromeBookMark.html -o ToadJiangPlusOneSecond.json

Known Issue

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.

Json Structure:

"Bookmarks":
	{
		"FolderA": 
			{
			"LINK":'BOOKMARK_NAME'
			}
		"FolderB": 
			{
			"LINK":'BOOKMARK_NAME'
			}
		"LINK": 'BOOKMARK_NAME'
	}

Presents

C++ Version : LBYPatrick

Python Version : gordon-zhao


最後に、東條希最高!

About

Convert exported chrome bookmarks to JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published