Skip to content

Commit bd8bb72

Browse files
authored
Merge pull request #1 from L480/claude/execute-plan-md-wlkykf
2 parents 25f60e6 + fb6e76c commit bd8bb72

789 files changed

Lines changed: 36650 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data/tonies/** linguist-generated=true
2+
data/tonies.json linguist-generated=true
3+
TONIES.md linguist-generated=true

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
- name: Syntax check
17+
run: python3 -m py_compile $(git ls-files '*.py')
18+
- name: Run tests
19+
run: python3 -m unittest discover -s tests -v

.github/workflows/sync-tonies.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Sync Tonies
2+
3+
on:
4+
schedule:
5+
- cron: "27 2 * * *" # 02:27 UTC nightly
6+
workflow_dispatch:
7+
inputs:
8+
dry_run:
9+
description: "Skip the commit step (for testing)"
10+
type: boolean
11+
default: false
12+
13+
permissions:
14+
contents: write
15+
16+
concurrency:
17+
group: sync-tonies
18+
cancel-in-progress: false
19+
20+
jobs:
21+
sync:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.12"
28+
- name: Sync upstream .nfc files
29+
run: ./scripts/sync_upstream.sh
30+
- name: Rebuild index
31+
run: python3 scripts/build_index.py
32+
- name: Commit changes
33+
run: |
34+
git add data TONIES.md
35+
36+
if git diff --cached --quiet; then
37+
echo "No changes."
38+
exit 0
39+
fi
40+
41+
if [ "${{ inputs.dry_run }}" = "true" ]; then
42+
echo "dry_run: would commit the following changes:"
43+
git diff --cached --stat
44+
exit 0
45+
fi
46+
47+
git config user.name "github-actions[bot]"
48+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
49+
50+
SHORT_SHA="$(python3 -c "import json; print(json.load(open('data/UPSTREAM.json'))['commit'][:7])")"
51+
FILE_COUNT="$(python3 -c "import json; print(json.load(open('data/UPSTREAM.json'))['file_count'])")"
52+
53+
git commit -m "chore: sync tonies from upstream ($SHORT_SHA, $FILE_COUNT files)"
54+
git push

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__pycache__/
2+
*.pyc
3+
.DS_Store

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# tonies
2+
3+
Write a real Tonie figure onto a blank NFC tag using a Proxmark3, so a stock
4+
Toniebox plays it. This repo nightly mirrors every `.nfc` dump from
5+
[nortakales/flipper-zero-tonies](https://github.com/nortakales/flipper-zero-tonies),
6+
builds a browsable index, and ships a local CLI (`./tonie`) that resolves a
7+
Tonie by name, writes it to a tag, and verifies the result.
8+
9+
> **⚠️ Tag compatibility — read this first**
10+
> You need a **magic ICODE SLIX-L tag with a changeable UID**, e.g. from
11+
> [rfidfriend.com](http://rfidfriend.com) (order the *magic* variant, not the
12+
> fixed-UID one). Plain "programmable" SLIX stickers, and generic magic
13+
> ISO 15693 tags (SLI / SLIX2 / TAG-it), do **not** work on a stock,
14+
> unmodified Toniebox — they either have the wrong UID prefix or fail the
15+
> box's privacy-password check. See [`docs/HARDWARE.md`](docs/HARDWARE.md)
16+
> for the full compatibility table and troubleshooting.
17+
18+
## Quickstart
19+
20+
```sh
21+
git clone https://github.com/l480/tonies.git && cd tonies
22+
brew tap RfidResearchGroup/proxmark3 && brew install --with-generic proxmark3
23+
pm3-flash-all # put the PM3 in bootloader mode first
24+
./tonie doctor
25+
./tonie search "paw patrol"
26+
./tonie write "Zuma" --dry-run
27+
./tonie write "Zuma"
28+
```
29+
30+
No `pip install` step: the CLI is Python standard library only.
31+
32+
## Commands
33+
34+
| Command | Behaviour |
35+
|---------|-----------|
36+
| `tonie list [--language DE\|German] [--series X] [--limit N]` | print the catalog |
37+
| `tonie search <query>` | ranked matches with scores |
38+
| `tonie info <query>` | resolved Tonie: name, series, language, UID, path, all 8 blocks |
39+
| `tonie write <query> [flags]` | resolve, confirm, write, and verify a Tonie onto the tag on the reader |
40+
| `tonie read` | read the tag on the reader and identify it against the catalog |
41+
| `tonie doctor [--probe-magic]` | environment + hardware check |
42+
| `tonie index` | regenerate `data/tonies.json` + `TONIES.md` locally |
43+
44+
Global flags: `--port <dev>`, `--json`, `--verbose`.
45+
46+
`tonie write` flags: `--dry-run`, `--yes`, `--uid-only`, `--blocks-only`,
47+
`--no-verify`, `--retries N`, `--language`, `--pick N`. There is deliberately
48+
no `--gen2` flag — see `docs/HARDWARE.md` for why.
49+
50+
## The catalog
51+
52+
[`TONIES.md`](TONIES.md) lists every available Tonie, grouped by language and
53+
series. It and `data/` are regenerated nightly by
54+
[`.github/workflows/sync-tonies.yml`](.github/workflows/sync-tonies.yml); see
55+
[`docs/WORKFLOW.md`](docs/WORKFLOW.md) for how that works and how to run it
56+
locally.
57+
58+
## Credits & legal
59+
60+
The `.nfc` dumps are mirrored from the community-maintained
61+
[nortakales/flipper-zero-tonies](https://github.com/nortakales/flipper-zero-tonies)
62+
repository. The write sequence is built against the
63+
[Proxmark3 Iceman (RfidResearchGroup) firmware](https://github.com/RfidResearchGroup/proxmark3)
64+
and reuses the safe magic-UID write frames documented by
65+
[SLI-Writer](https://github.com/Julienbxl/SLI-Writer).
66+
67+
This tooling clones identifiers of Tonie figures for personal use with
68+
figures and content you own — for example, replacing a lost or damaged
69+
figure with a sticker on a DIY figure. Do not redistribute cloned tags. No
70+
audio content is copied by any of this: the audio lives on the
71+
Toniebox/cloud, never on the tag itself.

0 commit comments

Comments
 (0)