webmention.io-backup

A tool to backup webmentions stored in webmention.io.


The information below may be outdated. For the latest version, check the repository.

webmention.io-backup

a little tool to backup webmentions stored in webmention.io

Build Status codecov Go Report Card

Table of Contents

Help webmention.io-backup get better!

Join the development (or just buy me a coffee, that helps, too).

How

Simpy run in command line with the desired options. For regular backups, set up a cron script or a systemd timer.

Command line options

1
-t [token]

the API token for webmention.io.

1
-d [domain]

only ask for webmentions received for specific domain (i.e. example.org); all the domains associated with the account will be processed otherwise.

1
-f [filename]

the name of the file to save webmentions to (and read the already backed-up webmentions from). Defaults to webmentions.json in current directory.

1
-jf2

use the /api/mentions.jf2 endpoint instead of /api/mentions. The produced JSON will naturally be JF2 in this case.

1
-tlo=false

don’t create the top-level object in the saved file (i.e. save as an array of webmentions).

1
-p

pretty-print (jq-style) the saved file.

1
-cd [directory]

look in the directory for the directory structure that represents the website’s structure and try to save webmentions to the individual files (one for each page) in this directory structure; useful for saving webmentions into the source tree of an SSG project.

1
-l [list]

list of comma-separated top-level directories to ignore when using -cd; with -cd ./website -l en,fr both webmentions for my.site/en/page and my.site/fr/page/ will be saved to ./website/page/webmentions.json instead of separate directories.

1
-ts

when using -cd, store a timestamp in the root directory and avoid re-fetching webmentions before that timestamp.

Development

Issues reports and pull requests are always welcome!

Credits

This software includes the following software or parts thereof:

Comments can be sent as webmentions or by email.