https://github.com/orestispanago/manage-ftp-koukouli
Manage files on FTP uploaded from Koukouli weather station
https://github.com/orestispanago/manage-ftp-koukouli
ftp rename
Last synced: 2 months ago
JSON representation
Manage files on FTP uploaded from Koukouli weather station
- Host: GitHub
- URL: https://github.com/orestispanago/manage-ftp-koukouli
- Owner: orestispanago
- Created: 2023-01-13T10:00:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T10:00:41.000Z (12 months ago)
- Last Synced: 2025-01-30T15:49:33.130Z (4 months ago)
- Topics: ftp, rename
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Manage-FTP-koukouli
Koukouli weather station uploads a ```.dat``` file every 5 minutes to the FTP server.
Each ```.dat``` file contains 5 1-min measurements.
This script downloads the ```.dat``` files locally, and organizes them to daily ```.csv``` files using the filename format: `YYYY/koukouli1min_YYYYMMDD.csv`
The generated ```.csv``` files are uploaded to the FTP server and archived locally.
Both the remote and the loca raw ```.dat``` files are deleted after the ```.csv``` upload.
## Instructions
Edit the FTP parameters in ```ftp.py```.
To avoid overlapping cron job execution, use ```flock``` in crontab:
```
*/10 * * * * /usr/bin/flock -w 0 ~/manage_ftp_koukouli.lock python3 ~/Manage-FTP-koukouli/main.py
```To check if your cron job is running:
```
grep CRON /var/log/syslog
```