Skip to content

Instantly share code, notes, and snippets.

@debuger
debuger / flac2mp3
Created June 27, 2015 19:30
Convert flac to mp3
#!/bin/sh
function conv {
if [ -z "$1" -o ! -f "$1" ]; then
break;
fi
TAGS="/tmp/ex"
COVER="/tmp/c.jpg"
FLAC=$1
fields='COVER TITLE ALBUM TRACKNUMBER ARTIST GENRE YEAR'
@debuger
debuger / wvsplit
Last active August 29, 2015 14:23
Split wavepack into flac/mp3
#!/bin/sh
usage()
{
echo "usage: wvsplit <wv> <m|f>"
}
if [ $# -lt 1 ]; then
usage
exit 1
fi
@debuger
debuger / mp3splitcue
Last active August 29, 2015 14:23
Split flac/ape with cue into mp3
#!/bin/sh
usage()
{
echo "usage: splitcue <cuefile> [file_to_split]"
}
if [ $# -lt 1 ]; then
usage
exit 1
@debuger
debuger / splitcue
Last active April 2, 2016 08:17
Split flac with cue file
#!/bin/sh
usage()
{
echo "usage: splitcue <cuefile> [file_to_split]"
}
if [ $# -lt 1 ]; then
usage
exit 1
@debuger
debuger / db.sh
Last active August 29, 2015 14:03
Share pictures over Dropbox
#!/bin/sh
DPDIR='/home/rym/Dropbox/Public'
dropbox running
if [ $? -eq 0 ]
then
dropbox start > /dev/null
fi
if [ $# -ge 1 ]
then
@debuger
debuger / update.sh
Last active August 29, 2015 14:01
Batch update photos descriptions and timestamps
#!/bin/sh
# update photos descriptions and timestamps
# usage: update.sh [TIME] [DESCRIPTION]
# example: ./update.sh "2:35:45" "Trip"
# Add 2h 35m 45s to exif timestamp and add description "Trip"
for f in *
do
if [ -r $f -a `file --mime-type $f | grep -c image` -eq 1 ]
then
a=''