remove quotes and categories

master
Castro0o 5 years ago
parent c1d99ff821
commit ac4b90a01d

@ -2,6 +2,7 @@
api_querypage="https://pzwiki.wdka.nl/mw-mediadesign/api.php?format=json&action=query&list=categorymembers&cmtitle=Category:LFP_Publication" api_querypage="https://pzwiki.wdka.nl/mw-mediadesign/api.php?format=json&action=query&list=categorymembers&cmtitle=Category:LFP_Publication"
echo $api_querypage
for page in `curl -s $api_querypage | jq .query[][].title | sed 's/\ /\_/g' | sed 's/\"//g'` for page in `curl -s $api_querypage | jq .query[][].title | sed 's/\ /\_/g' | sed 's/\"//g'`
do echo $page do echo $page
./wiki2html_icml.sh $page ./wiki2html_icml.sh $page

@ -11,9 +11,9 @@ file_icml=$pagetitle".icml"
file_html=$pagetitle".html" file_html=$pagetitle".html"
api_querypage="https://pzwiki.wdka.nl/mw-mediadesign/api.php?format=json&action=query&titles="$pagetitle"&prop=revisions&rvprop=content" 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 echo $api_querypage $file_wiki
curl -s $api_querypage | jq '.query.pages[].revisions[]."*"' > $file_wiki curl -s $api_querypage | jq '.query.pages[].revisions[]."*"' | xargs | sed 's/\[\[.*\]\]//g' > $file_wiki
pandoc $file_wiki -f mediawiki -t html -o $file_html echo `cat $file_wiki` | pandoc -f mediawiki -t html -o $file_html
pandoc $file_wiki -f mediawiki -t icml -s -o $file_icml echo `cat $file_wiki` | pandoc -f mediawiki -t icml -s -o $file_icml
rm $file_wiki # rm *.wiki
Loading…
Cancel
Save