Commit cd22a15611
Verified · cmc
Layout: unified · split
content/blog/2026-08-20-nfogen.org added +270
| @@ -0,0 +1,270 @@ | ||
| 1 | #+date: [2026-08-20 Thu 10:24:00] | |
| 2 | #+title: generating scene-style .nfo files in 2026 | |
| 3 | #+description: Announcing nfogen, a small utility to generate NFO files. | |
| 4 | #+slug: nfogen | |
| 5 | #+filetags: :development: | |
| 6 | ||
| 7 | * What Is an .nfo File? | |
| 8 | ||
| 9 | If you're unfortunate enough not to have lived through the heyday of =.nfo= files, | |
| 10 | I want to provide some context. Because honestly, this project might seem weird | |
| 11 | or useless without it. | |
| 12 | ||
| 13 | First, an [[https://en.wikipedia.org/wiki/.nfo][NFO]] file (short for info/informational) is a file format originally | |
| 14 | released in 1990. This file format was used by various projects, but especially | |
| 15 | by [[https://en.wikipedia.org/wiki/Warez_scene][warez/scene]] groups to provide info about their projects. This might include | |
| 16 | credits, installation instructions, BBS/contact info, greetz/notes, etc. | |
| 17 | ||
| 18 | For example, here's the =bonzai.nfo= file for a patched save game for Lemmings | |
| 19 | III, with credits to those involved and instructions to get in touch. | |
| 20 | ||
| 21 | #+begin_src nfo | |
| 22 | К К | |
| 23 | ||
| 24 | лллллК К | |
| 25 | лллллК К | |
| 26 | лллллпллл лллллпллл лллллпллл лллллпллл лллллпллл ппппп | |
| 27 | лллллКлллл ллллл лллл ллллл лллл ллллл лллл ллллл лллл ллллл | |
| 28 | лллллКлллл ллллл лллл ллллл лллл ммммммлллл лллллмлллл лллллл | |
| 29 | лллллКлллл ллллл лллл ллллл лллл ллллл мммм ллллл лллл лллллл | |
| 30 | ллллл лллл ллллл лллл ллллл лллл ллллл лллл ллллл лллл лллллл | |
| 31 | лллллКлллл ллллл лллл ллллл лллл ллллл лллл ллллл лллл лллллл | |
| 32 | лллллКлллл ллллл лллл ллллл лллл ллллл лллл ллллл лллл лллллл | |
| 33 | ллллл лллл ллллл лллл ллллл лллл ллллл лллл ллллл лллл лллллл | |
| 34 | пппппппппп пппппппппп ппппп пппп пппппппппп ппппп пппп пппппп | |
| 35 | К жФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФЗ К | |
| 36 | К ў BONZAi Ф EVERYTHiNG BUT FRiENDSHiP ў К | |
| 37 | К гФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФФН К | |
| 38 | R E L E A S E D : | |
| 39 | К К | |
| 40 | К 9O BYTES SAVE GAME PATCHER FOR LEMMiNGS III К | |
| 41 | ||
| 42 | К FiLENAME .............. : ........... BNZ-L3T.ZiP К | |
| 43 | К TYPE .................. : ............... TRAiNER К | |
| 44 | К COMPANY ............... : ............. PSYGNOSiS К | |
| 45 | К CODER .. .............. : ................ SCAMPY К | |
| 46 | К PACKAGER .............. : ................ SCAMPY К | |
| 47 | К DATE AT RELEASiNG ..... : ............ 11-27-1994 К | |
| 48 | К TiME AT RELEASiNG ..... : .............. 15:OO PM К | |
| 49 | К RELEASE NOTES : ..................... READ BELOW! К | |
| 50 | К К | |
| 51 | К !!!*!!! IMPORTANT !!!*!!! К | |
| 52 | К К | |
| 53 | К NiCE PATCHER FOR A NiCE GAME - THiS PATCHER WAS К | |
| 54 | К KINDA DiFFiCULT BECAUSE OF THE MANY BYTES TO BE К | |
| 55 | К PATCHED. BUT PROBLEMS WiTH PATCHiNG TiME AND К | |
| 56 | К FiLE LENGTH HAVE BEEN SOLVED. К | |
| 57 | К К | |
| 58 | К ENJOY PLAYiN' -SCAMPY! К | |
| 59 | К К | |
| 60 | К К | |
| 61 | К MEMBERS OF BONZAi ARE . : К | |
| 62 | К MOTiV8- SCAMPY- SUM-1- DEViL К | |
| 63 | К К | |
| 64 | К BULLETiN BOARD SYSTEMS : К | |
| 65 | Э Э ЭЭ ЭЭЭМ NONE! SEARCHiNG! ШЭЭЭ ЭЭ Э Э | |
| 66 | ||
| 67 | GREETiNGS TO: | |
| 68 | TOXiC HYBRiD PENTAGRAM PARADOX THHG G.T.A TRSI | |
| 69 | ||
| 70 | #TO GET iN TOUCH WiTH BNZ LEAVE MAiL TO US ANYWHERE YOU FiND US# | |
| 71 | ||
| 72 | CURRENTLY WE ARE SEARCHiNG FOR ALL KiND OF MEMBERS.. LiKE TRADERS | |
| 73 | SUPPLiERS.. SYSOPS.. ETC. | |
| 74 | ||
| 75 | Э Э ЭЭ ЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭЭ ЭЭ Э Э | |
| 76 | #+end_src | |
| 77 | ||
| 78 | If you want to browse an archive of NFO files, head over to [[http://www.textfiles.com/piracy/NFO/][textfiles]]. | |
| 79 | ||
| 80 | * The Aesthetic | |
| 81 | ** ASCII Art and Box Drawing | |
| 82 | ||
| 83 | As you can see in the example above, complex ASCII drawings, logos, and | |
| 84 | structure are a staple of a good NFO file. Commonly, the ASCII art is used to | |
| 85 | create recognizable logos for specific groups in the scene. | |
| 86 | ||
| 87 | This requires fixed-width fonts to be viewed appropriately. E.g., on Windows, | |
| 88 | you could open an NFO file in Notepad and ensure a fixed-width font is selected, | |
| 89 | such as Consolas. Proportional and custom fonts break the flow and structure of | |
| 90 | these files, which is unfortunately the default in modern browsers (unless you | |
| 91 | use code blocks, like I did above). | |
| 92 | ||
| 93 | ** Codepage 437 | |
| 94 | ||
| 95 | One such character set was often used for NFO files: IBM's [[https://en.wikipedia.org/wiki/Code_page_437][CP437]] character set, | |
| 96 | released with the 1981 IBM PC. This set was popular because each character could | |
| 97 | be typed with an alt code in DOS, even if they were not on the user's keyboard. | |
| 98 | E.g., =Alt + 2665= would result in the following character: =♥=. | |
| 99 | ||
| 100 | * Introducing: nfogen | |
| 101 | ||
| 102 | So, why am I writing about this now? Well, I was feeling nostalgic for NFO files | |
| 103 | recently. As part of this, I started using NFO files for my git repos under my | |
| 104 | new org and wanted a tool that could help me accelerate the generation of these | |
| 105 | files. | |
| 106 | ||
| 107 | Introducing [[https://github.com/krazywarez/nfogen][nfogen]], a small Python utility that can generate NFO files for you based on: | |
| 108 | - templates | |
| 109 | - profiles | |
| 110 | - configuration files | |
| 111 | - CLI flags | |
| 112 | - interactive CLI prompts | |
| 113 | ||
| 114 | This enables fast, customizable, and templatized NFO files you can generate on | |
| 115 | the fly. | |
| 116 | ||
| 117 | ** Sample Output | |
| 118 | ||
| 119 | There's no better way to introduce a project than to show a demo, so here's a | |
| 120 | demo of how I generated the =README.nfo= for nfogen itself. | |
| 121 | ||
| 122 | First, I defined =nfogen.toml= so that I could use this as a configuration file | |
| 123 | during generation: | |
| 124 | ||
| 125 | #+begin_src toml | |
| 126 | group = "KRZ" | |
| 127 | site = "krz.sh" | |
| 128 | width = 79 | |
| 129 | style = "double" | |
| 130 | layout = "rows" | |
| 131 | ||
| 132 | banner = true | |
| 133 | banner_text = "NFOGEN" | |
| 134 | ||
| 135 | footer = true | |
| 136 | footer_text = "nfogen // krazy warez // krz.sh" | |
| 137 | ||
| 138 | title = "nfogen 1.2.2" | |
| 139 | type = "CLI / library" | |
| 140 | publisher = "krazy warez" | |
| 141 | language = "Python 3.11+ (any 3.x with a JSON config)" | |
| 142 | files = "nfogen.py -- single file, zero deps" | |
| 143 | url = "krz.sh" | |
| 144 | ||
| 145 | notes = """ | |
| 146 | nfogen builds scene-style ASCII .nfo files from CLI flags, a config | |
| 147 | file, interactive prompts, or any mix of the three. | |
| 148 | ||
| 149 | FEATURES | |
| 150 | - CP437 or UTF-8 output; single / double / block box styles | |
| 151 | - two-column release+game info panel, or simple rows | |
| 152 | - group profiles: reusable logo, members, couriers, boards | |
| 153 | - mediainfo import auto-fills video / audio / resolution / size | |
| 154 | - built-in ASCII banner generator for header logos (this one!) | |
| 155 | - bundled templates: razor, modern, minimal | |
| 156 | ||
| 157 | QUICKSTART | |
| 158 | nfogen.py --title "Some.App.v1-KRZ" --type APP --banner | |
| 159 | nfogen.py -c release.toml -p group.toml -o release.nfo | |
| 160 | nfogen.py -t razor --title "..." --mediainfo dump.json | |
| 161 | nfogen.py -i (prompt for every field) | |
| 162 | ||
| 163 | RESOLUTION ORDER | |
| 164 | template < profile < config file < CLI flags < prompts | |
| 165 | ||
| 166 | See examples/ for full release nfos and a group profile, and | |
| 167 | templates/ for the bundled presets. This README.nfo was itself | |
| 168 | generated by nfogen: nfogen.py -c nfogen.toml | |
| 169 | """ | |
| 170 | #+end_src | |
| 171 | ||
| 172 | Next, I ran the following command, which produced the NFO file below: | |
| 173 | ||
| 174 | #+begin_src shell | |
| 175 | nfogen.py -c nfogen.toml -p -o README.nfo | |
| 176 | #+end_src | |
| 177 | ||
| 178 | #+begin_src nfo | |
| 179 | # # ##### ### #### ##### # # | |
| 180 | ## # # # # # # ## # | |
| 181 | # # # ### # # # ## ### # # # | |
| 182 | # ## # # # # # # # ## | |
| 183 | # # # ### #### ##### # # | |
| 184 | ||
| 185 | ╔═════════════════════════════════════════════════════════════════════════════╗ | |
| 186 | ║ N F O G E N 1 . 2 . 2 ║ | |
| 187 | ║ [ KRZ ] krz.sh ║ | |
| 188 | ╠═════════════════════════════════════════════════════════════════════════════╣ | |
| 189 | ║ DATE 2026-08-08 ║ | |
| 190 | ║ TYPE CLI / library ║ | |
| 191 | ║ PUBLISHER krazy warez ║ | |
| 192 | ║ LANGUAGE Python 3.11+ (any 3.x with a JSON config) ║ | |
| 193 | ║ FILES nfogen.py -- single file, zero deps ║ | |
| 194 | ║ URL krz.sh ║ | |
| 195 | ╠═════════════════════════════════════════════════════════════════════════════╣ | |
| 196 | ║ NOTES ║ | |
| 197 | ║ ║ | |
| 198 | ║ nfogen builds scene-style ASCII .nfo files from CLI flags, a config ║ | |
| 199 | ║ file, interactive prompts, or any mix of the three. ║ | |
| 200 | ║ ║ | |
| 201 | ║ FEATURES ║ | |
| 202 | ║ - CP437 or UTF-8 output; single / double / block box styles ║ | |
| 203 | ║ - two-column release+game info panel, or simple rows ║ | |
| 204 | ║ - group profiles: reusable logo, members, couriers, boards ║ | |
| 205 | ║ - mediainfo import auto-fills video / audio / resolution / size ║ | |
| 206 | ║ - built-in ASCII banner generator for header logos (this one!) ║ | |
| 207 | ║ - bundled templates: razor, modern, minimal ║ | |
| 208 | ║ ║ | |
| 209 | ║ QUICKSTART ║ | |
| 210 | ║ nfogen.py --title "Some.App.v1-KRZ" --type APP --banner ║ | |
| 211 | ║ nfogen.py -c release.toml -p group.toml -o release.nfo ║ | |
| 212 | ║ nfogen.py -t razor --title "..." --mediainfo dump.json ║ | |
| 213 | ║ nfogen.py -i (prompt for every field) ║ | |
| 214 | ║ ║ | |
| 215 | ║ RESOLUTION ORDER ║ | |
| 216 | ║ template < profile < config file < CLI flags < prompts ║ | |
| 217 | ║ ║ | |
| 218 | ║ See examples/ for full release nfos and a group profile, and ║ | |
| 219 | ║ templates/ for the bundled presets. This README.nfo was itself ║ | |
| 220 | ║ generated by nfogen: nfogen.py -c nfogen.toml ║ | |
| 221 | ╠═════════════════════════════════════════════════════════════════════════════╣ | |
| 222 | ║ ║ | |
| 223 | ║ nfogen // krazy warez // krz.sh ║ | |
| 224 | ║ ║ | |
| 225 | ╚═════════════════════════════════════════════════════════════════════════════╝ | |
| 226 | #+end_src | |
| 227 | ||
| 228 | For more examples, browse the [[https://github.com/krazywarez/nfogen/tree/main/examples][examples]] directory within the repository. | |
| 229 | ||
| 230 | * Usage | |
| 231 | ** Installation | |
| 232 | ||
| 233 | The fastest installation method is to clone the repo and use the Python file | |
| 234 | directly: | |
| 235 | ||
| 236 | #+begin_src shell | |
| 237 | git clone https://github.com/krazywarez/nfogen.git && cd nfogen | |
| 238 | nfogen.py -i | |
| 239 | #+end_src | |
| 240 | ||
| 241 | ** Generating a File | |
| 242 | ||
| 243 | As noted in the README above, there are numerous ways to generate an NFO file: | |
| 244 | ||
| 245 | #+begin_src shell | |
| 246 | # CLI Flags | |
| 247 | nfogen.py --title "Some.App.v1-KRZ" --type APP --banner | |
| 248 | ||
| 249 | # TOML Configuration Files | |
| 250 | nfogen.py -c release.toml -p group.toml -o release.nfo | |
| 251 | ||
| 252 | # CLI Flags & JSON for mediainfo | |
| 253 | nfogen.py -t razor --title "..." --mediainfo dump.json | |
| 254 | ||
| 255 | # Interactive Mode | |
| 256 | nfogen.py -i | |
| 257 | #+end_src | |
| 258 | ||
| 259 | * How It Works | |
| 260 | ||
| 261 | nfogen itself works by parsing the various inputs, determining a style to use | |
| 262 | for the box-drawing/character sets, and rendering the characters individually by | |
| 263 | rows and columns. | |
| 264 | ||
| 265 | * The Future | |
| 266 | ||
| 267 | I'd love to build this tool out to support more character sets, pre-built | |
| 268 | libraries for ASCII art and table layouts, and more customization options. | |
| 269 | ||
| 270 | If you're interested in helping, feel free to reach out! | |