Scripts
Ready-To-Run Python Scripts
Is it possible to supply fully functioning Python scripts that can be run just by clicking them? Let's see.
We'll need two prerequisites:
- Python must be installed
- you must create a local script “api_parms.py”
user_key = 'your-wiki-userid:your-api-key
site = 'your-wikidot.site'
(optional) category = 'your-category'
and save it to a path, that allows Python scripts running in any working directory to import it with import api_parms
If you don't have your API key yet, post to the Wikidot XML-RPC API discussion thread and request one.
Suggested Python scripts are:
Note: Very preliminary stuff here
- Site Statistics: number of pages, number of categories, pages per category, category woth most/least pages, biggest page, smallest page, total number of unique tags, number of pages with tags, page with most tags, etc.
- Site Analysis: a script that analyzes things that are difficult to find out otherwise, e. g. a list of pages without tags, broken links
- Site Dump: Site Managers' “Backup” function has a lot of restrictions — this script should dump everything that is available through the API and output it into CSV for easy analysis in e. g. Excel
View it | Download or run it Warning: Never run a script from a source that you do not trust
For the first two suggested scripts, the output would be in Wikidot syntax that the script — as soon as page.save() starts working — would directly save to a Wikidot site statistics/analysis page. In the meantime you'd have to manually save the output to that page.
The “Site Dump” script's output would be CSV.