debrouxl / tilibs

TILP (formerly GtkTiLink) can transfer data between Texas Instruments graphing calculators and a computer. It works with all link cables (parallel, serial, Black/Gray/Silver/Direct Link) and it supports the TI-Z80 series (73..86), the TI-eZ80 series (83PCE, 84+CE), the TI-68k series (89, 92, 92+, V200, 89T) and the Nspire series (Nspire Clickpad / Touchpad / CX, both CAS and non-CAS)
http://lpg.ticalc.org/prj_tilp
63 stars 23 forks source link

CLI interface to libtifiles for portable file manipulation #31

Open debrouxl opened 5 years ago

debrouxl commented 5 years ago

Making a CLI interface on top of libtifiles, to provide portable, native code functionality for manipulating computer files suitable for calculators, is a very old idea, and I should have pursued it earlier...

Scattered, partial implementations of the concept can be found in e.g.:

Also, to gather all of the links in a single place, let's mention better CLI front-ends for libticalcs, namely Benjamin Moody's titools and Jonimus' fork containing tidump: https://www.ticalc.org/archives/files/fileinfo/430/43083.html , https://github.com/Jonimoose/TITools .

A unified version of a subset of the file manipulation utilities' functionality could be fulfilled by a single tifileutil (name TBD) tool with scriptable interface, ala gdbmtool / tdbtool (pure CLI args version at first). I think that it should live in the tilibs tree, alongside the other top-level projects, so that it can be used e.g. when building libticalcs' ROM dumpers - that's the trigger for writing this issue.

Draft proposal gathering functionality found in other tools, as well as several new items:

tipack CLI

Usage: tipack [OPTIONS] [FILE | -]
Where OPTIONS may include:
 -o FILE:     output result to FILE
 -n NAME:     set on-calc variable name to NAME
 -t TYPE:     set variable type to TYPE (e.g. 82p)
 -c COMMENT:  set file comment (strftime format string)
 -p:          protect program
 -C:          number/list/matrix is complex
 -a:          send files to archive
 -r:          raw mode (no length bytes)
 -v:          be verbose

Implementation notes:

debrouxl commented 3 years ago

tifileutil with wrap and dump sub-commands are now live on the experimental2 branch, used by the libticalcs build when rebuilding the ROM dumpers.