Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:wikibaseintegrator [2025/02/10 05:36] – [Test] darrontools:wikibaseintegrator [2025/02/11 07:30] (current) darron
Line 1: Line 1:
 ====WikibaseIntegrator==== ====WikibaseIntegrator====
  
-[[https://github.com/LeMyst/WikibaseIntegrator|WikibaseIntegrator]] is a python package designed to interact with Wikibase. It's a fork of [[https://github.com/SuLab/WikidataIntegrator|WikidataIntegrator]].+[[https://github.com/LeMyst/WikibaseIntegrator|WikibaseIntegrator]] is a python package written to interact with Wikibase and Jupyter notebooks. It's a fork of [[https://github.com/SuLab/WikidataIntegrator|WikidataIntegrator]].
  
 ===Clone=== ===Clone===
Line 7: Line 7:
 <code> <code>
 git clone --recursive https://github.com/LeMyst/WikibaseIntegrator git clone --recursive https://github.com/LeMyst/WikibaseIntegrator
-</code> 
- 
-Perform operations inside the repository directory. 
- 
-<code> 
 cd WikibaseIntegrator cd WikibaseIntegrator
 </code> </code>
Line 24: Line 19:
  
 ===Test=== ===Test===
 +
 +<code>
 +source ~/.venvs/wikibaseintegrator/bin/activate.csh
 +</code>
  
 <code> <code>
Line 30: Line 29:
  
 <code> <code>
-#! /home/USERNAME/.venvs/wikibaseintegrator/bin/python+#! /usr/bin/env python 
 from wikibaseintegrator import WikibaseIntegrator from wikibaseintegrator import WikibaseIntegrator
 from wikibaseintegrator.wbi_config import config as wbi_config from wikibaseintegrator.wbi_config import config as wbi_config
Line 39: Line 39:
 my_first_wikidata_item = wbi.item.get(entity_id='Q5') my_first_wikidata_item = wbi.item.get(entity_id='Q5')
  
-# to check successful installation and retrieval of the data, you can print the json representation of the item 
 print(my_first_wikidata_item.get_json()) print(my_first_wikidata_item.get_json())
 </code> </code>
Line 48: Line 47:
 </code> </code>
  
 +<code>
 +deactivate
 +</code>
 +
 +===Resources===
 +
 +[[https://jupyterlab.readthedocs.io/en/latest/|JupyterLab]]
 +
 +[[https://www.geeksforgeeks.org/python-web-scraping-tutorial/|Web scraping]]