Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bookmarkdown

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bookmarkdown

Parse your browser's exported HTML bookmark file to Markdown.

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

bookmarkdown

Parse your browser's exported HTML bookmark file to Markdown.

Supported browsers: Brave.

Installation

pip install bookmarkdown

Usage

CLI

# Convert "bookmarks.html" to markdown and output to STDOUT
btm bookmarks.html

# Convert "bookmarks.html" to markdown and write to "bookmarks.md"
btm --output=bookmarks.md bookmarks.html

# Alternatively
btm bookmarks.html > bookmarks.md

Python

The BookmarkHTMLParser is an instance of the Python standard library's HTMLParser and thus supports all its methods.

from bookmarkdown import btm

parser = btm.BookmarkHTMLParser()
parser.feed(html_content)

# Access the data
parser.data

FAQ

Concerns

  • Minimal dependencies. bookmarkdown is likely to be installed on the system level Python to make use of the btm script.
  • Correctness. No one likes to lose a bookmark nor a different ordering.

Future ideas

The current application solves my needs pretty well, but there are additional applications I can think of. Such as merging multiple bookmark files.

Add functionality to the CLI and Python codebase to support the following:

# Merge bookmark html-file into existing markdown file.
btm --merge=[md-file] [html-file]

btm [html-file]  # already implemented

# Read the `-r` as "reverse", i.e. instead of bookmark to markdown it
# becomes markdown to bookmark.
btm -r [md-file]

btm -r --merge=[md-file] [html-file]

Project structure

The project structure was automatically set up using cookiecutter and my Python template: cutter-py.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc