Linux-Tools
Unfortunately I'm forced to give the suffix txt to all my scripts. Otherwise my provider's so-called webserver won't deliver them correctly.
All programs available on this page are distributed under the GNU General Public License (GPL). It mainly means, that it's legal to copy, publish, use and modify them - as long the modified version is also published under the GPL and all authors are listed.
- dir2pdf
- firefox-pimp
- icon_in_bookmarks.py
- logooverlay
- mget
- myanacron
- partmirror.py
- randomcp
- renumber
- res2a4
- rpm_canonical_rename.py
- rpm_onlynew.py
- rot13
- wlanscanner
dir2pdf
This script converts a directory full of PNM files (PPM, PGM or PBM) to a PDF file. At the moment it is limited to DIN A4 page size.
firefox-pimp
This RPM package installs a patch for forefox's start script, which it modifies on every update of firefox. The modification contains two changes.
- If the variable MOZ_ARCH is set to i386 the 32-bit version of firefox will always be used, no matter on which architecture firefox is started. This is important if you use firefox-plugins which do not exist in a 64-bit variant.
If the Variable is not set, the startscript proceeds as usual. - Firefox (currently) does not support sound output through ALSA. My modifications always starts an ALSA-OSS wrapper for firefox, if one has been installed. Fedora provides it in the package alsa-oss. The variable MOZ_AOSS controls this behaviour and contains the path to the wrapper. If you do not want to use the wrapper and there is one installed, set the value to none. If there no wrapper installed, the firefox start script proceeds as usual.
Most easiest if you copy the file adalberts.repo to /etc/yum.repos.d. Afterwards you can install firefox-pimp with yum.
The RPM package uses triggers, which become active on changes to firefox package. If you deinstall this package, the original start script will be restored. Before any changes to /usr/bin/firefox are made a backup is created in /usr/bin - just in case. Should the patching fail, an alternative start script will be installed and the user will be informed about it.
icon_in_bookmarks.py
This script injects icons into firefox' bookmarks. My motivations for this script was Google, because its icon did not appear in my bookmarks. The icons should be 64×64 pixel in size.
Altenatively this script can also delete the icon from a given bookmark.
logooverlay
This script puts a logo over a JPEG image. The logo has to be in PNG format and may be translucent. This script can also be used as a filter. In this case it receives a PNM file on the standard input and produces a PNM image on standard output.
mget
It dowloads a bunch of files, which somehow has to be described as a numbered set, for example CAM_0147.jpg, CAM_0149.jpg, CAM_0151.jpg, CAM_0153.jpg, ...
It is also possible to specify a referer.
This script uses wget a the backend tool.
myanacron
The tool myanacron is a "personal" anacron. The original has the disadvantage to have a hardcoded path for its time stamp directory. I've slightly modified the code what makes it possible to name a directory for time stamps on the command line. If nothing else is given, myanacron will use the configuration file $HOME/.anacrontab and the directory $HOME/.anacron.
The file myanacron is the compiled binary (i386, depends on libc.so.6), myanacron.patch contains the changes which can be patched into the original Anacron on Sourceforge.net.
partmirror.py
I use this script to get updates for my Fedory Core 4 distribution while I'm at the university with broadband connection. I do not indend to carry the whole update repository with me, that is why I wrote this script.
It manages a list of files, which have already been downloaded to avoid useless transfers. Apart from this, it is an ordinary mirror script.
randomcp
This one generates a random order for files to copy and gives every file a numbered prefix. The prefix length is adjustable. It is very useful for MP3 players without a random play mode.
renumber
Given files will be renamed in a consecutively numbered manner. You can specify a prefix, suffix, the start number and the step size. Example: given files a.jpg, foo.jpg and bar.jpg the command
renumber pic- .jpg 1 1 1 a.jpg foo.jpg bar.jpg
renames them to pic-1.jpg, pic-2.jpg and pic-3.jpg.
res2a4
This script takes a list of PNM files and checks if their aspect ration is 1:√2 according to the DIN norm. If not, files are enlarged to match the required aspect ratio.
rpm_canonical_rename.py
Sometimes RPM files have filenames, which do not contain the version number or the architecture they were made for. This script reads the metadata from the file (name, version, architecture, etc.) and renames the file on the basis of this information.
rpm_onlynew.py
I use this script to keep only the newest version of updates for my distribution. For example an update of OpenOffice has about 700MB of data. After two or three updates the hard disk is well filled. This scripts examines the metadata stored in the RPMs and determines the newest version. It can differ between differen versions for different architectures.
Before it deletes old versions it asks for permission.
rot13
A very simple script, which "encodes" the standard input or any given text usin RED13. RED13 means that every letter is shifted by 13 positions in the alphabet. Latin alphabet has 26 letters, as you know...
wlanscanner
This little helper allows me to join known WLANs automagically - something Windows user know for ages... it can be called from the HAL subsystem or on the command line. You can also set a wireless network name manually, in case the automation fails. It uses iwlist net_device scanning for the scan as well as sudo and iwconfig for wireless parameter setting.
Last changes: Sunday, 5. October 2008, 22:48:51


