python: add docstrings to import/export tools
add retro implementation of block_import
add a block_export tool in retro
These are a collection of tools for operating on block files, specifically aimed at use with the block files for ilo, napia, and arks.
As defined by ilo (and drawing from Forth tradition), blocks are 1024 byte sequences of characters. These are traditionally displayed as 16 lines of 64 characters.
Adjust the constants in block_config.py
to match your block
file limits.
This takes a block file as input and converts it to a plain text file format. Each line gets a line number, and horizontal rules are provided as a visual aid.
A RetroForth implementation is also provided as
block_export.retro
.
This takes a plain text file (as created by block_export.py
)
and converts it into a block file. The horizontal rules and line
numbers are stripped in the process.
A RetroForth implementation is also provided as
block_import.retro
.
This takes in two exported block sets, and allows you to select which blocks to keep for any blocks that differ between the two.
Copyright (c) 2022 Arland Childers <arland@childe.rs>
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.