{"id":13480730,"url":"https://github.com/kiosion/toru","last_synced_at":"2025-04-13T01:23:10.946Z","repository":{"id":38822865,"uuid":"478435330","full_name":"kiosion/toru","owner":"kiosion","description":"API for generating customizable image embeds of last.fm activity","archived":false,"fork":false,"pushed_at":"2024-09-17T23:27:00.000Z","size":395,"stargazers_count":44,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-30T14:42:31.476Z","etag":null,"topics":["elixir","elixir-lang","lastfm","profile-readme","profile-stats","readme-badges","readme-profile","readme-stats"],"latest_commit_sha":null,"homepage":"https://kiosion.github.io/toru/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiosion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":["kiosion"],"ko_fi":"kiosion"}},"created_at":"2022-04-06T06:41:02.000Z","updated_at":"2024-10-09T23:31:12.000Z","dependencies_parsed_at":"2023-12-12T15:30:53.293Z","dependency_job_id":"b3649909-7245-4166-aa43-ae7ec87f22c6","html_url":"https://github.com/kiosion/toru","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Ftoru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Ftoru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Ftoru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiosion%2Ftoru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiosion","download_url":"https://codeload.github.com/kiosion/toru/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228996052,"owners_count":18003633,"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":["elixir","elixir-lang","lastfm","profile-readme","profile-stats","readme-badges","readme-profile","readme-stats"],"created_at":"2024-07-31T17:00:44.244Z","updated_at":"2024-12-10T03:09:49.984Z","avatar_url":"https://github.com/kiosion.png","language":"Elixir","funding_links":["https://github.com/sponsors/kiosion","https://ko-fi.com/kiosion"],"categories":["Elixir"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eToru\u003c/h1\u003e\n  \u003cp\u003eAn API for generating customizable embeds of last.fm activity\u003c/p\u003e\n\u003c/div\u003e\n\n## Demos 🚧\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://last.fm/user/kiosion\" target=\"_blank\"\u003e\u003cimg src=\"https://toru.kio.dev/api/v1/kiosion?theme=dark\" alt=\"Last.fm Activity\" width=\"380px\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://last.fm/user/kiosion\" target=\"_blank\"\u003e\u003cimg src=\"https://toru.kio.dev/api/v1/kiosion?theme=light\" alt=\"Last.fm Activity\" width=\"380px\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Usage 🔧\nSimply add the following snippet to your Github profile readme (or anywhere else you'd like to embed your last.fm activity):\n```\n\u003cimg src=\"https://toru.kio.dev/api/v1/{your_lfm_username}\" alt=\"Last.fm Activity\" /\u003e\n```\n\nYou can append `?res=json` to get a JSON response:\n```\nGET https://toru.kio.dev/api/v1/{your_lfm_username}?res=json\n-\u003e\n{\n  status: 200,\n  data: {\n    url: \"https://last.fm/music/X\",\n    title: \"X\",\n    streamable: false,\n    playing: true,\n    cover_art: {\n      mime_type: \"image/png\",\n      data: \"X\"\n    },\n    artist: \"X\",\n    album: \"X\"\n  }\n}\n```\n\nYou can also connect to the Websocket endpoint - recieved frames will be of the \"data\" field above. Minute-interval pings are required to stay connected.\n```\nwss://toru.kio.dev/api/v1/ws/{your_lfm_username}\n```\n\n## Options ⚙️\nToru has a few parameters you can customize through query parameters:\n\n#### Theme\nThe theme can be specified with `theme=\u003cstr\u003e`. Available themes are:\n- dark/light\n- shoji\n- dracula\n- nord\n- solarized\n- monokai\n\n#### Border radius\nThe border radius of the embed can be specified as an integer with `border_radius`\n\n#### Cover radius\nThe border radius of the album art can be specified as an integer with `cover_radius`\n\n#### Blurred background\nA blurred background can be enabled using `blur`:\n\n\u003ca href=\"https://last.fm/user/kiosion\" target=\"_blank\"\u003e\u003cimg src=\"https://toru.kio.dev/api/v1/kiosion?theme=nord\u0026blur\" alt=\"Last.fm Activity\" width=\"380px\" /\u003e\u003c/a\u003e\n\n#### Border width\nThe width of the borders can be specified (or removed by setting to '0') with `border_width`:\n\n\u003ca href=\"https://last.fm/user/kiosion\" target=\"_blank\"\u003e\u003cimg src=\"https://toru.kio.dev/api/v1/kiosion?theme=dracula\u0026border_width=0\" alt=\"Last.fm Activity\" width=\"380px\" /\u003e\u003c/a\u003e\n\n#### Custom SVG asset\nYou can alternativly specify a custom SVG asset with `svg_url=\u003cstr\u003e`. Toru will fill in the artist name, track title, album title, and cover art resource using the following template strings:\n- Cover art -\u003e `${cover_art}` (should be the 'src' attr, as it's sent as a b64-encoded image string)\n- Artist -\u003e `${artist}`\n- Album -\u003e `${album}`\n- Track -\u003e `${title}`\n\n## Building / Testing 🔨\n- Clone the repo\n- Run `make install` to pull \u0026 compile needed dependencies\n\n### Running\n- Make sure you have an `.env` file in the project root, with `LFM_TOKEN` set to your last.fm API key, and optionally `PORT` set to the port you want to run the dev server on (default is 4000)\n- Run `make dev` to run the livereload dev server, and `make test` to run all unit tests.\n\n### Building a release\n- Environment variables `LFM_TOKEN` and `PORT` are required to build a release\n- `make release` compiles environment variables and builds a docker image with the release\n- `make run` stops any previuosly running docker container, and runs the new release\n\n## Contributing 🤝\nFeel free to open an issue or pull request if you have suggestions or find any bugs!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiosion%2Ftoru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiosion%2Ftoru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiosion%2Ftoru/lists"}