Tools for PiWiGo
git clone https://github.com/hglkrijger/psync.git
cd psync
pip3 install -r requirements.txt
[add secrets to psync.conf, see below]
python3 setup.py installTo sync with OneDrive, update psync.conf with the following structure:
[secrets]
client_id: application_id
client_secret: secret
redirect_uri: uriThese values should be obtained by registering an application at https://apps.dev.microsoft.com.
More information at https://developer.microsoft.com/en-us/graph/quick-start.
Also update the accounts value in service to list the appropriate account sections, and update those sections
with valid values. For example:
[service]
accounts: ['john', 'jane']
[john]
session_file: session-john.pickle
sync_src: Pictures/Camera Roll
sync_dst: /datadisk/galleries/John
[jane]
session_file: session-jane.pickle
sync_src: Pictures/Camera Roll
sync_dst: /datadisk/galleries/Janeless /usr/sbin/psync
less /lib/systemd/system/psync.service
systemctl daemon-reload
systemctl enable psync.service
systemctl start psync.service
systemctl stop psync.service
systemctl disable psync.servicepython3 psync --helpLOGLEVEL='DEBUG'This requires a browser with JavaScript support.
python3 psync --new-session accountSubstitute account with the name of the account section, for example john.
Ensure the same version of Python is used to generate and refresh the session.
python3 psync --refresh-session accountSubstitute account with the name of the account section, for example jane.
Ensure the configuration values are set appropriately.
python3 psync --syncpython psync --clean folder