{"id":20122263,"url":"https://github.com/cesiumcz/webcam-snapshot","last_synced_at":"2025-08-23T04:13:15.295Z","repository":{"id":221902128,"uuid":"755720311","full_name":"cesiumcz/webcam-snapshot","owner":"cesiumcz","description":"Shell script-based routine that takes unique snapshots from live JPEG images published on the Web.","archived":false,"fork":false,"pushed_at":"2024-02-10T22:56:28.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-02T20:28:25.624Z","etag":null,"topics":["timelapse","webcam-capture"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cesiumcz.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,"dei":null}},"created_at":"2024-02-10T22:02:33.000Z","updated_at":"2024-02-11T00:54:18.000Z","dependencies_parsed_at":"2024-02-10T23:25:18.497Z","dependency_job_id":"7f22c81f-ea16-475d-9ae5-f92318d7355f","html_url":"https://github.com/cesiumcz/webcam-snapshot","commit_stats":null,"previous_names":["cesiumcz/webcam-snapshot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cesiumcz/webcam-snapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesiumcz%2Fwebcam-snapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesiumcz%2Fwebcam-snapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesiumcz%2Fwebcam-snapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesiumcz%2Fwebcam-snapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cesiumcz","download_url":"https://codeload.github.com/cesiumcz/webcam-snapshot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesiumcz%2Fwebcam-snapshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740732,"owners_count":24812642,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["timelapse","webcam-capture"],"created_at":"2024-11-13T19:36:40.815Z","updated_at":"2025-08-23T04:13:15.275Z","avatar_url":"https://github.com/cesiumcz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cesium webcam snapshot\nShell script-based routine that takes unique snapshots from live JPEG images published on the Web.\n\n## Prerequisities\n- Shell - `bash` or Korn shell `ksh` (OpenBSD's default shell)\n- `curl`\n\n## Installation\n### System user\n\n\tuseradd -c \"Webcam routine\" -b /var/webcam/ -d /var/webcam-snapshot/ -s /sbin/nologin _webcam\n\tinstall -d -m 770 -o root -g _webcam /var/webcam-snapshot/\n\n### Clone \u0026 file copy\n\n\tcd /tmp/\n\tgit clone https://github.com/cesiumcz/webcam-snapshot.git\n\nDetermine correct version `bash`/`ksh`:\n\n\tmv snap.(bash|ksh) snap.sh\n\nInstall the script and set correct permissions\n\n\tinstall -d -m 755 -o root -g _webcam /usr/local/webcam-snapshot/\n\tinstall -m 754 -o root -g _webcam snap.sh /usr/local/webcam-snapshot/\n\trm -rf /tmp/webcam-snapshot/\n\n### Configuration\n#### Camera list\n\n\tvim /usr/local/webcam-snapshot/cameras.txt\n\nFor each webcam, insert a line according to the following syntax:\n\n\tcam_name jpg_uri\n\n- *cam_name* = unique string camera name. Use short and simple names.\n- *jpg_uri* = URI to JPEG image\n\nA line starting with `#` is ignored.\n\nExample contents of `cameras.txt`\n\n\tpec https://www.chmi.cz/files/portal/docs/meteo/kam/pecpodsnezkou.jpg\n\tjizerka https://www.chmi.cz/files/portal/docs/meteo/kam/jizerka.jpg\n\nSet proper permissions (`cameras.txt` is likely to contain credentials)\n\n\tchown -R root:_webcam /usr/local/webcam-snapshot/\n\tchmod 660 /usr/local/webcam-snapshot/cameras.txt\n\n### Cron\nInvoke the script every minute between 6 to 18 hours:\n\n\tcrontab -e -u _webcam\n\t* 6-18 * * * /usr/local/webcam-snapshot/snap.sh\n\n## Testing\n\n\tsu -l _webcam /usr/local/webcam-snapshot/snap.sh\n\nOr alternative using `doas` command:\n\n\tdoas -u _webcam /usr/local/webcam-snapshot/snap.sh\n\n## Modus operandi\n**`snap.sh`** does the following sequentially for each webcam:\n- downloads current image into temporary location, if succeeds:\n- checks if the new image differs from the last downloaded, if so:\n- moves the second oldest image into final location\n\n### Directory structure\n\t/tmp/webcam-snapshot/\n\t|-- cam1\n\t|   `-- 202401201023.jpg\n\t`-- cam2\n\t    `-- 202401201023.jpg\n\n\t/var/webcam-snapshot/\n\t|-- cam1\n\t|   |-- 202401201020.jpg\n\t|   `-- 202401201010.jpg\n\t`-- cam2\n\t    |-- 202401201020.jpg\n\t    `-- 202401201010.jpg\n\n## Author\n[Matyáš Vohralík](https://mv.cesium.cz), 2024\n\n## License\n[BSD 3-Clause](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesiumcz%2Fwebcam-snapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesiumcz%2Fwebcam-snapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesiumcz%2Fwebcam-snapshot/lists"}