# gets json length from input file
jq length database.json# gets number of files in currrent dir
find . -type f | wc -l# gets size of current dir
du -hs# gets last modified of file
stat database.jsonpython3urllib3jsonosdatetimeglobBeautifulSoupre
for analytics
numpypandasmatplotlibseabornnetworkx
mkdir ~/apps
cd ~/appsgit clone https://github.com/emilianscheel/tagesschau-data-fetching# Create system service
sudo nano /etc/systemd/system/tagesschau-data-fetching.service- Replace
<user>with your username - Paste the configuration into the file ends with
.service
[Unit]
Description=Tagesschau data fetching
User=<user>
After=multi-user.target
Wants=tagesschau-data-fetching.timer
[Service]
Type=oneshot
WorkingDirectory=/home/<user>/apps/Tagesschau-data-fetching/
ExecStart=/usr/bin/python3 main.py
[Install]
WantedBy=multi-user.target
# Create system timer
sudo nano /etc/systemd/system/tagesschau-data-fetching.timer- Replace
<user>with your username - Paste the configuration into the file ends with
.timer
[Unit]
Description=Fetches Tagesschau.de for data and saves it
Requires=tagesschau-data-fetching.service
[Timer]
Unit=tagesschau-data-fetching.service
OnCalendar=*:0/11
[Install]
WantedBy=timers.target
# starts and enables service, view status
sudo systemctl enable tagesschau-data-fetching.service
sudo systemctl start tagesschau-data-fetching.service
sudo systemctl status tagesschau-data-fetching.service
# starts and enables timer, view status
sudo systemctl enable tagesschau-data-fetching.timer
sudo systemctl start tagesschau-data-fetching.timer
sudo systemctl status tagesschau-data-fetching.timerThat configuration starts our system service every eleven minutes. The system service triggers the main.py script which is the fetching the tagesschau api.