- Introduction
- Setting up Google Cloud Project
- Prerequisites and Packages Installation
- Project Setup
- Meta-Data-Editor
- Allowed File Formats
- Allowed Date Formats for Google Drive
- Auto-start Configuration
Welcome to the TerminalSlideShow repository. This project is a lightweight, non-GUI slideshow that fetches new files from Google Drive, allowing you to update the slideshow remotely. This README provides instructions for setting up the project using Python, installing necessary requirements, configuring a Google Cloud project, and setting up auto-start functionality.
Follow these steps to set up the Google Cloud project and obtain necessary credentials:
- Create a new project on Google Cloud Console.
- Navigate to "Service Accounts" on the left navbar and create a new service account with drive permissions.
- Add a key in JSON format for the service account.
- Use the email to grant permission to the target folder.
Ensure you have Python version 3.9.2
or higher installed.
- Execute: the
initialize.sh
inside the projectfolder usingcd path/to/this_repo
- To get newest repo version:
python -m update.py --update
Execute the following commands:
- install venv for python:
sudo apt-get install python3-venv
- create a venv:
python -m venv venv
- always use the venv:
source path/to/venv/bin/activate
- Install requirements using:
pip install -r requirements.txt
# Update package information
sudo apt update
# Upgrade installed packages
sudo apt upgrade
# Install required packages:
sudo apt install fbi vlc jq
sudo apt install libimage-exiftool-perl
#for MetaDataEdtor on MAC:
brew install exiftool
# Download the executable for windows: https://exiftool.org/
# Install recommended packages:
sudo apt install dos2unix
To start you have to set some variables inside the config-file
TARGETDIR
-> folder where the content will be savedUSE_GDRIVE
-> If you want to get the content from Google-Drive set ittrue
GOOGLE_API_ACCESS
-> Specifies the path to yourservice_account.json
fileDRIVE_DIR_ID
-> The ID of the Google-Drive folder with your content
ON_TIME
andOFF_TIME
-> Time when it should display(HH:MM) or (HH:MM:SS)
(local time zone!)DISPLAYTIME
-> Time for Duration for all images (in seconds)BLENDTIME
-> Time for blending animation (in milliseconds)PYENV
-> Path to the venv if you are using one. Else let it empty
- Allows to add custom Tags to the file using a GUI
STARTDATE
-> Date when it will beginn displayingENDDATE
-> Date when it will stop displaying
!!!Under DEV:!!!
DisplayTime
-> Time how long the single image will be displayed (in seconds)
-
The script supports the following image formats:
.jpg
,.jpeg
,.png
,bmp
,.gif(first frame)
. -
The script supports the following video formats:
.mp4
,.mkv
,.avi
,.ogg
,mov
,flv
.
-
The script supports the following date formats for filenames:
day.month.year
,5.5.23
,05.05.2023
,15-06-2023
,20_07_2023
-
You can also add a name before and after:
FILENAME5.5.23stufff
-
To set a time range use
@
:5.5.23@08-12-23
To configure auto-start:
- Open the rc.local file:
sudo nano /etc/rc.local
- Add
sudo reset
to an empty command line - Go to the crontabs:
crontab -e
- Add
chmod
to set the script as always executable and add the path to the script:
@reboot sudo sleep 8 && cd /path/to/project && sudo chmod +x path/to/script.sh && path/to/script.sh >/dev/null 2>/dev/null
# recommended
@reboot sudo sleep 8 && cd /path/to/project && dos2unix ./script.sh && sudo chmod +x ./script.sh && ./script.sh >/dev/null 2>/dev/null