{"id":27201693,"url":"https://github.com/markmac99/mp4toftp","last_synced_at":"2025-04-09T21:57:22.835Z","repository":{"id":43690914,"uuid":"511437854","full_name":"markmac99/mp4toftp","owner":"markmac99","description":"Simple FTP uploader for RMS mp4 timelapses","archived":false,"fork":false,"pushed_at":"2024-01-26T09:57:33.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T21:57:19.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markmac99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-07T08:04:24.000Z","updated_at":"2022-07-07T11:56:58.000Z","dependencies_parsed_at":"2024-01-26T11:58:29.664Z","dependency_job_id":null,"html_url":"https://github.com/markmac99/mp4toftp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fmp4toftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fmp4toftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fmp4toftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fmp4toftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmac99","download_url":"https://codeload.github.com/markmac99/mp4toftp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119349,"owners_count":21050754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T21:57:22.152Z","updated_at":"2025-04-09T21:57:22.822Z","avatar_url":"https://github.com/markmac99.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README for mp4toftp\n\nThis python script is intended to be called as an 'extrascript' from ukmon-pitools to upload the allnight timelapse to an FTP site.  The uploaded file is named {stationid}_latest.mp4, where stationid is the 6-letter RMS station code such as UK0001. \n\nThe script can also probably be used directly as an \"external script\" from RMS. However, i've not tested this and so i can't be certain. \n\nUploads can be made with ftp, sftp or ftps (ftp with tls). \n\n\n## Installation\n### Step 1: Download the Software\nopen a terminal window and type\n\u003cpre\u003e\ncd ~/source  \ngit clone https://github.com/markmac99/mp4toftp.git  \ncd mp4toftp  \n\u003c/pre\u003e\n\n### Step 2: Configure the ftp Connection\nEdit the configuration file using a text editor, for example\n\u003cpre\u003e\nnano ~/source/mp4toftp/mp4toftp.ini  \n\u003c/pre\u003e\nProvide the server name, username, password and target folder for your FTP site. \nSelect a protocol (FTP, SFTP or FTPS). \nIf uploading to the default location on your server just leave the target folder blank. \nThen save and exit the editor. \n\n\n### Step 3a: Add the Hook to UKMON-pitools\nIf you're not using UKMON-pitools, skip ahead to 3b.\n\nIf you're  using the 'extrascript' function in ukmon-pitools (for example to contribute to Istrastream), copy the extrascript file from ukmon-pitools to the mp4toftp folder. \n\u003cpre\u003e\ncp ~/source/ukmon-pitools/extrascript ~/source/mp4toftp\n\u003c/pre\u003e\n\nThen create or update the *ukmon-pitools* 'extrascript' file so that it calls mp4toFTP.py:\n\u003cpre\u003e\necho /home/pi/source/mp4toftp/mp4toFTP.py \u003e ~/source/ukmon-pitools/extrascript\n\u003c/pre\u003e\n\n### Step 3b: Add the Hook Directly to RMS\nOpen the RMS config file in an editor and find the line starting *external_script_path*\n\nIf you're contributing to istrastream, this will probably read  \n\u003cpre\u003e\nexternal_script_path: /home/pi/source/RMS/iStream/iStream.py\n\u003c/pre\u003e\n\nMake a note of the path, then update the line to read\n\u003cpre\u003e\nexternal_script_path: /home/pi/source/mp4toftp/mp4toFTP.py\n\u003c/pre\u003e\n\nNow, create a new text file */home/pi/source/mp4toftp/extrascript* containing just the path that you noted earlier. For example if you are contributing to istrastream, then the extrascript file would contain \n\u003cpre\u003e/home/pi/source/RMS/iStream/iStream.py\u003c/pre\u003e\n\n## Testing and Manual Use\nThe script can also be tested by passing a single argument which is the dated folder name you want to upload from. For example\n\u003cpre\u003e\npython ~/source/mp4toftp/mp4toFTP.py UK0006_20220511_043312_012356\n\u003c/pre\u003e\nYou should see some messages in the terminal window, and a logfile is also created in ~/RMS_data/logs. The logfile name starts with ftpu_. Note that any extrascript you've configured will be called. \n\nQuestions and Requests\n----------------------\nContact me via the email address in github, or by raising an Issue on this repository. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmac99%2Fmp4toftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmac99%2Fmp4toftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmac99%2Fmp4toftp/lists"}