diff --git a/tools/2xep.lua b/tools/2xep.lua index e9383ccc..64ced99e 100644 --- a/tools/2xep.lua +++ b/tools/2xep.lua @@ -1,16 +1,13 @@ --- This is a sample custom writer for pandoc. It produces output --- that is very similar to that of pandoc's HTML writer. --- There is one new feature: code blocks marked with class 'dot' --- are piped through graphviz and images are included in the HTML --- output using 'data:' URLs. +-- XEP output format for pandoc -- --- Invoke with: pandoc -t sample.lua +-- Based on the pandoc sample.lua HTML writer -- --- Note: you need not have lua installed on your system to use this --- custom writer. However, if you do have lua installed, you can --- use it to test changes to the script. 'lua sample.lua' will --- produce informative error messages if your code contains --- syntax errors. +-- Invoke with: pandoc -t 2xep.lua +-- +-- Based on `data/sample.lua` from pandoc. +-- +-- Modifications released under the MIT license. +-- Copyright (C) 2021 Kim Alvefur -- luacheck: globals Blocksep Doc Space SoftBreak Str LineBreak Emph Strong Subscript Superscript SmallCaps Strikeout -- luacheck: globals Link Image Code InlineMath DisplayMath SingleQuoted DoubleQuoted Note Span RawInline Cite Plain diff --git a/tools/xep2md.lua b/tools/xep2md.lua index b3b9d6c6..7e4d6590 100644 --- a/tools/xep2md.lua +++ b/tools/xep2md.lua @@ -1,6 +1,12 @@ #!/usr/bin/env lua5.3 -- XEP to Markdown converter -- +-- Copyright (C) 2021 Kim Alvefur +-- +-- This file is released under the MIT license. +-- +-- Invoke with: +-- xmllint --nonet --noent --loaddtd "$@" | lua5.3 -lluarocks.loader xep2md.lua -- Inlined util.events from Prosody, you may wanna skip ahead ~160 lines -- or so to the main script.