I am working on a Python script that converts this:
foo bar
In it:
[[Component foo]] [[bar]]
The script checks (on the input line) if the Component foo page exists. If it exists, a link to this page is created; if it does not exist, a direct link is created.
The problem is that I need a quick and cheap way to check if there are many wiki pages. I do not want (try) to load all the Component pages.
I already figured out a quick way to do this manually: edit the new wiki page. paste all the links of the “component” to the page, click “Preview”, and then save the resulting HTML preview page. As a result, the HTML file contains a different link for existing pages than for non-existent pages.
So, to rephrase my question: how to save the media preview page in Python?
(I do not have local access to the database.)
source share