all material needed
commit
c1d99ff821
@ -0,0 +1,2 @@
|
||||
*.icml
|
||||
*.html
|
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
api_querypage="https://pzwiki.wdka.nl/mw-mediadesign/api.php?format=json&action=query&list=categorymembers&cmtitle=Category:LFP_Publication"
|
||||
for page in `curl -s $api_querypage | jq .query[][].title | sed 's/\ /\_/g' | sed 's/\"//g'`
|
||||
do echo $page
|
||||
./wiki2html_icml.sh $page
|
||||
done
|
||||
|
||||
# curl -s "https://pzwiki.wdka.nl/mw-mediadesign/api.php?format=json&action=query&list=categorymembers&cmtitle=Category:LFP_Publication" | jq .query[][].title
|
||||
|
||||
# api_querypage="https://pzwiki.wdka.nl/mw-mediadesign/api.php?format=json&action=query&titles="$pagetitle"&prop=revisions&rvprop=content"
|
||||
# echo $api_querypage $file_wiki
|
||||
# curl -s $api_querypage | jq '.query.pages[].revisions[]."*"' > $file_wiki
|
@ -0,0 +1,12 @@
|
||||
|
||||
Script creates HTML and ICML files from Mediadesign wiki pages under the category `[[Category:LFP Publication]]`
|
||||
|
||||
# Requirements
|
||||
|
||||
* pandoc `brew install pandoc` `sudo apt install pandoc`
|
||||
* jq `brew install jq` `sudo apt install jq`
|
||||
* `brew install curl` `sudo apt install curl`
|
||||
|
||||
# Run
|
||||
|
||||
`./LFP.sh`
|
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
if [ -n "$1" ]; then
|
||||
pagetitle=$1
|
||||
else
|
||||
echo "Wikipage title not supplied as script argument"
|
||||
exit
|
||||
fi
|
||||
|
||||
file_wiki=$pagetitle".wiki"
|
||||
file_icml=$pagetitle".icml"
|
||||
file_html=$pagetitle".html"
|
||||
api_querypage="https://pzwiki.wdka.nl/mw-mediadesign/api.php?format=json&action=query&titles="$pagetitle"&prop=revisions&rvprop=content"
|
||||
echo $api_querypage $file_wiki
|
||||
curl -s $api_querypage | jq '.query.pages[].revisions[]."*"' > $file_wiki
|
||||
|
||||
|
||||
pandoc $file_wiki -f mediawiki -t html -o $file_html
|
||||
pandoc $file_wiki -f mediawiki -t icml -s -o $file_icml
|
||||
rm $file_wiki
|
Loading…
Reference in New Issue