Skip to content
HEC - Html Export Compiler
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

HEC - Html Export Compiler

This is essentially just a build script written in BASH-script. It compiles together the HTML export for an OSF document which resides at a ShowPad.

In order to do so, it requires a parameter $padname to be specified upon invocation. It invokes the specified pad's content, calls the parser of SimonWaldherr to parse the content, and prepends the HEADER data. Additionally it sorts the resulting file into the "podcasts" directory and calls the browser to present the HTML file.


Mainly GNU Linux. Most notably GNU bash, followed by GNU sed, GNU dc, and a lot of other commands which are shipped with a GNU Linux distro. I use the default Ubuntu to run the script. Trying to run the script on a Mac will probably fail, due to that the implementations of grep, sed, dc, and mktemp (among others) differ.


GNU GPL version 3.


HEC requires the Repository which can be found under shownotes/

HEC comes with a config file .hec_config. You can set the path to where you put the directory right after out_dir=. The line include= is only relevant, when you don't have all the HEC's files in one directory, or if you are running from a different directory (such would also be the case, if you did put it into a sub folder). The other configuration options don't need to be altered for the script to run.

Example setup configuration:

I have my script at /home/quimoniz/github/hec/ the other HEC files are also in that directory, my directory is at /home/quimoniz/github/ so I put in my configuration file:


If I fancy to run from within my directory, I should instead use absolute paths:


Previous to this release HEC was distributed as utilsh.tar.gz, which was put in a sub folder of the directory. It is still possible to set up HEC the old fashioned way. In order to do so, it is good practice to use absolute paths in the config file as mentioned above, like so include=/home/quimoniz/github/ Note, that in this case you will also have to add .hec_config to the .gitignore file in your directory.


Once set up, just invoke it with a pad name. For example bash einschlafen-230.

The script then requests the pad's contents, parses them, assumes a path name for the HTML output, writes to to it, and invokes the browser to present a preview.

Note that you may also specify an additional parameter --preview which adds a warning label to the output, stating that it is still in revision.

Security Considerations


I assume it can be easily exploited by inserting code into the external text source. However, I will give out a reward of 20 Euros to anyone who can first show a particular vulnerability, and tell me how to fix it.


The script won't do anything if the OSF has no HEADER

header fields:

podcastmandatoryname to use for looking up the podcast's "slug"
episodemandatoryonly used to figure out the episode number
podcastermadatorylist of podcasters, will be passed to ""
shownotermandatorylist of shownoters, will be passed to ""
starttimeoptionalfor header field "Sendung vom"
actual-starttimeoptionalmay override "starttime" if specified
webseiteoptionalthe podcast's web page
episodepageoptionalthe specific episode's page
episodetitleoptionalthe specific title of this particular episode
chatlogdeprecatedan optional link to a chat log, as has been used for NSFW (has to be enabled in config)
You can’t perform that action at this time.