Open main menu

Sarilho1

Joined 12 January 2013
Babel user information
pt-N Este utilizador tem como língua materna o português.
pt-BR-4 Este usuário pode contribuir com um nível quase nativo de português no dialeto brasileiro.
en-3 This user has advanced knowledge of English.
fr-2 Cet utilisateur dispose de connaissances intermédiaires en français.
es-1 Este usuario tiene un conocimiento básico del español.
gl-1 Este usuario ten un coñecemento básico de galego.
Wikidata WikiProject Astronomy No Text Square.svgThis user is a member of
WikiProject Astronomy.
Wikidata Task Force Physics No Text.svgThis user is a member of
WikiProject Physics.
Pwb icon.svgThis user has basic understanding of the Pywikibot.
Users by language

Pywikibot tutorialEdit

  1. Data Harvest: Gathering data from one Wikidata-item;
  2. Winter Storage: Writing data into a file or database
  3. Big Data: Iterating over large sets of items

Program: Chemical Elements (Q11344)Edit

The program runs through all the elements of the Periodic Table (118). It starts with Hydrogen (Q556), by default, and iterates the atomic number, through qualifier P156 in the property P31 with the value Q11344, until a chosen element. By construction, the cycle program will only alter the programs inside the cycle, meaning the first needs to be edit manually. It takes around 9 seconds to make an edit, so it will edit the entire list (118 elements minus hydrogen) in around 17,50 min. I've used the program to:

  • Create a list of the elements by identifier (Q...), which might be used instead of the cycle to achieve better performances.
  • Translate the description to Portuguese and Brazilian Portuguese.
  • Add the aliases 'elemento Z' (Z, atomic number) and the Chemical Symbol of the element in several languages. (Note: It doesn't change aliases that are already there. It only checks which aliases exist and adds a new one if needed.)

Wikidata Query Service CodeEdit