Skip to content

Transform local dumped compressed copy of articles (xml.bz2) + index.bz2) to epub #116

Description

@silbinarywolf

What would change in wiki2book?

Sub Issue 1
Add support for generating an epub from Wikimedia database dump XML and associated index file. (Links at bottom of issue)

wikipedia-host configured to point at file:/enwiki-20260701-pages-articles-multistream.xml.bz2, it then also looks for an associated enwiki-20260701-pages-articles-multistream-index.txt.bz2 file automatically.

{
  // Loads `./enwiki-20260701-pages-articles-multistream.xml.bz2` and `enwiki-20260701-pages-articles-multistream-index.xml.bz2``
  "wikipedia-host": "file://enwiki-20260701-pages-articles-multistream.xml.bz2"
  // List articles you want as normal
  // "articles": []
}

Sub Issue 2
Related to this, I also want a directive to convert all articles into 1 epub. Maybe this can be limited to localhost servers and files only. This might be unreasonable but I don't think Sub Issue 1.

{
  "articles": [":all_articles"]
}

What's the motivation behind this change?

Why is this useful to others?

It allows local database dumps of wikipedia to be converted to ebooks as needed. Being able to do this regardless of API limits / whether the internet is down or up.

Why do I personally want it?

  • I have a Kindle Paperwhite Gen 12 w/ 32GB (has ~25GB of free space right now)
  • I want to at least attempt to convert as much of Wikipedia as possible (if not all of it) to an epub, then azw3, then just put it on my Kindle.

What existing parts of wiki2book might be influenced by this change?

  • Sub-Issue 1: Config needs updating to support pointing at files instead of hosts: wikipedia-host
  • Sub-Issue 2: Add directive for targetting all articles

What alternatives are there?

Not from my googling, but I'm very happy to be proven wrong.

Additional context

Data dump of all of wikipedia

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions