git ssb

0+

cel / ssb-wikimedia



Branch:
Charles E. Lehner committed Support /wikimedia/ prefixLatest: c088bad on 2/14/2021, 8:46:31 PM
📄LICENSE
📄README.md
📄bin.js
📄notes.txt
📄package.json
📄usage.txt
README.md

ssb-wikimedia

Wikimedia to Secure Scuttlebutt bridge. Sync revisions from Wikimedia pages into SSB.

CLI

Usage: ssb-wikimedia-sync [-y] [-n] [-h] [<url>...]

Options:
  -y  Yes mode. Publish messages without prompting for confirmation.
  -n  Dry run. Output message draft JSON instead of publishing them.
  -h  Help mode. Output usage text and exit.

If URLs are not given on the command-line, they are read line-by-line from a file in the SSB directory: ~/.ssb/wikimedia-pages.txt
Lines in that file starting with "#" are considered comments and skipped. Blank lines are also skipped.

Schema

type: wikimedia/revisions

The message content is as returned from the Wikimedia Query/Revisions API, with the following change:

Example:

{
  "type": "wikimedia/revisions"
  "pageid": 77777777,
  "ns": 0,
  "site": "https://en.example.org/",
  "title": "Article Title",
  "pageId": "&...sha256",
  "parents": [
    "%...sha256",
  ],
  "revisions": [
    {
      "revid": 999999999,
      "parentid": 999999998,
      "user": "Username",
      "userId": "&...sha256",
      "timestamp": "2019-11-22T00:00:00Z",
      "roles": [
        "main"
      ],
      "slots": {
        "main": {
          "size": 0,
          "sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
          "contentmodel": "wikitext",
          "contentformat": "text/x-wiki",
          "*": "&47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=.sha256"
        }
      },
      "comment": "Example edit summary",
      "tags": []
    }
  ]
}

Config

{
  "wikimedia": {
    "contact": "example@example.org",
    "bot": false
  }
}

References

License

Copyright (C) 2019-2020 Charles E. Lehner

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Built with git-ssb-web