X-Git-Url: https://git.wikimedia.ca/?a=blobdiff_plain;f=README;h=9cf1c30a83e588faad07f6019815b565e2823436;hb=b5333d25fa9bb69099ff6483b9c6aff2f5862b54;hp=ee13ba54500af8426a97fcf5c0d9619eaa7e8899;hpb=c4fdff03a380cd239b55e8d5f57817b967d1449d;p=eccc_to_commons.git diff --git a/README b/README index ee13ba5..9cf1c30 100644 --- a/README +++ b/README @@ -12,8 +12,7 @@ distribution. In addition to coreutils, prerequisites are: - Xmlstarlet - Jq -This repository is sponsored by Environment and Climate change Canada and -Wikimedia Canada. +This repository is sponsored by Wikimedia Canada. Provided scripts, ordered by chronological usage: @@ -25,6 +24,7 @@ commons_rules.xsd validate ECCC XML from a Wikimedian point of view eccc_to_commons.sh transform ECCC XML files into JSON monthly_to_commons.xslt transform ECCC monthly XML file into JSON almanac_to_commons.xslt transform ECCC almanac XML file into JSON +mediawiki_post.sh upload directory to a Mediawiki Usage: @@ -72,8 +72,8 @@ Keep only monthly data: -E '^output = ".*/monthly/[A-Z0-9]{7}.xml"$' > downloads_monthly Remove all downloads before (restart interrupted download): - $ sed -n '/https:\/\/climate.weather.gc.ca\/climate_data\/bulk_data_e.html?format=xml&timeframe=3&stationID=2606/,$p' \ - downloads_all > download_continue + $ sed -n '/https:\/\/climate.weather.gc.ca\/climate_data\/bulk_data_e.html?format=xml&timeframe=3&stationID=2606/,$p' \ + downloads_all > download_continue 1.3 Download wanted files @@ -145,4 +145,11 @@ conversion. 5. Upload to destination -Not done yet. +It's now time to share our work with the world and that's the purpose of the +mediawiki_post.sh script. + + $ ./mediawiki_post.sh "${COMMONS_CACHE}" + +It takes the commons cache as parameter: its file hierarchy will be replicated +on commons. On first run, it will ask credentials for the Mediawiki account to use to +perform the import.