Skip to content
beetlebugorgPublic

About

ztk-cards: Cardbox, a sample ztk app for desktop, mobile, the web, and the command line

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Cardbox

A collection of baseball cards, on each screen. Cardbox is the sample app of ztk. The plan: one code base gives a desktop UI, a Tk mobile UI, native phone screens, and a command line program, and each file shows one API of ztk or ztcl. Today the repository has the core rules and the sample data only. The status below gives the parts that exist.

API map: https://beetlebug.org/ztk-cards/api-map/ (item 50 makes it; the page does not exist yet)

Docs: https://beetlebug.org/ztk-cards/ (item 49 makes the site; the site does not exist yet)

Install

Install ztcl and ztk, then clone this repository:

git clone https://github.com/beetlebugorg/ztk-cards
cd ztk-cards

ztcl runs the core and the tests. ztk runs the GUI when it exists.

Example

A card is a dict. The model normalizes it and reports the errors. Save this as example.tcl in the root; the names are invented:

source core/model.tcl
set card [cardbox::model::new player "Tavi Rook" set "Lanterns 1987" number 7a]
foreach error [cardbox::model::validate $card] {
    puts [dict get $error message]
}

Run it, then run the tests:

ztcl --allow channels example.tcl
ztcl test

The output of the example is:

The number must be a positive integer.

Documentation

  • docs/dev/spec.md: the approved design and the 60 work items.
  • A README in each folder gives its purpose, its files, and its rules.

The docs site comes with items 49 to 56: the API map, install, a tutorial, guides, platform pages, and a reference.

Status

Cardbox is in its first work items. The repository has the repo file set, the project and its start, the folder READMEs, and these parts of core/: the card model, the grade, the value, the filter, the sets and the want list, CSV and JSON in and out, the PDF checklist, and the sample collection. data/ has the word lists and the sample data, and ui/model/ has the session, the collection, the card, and the form spec. ui/app.tcl is a stub, and the CLI does not exist yet. The items of section 12 of the spec add the CLI, the store, the view models, the UIs, and the docs site. The issues and the milestone v0.1.0 hold the work.

Contributing

A contribution starts in a Discussion: a bug with the steps that show it, or an idea with the use that you have for it. A maintainer makes an issue from the Discussion, and an AI agent of the project does the work. Do not open an issue or a pull request yourself. CONTRIBUTING.md has the steps, and DISCUSSIONS.md has what a discussion must give.

Contact

Write to [email protected] about Cardbox. Start a Discussion for a bug or a request, and report a security problem as SECURITY.md says.

License

MIT. See LICENSE.

About

ztk-cards: Cardbox, a sample ztk app for desktop, mobile, the web, and the command line

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages