{"id":18133393,"url":"https://github.com/nickatnight/chaptify","last_synced_at":"2026-05-02T02:40:42.156Z","repository":{"id":47155219,"uuid":"367516713","full_name":"nickatnight/chaptify","owner":"nickatnight","description":":book: :arrow_right: :loud_sound: Create Spotify playlists from the audio of chapter enabled YouTube videos","archived":false,"fork":false,"pushed_at":"2022-08-23T04:17:30.000Z","size":78,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T22:19:46.426Z","etag":null,"topics":["chapters","python","spotify","spotify-playlist","youtube"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickatnight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-15T01:38:28.000Z","updated_at":"2024-05-03T07:44:30.000Z","dependencies_parsed_at":"2022-09-21T04:42:31.460Z","dependency_job_id":null,"html_url":"https://github.com/nickatnight/chaptify","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickatnight%2Fchaptify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickatnight%2Fchaptify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickatnight%2Fchaptify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickatnight%2Fchaptify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickatnight","download_url":"https://codeload.github.com/nickatnight/chaptify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247510286,"owners_count":20950433,"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":["chapters","python","spotify","spotify-playlist","youtube"],"created_at":"2024-11-01T13:07:38.527Z","updated_at":"2026-05-02T02:40:42.105Z","avatar_url":"https://github.com/nickatnight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"#\"\u003e\u003cimg alt=\"Synthwave\" src=\"https://f4.bcbits.com/img/0017910770_0\"\u003e\u003c/a\u003e\n    \u003csmall\u003ePhoto: https://daily.bandcamp.com\u003c/small\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/nickatnight/chaptify/actions\"\u003e\n        \u003cimg alt=\"GitHub Actions status\" src=\"https://github.com/nickatnight/chaptify/actions/workflows/main.yml/badge.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/nickatnight/chaptify\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/nickatnight/chaptify/branch/master/graph/badge.svg?token=E03I4QK6D9\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# chaptify :closed_book: :speaker:\nA simple cli to create Spotify playlists from the audio of [chapter](https://support.google.com/youtube/answer/9884579?hl=en) enabled YouTube videos\n\n## Reason?\nI needed an automated process to transfer 80s synthwave mixes I listen to from [YouTube](https://www.youtube.com/watch?v=2b9AqJimM-0), most of which were chapter enabled (new video feature from YT), to Spotify playlists.\n\n## Install (edit mode) Python 3.9+\nThis package relies on `spotipy`, a lightweight python wrapper for Spotify api. See their [docs](https://spotipy.readthedocs.io/en/latest/) for installation or Spotify [developer](https://developer.spotify.com/documentation/general/guides/) guide for obtaining api keys\n\n1. clone this repo `$ git clone git@github.com:nickatnight/chaptify.git` and `cd chaptify`\n2. export ENV vars\n    ```shell\n    $ export SPOTIFY_CLIENT_SECRET=\u003csome_secret\u003e\n    $ export SPOTIFY_CLIENT_ID=\u003csome_id\u003e\n    $ export SPOTIFY_REDIRECT_URI=\u003csome_uri\u003e  # optional...defaults to http://localhost:8321\n    ```\n3. install in editable mode `$ pip install -e .`\n4. run `$ chaptify https://www.youtube.com/watch\\?v\\=Pz1a9MM-Vn4`\n\n### Note\n* SPOTIFY_REDIRECT_URI environment variable must match the redirect URI added to your application in your [Dashboard](https://developer.spotify.com/dashboard/applications) , this URI does not need to be accessible\n* on first use, `spotipy` will spin up a temporary web server on whatever port is specified above to automatically handle the oauth redirect\n\n## Usage\n```bash\nUsage: chaptify [OPTIONS] URL\n\n  Youtube video link URL\n\nOptions:\n  -a, --append TEXT  Append to a playlist (by name).\n  --help             Show this message and exit.\n```\n\n\u003c!-- https://imgur.com/a/BYHqmhi --\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"cli demo\" src=\"https://i.imgur.com/jVpwvYX.gif\"\u003e\n\u003c/p\u003e\n\n\n## Development\nThis project uses [Poetry](https://python-poetry.org/docs/#osx--linux--bashonwindows-install-instructions) to manage dev environment.  Once installed:\n1. follow steps 1-2 from above\n2. install packages with `poetry install`\n3. black `poetry run black .`\n4. flake8 `poetry run flake8`\n5. test `poetry run pytest --cov=chaptify tests/`\n6. build sdist `poetry build --format sdist`\n7. create new setup.py\n    ```shell\n    $ tar -xvf dist/*-`poetry version -s`.tar.gz -O '*/setup.py' \u003e setup.py\n    ```\n\n## Limitations\n* obviously, this tool is limited to whats available on Spotify\n* only supports US market\n* works best with title tracks with variations of \"name - artist\" eg Rosentwig - Journey\n* there is no fancy algorithm or deep learning technique when using spotify search, just fetch me the first hit\n\n## TODO\nIntegrate with new libs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickatnight%2Fchaptify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickatnight%2Fchaptify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickatnight%2Fchaptify/lists"}