Convert json-formatted Chrome bookmarks file to html

How can I convert jones files from bookmarks (taken from / Library / Application Support / Google / Chrome / Default / Bookmarks) to html bookmarks file so that Google Chrome can import it?

+11
source share
3 answers

@ Mr.P more or less answered this in the comments, but let me formalize:

In my example, I have a current (root OS) drive named C:\\ . I have a F:\\ drive with a previous Chrome installation from which I want to get bookmarks.

I did it in Powershell, but you could easily do it in Explorer, you just need to either enter the path to <drive_name>:\\users\<account_name>\appdata / show hidden folders.

  1. close all Chrome instances that are currently running (perhaps check the process monitor to make sure all processes are complete).

  2. go to <storage_drive_letter>:\\users\<account_name>\appdata\local\google\chrome\default .

  3. In PowerShell, you must select the previous installation bookmark file by entering $books = Get-Item bookmarks . In a conductor you would "cut out"

  4. cd <os_drive_letter>:\\users\<account_name>\appdata\local\google\chrome\default or follow this path in Explorer

  5. mv $books. or paste the file

  6. open Chrome again and check the bookmarks: they should be visible all together.

  7. [optional] If you are brave, close all Chrome windows again (potentially save both files somewhere else before doing this), delete all bookmarked files at the beginning (you can use gci | where {$_.name -like "bookmarks"} | rm ) then open the browser again. On your file system, Chrome should automatically convert bookmarks to a single file.

If this does not work for other people, let me know

+2
source

If for any reason you only have JSON output from the Chrome bookmarks file, don't worry. Chrome will export bookmarks as HTML and import as HTML. But sometimes you cannot afford to export from Chrome due to problems with your Windows installation. But you are resourceful and can at least get access to your Windows file system.

So, on Windows (this was tested on Win 10) all you have to do is show hidden files and folders, and then copy, paste and overwrite the bookmarks file at:

C: \ Users \ Your username \ AppData \ Local \ Google \ Chrome \ User Data \ Default

0
source


');close();}})(); Thanks to dickvl clickable links, the result is Save the web page is completed, save .htm

Save .json to the desktop, drag the browser window less from the bottom right until you can drag .json into the open window., Double-click the window title to restore the browser to its full size. On the tab that opens with .json data, click the bookmarklet. Another tab should open with links. You can save as .htm by right-clicking the "save page as" web page completed.

Anywhere in the window that opens, for example, when you drag a shortcut or HTML, it will open

You can also do File> Open File> .json> open

Using json

Back up your bookmarks as a JSON file. Delete bookmarks you don't need. Export the necessary files to an HTML file. Restore bookmarks using a JSON file. To add them to a JSON file in a text editor. Create lines by finding and replacing ', {"title' with 'return {" title' (Do not enter single quotes and in the replacement field use the appropriate replacement for return: ΒΆ or \ r, for example. My search looked like this: Find :, {"title Replace: \ r, {" title Replace All gave me strings instead of a continuous stream of text. Save the file as text and open it in a spreadsheet. Each bookmark will have its own site name, URLs and other data are listed in columns Create a bookmark by copying the URL, pasting it into Firefox and going to the website. Drag the URL from the toolbar. trumentov to the desired location on the side panel. bookmark name, if you do not like the title, the designated Web site. Repeat if necessary.

-1
source

Source: https://habr.com/ru/post/1237275/


All Articles