mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 20:35:11 +01:00
Import
This commit is contained in:
3
bin/clean_pyc
Executable file
3
bin/clean_pyc
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
find . -name "*.pyc" -exec rm -f {} \;
|
||||||
|
#find . -name "*.pyc" -exec ls {} \;
|
||||||
6
bin/dirdiff
Executable file
6
bin/dirdiff
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#ls -lR $1 > /tmp/diff_01
|
||||||
|
#ls -lR $2 > /tmp/diff_02
|
||||||
|
ls -logR $1 > /tmp/diff_01
|
||||||
|
ls -logR $2 > /tmp/diff_02
|
||||||
|
diff /tmp/diff_01 /tmp/diff_02 |less
|
||||||
4
bin/fixpermissions
Executable file
4
bin/fixpermissions
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
find . -type d -exec chmod 755 {} \;
|
||||||
|
find . -type f -exec chmod 644 {} \;
|
||||||
|
|
||||||
2
bin/privfilessystem
Executable file
2
bin/privfilessystem
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
sudo mount -t ecryptfs ~/files/system/backup ~/Documents/private/backup
|
||||||
75
bin/sanitise_mapleleaves_programma.py
Executable file
75
bin/sanitise_mapleleaves_programma.py
Executable file
@@ -0,0 +1,75 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description='Cleanup Mapleleaves program tables')
|
||||||
|
|
||||||
|
#parser.add_argument('inputFile', metavar='1', type=string
|
||||||
|
#parser.add_argument('inputFile', help='original table snippet from Gnumeric', dest='inputFile')
|
||||||
|
parser.add_argument('inputFile', help='original table snippet from Gnumeric')
|
||||||
|
parser.add_argument('outputFile', help='new file with clean html')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
#print vars(args)
|
||||||
|
#argparse.Namespace(origFile='inputFile')
|
||||||
|
|
||||||
|
print 'Sanitising {0}'.format(args.inputFile)
|
||||||
|
print 'Writing to {0}'.format(args.outputFile)
|
||||||
|
|
||||||
|
#origFile = open(args['inputFile'], 'r')
|
||||||
|
origFile = open(args.inputFile, 'r')
|
||||||
|
cleanFile = open(args.outputFile, 'w')
|
||||||
|
|
||||||
|
#thisLine = origFile.readline()
|
||||||
|
#print thisLine
|
||||||
|
|
||||||
|
inHeader = False
|
||||||
|
|
||||||
|
for thisLine in origFile.readlines():
|
||||||
|
thisLine = thisLine.strip()
|
||||||
|
# regular strippage
|
||||||
|
thisLine = thisLine.replace(' font-size:9pt;', '').replace(' font-size:10pt;', '').replace(' font-size:11pt;', '').replace(' style=""', '').replace(' valign="bottom"', '').replace(' ', ' ').replace('<b></b>', '')
|
||||||
|
thisLine = thisLine.replace('<i>', '').replace('</i>', '').replace('<b></b>', '').replace('<td></td>', '<td> </td>')
|
||||||
|
|
||||||
|
lineSoFar = thisLine
|
||||||
|
|
||||||
|
# if it is a table header
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Datum</b></td>', '<th align="left">Datum</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Tijd</b></td>', '<th align="left">Tijd</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="center"><b>Tijd</b></td>', '<th align="center">Tijd</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="center"><b>Veld</b></td>', '<th align="center">Veld</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Poule</b></td>', '<th align="left">Poule</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="center"><b>Code</b></td>', '<th align="center">Code</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Team Thuis</b></td>', '<th align="left">Team Thuis</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Team Uit</b></td>', '<th align="left">Team Uit</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Plaats/Sporthal</b></td>', '<th align="left">Plaats/Sporthal</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Scheidsrechters</b></td>', '<th align="left">Scheidsrechters</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Schrijvers</b></td>', '<th align="left">Schrijvers</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Zaaldienst</b></td>', '<th align="left">Zaaldienst</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Vertrektijd</b></td>', '<th align="left">Vertrektijd</th>')
|
||||||
|
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Veld</b></td>', '<th align="left">Veld</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Code</b></td>', '<th align="left">Code</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Thuis</b></td>', '<th align="left">Thuis</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Uit</b></td>', '<th align="left">Uit</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Hal</b></td>', '<th align="left">Hal</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Adres</b></td>', '<th align="left">Adres</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>postcode</b></td>', '<th align="left">Postcode</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Plaats</b></td>', '<th align="left">Plaats</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="center"><b>Vertrektijd</b></td>', '<th align="center">Vertrektijd</th>')
|
||||||
|
|
||||||
|
thisLine = thisLine.replace('<td align="left"><b>Scheidsrechter</b></td>', '<th align="left">Scheidsrechter</th>')
|
||||||
|
thisLine = thisLine.replace('<td align="center"><b>Zaaldienst</b></td>', '<th align="center">Zaaldienst</th>')
|
||||||
|
|
||||||
|
if (thisLine != lineSoFar):
|
||||||
|
inHeader = True
|
||||||
|
|
||||||
|
if (inHeader):
|
||||||
|
thisLine = thisLine.replace('<td> </td>', '<th> </th>')
|
||||||
|
if thisLine == '</tr>':
|
||||||
|
inHeader = False
|
||||||
|
|
||||||
|
#print thisLine
|
||||||
|
cleanFile.write(thisLine + '\n')
|
||||||
|
|
||||||
|
origFile.close()
|
||||||
|
cleanFile.close()
|
||||||
10
bin/wav2mp3
Executable file
10
bin/wav2mp3
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if test -z "$1"
|
||||||
|
then
|
||||||
|
echo "Usage: wav2mp3 source.wav destination.mp3"
|
||||||
|
elif test -z "$2"
|
||||||
|
then
|
||||||
|
echo "Missing destination.mp3"
|
||||||
|
else
|
||||||
|
lame -m s --cbr --preset insane "$1" "$2"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user