Difference between revisions of "PySMWSync"

From BITPlan Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
|title=pySMWSync
 
|title=pySMWSync
 
|url=https://github.com/WolfgangFahl/pySMWsync
 
|url=https://github.com/WolfgangFahl/pySMWsync
|version=0.0.2
+
|version=0.1.0
 
|description=synchronize Semantic MediaWiki content e.g. with wikidata
 
|description=synchronize Semantic MediaWiki content e.g. with wikidata
|date=2023-03-03
+
|date=2025-06-12
 
|since=2023-03-03
 
|since=2023-03-03
 
}}
 
}}
Line 16: Line 16:
 
== Command line ==
 
== Command line ==
 
=== smwsync ===
 
=== smwsync ===
<source lang='bash'>
+
<source lang='bash' highlight='1'>
smwsync -h                
+
smwsync -h
usage: smwsync [-h] [-a] [--context CONTEXT] [-d] [-t TARGET] [-u] [--topic TOPIC] [--props] [-V]
+
usage: smwsync [-h] [-a] [--context CONTEXT] [-cpm CREATEPROPERTYMAP] [-d]
 +
              [--dry] [-e ENDPOINT] [--progress] [-p PROPS [PROPS ...]]
 +
              [--proplist] [-pm PROPERTYMAP] [-pk PRIMARYKEY]
 +
              [-pkv PRIMARYKEYVALUES [PRIMARYKEYVALUES ...]] [-t TARGET] [-u]
 +
              [--topic TOPIC] [--verbose] [-V]
  
pySMWSync - ('synchronize Semantic MediaWiki content e.g. with wikidata',)(v0.0.1,2023-03-03)
+
pySMWSync - python library to synchronize property values of a semantic MediaWiki with e.g. wikidata or another Semantic MediaWiki(v0.1.0,2025-06-12)
  
 
options:
 
options:
Line 26: Line 30:
 
   -a, --about          show about info [default: False]
 
   -a, --about          show about info [default: False]
 
   --context CONTEXT    context to generate from [default: CrSchema]
 
   --context CONTEXT    context to generate from [default: CrSchema]
 +
  -cpm CREATEPROPERTYMAP, --createPropertyMap CREATEPROPERTYMAP
 +
                        create the yaml property map
 
   -d, --debug          show debug info [default: False]
 
   -d, --debug          show debug info [default: False]
 +
  --dry                dry run only - do not execute wikiedit commands but
 +
                        just display them
 +
  -e ENDPOINT, --endpoint ENDPOINT
 +
                        the SPARQL endpoint to be used [default: wikidata]
 +
  --progress            show progress bar
 +
  -p PROPS [PROPS ...], --props PROPS [PROPS ...]
 +
                        properties to sync
 +
  --proplist            show the properties
 +
  -pm PROPERTYMAP, --propertyMap PROPERTYMAP
 +
                        the yaml property map
 +
  -pk PRIMARYKEY, --primaryKey PRIMARYKEY
 +
                        primary Key [default: qid]
 +
  -pkv PRIMARYKEYVALUES [PRIMARYKEYVALUES ...], --primaryKeyValues PRIMARYKEYVALUES [PRIMARYKEYVALUES ...]
 +
                        primary Key Values
 
   -t TARGET, --target TARGET
 
   -t TARGET, --target TARGET
 
                         wikiId of the target wiki [default: ceur-ws]
 
                         wikiId of the target wiki [default: ceur-ws]
 
   -u, --update          update the local cache
 
   -u, --update          update the local cache
 
   --topic TOPIC        the topic to work with [default: Scholar]
 
   --topic TOPIC        the topic to work with [default: Scholar]
   --props              show the properties
+
   --verbose            show verbose edit details
 
   -V, --version        show program's version number and exit
 
   -V, --version        show program's version number and exit
 
 
</source>
 
</source>

Latest revision as of 08:46, 12 June 2025

OsProject

OsProject
id  pySMWSync
state  active
owner  WolfgangFahl
title  pySMWSync
url  https://github.com/WolfgangFahl/pySMWsync
version  0.1.0
description  synchronize Semantic MediaWiki content e.g. with wikidata
date  2025-06-12
since  2023-03-03
until  


Installation

pip install pySMWSync
# alternatively if your pip is not a python3 pip
pip3 install pySMWSync 
# local install from source directory of pySMWSync 
pip install .

upgrade

pip install pySMWSync  -U
# alternatively if your pip is not a python3 pip
pip3 install pySMWSync -U


Usage

Command line

smwsync

smwsync -h
usage: smwsync [-h] [-a] [--context CONTEXT] [-cpm CREATEPROPERTYMAP] [-d]
               [--dry] [-e ENDPOINT] [--progress] [-p PROPS [PROPS ...]]
               [--proplist] [-pm PROPERTYMAP] [-pk PRIMARYKEY]
               [-pkv PRIMARYKEYVALUES [PRIMARYKEYVALUES ...]] [-t TARGET] [-u]
               [--topic TOPIC] [--verbose] [-V]

pySMWSync - python library to synchronize property values of a semantic MediaWiki with e.g. wikidata or another Semantic MediaWiki(v0.1.0,2025-06-12)

options:
  -h, --help            show this help message and exit
  -a, --about           show about info [default: False]
  --context CONTEXT     context to generate from [default: CrSchema]
  -cpm CREATEPROPERTYMAP, --createPropertyMap CREATEPROPERTYMAP
                        create the yaml property map
  -d, --debug           show debug info [default: False]
  --dry                 dry run only - do not execute wikiedit commands but
                        just display them
  -e ENDPOINT, --endpoint ENDPOINT
                        the SPARQL endpoint to be used [default: wikidata]
  --progress            show progress bar
  -p PROPS [PROPS ...], --props PROPS [PROPS ...]
                        properties to sync
  --proplist            show the properties
  -pm PROPERTYMAP, --propertyMap PROPERTYMAP
                        the yaml property map
  -pk PRIMARYKEY, --primaryKey PRIMARYKEY
                        primary Key [default: qid]
  -pkv PRIMARYKEYVALUES [PRIMARYKEYVALUES ...], --primaryKeyValues PRIMARYKEYVALUES [PRIMARYKEYVALUES ...]
                        primary Key Values
  -t TARGET, --target TARGET
                        wikiId of the target wiki [default: ceur-ws]
  -u, --update          update the local cache
  --topic TOPIC         the topic to work with [default: Scholar]
  --verbose             show verbose edit details
  -V, --version         show program's version number and exit