Subversion Repositories programming

Compare Revisions

Ignore whitespace Rev 117 → Rev 118

/shell_programs/rarslave
80,10 → 80,14
cleanup_temp
 
# Repair everything, and sort it into "goodfiles" and "badfiles"
find ./ -maxdepth 1 -iregex '.*\.par2$' \! -iregex '.*\.vol[0-9]+\+[0-9]+\.par2$' -print0 \
| xargs -0 -n1 \
| xargs -I{} rarslave "{}" "parsort"
find ./ -maxdepth 1 -iregex '.*\.par2$' \! -iregex '.*\.vol[0-9]\++[0-9]\+\.par2$' -print0 \
| xargs -0 -n1 -i rarslave "{}" "parsort"
 
# When using <=findutils-4.2.20 (or thereabouts), use the following. The "+" operator
# has changed in later versions.
#find ./ -maxdepth 1 -iregex '.*\.par2$' \! -iregex '.*\.vol[0-9]+\+[0-9]+\.par2$' -print0 \
# | xargs -0 -n1 -i rarslave "{}" "parsort"
 
# Extract files, and delete the set if it extracted correctly
sed 's/.par2$//' goodfiles | sed 's/.PAR2$//' > completefiles
 
/shell_programs/animesorter.py
119,16 → 119,17
 
return os.path.join(SORT_DIR, dir)
 
def printfailed(moved, failed):
"""printfailed(moved, failed):
def printfailed(moved, failed, cwd):
"""printfailed(moved, failed, cwd):
 
moved is an INTEGER number representing the number of files successfully moved
failed is a LIST of the filenames which could not be moved"""
failed is a LIST of the filenames which could not be moved
cwd is a STRING containing the current working directory"""
if( len(failed) > 0 and moved > 0 ):
print '================================================================================'
 
if( len(failed) > 0 and moved == 0 ):
printwdheader(os.path.split(failed[0])[0])
printwdheader(cwd)
 
for f in failed:
print "Failed to move %s" % f
144,9 → 145,9
print 'Working in directory: %s' % dir
print '================================================================================'
 
def printmove(num, file, dstdir):
def printmove(num, file, dstdir, cwd):
if( num == 1 ):
printwdheader(os.path.split(file)[0])
printwdheader(cwd)
 
print "Moved %s to %s!" % (file, dstdir)
 
176,9 → 177,9
failed.append(f)
else:
moved = moved + 1
printmove(moved, f, dstdir)
printmove(moved, f, dstdir, cwd)
 
printfailed(moved, failed)
printfailed(moved, failed, cwd)
 
# Call ourself recursively on the subdirectories
for s in subdirs:
/shell_programs/remount
20,4 → 20,13
exit
fi
 
if [ "stat" = "$1" ]; then
if [ -z "$(cat /etc/mtab | grep '/data' | grep 'ro')" ]; then
echo "Read-Write"
else
echo "Read-Only"
fi
exit
fi
 
echo "${HELP_MSG}"
/shell_programs/irasync
1,3 → 1,4
#!/bin/bash
su -c 'SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" emerge --sync'
update-eix
exit
/shell_programs/animesorter.dict
16,6 → 16,7
\[AnY-Nanashi\]_Ichigo_Mashimaro_-_.+_\[.+\].avi = Ichigo Mashimaro
\[ICE_CREAM\]_Ichigo_Mashimaro_-_.+.mkv = Ichigo Mashimaro
Ichigo_Mashimaro_-_.+.mkv = Ichigo Mashimaro
Ichigo_Mashimaro-.+_HDTV_720p_\[ICE-CANDY\].mkv = Ichigo Mashimaro
Kaleido_Star_-_.+_\[Freedom-Rise\]_\[.+\].avi = Kaleido Star
Kamichu\!-.+_HDTV_720p_\[.+\].mkv = Kamichu
\[Froth-Bite\]Mahoraba_Heartful_Days_-_.+\[.+\].avi = Mahoraba Heartful Days
24,6 → 25,7
\[yesy\]_Okusama_wa_Joshikousei_-_.+_\[.+\].avi = Okusama wa Joshikosei
\[K-F\]_One_Piece_.+_\[.+\].avi = One Piece
\[Oyasumi\]_Pani_Poni_Dash_-_.+_\[.+\].avi = Pani Poni Dash
\[Oyasumi\]_Pani_Poni_Dash\!_.+_\[.+\].avi = Pani Poni Dash
\[PF\]_Pani_Poni_Dash_-_.+_\[.+\].avi = Pani Poni Dash
Petopeto-san_-_.+_\[Doremi-Spork\]\[.+\].avi = Petopeto-san
\[Shinsen-Subs\]_Saikano_OVA_-_Another_Love_Song_Mission_.+_\[.+\].avi = Saikano OVA
44,3 → 46,4
\[Anime-Works\]_Ultimate_Girls_ep_.+_\[.+\].avi = Ultimate Girls
\[A-E\]_Yakitate_Japan_.+_\[.+\].avi = Yakitate Japan
\[Triad\]_Zettai_Shonen_-_.+.avi = Zettai Shonen
reno\.911\.3.+\.dsr-.+\.avi = /data/Downloads/Reno 911