Difference between revisions of "User:Craftjenn/PWB : Upload several images"

From Ryzom Commons

Jump to: navigation, search
m (création pages)
m (création pages)
Line 25: Line 25:
 
https://www.mediawiki.org/wiki/Manual:Pywikibot/pagefromfile.py
 
https://www.mediawiki.org/wiki/Manual:Pywikibot/pagefromfile.py
 
upload pages to a wiki from a text file (en utf-8).
 
upload pages to a wiki from a text file (en utf-8).
 +
 +
 +
python3 pwb.py  pagefromfile -showdiff -file:pages.txt
 +
 +
pages.txt contient le code:
 +
:<nowiki>{{-start-}}
 +
'''User:Craftjenn/App FR''' les app intégrées, voir [[:fr:Présentation des Webapps]] et  [[:fr:Manuel de l'utilisateur/Diverses astuces#Interface]]
 +
{{-stop-}}
 +
{{-start-}}
 +
'''User:Craftjenn/App EN''' Integrated apps, more on [[:en:Webapps main]]
 +
{{-stop-}}</nowiki>
  
 
== Links ==
 
== Links ==

Revision as of 17:58, 5 May 2020

Comment uploader plein d'images

  1. avoir un site web où sont toutes les images (filezilla) - ici http://www.sitename.org/folder
  2. utiliser un bot (script en pyton)


python imageharvest.py http://www.sitename.org/folder

config

versions python

  • python --version vérifier la version de python, voire python3 --version
  • which python3 voir quelle version py 3 on utilise par défaut

Voir https://cloud.ryzom.com/f/32851

tests

tests add_text

la page doit exister User:Craftjenn/Uploader plein d'images/test import

test checkimages.py

bof https://www.mediawiki.org/wiki/Manual:Pywikibot/checkimages.py

création pages

https://www.mediawiki.org/wiki/Manual:Pywikibot/pagefromfile.py upload pages to a wiki from a text file (en utf-8).


python3 pwb.py pagefromfile -showdiff -file:pages.txt

pages.txt contient le code:

{{-start-}} '''User:Craftjenn/App FR''' les app intégrées, voir [[:fr:Présentation des Webapps]] et [[:fr:Manuel de l'utilisateur/Diverses astuces#Interface]] {{-stop-}} {{-start-}} '''User:Craftjenn/App EN''' Integrated apps, more on [[:en:Webapps main]] {{-stop-}}

Links

https://www.mediawiki.org/wiki/Manual:Pywikibot/imageharvest.py

en:Category:PWB