GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - iipc/warc2html: Converts WARC files to static HTML

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
resources/org/netpreserve/warc2html
resources/org/netpreserve/warc2html
 
 
src/org/netpreserve/warc2html
src/org/netpreserve/warc2html
 
 
test/org/netpreserve/warc2html
test/org/netpreserve/warc2html
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 
warc2html.png
warc2html.png
 
 

Repository files navigation

warc2html

Converts WARC files to static html while rewriting links to relative paths suitable for browsing offline or rehosting on a standard web server.

Limitations:

  • Links in JavaScript are not rewritten
  • Assumes there's only one snapshot of each URL in the input
  • Does not handle resource records (yet)

Usage

To convert a file named input.warc.gz to static HTML:

java -jar warc2html.jar -o output/ input.warc.gz

Alternatively, if you'd like to convert a subset of records you can supply a list of records in CDX11 format and the path or URL where the corresponding WARC files are stored:

java -jar warc2html.jar -o output/ -b http://server/warcs/ input.cdx

You can also query a CDX server:

java -jar warc2html.jar -o output/ -b http://server/warcs/ --cdx-server http://cdx-server/collection http://example.com/

Compiling

Install OpenJDK 17 or later and Apache Maven then compile with:

mvn package

File renaming

Files are renamed to remove characters like "?" that are disallowed on some systems. File extensions are updated or added based on the Content-Type header according to these rules.

URLs ending in / will be saved as index.html. Where two WARC records would produce the same filename they are disambiguated by adding a number like ~1, ~2, ~3 to the end of the filename.

License

Copyright 2021-2025 National Library of Australia
License: Apache 2.0

About

Converts WARC files to static HTML

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

60 stars

Watchers

9 watching

Forks

8 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.