pump-io / pump.io

Social server with an ActivityStreams API
http://pump.io/
Apache License 2.0
2.22k stars 332 forks source link

Automatically update FSF free software directory metadata #1303

Open strugee opened 7 years ago

strugee commented 7 years ago

To be clear, this would be done during npm version runs

strugee commented 7 years ago

From @ian-kelling on IRC:

\ what the api will give you is: a call to download latest page, and a call to upload a new revision. to make the change in the new revision, you're going to have to do a sed type operation on the wikitext for a line that looks like "|Version identifier=0.2-4". The reason you have to do that is that the info is stored in structured way using semantic mediawiki (a plugin to mediawiki), but it's api only allows querying, not making changes. \ There is an api client which is the easiest way to do it \ This is the most succinct example of how to use it to upload a new page \ https://ofswiki.org/wiki/Mediawiki_Setup_Guide#Additional_Configuration_with_Pywikibot \ And, from my notes, an even slightly more succinct example for doing the setup for the fsd \ git clone --recursive \ \ https://gerrit.wikimedia.org/r/pywikibot/core.git \ cd pywikibot \ mwdomain=directory.fsf.org \ mwfamily=fsfd \ wikiuser=IanK \ dd of=user-config.py \<\<EOF \ mylang = 'en' \ usernames["$mwfamily"]['en'] = u'$wikiuser' \ family = "$mwfamily" \ console_encoding = 'utf-8' \ password_file = "secretsfile" \ EOF \ # uncomment this, put your own info in $wikipass \ https://paste.debian.net/925951/ \ That link doesn't have the get & post, the earlier link just has the post, the getting started guide should lead you for how to do the get. \ No need to do it now, you might just want to save that info somewhere for later \ Or whatever \ neat, thanks very much! I've looked into Semantic MediaWiki before, seems really cool \ mind if I copypasta all that onto GitHub? \ ya, go for it \ i got throttled, so thats why the pastebin link, stuff before that was cutoff \ lol np \ thanks!

strugee commented 7 years ago

Also maybe worth doing: Wikipedia