oddmu-export(1)

Name

oddmu-export - export all pages into one file

Synopsis

Description

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.

Files

By default, the export uses the ***feed.html*** template in the current directory.

Examples

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}}
    {}
  ]
}

See also

oddmu(1), oddmu-templates(5), oddmu-static(1)

oddmu(1)

oddmu-templates(5)

oddmu-static(1)

Authors

Maintained by Alex Schroeder alex@gnu.org.

alex@gnu.org