wikiedudashboard

https://github.com/wikieducationfoundation/wikiedudashboard

Ruby

Wiki Education Foundation's Wikipedia course dashboard system

RevisionDataParser#parse_revision

Given a single raw json revision, parse it into a more useful format.

Example raw revision input:
  {
    "page_id"=>"418355", "page_title"=>"Babbling", "page_namespace"=>"0",
    "rev_id"=>"641327984", "rev_timestamp"=>"20150107003430",
    "rev_user_text"=>"Ragesoss", "rev_user"=>"319203",
    "new_article"=>"false", "byte_change"=>"121"
  }

Example parsed revision output:
 {
    "revision"=>{
      "id"=>"641327984", "date"=>Wed, 07 Jan 2015 00:34:30 +0000,
      "characters"=>"121", "article_id"=>"418355", "user_id"=>"319203",
      "new_article"=>"false"}, "article"=>{"id"=>"418355",
      "title"=>"Babbling", "namespace"=>"0"
    }
  }

Source | Google | Stack overflow

Edit

git clone [email protected]:wikieducationfoundation/wikiedudashboard.git

cd wikiedudashboard

open lib/revision_data_parser.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-RevisionDataParser-parse_revision-for-pr


# Commit to git

git add lib/revision_data_parser.rbgit commit -m "better docs for RevisionDataParser#parse_revision"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-RevisionDataParser-parse_revision-for-pr

hub pull-request


# Celebrate!