Added Stuff.

master
Leo Coogan 5 years ago
parent 0abd896dda
commit de54dc2cb0

@ -2,23 +2,34 @@
A collection of useful scripts.
## Scripts info
| Script | Info |
|----------------|--------------------------------------------------------|
| ffconv | Batch convert mkvs to mp4s. |
| ffconv-a | Batch convert from one format to another. |
| gpltopnm | Convert gpl to ppm. |
| makeself | Make self-extractable archives for *nix-likes. |
| matrix-decrypt | Decrypt matrix attachments that are encrypted. |
| matrix-upload | Upload attachment to matrix homeserver. |
| mkv-cat | Convert multiple videos into one. |
| nds-banner | Create NDS banner.bin files. |
| nlzss | Compress/decompress Nintendo's different LZSS formats. |
| nlzss-c | Compress Nintendo's different LZSS formats. |
| pa-rescan | Rescan audio devices (pulseaudio). |
| pip-upgrade | Upgrade all pip packages. |
| repack | Completely repack an NDS rom with `ndstool`. |
| scanif | Scan several documents one-by-one with SANE/CUPS. |
| ugrade | Upgrade packages for every package manager. |
| unpack | Completely unpack an NDS rom with `ndstool`. |
| yt-dl | youtube-dl "magic" download. |
| yt-mpeg | Turn wav/cover image into a video optimised for yt. |
| Script | Info |
|----------------|-----------------------------------------------------------------------|
| db | Quickly cd into specific directories using short aliases. |
| ffconv | Batch convert mkvs to mp4s. |
| ffconv-a | Batch convert from one format to another. |
| ffconv-ar | Batch convert from one format to another without preserving metadata. |
| gpltopnm | Convert gpl to ppm. |
| makeself | Make self-extractable archives for *nix-likes. |
| matrix-decrypt | Decrypt matrix attachments that are encrypted. |
| matrix-upload | Upload attachment to matrix homeserver. |
| mkv-cat | Convert multiple videos into one. |
| nds-banner | Create NDS banner.bin files. |
| nlzss | Compress/decompress Nintendo's different LZSS formats. |
| nlzss-c | Compress Nintendo's different LZSS formats. |
| pa-rescan | Rescan audio devices (pulseaudio). |
| pip-upgrade | Upgrade all pip packages. |
| repack | Completely repack an NDS rom with `ndstool`. |
| scanif | Scan several documents one-by-one with SANE/CUPS. |
| ugrade | Upgrade packages for every package manager. |
| unpack | Completely unpack an NDS rom with `ndstool`. |
| yt-dl | youtube-dl "magic" download. |
| yt-mpeg | Turn wav/cover image into a video optimised for yt. |
### db
"./cfg/db" contains the directories in your database. This is the file you edit, and it follows a simple syntax.
```sh
<alias-name> /path/to/dir
```
The alias name needs to be one argument...otherwise the script can't parse it.
After editing the db file, you will run "./bin/db" -- which parses the data and outputs a file to "./dat/db-c" containing your aliases in shell form. Add `source /path/to/Scripts/dat/db-c` to your shell config. After that, just remember to source your shell config and everything should work.

@ -0,0 +1 @@
awk '{print "alias "$1"=\"cd "$2"\""}' ~/Scripts/cfg/db | sort -u > ~/Scripts/dat/db-c

@ -6,7 +6,7 @@ read toext
for i in *.$ext;
do name=`echo "$i" | grep -E '(.+?)(\.[^.]*$|$)'`
echo "$name"
ffmpeg -i "$i" "${name}.$toext"
ffmpeg -i "$i" "${name}.$toext" -movflags use_metadata_tags
done
while true; do
read -p "Delete original files? " yn

@ -0,0 +1,18 @@
#!/bin/dash
echo Convert from...
read ext
echo Convert to...
read toext
for i in *.$ext;
do name=`echo "$i" | grep -E '(.+?)(\.[^.]*$|$)'`
echo "$name"
ffmpeg -i "$i" "${name}.$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

@ -1,4 +1,4 @@
#!/bin/dash
echo ROM?
read rom
ndstool -c $rom -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
ndstool -c $rom -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

@ -1,4 +1,4 @@
#!/bin/dash
echo ROM?
read rom
ndstool -x $rom -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
ndstool -x $rom -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

@ -0,0 +1,5 @@
a ~/Asiakirjat
p ~/Projektit
t ~/Testi
v ~/vimwiki
vd ~/vimwiki/diary

@ -0,0 +1,5 @@
alias a="cd ~/Asiakirjat"
alias p="cd ~/Projektit"
alias t="cd ~/Testi"
alias v="cd ~/vimwiki"
alias vd="cd ~/vimwiki/diary"
Loading…
Cancel
Save