CONVERT(1L)
β¨ CONVERT π
okay bestie, gather round, because we're talking about convert β the manual page for it lives in section 1L of the manual, and it is literally the glow-up artist for your ancient scripts. no cap.
πΈ NAME πΈ
convert β convert GENESIS 1.x scripts to GENESIS 2.x syntax and command names
like. it takes your crusty old GENESIS 1.x script and gives it the GENESIS 2.x makeover. new syntax, new command names, same brain. slay.
π SYNOPSIS π
convert [ oldscriptfile [ newscriptfile ] ] [ -noX1compat ] [ -constants
scriptfile ... ]
π¦ DESCRIPTION π¦
okay so here's the tea. convert converts a GENESIS 1.x script file to GENESIS 2.x syntax, replacing old command names and arguments with their GENESIS 2.x counterparts. glow-up complete. π
the vibe check on where it reads and writes:
- with no arguments?
convertreads from standard input and writes to standard output. very demure, very pipes-and-redirection. - with arguments? it reads from and writes to the given file names.
- if the
newscriptfileargument is not given,convertoutputs to a file with the same name as the input file, minus any directory path. - if a directory path is not given for the input file, output is written to standard output.
π§ converting a whole script set (the iconic move) π§
to convert entire script sets, UNIX command shell loops may be used. assuming an old set of scripts lives in the directory ../oldscripts, then the following will convert the entire script set.
for csh:
foreach file (../oldscripts/*.g)
convert $file
end
for sh:
for file in ../oldscripts/*.g
do
convert $file
done
group chat energy: one loop and the whole folder ate. π₯
π OPTIONS π
-constantsβ bestie, to correctly translate a script,convertneeds to know the names of globally defined variables in a script set. the-constantsoption is used to identify the scripts in which these global script variables are defined. more than one script may be specified.-noX1compatβ the automatic translation ofcreatecommands for Xodus objects to objects in the X1compat library may be suppressed using the-noX1compatoption. in this case, converted scripts will use the Xodus 2 objects directly. this will work most of the time for the standard Xodus 1 interface objects, but will likely fail for the draw widgets and pixes. xgraph widgets may also fail when not using X1compat, but have a better chance of working than xdraw et al.
ngl, if you're reaching for -noX1compat just know the odds are not in your favor for the draw widgets and pixes. π
π SEE ALSO π
the GENESIS 1.x to GENESIS 2.x conversion section of the GENESIS Reference Manual. iykyk, go read it. π
π BUGS π
okay this is the part where we hold hands, because there's some real stuff here.
convertis not a complete conversion solution. see theDoc/convert.dochelp file for a complete discussion of conversion issues, including a list of problem areas.
π¨ MAJOR ONE, READ THIS TWICE π¨convertwill delete the contents of the input file if the output filename is the same as the input file name. this can be done implicitly if the input filename path refers to a file in the current directory using a relative path (e.g.convert ./file.g). not me accidentally vaporizing my own script. π back up your files, bestie, fr fr.
convertmakes use of the X1compat script set for compatibility with GENESIS 1.x graphical interface elements. the X1compat script directory should be added to the SIMPATH, and the X1compat script called from the.simrcor the main simulation script.converttranslates network models using GENESIS 1.x connections to commands in the connection compatibility library. this library is not included by default in the GENESIS 2.x executable. see the GENESIS Reference Manual for details on compiling GENESIS 2.x with the connection compatibility library, and for tips on rewriting network simulations using the new network modeling objects and commands.
and that's the whole page, periodt. π this one's dated 3 October 1994 and it's the CONVERT(1L) manual page β yes, 1994, the manpage is older than most of us and still handing out glow-ups. take care of your scripts out there. π«Άβ¨
π¦ where this page comes from
- fedora 43: genesis-simulator 2.4-26.20210608git7b0a66b.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-Public-Domain
- fedora 44: genesis-simulator 2.4-29.20210608git7b0a66b.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later AND MIT AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms