{"id":16130329,"url":"https://github.com/paulfantom/media-autocopier","last_synced_at":"2025-04-06T14:16:46.709Z","repository":{"id":70137579,"uuid":"148062740","full_name":"paulfantom/media-autocopier","owner":"paulfantom","description":"Automatically copy pictures and videos from SD cards to local disk","archived":false,"fork":false,"pushed_at":"2020-02-23T00:31:36.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T20:19:46.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulfantom.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,"publiccode":null,"codemeta":null}},"created_at":"2018-09-09T20:23:04.000Z","updated_at":"2020-02-23T00:31:38.000Z","dependencies_parsed_at":"2023-04-16T07:47:01.100Z","dependency_job_id":null,"html_url":"https://github.com/paulfantom/media-autocopier","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/paulfantom%2Fmedia-autocopier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulfantom%2Fmedia-autocopier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulfantom%2Fmedia-autocopier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulfantom%2Fmedia-autocopier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulfantom","download_url":"https://codeload.github.com/paulfantom/media-autocopier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492544,"owners_count":20947545,"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":"2024-10-09T22:15:30.786Z","updated_at":"2025-04-06T14:16:46.665Z","avatar_url":"https://github.com/paulfantom.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SD Card automatic media copier\n\nAutomatically copy pictures after inserting SD Card.\n\n## How this works?\n\n1. Udev detects inserted SD Card with rule from [udev/99-sd-copier.rules] file and notifies systemd service\n2. Systemd runs `copier.sh` script with device as parameter. For example if SD card is located at `/dev/sda` then systemd\nservice state can be checked with `systemctl status sd-copier@-dev-sda1.service`\n3. `copier.sh` mounts SD card device and tries to detect following parameters from EXIF data of first located picture:\n  - camera make (manufacturer)\n  - month and year when picture was taken (if not present it assumes current date)\n  - picture location (if not present it defaults to `Unknown_Location`)\n4. Script uses `rsync` to copy pictures to local directory specified as: `PREFIX/YEAR/MONTH/LOCATION/MANUFACTURER`. \nHigh quality RAW pictures are copied to subfolder called `RAW`. `PREFIX` is set by default to `/srv/media` and can be\nchanged by modifying systemd service file.\n\n## Installation\n\n1. Copy udev rule to `/etc/udev/rules.d` and systemd service to `/etc/systemd/system`\n2. Reload udev and system by running following as root: `udevadm control --reload-rules \u0026\u0026 systemctl daemon-reload`\n3. Copy `copier.sh` to `/usr/local/bin` and make sure it is executable.\n\nTL;DR:\n```\n# as root:\ncp udev/99-sd-copier.rules /etc/udev/rules.d/\ncp systemd/sd-copier@.service /etc/systemd/system/\nudevadm control --reload-rules\nsystemctl daemon-reload\ncp copier.sh /usr/local/bin/\nchmod +x /usr/local/bin/copier.sh\n```\n\n## TODO\n\n- rewrite to go-lang?\n- containerize?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulfantom%2Fmedia-autocopier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulfantom%2Fmedia-autocopier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulfantom%2Fmedia-autocopier/lists"}