X-Git-Url: https://git.wikimedia.ca/?a=blobdiff_plain;f=README;h=f6c6fd48d226008053938d38f17301ad7c608457;hb=841ebb7ac88358738d28a2f096c031de51c685ad;hp=9c0fe34c404fb0b2335bc3b05c196c36517adc2b;hpb=12f5a3f91fffcdf4f6f13bf153bbeb828d503d82;p=eccc_to_commons.git diff --git a/README b/README index 9c0fe34..f6c6fd4 100644 --- a/README +++ b/README @@ -24,6 +24,8 @@ eccc_fixer.xslt fix upstream data XML file 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: @@ -68,7 +70,7 @@ Here are a few examples to inspire you: Keep only monthly data: $ cat downloads_all | grep -B1 -A1 --no-group-separator \ - -E '^output = ".*/monthly/[0-9]*.xml"$' > downloads_monthly + -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' \ @@ -144,4 +146,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.