wget2hugo

Crates.iowget2hugo
lib.rswget2hugo
version0.1.2
sourcesrc
created_at2021-10-26 22:48:52.082422
updated_at2021-10-28 12:36:44.632791
descriptionA small utility for converting a wget backup to markdown
homepagehttps://github.com/alicewriteswrongs/wget2hugo
repositoryhttps://github.com/alicewriteswrongs/wget2hugo
max_upload_size
id472191
size27,773
Alice Pote (alicewriteswrongs)

documentation

README

wget2hugo

This is a program that converts a wget backup of a site into Markdown, which can then be used as content in Hugo or a similar static site generator.

You can create a full backup of a website using

wget \
    --mirror \
    --convert-links \
    $URL

which is great! but if you don't want to merely store that backup or host an exact mirror you'll want to convert that backup to a more manageable format. This program will convert html into Markdown files, and will copy all static files over as well (PDFs, .doc files, images, etc). The goal is to have output which can be immediately popped into a Hugo site's content directory, built, and deployed.

It's written in Rust, using this HTML -> Markdown crate. I wrote a previous version in node.js using turndown, but ran into issues with memory leaks and performance.

Running it

Just do

cargo run --help

and it should print usage information.

Commit count: 37

cargo fmt