Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Wikidata -> OpenChurch sync. version 2. #31

Open
wants to merge 1 commit into
base: feat/v2
Choose a base branch
from

Conversation

pyguerder
Copy link
Contributor

Usage:

At the root of the project, add to the .env file:

###> synchro scripts ###
SQLITE_DATABASE=local.sqlite
OPENCHURCH_HOST='https://whatever.the.url'
OPENCHURCH_API_TOKEN='Y...K'
###< synchro scripts ###

Load data from Wikidata: python3 synchro_v2.py
Push data to OpenChurch v2: python3 synchro_v2.py push
Print statistics: python3 synchro_v2.py stats

The local.sqlite serves as a local buffer to store the OpenChurch v2 UUIDs and remember what as already been pushed, what has not and determine what has been updated on Wikidata since the last push.

1st run is very long (several hours) because it loads places (cities, countries) from Wikidata. It is recommended to put the attached SQLite database in the scripts folder to fasten the process. Every data from this file (except OpenChurch UUIDs) is from Wikidata with license is CC0.
local.sqlite.gz

@pyguerder pyguerder changed the base branch from develop to feat/v2 October 25, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant