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
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
|
|
the API token for webmention.io
.
|
|
only ask for webmentions received for specific domain (i.e. example.org
); all the domains associated with the account will be processed otherwise.
|
|
the name of the file to save webmentions to (and read the already backed-up webmentions from). Defaults to webmentions.json
in current directory.
|
|
use the /api/mentions.jf2
endpoint instead of /api/mentions
. The produced JSON will naturally be JF2 in this case.
|
|
don’t create the top-level object in the saved file (i.e. save as an array of webmentions).
|
|
pretty-print (jq
-style) the saved file.
|
|
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.
|
|
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.
|
|
add language filename suffix if the path prefix was removed, only makes sense when using -l
; this way mentions for my.site/en/page
go to ./website/page/webmentions.en.json
, for example.
|
|
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:
- The Go Programming Language Copyright © 2009 The Go Authors