5,520
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== One-time == | == Drawings == | ||
=== One-time === | |||
* Remove subdirectories of directory <code>images</code> (see [[mw:Manual:$wgHashedUploadDirectory|$wgHashedUploadDirectory]]) '''Done''' | * Remove subdirectories of directory <code>images</code> (see [[mw:Manual:$wgHashedUploadDirectory|$wgHashedUploadDirectory]]) '''Done''' | ||
* Configure [[User:Nachlass Graphics Bot]]<ref>pywikibot installed in <code>/home/michele/.local/bin</code></ref> '''Done''' | * Configure [[User:Nachlass Graphics Bot]]<ref>pywikibot installed in <code>/home/michele/.local/bin</code></ref> '''Done''' | ||
== For each Ms or Ts == | === For each Ms or Ts === | ||
* Upload files (PNGs and SVGs) using [[mw:Manual:importImages.php|importImages.php]]: in wiki root directory run <code><nowiki>sudo php maintenance/importImages.php import --comment="{{Graphic}}" --summary="{{Graphic}}" --user="MLavazza" --limit=1</nowiki></code> | * Upload files (PNGs and SVGs) using [[mw:Manual:importImages.php|importImages.php]]: in wiki root directory run <code><nowiki>sudo php maintenance/importImages.php import --comment="{{Graphic}}" --summary="{{Graphic}}" --user="MLavazza" --limit=1</nowiki></code> | ||
* Generate description pages: | * Generate description pages: | ||
Line 10: | Line 11: | ||
** Create file <code>descriptions.txt</code> by running custom script <code>process.php</code> on local machine | ** Create file <code>descriptions.txt</code> by running custom script <code>process.php</code> on local machine | ||
* Add description pages using [[mw:Manual:Pywikibot/pagefromfile.py|pagefromfile.py]]: in <code>~/Documents/pywikibot/</code> run <code>sudo python3 pwb.py pagefromfile -notitle -showdiff -force -putthrottle:2 -file:/home/michele/Documents/Nachlass\ Graphics\ website/Description\ files/pages.txt</code> | * Add description pages using [[mw:Manual:Pywikibot/pagefromfile.py|pagefromfile.py]]: in <code>~/Documents/pywikibot/</code> run <code>sudo python3 pwb.py pagefromfile -notitle -showdiff -force -putthrottle:2 -file:/home/michele/Documents/Nachlass\ Graphics\ website/Description\ files/pages.txt</code> | ||
== Figures == | |||
Because html2image is installed in a virtual environment, for it to work, before lauching a Python file such as <code>take-screenshots-loop.py</code>, the venv must be activated by navigating to <code>~/.local/share/pipx/venvs/html2image/bin</code> and running <code>source ./activate</code> | |||
Then, it is possible to navigate to the folder where the Python file is and launch it with <code>python3 take-screenshots-loop.py</code> | |||
== Notes == | == Notes == |