Skip to content

Instantly share code, notes, and snippets.

@STrRedWolf
Created January 14, 2023 13:53
Show Gist options
  • Save STrRedWolf/f580b900043a579e422b03e97cb01586 to your computer and use it in GitHub Desktop.
Save STrRedWolf/f580b900043a579e422b03e97cb01586 to your computer and use it in GitHub Desktop.
DESCRIPT.ION File format (inc RedWolf extension)

DESCRIPT.ION file format (RedWolf extension)

DESCRIPT.ION files are files used in BBSen and the programs 4NT and Take Command. These files describe other files in the directory.

Below is a technical summary of the orignal format, plus an extension to the format.

DESCRIPT.ION "back in the day"

contents    = *(file-line) [EOF]
file-line   = file-name SP description *(app-specific-tags)
file-name   = *VCHAR
description = *(VCHAR / SP)
app-specific-tags   = EOT app-id app-desc
app-desc    = *(VCHAR / SP)

EOT         = %x04                  ; ASCII End-Of-Transmission
EOL         = CR LF / CR / LF / EOF
EOF         = %x1A                  ; ASCII End-Of-File

The maximum file size for DESCIPT.ION files is 4096 bytes.

The RedWolf Extension

DESCRIPT.ION files (or .descript.ion files in UNIX style OSen) can break some limitations with the following format.

contents        = header EOL *(file-line)
header          = content-name SP "DESCRIPT.ION" SP "RW" [*(SP extension)]
extension       = name [":" value]
file-line		= file-name HTAB *SP description *(HTAB tag)
file-name		= *(VCHAR / SP)
description		= *(VCHAR / SP)
tag				= name ":" *SP value
name			= *(ALPHA / DIGIT / "-" / "_" )
value			= *(VCHAR / SP)

EOL             = CR LF / CR / LF

File size is constraigned only by operating system file size limits. File names may be further constraigned by the operating system and/or file system.

A basic example:

.descript.ion DESCRIPT.ION RW
foo.bar	test file	type:junk

Extensions may also be specified in the header. For example, if an index extenstion were to be developed:

.descript.ion DESCRIPT.ION RW index:.desc.idx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment