netscape_bookmark_parser

Crates.ionetscape_bookmark_parser
lib.rsnetscape_bookmark_parser
version
sourcesrc
created_at2025-01-19 04:18:54.130672
updated_at2025-01-19 04:38:19.37569
descriptionA Netspace bookmark parser for Rust
homepagehttp://dnrops.gitlink.net
repositoryhttps://gitlab.com/andrew_ryan/netscape_bookmark_parser
max_upload_size
id1522523
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
zinso (zinso)

documentation

https://docs.rs/netscape_bookmark_parser

README

netscape_bookmark_parser

Crates.io Rust license

netscape_bookmark_parser

Introduction

netscape_bookmark_parser is a Rust crate designed to parse HTML bookmark files (commonly exported from web browsers) and convert them into a structured JSON format. This crate provides functionality to read, parse, and transform bookmark data, making it easier to work with bookmarks programmatically.

Features

  • HTML Bookmark Parsing: The crate can parse HTML files that contain browser bookmarks, extracting folder structures and individual bookmarks.
  • Timestamp Conversion: It handles the conversion of Unix timestamps to Windows NT timestamps, ensuring accurate date representation.
  • JSON Output: The parsed data is converted into a JSON structure, which can be easily integrated into other applications or stored for further processing.
  • Error Handling: Robust error handling ensures that issues with file paths or malformed HTML are gracefully managed.

Usage

To use netscape_bookmark_parser, you can add it as a dependency in your Cargo.toml file:

cargo add netscape_bookmark_parser

Then, you can call the run function to process an HTML bookmarks file and output the result as a JSON file:

use netscape_bookmark_parser;
fn main() -> std::io::Result<()> {
    netscape_bookmark_parser::run("input.html", "output_directory")?;
    Ok(())
}

install as CLI

cargo install netscape_bookmark_parser
# example
netscape_bookmark_parser -d html2json -i .\bookmark.html -o ./
netscape_bookmark_parser -d json2html -i .\bookmark.json -o ./
Commit count: 0

cargo fmt