Roland's homepage

My random knot in the Web

Articles tagged with "scripts"

  1. img4latex

    This script “image for LaTeX” is meant for generating LaTeX figure environments of pictures.

    It handles the same picture types that pdfLaTeX can handle; pdf, jpeg and png. To be able to do this, it requires the PostScript interpreter ghostscript and the identify program from the ImageMagick suite.

    This script …

  2. Opening files from the command line

    This Python script is a small helper to open files from the command line. It was inspired by a OS X utility of the same name.

    A lot of my interaction with the files on my computers is done through a command-line shell, even though I use the X Window …

  3. Generate random passwords

    One way of making hard to guess passwords is to take random data and encode it with base64 to make it readable. This is what I’ve done in the script.

    This is mainly useful for passwords that you can store in a secure manner (like in an …

  4. vid2mkv

    My digital camera can also produce movies, like most camera’s these days. It saves them in AVI format, with relatively poor mjpeg compression and uncompressed sound.

    So I wrote this python script to convert these AVI files to Theora / Vorbis streams in a matroška container. It takes the video …

  5. vid2mp4

    Videos with H.264 video and AAC sound im MP4 containers seem to strike a very good size performance balance. So I modified a copy of vid2mkv to use ffmpeg to create this kind of files instead.

    To speed up the processing of multiple files, this script runs the conversions …

  6. genbackup

    This shell-script makes a backup (with the tar program) of the directory from which it is called, with all its contents. It is one of the smallest scripts I’ve ever written but I’ve found it really useful to make fast complete backups of e.g. source archives.

    The …

  7. foto4lb

    Photos from modern digital cameras are generally so large these days that you have to shrink them to use them in a document. I do this a lot, so I automated it.

    The script shrinks the files it is given to a width of 886 pixels, and shrinks …

  8. make-mp3

    After writing the make-flac python script, I adapted a copy to use LAME to generate variable bitrate MP3 files instead.

    You can find on github. Apart from python (version 3) it requires LAME.


    The script is now compatible with both Python 2 and Python 3. But is …

  9. gitdates

    In answer to this question on stackechange, I wrote (available from github). If it is called from a directory that is under git resivion control, it lists all the files there with the short hashtag and the date from when they were last committed. The current version is …

  10. dicom2png


    It is probably better to use dicom2jpg from the same repository. It produces much smaller files, and the quality is similar.

    This simple python script uses ImageMagick to convert DICOM images from a Philips digital X-ray machine to PNG format. It crops the images from 2048x2048 pixels to 1574x2048 …

Page 1 / 2 Page 2 →