Project:Procedure
Drawings
One-time
- Remove subdirectories of directory
images
(see $wgHashedUploadDirectory) Done - Configure User:Nachlass Graphics Bot[1] Done
For each Ms or Ts
- Upload files (PNGs and SVGs) using importImages.php: in wiki root directory run
sudo php maintenance/importImages.php import --comment="{{Graphic}}" --summary="{{Graphic}}" --user="MLavazza" --limit=1
- Generate description pages:
- Download HTML source code of the relevant Ms or Ts and substitute single quotes
- Create file
descriptions.txt
by running custom scriptprocess.php
on local machine
- Add description pages using pagefromfile.py: in
~/Documents/pywikibot/
runsudo python3 pwb.py pagefromfile -notitle -showdiff -force -putthrottle:2 -file:/home/michele/Documents/Nachlass\ Graphics\ website/Description\ files/pages.txt
Figures
Because html2image is installed in a virtual environment, for it to work, before lauching a Python file such as take-screenshots-loop.py
, the venv must be activated by navigating to ~/.local/share/pipx/venvs/html2image/bin
and running source ./activate
Then, it is possible to navigate to the folder where the Python file is and launch it with python3 take-screenshots-loop.py
To upload the files thus generated, upload them to the w/import
folder on the server and using SSH, in the wiki root, run sudo php maintenance/importImages.php import --comment="" --summary="individual figures based on transcription HTML" --user="MLavazza" --limit=1
Notes
- ↑ pywikibot installed in
/home/michele/.local/bin