UNIBETAPREP(1)
π 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 isSTDIN. π-oβ Specify the output file. The default isSTDOUT. π-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
- debian trixie: unibetacode 2.3-5 Β· GPL-2.0-or-later
- ubuntu questing: unibetacode 2.3-5
- ubuntu resolute: unibetacode 2.3-5build1 Β· GPL-2.0-or-later
- ubuntu stonking: unibetacode 2.3-5build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms