Timestamp to upload folder
Moderator: Mattk
Timestamp to upload folder
I see there is a function for filenames to get named by a timestamp f.ex %F_%R.png, so that filenames became 2007-09-23_15:10.png. Is it possible to include that also a corresponding folder is created at upload? So that the file 2007-09-23_15:10.png will be uploaded to a folder structure like /2007/09/23/15:10.png?
Re: Timestamp to upload folder
sorry, only file name can be controlled by patterns.
Re: Timestamp to upload folder
Maybe someone know how to make a cron script to do this? 

Re: Timestamp to upload folder
sure, shouldn´t be a problem. FTP upload or internal folder on meteohubs filesystem?
From where is that png file coming? A graph created with meteohub. Or from a webcam source?
: is an illicit character anyway
From where is that png file coming? A graph created with meteohub. Or from a webcam source?
: is an illicit character anyway

Re: Timestamp to upload folder
Thanks for the interrest in this
Ftp-upload. The graph should be generated by meteohub with timestamp in filename. F. example a graph for every month for temperature should be temp<year><month>.png. Or for every week temp<year><weeknumber>.png.

Re: Timestamp to upload folder
okay, creating the date structure is not difficult with the mighty linux command DATE - used within a shell script.
the other thing is "how to create a png graph from a shell script?"
Maybe Boris can jump in and give us the shell script command for creating a png graph file, then I can give you the code to create a date based directory structure for your graphs.
Thanks,
just to give a glimpse how the ftp upload is working with a shell script
ncftpput ist clever enough to create the folder if not already existing. NICE!
e.g.
this command is uploading my webcam shots to an external ftp server >>>
the other thing is "how to create a png graph from a shell script?"


Maybe Boris can jump in and give us the shell script command for creating a png graph file, then I can give you the code to create a date based directory structure for your graphs.
Thanks,
just to give a glimpse how the ftp upload is working with a shell script
ncftpput ist clever enough to create the folder if not already existing. NICE!
e.g.
this command is uploading my webcam shots to an external ftp server >>>
Code: Select all
/usr/bin/ncftpput -u user -p password honsol_753087.ho.funpic.de /`date -d 'today' +%Y_%m_%d` /data/myweb/`date -d 'today' +%Y-%m-%d_%H-%M_webcam.jpg`