Some of the scripts I use on a daily - or not - basis, and that I thought worth sharing - who knows. Complexity varies from trivial to, well, complex.
All scripts are published under the WTFPL.
Converts FLAC audio files to MP3 (high quality) while preserving metadata
in ID3 fields. You get the best of both worlds: unadultered quality of FLACs plus
portability of MP3s. The FLAC files may be generated using any ripping/encoding
CDDB-aware software like ripit
. You will need flac
, lame
, eyeD3
.
Searches Google Images using the parameter as search terms, grabs the first one
to appear, normalizes its size to 480 pixels wide, renames it to the search
terms + .jpg, and creates a PNG thumbnail. Useful in addition to ripit
, to add
images to the files (flac2mp3
should be upgraded...) Needs wget
and ImageMagick
.
Ouch! ggimg
doesn't work anymore because Google's HTML has changed. See...
Searches Bing Images using the parameter as search terms, grabs the first one
to appear, normalizes its size to 480 pixels wide, renames it to the search
terms + .jpg, and creates a PNG thumbnail. Useful in addition to ripit
, to add
images to the files (flac2mp3
should be upgraded...) Needs wget
and ImageMagick
.
Acts as a replacement for Google Images as long as their code stays undecipherable.
Two complementary scripts which extrude an STL mesh from a JPEG image for 3D
printing. jpg2stl.sh
can be used as a standalone script, or you can call it
from jpg2stl.cgi
which accepts a .jpg
image and sends back a .stl
file. These scripts were written for Datapaulette.
They need ImageMagick
, potrace
, pstoedit
and OpenSCAD
. You can check
the result with MeshLab
.
Ugly bash script generating a mastering sheet, needed by audio mastering studios. Good luck customizing this one... although the IRSC could prove useful.
Files should be alphabetically ordered in the directory. You will have to create a sequential file where filenames match the titles, in the same order as the files in the directory, looking like this:
file1.wav First Title
file2.wav Second Title
(...)
Dumps sound data from a Mirage-formatted diskette. The Ensoniq Mirage was the very first popular sampler, and used 8-bit samples on 3.5" diskettes, which were formatted in an "interesting" way. Normal humans won't need this script.
Networked xv
, that is, accepting URLs as arguments.
I'm addicted to xv
, an image visualizer which you could find in the first Slackwares, but
as a shareware, it has been excluded from all GNU/Linux distros for a long time now.
Furthermore, the project is abandoned by its author.
You can still grab a copy of the sources,
and compile them - or use qiv
for which you can easily adapt this script, or display
which accepts URLs by default, or any modern software you like.
grep
for paragraphs: first, formats each paragraph (separated by two line feeds) as a single line,
then greps a pattern in it. Does its best to preserve patterns and options passed to the real grep
.
By the way, --color=always
is really useful to spot the pattern in huge chunks of text.
Reduces multiple contiguous spaces to a single one.
Accepts input from stdin. Without any pattern, will simply format the paragraphs as lines.
Perl program which computes the third value of an electronic first-order RC filter, given two values, with an absurd precision, and a more significant number between parentheses. For example, a 2.2 kiloohm resistor and a 10 nanofarad capacitor
rcf 2.2k 10n
return 7234.52895981943 (7.2k)
in Hertz, but the units are interchangeable, i.e. you
can deduce a capacitor value given the resistor and the cutoff frequency.
Generates HTML from a Markdown file,
in /tmp/testmd.html
. I use it mostly for READMEs like this one.