A Python3 script to sync folders with Cascade CMS. This program will scan the contents of the current directory with a .cms config folder and sync files with a Cascade CMS server via Cascade's REST API. Designed for those locations where login access to a web server is not available. Tested on Ubuntu Linux, other operating systems may work as long as you have the required python libraries.
The code below will clone the repository into your home directory.
cd ; git clone https://github.com/jskenney/cms-sync.git ; cd cms-sync ; chmod 755 cmssync
Once you have the repository cloned, the next step is to go into the folder you want to sync with the CMS server and create a .cms/config.py file and define the required entries, there is an example in the repository that can be copied and taylored as needed.
Go into the folder that has the .cms directory and run:
~/cms-sync/cmssync
- Will it upload all files? Yes, as long as they are:
- Not in the ignore list (as defined in config.py),
- Do not start with a dot, and
- Are world readable.
- Does it break? Yes, the program will stop and alert to any error (file naming, etc) and you will need to correct it before moving on.