When scripthd was renamed to scripthd.sh the DATA field should have been
updated to have scripthd.sh. Also make clobber should remove scripthd
(but not scripthd.sh).
Updated .gitignore.
Have to remove *.wav files. This is important for updating the manifest
if the program was run and generated wav files (because the other tools
were not found).
The Makefile was modified in such a way that allows one to easily
redefine the size (in the code the S macro). For instance:
make clobber SIZE=50,50 all
The try.sh was renamed to endoh4.sh as it's more of a wrapper to the
program rather than things to try. Also it now lets one specify more
than one file to feed to the program (in sequence).
The bugs.md was updated - added INABIAF. If the file format is invalid
it will very likely crash.
The script checks for SoX, padsp and otherwise ruby. It allows one to
pass in args: each one is first checked to be a readable file and if
it is it'll be processed as a file; otherwise it'll be processed as a
string. If no arg is specified it runs the program on twinkle.abc and
the strings ABC and CDEFGABc (the latter suggested by the author).
If none of the three tools noted above are installed it tells the user
to install one of them first. I was not able to test the padsp(1) one
but the invocation matches the author's remarks. /dev/dsp seems to not
be installed in modern linux systems so it would be useful to have
padsp(1) if not SoX (which is preferable in general for entries that
play sound). The ruby script wavify.rb provided by the author is the
last resort which turns the output to a WAV file.
The try.sh script cannot be modified to prompt the user to run commands
as the other scripts (or at least one, diff.sh) make use of tail(1) on
the output. The script diff.sh however can have that and it has been
done.
Minor fixes in display in slflen.sh.
The additional commands I added cannot come first because the program
(as the bugs.md states and now more clearly) will likely crash (and does
in all the systems I tested) if the file does not exist. This did not
show itself the first time because the files already existed but running
make clobber before the script would remove the image files and thus a
crash (or actually two) would occur the first time the script was run
(second time it would be fine as the files it uses then exist).
As for the shellcheck warning could be fixed (missing '\' before a '"')
and the useless cat ones had the rationale updated (it's what the author
used so it's easier to verify it's okay though I still say - and so does
the script - that there's no such thing as a useless cat) and the format
of what warning is disabled (URL included).
Now randomly selects 10 numbers (in range $((RANDOM % 101))).
Also allows one to pass in numbers (or if they wish to they can pass in
non-numbers) to pass to the program.
The script has new fun numbers.
Removed that the valid range is from 0 - 255 as numbers bigger than 255
not only work but some show some fun output (a number of which are used
in the script now).
The try.alt.sh uses the alt code. This helps further show how a single
letter can change so much and thus one can really appreciate the
subtlety of the entry even more. The other scripts were improved.
The Makefile rules added:
hint.pdf
hint
hello.pdf
hello
The hint rules generate the hint.pdf (which is the README.md file
obfuscated in a pdf) by feeding the program README.md and then it
compiles hint.pdf as C code. Running it will print the README.md file!
The hello rules generate hello.pdf which is (inside the pdf) an
obfuscated 'Hello World!' program. This is done by a simple echo piped o
the program which redirects it to hello.pdf. Then hello.pdf will be
compiled as C code which when run (as ./hello2) will print 'Hello
World!'.
The script now uses these rules to do what was once done manually. These
rules are .PHONY rules as otherwise they might not always run.
The clobber rule now removes these files.
The try section in the README.md file did not refer to the script.
The URL in the cookie recipe file was updated to refer to the domain
that the old one redirects to just in case the old one ever expires or
no longer redirects to the more recent domain. The thanks file notes
this for reference as an aside for context and historical purposes,
noting both URLs.
The new try.sh and try.bw.sh scripts run the program on one file (passed
to the script) in colour and without colour respectively. One file
because one has to terminate the program.
The new try.alt.bw.sh is like try.alt.sh but uses the black and white
(original submitted entry) version.
The scripts for the alt code allow one to set the different variables
that can be redefined. The use is the same variable names as in the
Makefile. For instance:
TIMER=5 SLEEP=5000 GRAVITY=I VISCOSITY=4 PRESSURE=1 ./try.alt.sh
TIMER=5 SLEEP=5000 GRAVITY=I VISCOSITY=4 PRESSURE=1 ./try.bw.alt.sh
for the gravity 'I' and:
TIMER=5 SLEEP=5000 GRAVITY=N VISCOSITY=4 PRESSURE=1 ./try.alt.sh
TIMER=5 SLEEP=5000 GRAVITY=N VISCOSITY=4 PRESSURE=1 ./try.bw.alt.sh
where 'N' is some number. Obviously the other values can have different
values than given above. Some of these values are protected against in
code (to an extent - if the user wants to set them to strings that's on
them) but not all are and the scripts do not try and check for the user
either.
The endoh1.alt.c file was changed in that one can now define SLEEP (S in
the code) to 0 like the original, should they want to see the original
but with other values specified. That will make it flash much more
quickly which can be a problem of course but that's up to each user.
Improve less(1) options so that the screen is not cleared (to keep the
source visible after it's seen) and to exit at EOF.
Try converting image files to png files. If this fails then as long as
pbm files exist it will print those (telling the user to open them in
their graphics viewer of choice). Otherwise if png files exist it lists
the png files (with the same message). If no png and no pbm files exist
it warns them that something went wrong and they are free to fix and
open a pull request. This handling of convert(1) checks should probably
be done in other scripts where I neglected to do this (it's entirely
possible though unlikely that a convert program exists that returns
success but does not do what we expect).
Updated .gitignore.
The script now has quotes surrounding commands with '*'s in it and the
messages (of which some were added - only one existed before) were
improved when it comes to giving a warning that the next command might
take a bit of time. There are different messages depending on how slow
the commands are though this obviously cannot be even close to perfect.
Updated .gitignore.
The script will check that mplayer(1) is installed. If it is it will
pipe vik to mplayer. In that case it will still use the raw2wav program
just in case something goes wrong (or for some reason mplayer is not
what is expected). If mplayer cannot be found or is not a regular
executable file then it will just use raw2wav. The raw2wav function in
the script tells you the name of the converted file. In the case that
mplayer cannot be found the script also suggests that you play the WAV
files with a program that can play WAV files.
The bugs.md refers to the alt try script for testing any fix with the
Apple silicon chip. If someone gets it to work the entry could be
removed from the bugs.md file and the README.md file updated to refer to
the alternate code. As the alternate code does not work (though it has a
different type of crash) the alt build/try is not mentioned in the
README.md file. It is not clear if it's helpful or not to have it in the
README.md at this point as the important part is in bugs.md.