Memuly-Library

memcard-library

Chỉ mục (index / “tap”) chính thức cho Deck Library của Memcard — nơi liệt kê các bộ flashcard (deck) do cộng đồng đóng góp. Mô hình lấy cảm hứng từ Homebrew: repo này không chứa nội dung deck nặng, chỉ chứa các manifest mô tả deck và một index.json tổng hợp để app đọc.

Cấu trúc

memcard-library/
├── index.json                 # Danh mục tổng hợp — app tải file này để duyệt deck
├── manifests/                 # Mỗi deck = 1 manifest (metadata + checksum + link nội dung)
│   └── minna-no-nihongo-i.json
├── schema/
│   ├── manifest.schema.json   # JSON Schema cho manifest
│   └── index.schema.json      # JSON Schema cho index.json
├── scripts/
│   ├── build_index.py         # Sinh lại index.json từ manifests/
│   └── validate.py            # Kiểm tra schema + checksum + sanitize
└── .github/workflows/
    └── validate.yml           # CI chạy trên mỗi Pull Request

Cách hoạt động

  1. Nội dung deck thật (deck.json theo schema Memcard) nằm ở repo riêng của từng collection, ví dụ Minna-No-Nihongo-I.
  2. Repo này chỉ giữ manifest trỏ tới nội dung đó qua content_url, kèm content_sha256 để client verify.
  3. index.json được sinh tự động từ manifests/ bằng scripts/build_index.py.
  4. App Memcard tải index.json để hiển thị danh sách, rồi tải manifest + nội dung khi người dùng bấm Install.

Category

Mỗi deck khai báo đúng một category để app duyệt theo nhóm: languages, arts-literature, maths-science, the-natural-world, history-geography, memory-training, professional-and-careers, standardised-tests, trivia, entertainment. Chi tiết xem CONTRIBUTING.md.

Thêm một deck

Xem CONTRIBUTING.md.

Kiểm tra cục bộ

pip install jsonschema requests
python3 scripts/build_index.py          # sinh lại index.json
python3 scripts/validate.py             # validate đầy đủ (có tải nội dung qua mạng)
python3 scripts/validate.py --no-network # validate nhanh, bỏ qua tải mạng

License

Mã và schema trong repo này: MIT. Mỗi deck có license riêng khai báo trong manifest (license).