UNIBETAPREP(1)

πŸ“¦
version 2.3 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– UNIBETAPREP β€” the pre-processor bestie πŸ’–

okay so welcome to the unibetaprep(1) page, from the General Commands Manual section (section 1, the one for actual commands you run in your terminal, iykyk). Sit down, grab a strawberry πŸ“, and let's talk about turning ancient Greek into Unicode.


✨ NAME ✨

unibetaprep β€” pre-process Beta Code files so that beta2uni(1) can do its little thing πŸ¦‹


✨ SYNOPSIS ✨

unibetaprep [-i input_file.pre] [-o output_file.beta]

✨ DESCRIPTION ✨

okay so here's the tea β˜• unibetaprep(1) reads a document encoded in Beta Code β€” and that document may contain special character codes from the full Beta Code of the Thesaurus Linguae Graecae (TLG) specification β€” and it converts it into a Beta Code file where all those special characters have been turned into Unicode escape sequences. Basically it's not doing the traditional encoding of those special characters anymore, it's switching over to Unicode code point assignments. It's giving glow-up πŸ’…

Beta Code, for those not in the know, is an ASCII-only encoding scheme β€” literally just plain text characters β€” most commonly used for the digital representation of polytonic Greek. yes bestie, the Greek with all the little accents and breathings on top. iconic πŸ‘‘

Beta Code has become a widely-adopted standard for encoding classical Greek. It was developed by David Packard in the 1970s and adopted by the Thesaurus Linguae Graecae (TLG) Project at the University of California, Irvine shortly thereafter. Then the Perseus Project picked it up in the 1980s (originally at Harvard University, now at Tufts University), and so did a whole bunch of other collections of classical and Koine Greek. And today? The TLG corpus alone contains over 100 million words from classical to Byzantine Greek. a hundred million. that's not a typo. πŸ”₯

Here's a little detail that matters: the TLG uses uppercase Latin letters, and the Perseus Project uses lowercase. And unibetaprep(1)? It will accept either. no cap, it does not care, it loves you both 🫢

Many classicists who use Beta Code have been actively involved in The Unicode Standard, with evolving recommendations for mapping between Beta Code and Unicode. unibetaprep(1) exists to provide a capability for GNU/Linux users who wish to convert Beta Code texts to Unicode. that's the whole point, that's the mission 🌈

Now the most notable range of special characters in the TLG specification is the complete range of Byzantine Musical Symbols, in the Unicode range U+1D000 through U+1D0FF, inclusive. That range corresponds to the TLG special character encodings "#2000" through "#2245", respectively. And if a character sequence in the TLG Beta Code specification corresponds to a Unicode glyph or glyph combination, unibetaprep should handle the translation correctly. πŸ’«

Most of these Beta Code sequences consist of a "#", "%", "<", ">", "[", or "]" character followed by one or more decimal digits. But β€” and this is important β€” sequences corresponding to idiosyncratic Beta Code glyphs are not translated to Unicode. πŸ™ˆ

The Beta Code quotation mark sequences "1, "2, "4, and "5 are converted to represent Unicode code points U+201E, U+201C, U+201A, and U+201B, respectively. And for other special code sequences? consult the TLG Beta Code Quick Reference Guide, or go look at the flex program source in the file unibetaprep.l. yes, the source code is right there, it's an open book bestie πŸ“–

The output of unibetaprep is designed to provide the input to beta2uni(1), which then produces UTF-8 Unicode output. it's a whole pipeline, it's a relay race, and unibetaprep runs the first leg πŸƒβ™€οΈ

Note: Thesaurus Linguae Graecae and TLG are registered trademarks of the University of California. (legal girlies, that's for you πŸ’œ)

✨ OPTIONS ✨

  • -i β€” Specify the input file. The default is STDIN. πŸŽ€
  • -o β€” Specify the output file. The default is STDOUT. πŸŽ€
  • -v β€” Print the program version and exit. πŸ’…
  • --version β€” Print the program version and exit. πŸ’…

Sample usage, because a demo just hits different:

unibetaprep -i my_input_file.pre -o my_output_file.beta

The output file, my_output_file.beta, can then be used as input for beta2uni(1) for conversion into a UTF-8 Unicode document. that's it, that's the flow, slay πŸ’–


✨ FILES ✨

ASCII text files using Beta Code to encode polytonic Greek. that's the vibe 🌸


✨ SEE ALSO ✨

go read the whole friend group, they're all iconic πŸ¦‹


✨ AUTHOR ✨

unibetaprep was written by Paul Hardy. thank you Paul, king behavior πŸ‘‘


✨ LICENSE ✨

unibetaprep is Copyright Β© 2018, 2019, 2020 Paul Hardy.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. πŸ’œ


✨ BUGS ✨

No known bugs exist. literally flawless. not me being suspicious of a program with zero bugs 😭 but that's what the page says bestie, so that's what we're saying. periodt. ✨


and that's the whole page, no notes πŸ’– this version of the unibetaprep(1) manual is from 2019 Jan 26 β€” a little vintage, very timeless, main character energy β€” brought to you by the General Commands Manual section. go forth and convert some polytonic Greek, bestie 🌈🫢

πŸ“¦ where this page comes from