diff --git a/README.md b/README.md index 3641af3..060db1f 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,7 @@ A collection of useful scripts. These scripts are written by various authors. At | abc | A Binary Comparison tool. | | db | Quickly cd into specific directories using short aliases. | | eliza | Runs the perl clone of the Eliza chatbot. | -| ffconv | Batch convert mkvs to mp4s. | -| ffconv-a | Batch convert from one format to another. | +| ffconv | Batch convert from one format to another. | | ffconv-ar | Batch convert from one format to another without preserving metadata. | | ffr | Record a given window with ffmpeg to the current directory. | | gpltopnm | Convert gpl to ppm. | @@ -25,6 +24,7 @@ A collection of useful scripts. These scripts are written by various authors. At | repack | Completely repack an NDS rom with `ndstool`. | | scanif | Scan several documents one-by-one with SANE/CUPS. | | unpack | Completely unpack an NDS rom with `ndstool`. | +| whereami | Reimplementation of the old `whereami` command in Tcl. | | yt-dl | youtube-dl "magic" download. | | yt-mpeg | Turn wav/cover image into a video optimised for yt. | diff --git a/bin/abc b/bin/abc index b2bee59..95ceca7 100755 --- a/bin/abc +++ b/bin/abc @@ -1,4 +1,6 @@ #!/bin/bash +# abc - A Binary Comparison tool +# Written by mirrorsedgefan (mef) function oct2asc() { if [[ $1 ]]; then diff --git a/bin/db b/bin/db index c178b82..22250bd 100755 --- a/bin/db +++ b/bin/db @@ -1 +1,3 @@ +#!/usr/bin/zsh +# db - quickly cd into specific directories using short aliases. awk '{print "alias "$1"=\"cd "$2"\""}' ~/Scripts/cfg/db | sort -u > ~/Scripts/dat/db-c diff --git a/bin/ffconv b/bin/ffconv index e408ca3..4303bd8 100755 --- a/bin/ffconv +++ b/bin/ffconv @@ -1,5 +1,17 @@ -for i in *.mkv; -do name=`echo "$i" | cut -d'.' -f1` - echo "$name" - ffmpeg -i "$i" "${name}.mp4" +#!/bin/dash +#ffconv - Batch convert from one format to another +echo Convert from... +read ext +echo Convert to... +read toext + +for i in *.$ext; do ffmpeg -i "$i" "${i%.*}.$toext"; done + +while true; do + read -p "Delete original files? " yn + case $yn in + [Yy]* ) rm *.$ext; exit;; + [Nn]* ) exit;; + * ) printf "Please answer yes or no. ";; + esac done diff --git a/bin/ffconv-a b/bin/ffconv-a deleted file mode 100755 index ea16036..0000000 --- a/bin/ffconv-a +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/dash -echo Convert from... -read ext -echo Convert to... -read toext - -for i in *.$ext; do ffmpeg -i "$i" "${i%.*}.$toext"; done - -while true; do - read -p "Delete original files? " yn - case $yn in - [Yy]* ) rm *.$ext; exit;; - [Nn]* ) exit;; - * ) printf "Please answer yes or no. ";; - esac -done diff --git a/bin/ffconv-ar b/bin/ffconv-ar index d972764..0da391e 100755 --- a/bin/ffconv-ar +++ b/bin/ffconv-ar @@ -1,4 +1,5 @@ #!/bin/dash +#ffconv-ar - batch convert between formats without preserving metadata echo Convert from... read ext echo Convert to... diff --git a/bin/inc b/bin/inc index 93583bb..ca01c14 100755 --- a/bin/inc +++ b/bin/inc @@ -1,4 +1,5 @@ #!/usr/bin/env dash +#inc - increment - copy a single file to the number of files by hex in the current dir i="0" ext="swav" n="00" diff --git a/bin/mkv-cat b/bin/mkv-cat index 4e05e81..a8a6988 100755 --- a/bin/mkv-cat +++ b/bin/mkv-cat @@ -1,2 +1,4 @@ +#!/bin/bash +#Concatenate mkvs for f in ./*.mkv; do echo "file '$f'" >> list.txt; done ffmpeg -f concat -safe 0 -i list.txt -c copy output.mkv diff --git a/bin/nds-banner b/bin/nds-banner index a94536d..e2fbc0d 100755 --- a/bin/nds-banner +++ b/bin/nds-banner @@ -1,4 +1,5 @@ #!/usr/bin/env python +#Create NDS banner.bin files from PIL import Image """ Created by Alpha [http://projectpokemon.org | http://pokesplash.net] diff --git a/bin/nlzss b/bin/nlzss index 6aaea20..4ce4a82 100755 --- a/bin/nlzss +++ b/bin/nlzss @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +#magical's LZSS compressor/decompressor import sys from sys import stdin, stdout, stderr, exit diff --git a/bin/nlzss-c b/bin/nlzss-c index edc328e..1965f29 100755 --- a/bin/nlzss-c +++ b/bin/nlzss-c @@ -1,4 +1,5 @@ #!/bin/python3 +#magical's LZSS compressor # used http://code.google.com/p/u-lzss/source/browse/trunk/js/lib/ulzss.js as # a guide from sys import stderr diff --git a/bin/pa-rescan b/bin/pa-rescan index 2320832..5581baf 100755 --- a/bin/pa-rescan +++ b/bin/pa-rescan @@ -1 +1,3 @@ +#!/usr/bin/dash +#Rescan for pulseaudio devices pacmd unload-module module-udev-detect && pacmd load-module module-udev-detect diff --git a/bin/repack b/bin/repack index 19553c0..15d2be6 100755 --- a/bin/repack +++ b/bin/repack @@ -1,2 +1,3 @@ #!/bin/dash +#repack - Completely repack an NDS ROM with ndstool ndstool -c pk_baserom.nds -9 arm9.bin -9i arm9i.bin -7 arm7.bin -7i arm7i.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin # -o banner.bmp diff --git a/bin/scanif b/bin/scanif index 7c11d60..f5e09cf 100755 --- a/bin/scanif +++ b/bin/scanif @@ -1,4 +1,6 @@ #!/bin/dash +#scanif - scan several documents one-b-one with SANE/CUPS. +#Written by Leo Coogan / fm'latghor & re:fi.64 / Ryan Gonzalez i=0 while true; do read -p "Ready to scan. Scan your item(s)? y/N " yn diff --git a/bin/unpack b/bin/unpack index 5cc5343..03fd8fb 100755 --- a/bin/unpack +++ b/bin/unpack @@ -1,2 +1,3 @@ #!/bin/dash +#unpack - Completely unpack an NDS ROM with ndstool ndstool -x baserom.nds -9 arm9.bin -9i arm9i.bin -7 arm7.bin -7i arm7i.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin -o banner.bmp diff --git a/bin/yt-dl b/bin/yt-dl index 394c459..12d892a 100755 --- a/bin/yt-dl +++ b/bin/yt-dl @@ -1,4 +1,5 @@ #!/bin/dash +#yt-dl - youtube-dl "magic" download echo Playlist URL: read url youtube-dl "$url" --yes-playlist --audio-format flac -x --audio-quality 0 --add-metadata -o "%(title)s.%(ext)s" diff --git a/bin/yt-mpeg b/bin/yt-mpeg index 6f22a92..4cf1a37 100755 --- a/bin/yt-mpeg +++ b/bin/yt-mpeg @@ -1,4 +1,5 @@ #!/bin/dash +#yt-mpeg - Turn wav/cover image into a video optimised for yt echo Cover art: read cover echo Audio: