Skip to content

About

Convert Safari Bookmarks HTML page to organized markdown file.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Safari Bookmarks to Markdown Converter

Overview

This Python script, convert.py, is designed to convert Safari bookmarks exported in HTML format into a neatly organized Markdown file. The script parses the HTML file, extracts bookmarks and their folder structure, and outputs them in Markdown format, maintaining the folder hierarchy.

Requirements

  • Python 3
  • BeautifulSoup4

Installation

  1. Ensure Python 3 is installed on your system.
  2. Install BeautifulSoup4, if not already installed:
    pip install beautifulsoup4

Usage

  1. Export Bookmarks from Safari:

    • In Safari, go to File > Export Bookmarks... and save the HTML file.
  2. Run the Script:

    • Execute the script in the terminal by navigating to the script's directory and running:
      python convert.py [input_html_file] [output_markdown_file]
    • Replace [input_html_file] with the path to your exported HTML file (as a string).
    • Replace [output_markdown_file] with the desired path for the Markdown output (as a string).

Troubleshooting

  • Ensure that the HTML file is exported correctly from Safari.
  • If the script fails to run or produces unexpected output, check the HTML file format and ensure it matches the expected bookmark export format of Safari.

License

This script is released under the MIT License.

About

Convert Safari Bookmarks HTML page to organized markdown file.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages