jja 0.3.0

swiss army knife for chess file formats
docs.rs failed to build jja-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: jja-0.9.1

jja

This is jja, a command line utility to interact with various chess file formats. It is still in its very early stages of development. The initial intention of the author was to convert their opening books which were saved with ChessBase's proprietary CTG format to the free and open PolyGlot format. Overtime they intend to add support for other chess file formats (cbh, epd, pgn, si4, si5 and so on).

Formats

As of version 0.3.0, jja supports reading/querying:

  • PolyGlot, aka bin
  • Arena, aka abk
  • ChessBase, aka ctg
  • ChessMaster, aka obk (version 1 and 2, w\o,with text notes)

opening book files, wheras it supports writing/converting to:

  • PolyGlot, aka bin

opening book files.

During opening book conversion, jja uses the information provided in various input opening book formats to come up with a move weight which accompanies the move in the PolyGlot opening file. jja also writes some custom numbers in the learn field, such as NAGs during ctg conversion or priority during abk conversion. You may disable this custom usage using --no-learn as it may confuse other software making use of this field.

Usage

Use jja info to get brief information about the chess file. Use jja find to search for a position in a chess file. Use jja edit to edit opening book files and convert to PolyGlot files.

jja determines the type of the file using its file extension. Files with the extension .bin are considered PolyGlot books. Files with the extension .ctg are considered ChessBase books. Files with the extension .abk are considered Arena books. Files with extension .obk are considered ChessMaster books.

By default if the standard output is a TTY, jja will display information using fancy tables. Use --porcelain command line option to get the output in CSV (comma-separated values) format instead.

Demo

Jin, Jîyan, Azadî

I've started hacking this on International Women's Day 2023, a day to honor the achievements of women and advocate for their rights worldwide. As a person of Kurdish heritage, I am particularly moved by the slogan "Woman, Life, Freedom," which has become a symbol of resistance against oppression and a call for equality. In the spirit of free software and free speech, I strive to contribute to the creation of a more just and inclusive society, where every human being is granted the freedom to express themselves and pursue their dreams. I also honor the memory of Mahsa Amini, whose tragic death reminds us of the urgent need to fight for women's freedom and safety.

More on Wikipedia, WikiPedia::Woman,_Life,_Freedom

ChangeLog

0.3.0

  • refactor code to unify various opening book reader interfaces
  • support obk version 1 as well as 2 (ChessMaster books with and without notes)
  • support for reading obk (ChessMaster) books and converting them to polyglot books
  • do not display progress bar if standard output is not a TTY
  • support for reading abk (Arena) books and converting them to polyglot books
  • new play command can be used to make random playouts using opening books

0.2.1

  • weight conversion in ctg to polyglot edit can be tuned with --nag-weight-{good,mistake,hard,blunder,interesting,dubious,forced}=
  • edit learned --no-scale to avoid scaling weights globally to fit into 16 bits
  • the code is now relatively well documented
  • edit --in-place now properly deletes the output temp file on interrupt
  • edit filters out moves with zero weights, use -0, --null to preserve them

0.2.0

  • edit window lists position info (key, epd, legal moves) as comment
  • edit no longer silently discards illegal moves
  • edit can edit PolyGlot files in-place with -i, --in-place=SUFFIX
  • edit can convert CTG opening books into PolyGlot opening books
  • default to start position when no --fen or --pgn is given for edit and find
  • info prints number of total pages in CTG books

0.1.1

  • new positions can be added to polyglot files
  • many bugs fixed with polyglot edit
  • quote command added to print a random chess quote
  • open command added to query ECO classification

0.1.0

  • edit polyglot files, only editing present positions work
  • read polyglot files
  • read ctg files