{"id":21925547,"url":"https://github.com/jelmerro/sync_location","last_synced_at":"2026-02-17T16:01:35.264Z","repository":{"id":108179354,"uuid":"271074171","full_name":"Jelmerro/sync_location","owner":"Jelmerro","description":"Read, parse and expose syncthing folder locations by name","archived":false,"fork":false,"pushed_at":"2025-11-18T01:03:17.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T02:25:16.917Z","etag":null,"topics":["module","python","syncthing","syncthing-folders"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Jelmerro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"ko_fi":"jelmerro","github":"jelmerro"}},"created_at":"2020-06-09T18:00:54.000Z","updated_at":"2025-11-18T01:01:56.000Z","dependencies_parsed_at":"2025-04-19T15:53:02.416Z","dependency_job_id":"7c70061b-74a7-49bf-988b-7627835398da","html_url":"https://github.com/Jelmerro/sync_location","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jelmerro/sync_location","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jelmerro%2Fsync_location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jelmerro%2Fsync_location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jelmerro%2Fsync_location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jelmerro%2Fsync_location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jelmerro","download_url":"https://codeload.github.com/Jelmerro/sync_location/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jelmerro%2Fsync_location/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29549206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["module","python","syncthing","syncthing-folders"],"created_at":"2024-11-28T21:19:10.504Z","updated_at":"2026-02-17T16:01:35.258Z","avatar_url":"https://github.com/Jelmerro.png","language":"Python","funding_links":["https://ko-fi.com/jelmerro","https://github.com/sponsors/jelmerro","https://ko-fi.com/Jelmerro","https://github.com/sponsors/Jelmerro"],"categories":[],"sub_categories":[],"readme":"sync\\_location\n==============\n\nRead, parse and expose syncthing folder locations by name\n\n## Features\n\nThe sync location tool will read the syncthing configuration for the current machine,\nand expose the locations based on the syncthing folder name.\n\n#### Downloads\n\nIn addition to the syncthing folders, a folder named \"downloads\" is always exposed.\nThis will scan for mounted disks in \"/mnt/\" to use as the base location of the downloads,\nor use the user folder as the main fallback location at `~/Downloads`.\nIf there is a `downloads` folder in the syncthing config, that will be used instead.\n\n## Install\n\n### Module\n\nYou can add it to your setup.py or pyproject.toml file as a dependency using:\n\n`sync_location @ git+https://git@github.com/Jelmerro/sync_location@master`\n\n### Pip\n\n```bash\npip install --user -I git+https://github.com/Jelmerro/sync_location\n```\n\n### Python\n\nDownload or clone the repo, then run `python sync_location.py` directly.\n\n### [Github](https://github.com/Jelmerro/sync_location/releases)\n\nDownload a stable installer or executable for your platform from Github.\n\n### [Fedora](https://jelmerro.nl/fedora)\n\nI host a custom Fedora repository that you can use for automatic updates.\n\n```bash\nsudo dnf config-manager addrepo --from-repofile=https://jelmerro.nl/fedora/jelmerro.repo\nsudo dnf install sync_location\n```\n\n## Contribute\n\nYou can support my work on [ko-fi](https://ko-fi.com/Jelmerro) or [Github sponsors](https://github.com/sponsors/Jelmerro).\nAnother way to help is to report issues or suggest new features.\nPlease try to follow recommendations by flake8 and pylint when developing.\nFor an example vimrc that can auto-format based on the included linters,\nyou can check out my personal [vimrc](https://github.com/Jelmerro/vimrc).\n\n## Building\n\nTo create your own builds you can use [jfpm](https://github.com/Jelmerro/jfpm).\nPlease clone or download both this repo and jfpm, then run `../jfpm/release_py_simple.sh`.\nThis will build releases for various platforms and output them to `dist`.\n\n## Usage as a module\n\nThe package exposes the syncthing folders as a single dictionary named \"all\".\nIts keys are based on the folder names, and the values are set to the folder locations.\nAdditionally, all folders are also exposed by their label/name as globals.\n\n```python\nimport sync_location\n\nprint(sync_location.all)\n# {\"downloads\": \"/home/user/Downloads\", \"default\": \"/home/user/Sync\"}\n\nprint(sync_location.all[\"downloads\"])\nprint(sync_location.downloads)\n# /home/user/Downloads/\n\nif \"default\" in sync_location.all:\n    print(sync_location.all[\"default\"])\n    print(sync_location.default)\n    # /home/user/Sync/\n```\n\n## Usage from the Command-line\n\nTo find a location for a folder based on its name from the command line,\nit's possible to run the script with a single argument that represents the folder name.\nIf the folder exists, the location will be returned and the program will exit with status 0.\nFor missing folders, no output is printed and the program exists with status code 1.\nOptionally, a second argument can be presented that is appended to the base path,\nthis one is not checked for existence though, only the syncthing folder name is.\nWithout arguments, JSON is used to show all folders, similar to the module's `.all`.\nFinally, you can list all configured folder names using the `--folders` argument.\n\n```bash\nsync_location default\n# /home/user/Sync/\n\nsync_location downloads\n# /home/user/Downloads/\n\nsync_location downloads subfolder/fileorfolder\n# /home/user/Downloads/subfolder/fileorfolder\n\nsync_location\n# {\n#     \"default\": \"/home/user/Sync/\",\n#     \"downloads\": \"/home/user/Downloads/\"\n# }\n\nsync_location --folders\n# default\n# downloads\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelmerro%2Fsync_location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjelmerro%2Fsync_location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelmerro%2Fsync_location/lists"}