Skip to content

Instantly share code, notes, and snippets.

@DamianZaremba
Last active August 24, 2021 12:28
Show Gist options
  • Save DamianZaremba/d9e2d5da3374711fb4234c8b46ac5b94 to your computer and use it in GitHub Desktop.
Save DamianZaremba/d9e2d5da3374711fb4234c8b46ac5b94 to your computer and use it in GitHub Desktop.
  1. Install MySQL, Golang & Git
  2. Create a schema called cbng_review
  3. Create an OAuth application via https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose
    1. Select OAuth 1.0a
    2. Do not select 'This consumer is for use only by xxxx.'
    3. Enable 'User identity verification only, no ability to read pages or act on a user's behalf.'
  4. git clone https://github.com/cluebotng/reviewng
  5. Within the repo create config.yaml with suitable settings, example below
  6. Import the database tables & seed data
    1. mysql cbng_review < sql/schema.sql
    2. Optionally update the seed data, see sql/README.md
    3. cat sql/data.*.sql | mysql cbng_review
  7. Start the application go run main.go
  8. Call the import endpoint to load pending report entries http://localhost:8080/api/report/import
  9. Login/view the interface http://localhost:8080/
  10. Optionally check there are some report entries loaded http://localhost:8080/api/report/export and/or check there are some calculated stats http://localhost:8080/api/cron/stats
db:
host: 127.0.0.1
user: root
pass:
name: cbng_review
session:
key: <something random>
oauth:
token: <from oauth setup>
secret: <from oauth setup>
wikipedia:
update_stats: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment