GithubHelp home page GithubHelp logo

jmathai / synology-photos-reindexer Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 4.0 10 KB

Simple script to call Synology Photo's reindex API that can be scheduled to run periodically.

License: Apache License 2.0

Python 100.00%

synology-photos-reindexer's Introduction

Reindex Synology Photos

Simple script to call Synology Photo's reindex API that can be scheduled to run periodically.

The CLI commands did not work for me, unfortunately.

Instructions

Clone the repository.

git clone https://github.com/jmathai/synology-photos-reindexer.git

Change into the directory.

cd synology-photos-reindexer

Create virtual environment (optional but recommended)

python3 -m venv .env
source .env/bin/activate

Install dependencies.

pip3 install -r requirements.txt

Export environment variables.

export SYNO_USERNAME=<your synology username>
export SYNO_PASSWORD=<your synology password>
export SYNO_HOSTNAME=<your synology hostname or ip address>

Run the script.

You may see some errors about an InsecureRequestWarning which can be ignored.

./main.py

Schedule the script

Schedule this to run using Synology's Task scheduler which can be found in the Control Panel.

From the Task Scheduler click Create -> Scheduled Task -> User defined script.

On the Task Settings tab you'll use the following commands from above customized with your values.

export SYNO_USERNAME='<your synology username>'
export SYNO_PASSWORD='<your synology password>'
export SYNO_HOSTNAME='<your synology hostname or ip address>'
cd <path to git repo>
source .env/bin/activate
./main.py

synology-photos-reindexer's People

Contributors

jmathai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

synology-photos-reindexer's Issues

Password with ! not accepted

I am getting an error when trying to apply the password which has an exclamation mark in it.

(.env) user@diskstation:~/synology-photos-reindexer$ export SYNO_PASSWORD=abc!efg
-sh: !efg: event not found

Adding quotes does allow me to apply a password but I still get an error when running the script.

(.env) user@diskstation:/synology-photos-reindexer$ export SYNO_PASSWORD="abc!efg"
(.env) user@diskstation:
/synology-photos-reindexer$ ./main.py
/volume1/homes/user/synology-photos-reindexer/.env/lib/python3.8/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(
Login failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.