stormrider's code

blog ~ journal ~ doc ~ code ~ home

xpub stands for "cross-publish" – it's not just a conversion tool, but also a cross-publishing tool, written in python. Here are the basic capabilities:

  • pull files from a repository: thus far, it works with github and discourse repositories, though i want to expand it to more.
  • push files to those same repositories, presumably after changing them some
  • converts files from markdown (discourse or daring fireball) to html
  • adds files to a discourse respository

and here are some of the additional features:

  • preserves last-modified timestamp when pulling a file, thus allowing makefiles to work correctly.
  • double-checks last-modified time in the repository version when pushing, and stops if the repo version is more recent
  • converts discourse links to localized html links, by naming files in a predictable way, based on discourse title and topic
  • downloads all images in a discourse set when converting to html, and places them in a local image directory
  • can process conditional documents, a lot like cpp, based on html comment lines bearing "tags"
    – a tag can be any sequence of characters that you can type on the command line
    – multiple tags per commented section can be used
    – tagged sections are included or excluded when pushed, based on command line options

github: xpub

video show-and-tell of an early version: xpub Show-and-Tell, 23 July 2020, by stormrider

Author: root

Created: 2020-08-26 Wed 23:46

Emacs 25.2.2 (Org mode 8.2.10)