oddmu-export - export all pages into one file
The "export" subcommand prints a RSS file containing all the pages to stdout. You probably want to redirect this into a file so that you can upload and import it somewhere.
Note that this only handles pages (Markdown files). All other files (images, PDFs, whatever else you uploaded) are not part of the feed and has to be uploaded to the new platform in some other way.
The **-template** option specifies the template to use. If the template filename ends in *.xml*, *.html* or *.rss*, it is assumed to contain XML and the optional XML preamble is printed and appropriate escaping rules are used.
By default, the export uses the ***feed.html*** template in the current directory.
Export all the pages into a big XML file:
env ODDMU_LANGUAGES=de,en oddmu export > /tmp/export.xml
Alternatively, consider a template file like the following, to generate a JSON feed. The rule to disallow a comma at the end of arrays means that we need to add an empty tag and an empty item, unfortunately:
{ "version": "https://jsonfeed.org/version/1.1", "title": "{{.Title}}", "home_page_url": "https://alexschroeder.ch", "others": [], "items": [{{range .Items}} { "id": "{{.Name}}", "url": "https://alexschroeder.ch/view/{{.Name}}", "title": "{{.Title}}", "content_html": "{{.Html}}", "date_modified": "{{.Date}}", "tags": [{{range .Hashtags}}"{{.}}",{{end}}""], "language": "{{.Language}}" },{{end}} {} ] }
oddmu(1), oddmu-templates(5), oddmu-static(1)
Maintained by Alex Schroeder alex@gnu.org.