{"id":15283817,"url":"https://github.com/atomicptr/furigana-annotations","last_synced_at":"2026-05-19T04:06:31.371Z","repository":{"id":57243219,"uuid":"445621967","full_name":"atomicptr/furigana-annotations","owner":"atomicptr","description":"Library to provide an improved way to do furigana annotations.","archived":false,"fork":false,"pushed_at":"2022-01-07T19:12:21.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-22T02:00:37.700Z","etag":null,"topics":["anki","furigana","japanese"],"latest_commit_sha":null,"homepage":"https://furigana-annotations.atomicptr.de","language":"TypeScript","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/atomicptr.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":"2022-01-07T18:50:16.000Z","updated_at":"2022-01-07T19:12:25.000Z","dependencies_parsed_at":"2022-09-15T00:50:41.517Z","dependency_job_id":null,"html_url":"https://github.com/atomicptr/furigana-annotations","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/atomicptr/furigana-annotations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Ffurigana-annotations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Ffurigana-annotations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Ffurigana-annotations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Ffurigana-annotations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomicptr","download_url":"https://codeload.github.com/atomicptr/furigana-annotations/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicptr%2Ffurigana-annotations/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267576656,"owners_count":24110317,"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-07-28T02:00:09.689Z","response_time":68,"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":["anki","furigana","japanese"],"created_at":"2024-09-30T14:47:48.301Z","updated_at":"2026-05-19T04:06:26.321Z","avatar_url":"https://github.com/atomicptr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Furigana Annotations\n\nLibrary to provide an improved way to do furigana annotations.\n\n## Example\n\nView https://furigana-annotations.atomicptr.de\n\nGenerally this works similar to normal Anki furigana annotations:\n\n```\n猫[ねこ]\n```\n\nthe biggest advantage comes with words like 役に立つ where you had to write something like\n\n```\n役[やく]に 立[た]つ\n```\n\nbefore, which was always very annoying to me, so this library allows you to write something like this instead:\n\n```\n役に立つ[やく_た_]\n```\n\nas you can see this library keeps the word together and instead of splitting them up you can skip characters via \"_\".\n\n## How to use with Anki\n\n1. Copy the content from https://raw.githubusercontent.com/atomicptr/furigana-annotations/master/docs/index.js\n2. Put it into a script tag on your card template\n3. Add the following snippet to your code:\n\n```html\n\u003cscript\u003e\n    window.addEventListener(\"load\", () =\u003e {\n        const parser = new FuriganaParser();\n        document.querySelectorAll(\".sentence\").forEach(elem =\u003e {\n            const text = elem.textContent.trim();\n            elem.innerHTML = elem.classList.contains(\"render-pitch\") ?\n                    parser.renderPitchAccent(text) :\n                    parser.render(text);\n        });\n    });\n\u003c/script\u003e\n```\n\n4. This will now parse all tags which have the class \".sentence\" e.g. if you did something like this before:\n\n```html\n\u003cdiv class=\"back\"\u003e{{furigana:Sentence}}\u003c/div\u003e\n```\n\nYou'd need to do this now:\n\n```html\n\u003cdiv class=\"back sentence\"\u003e{{Sentence}}\u003c/div\u003e\n```\n\nFor the front you can keep using {{kanji:Sentence}} as this will strip the furigana completely anyway. Might need\nto add a function for this too...\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicptr%2Ffurigana-annotations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomicptr%2Ffurigana-annotations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicptr%2Ffurigana-annotations/lists"}