{"id":49305266,"url":"https://github.com/l-m-sherlock/japanese-mining-report","last_synced_at":"2026-04-26T09:04:03.108Z","repository":{"id":353058323,"uuid":"1217794065","full_name":"L-M-Sherlock/japanese-mining-report","owner":"L-M-Sherlock","description":"Report for visualizing the sources of Anki Lapis Japanese mining cards.","archived":false,"fork":false,"pushed_at":"2026-04-22T09:40:32.000Z","size":1313,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-22T10:30:06.144Z","etag":null,"topics":["japanese-learning","vibe-coding"],"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/L-M-Sherlock.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T08:17:51.000Z","updated_at":"2026-04-22T09:40:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/L-M-Sherlock/japanese-mining-report","commit_stats":null,"previous_names":["l-m-sherlock/japanese-mining-report"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/L-M-Sherlock/japanese-mining-report","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-M-Sherlock%2Fjapanese-mining-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-M-Sherlock%2Fjapanese-mining-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-M-Sherlock%2Fjapanese-mining-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-M-Sherlock%2Fjapanese-mining-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/L-M-Sherlock","download_url":"https://codeload.github.com/L-M-Sherlock/japanese-mining-report/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-M-Sherlock%2Fjapanese-mining-report/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32291347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T08:29:33.829Z","status":"ssl_error","status_checked_at":"2026-04-26T08:29:18.366Z","response_time":129,"last_error":"SSL_read: 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":["japanese-learning","vibe-coding"],"created_at":"2026-04-26T09:03:58.704Z","updated_at":"2026-04-26T09:04:03.100Z","avatar_url":"https://github.com/L-M-Sherlock.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Japanese Mining Report\n\nSmall script for visualizing where your Anki `Lapis` cards came from while mining Japanese.\n\nIt reads the `MiscInfo` field from your notes, groups mined cards by source and by higher-level work/material, and generates a local HTML report with English/Chinese UI switching.\n\n## Preview\n\n![English report preview](assets/report-preview-en.png)\n\n## Project Setup\n\nThis repository is managed as a `uv` project with a [`pyproject.toml`](pyproject.toml) and an installable CLI entrypoint.\n\nRecommended setup:\n\n```bash\nuv sync\n```\n\n## What It Shows\n\n- Total mined cards\n- Studied cards\n- Top works / materials\n- Top source entries\n- Full source table with filtering\n\nFor the two top charts:\n\n- Dark bar segment: studied cards\n- Light bar segment: mined but not yet studied cards\n- Right-side value: `studied/mined`\n\n## Safety\n\nThe script does **not** read Anki's live database directly.\n\nBefore querying anything, it copies `collection.anki2` and any matching `-wal` / `-shm` sidecar files to a temporary snapshot, then runs all analysis against that snapshot.\n\n## Usage\n\nRun from this directory:\n\n```bash\nuv run scripts/visualize_lapis_sources.py\n```\n\nOr run the packaged CLI from this repository:\n\n```bash\nuvx --from . japanese-mining-report --db \"/path/to/collection.anki2\"\n```\n\nOr directly from GitHub:\n\n```bash\nuvx --from git+https://github.com/L-M-Sherlock/japanese-mining-report.git \\\n  japanese-mining-report --db \"/path/to/collection.anki2\"\n```\n\nBy default the script resolves the database in this order:\n\n1. `--db /path/to/collection.anki2`\n2. `ANKI_COLLECTION_PATH`\n3. `./collection.anki2`\n\nIf you want to point at a specific collection:\n\n```bash\nuv run scripts/visualize_lapis_sources.py --db \"/path/to/collection.anki2\"\n```\n\nOr set an environment variable:\n\n```bash\nexport ANKI_COLLECTION_PATH=\"/path/to/collection.anki2\"\nuv run scripts/visualize_lapis_sources.py\n```\n\n## Common Options\n\n```bash\nuv run scripts/visualize_lapis_sources.py \\\n  --note-type Lapis \\\n  --field MiscInfo \\\n  --deck-contains 日本語 \\\n  --top 30 \\\n  --output output/lapis_source_report.html\n```\n\n- `--db`: explicit path to the Anki collection database\n- `ANKI_COLLECTION_PATH`: optional environment variable for the Anki collection database\n- `--note-type`: note type name, default `Lapis`\n- `--field`: source field name, default `MiscInfo`\n- `--deck-contains`: optional deck-name substring filter\n- `--top`: number of rows shown in the top charts\n- `--output`: output HTML path\n\n## Files in This Directory\n\n- [pyproject.toml](pyproject.toml): project metadata for `uv`\n- [scripts/__init__.py](scripts/__init__.py): package marker for the installable CLI\n- [uv.lock](uv.lock): lockfile generated by `uv`\n- [.python-version](.python-version): pinned Python minor version for `uv`\n- [scripts/visualize_lapis_sources.py](scripts/visualize_lapis_sources.py): main script\n- [output/](output): generated outputs\n- [output/lapis_source_report.html](output/lapis_source_report.html): latest generated report\n\nGenerated files under `output/` and the local `.venv/` are ignored by git.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl-m-sherlock%2Fjapanese-mining-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl-m-sherlock%2Fjapanese-mining-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl-m-sherlock%2Fjapanese-mining-report/lists"}