Crates.io | p101_enc |
lib.rs | p101_enc |
version | |
source | src |
created_at | 2024-10-09 21:32:14.400632 |
updated_at | 2024-10-09 21:32:14.400632 |
description | Library to convert Olivetti P101 program to and from different encodings |
homepage | |
repository | https://gitlab.com/cokkaai/programma_101/-/tree/master/enc |
max_upload_size | |
id | 1403071 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
C101 is the Programma 101 format conversion utility. In the Unix mindset, it allows to combine different filters in pipelines to apply different trasformations.
The conversion of a file to a new format is made of different stages. Each stage is a filter which trasforms its input in another form. Executing many filters in sequence, all required encodings can be managed: this is the concept of pipeline.
Each filter has specific input and output and must be properly combined. A stage output format must match the next stage input format. For instance, to read the prg.101 file from disk, decode from the Larini format, encode it in standard UTF8 and write the program to the standard out one would write:
c101 -f read_file -f larini_decoder -f standard_encoder -f write_to_stdout prg.101
The last parameter is always the file to process. While it may seems complicated, it allows to add a new formats by implementing the specific business logic in a new filter.
In order to build your own conversione pipeline, a short reference follows
A filter, by the trait definition, maps an EncodingData value to another. It means that you can transform raw data to a file or text or program a viceversa. Each filter accepts only the EncodingData it can process; for instance the read_file filter refues any input that is not an EncodingData::File value.