This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get absolute path(shell) | |
abspath(){ #{{{ | |
local thePath | |
if [[ ! "$1" =~ ^/ ]];then | |
thePath="$PWD/$1" | |
else | |
thePath="$1" | |
fi | |
IFS=/ parr=($thePath) | |
declare -a outp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import plistlib as plib | |
import subprocess as subp | |
from contextlib import closing | |
import os, tempfile, shutil, re | |
from NameAppend import nameAppend | |
def parsePlistToString(plistFile=None): | |
'''parsePlistToString(plistFile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
from PyQt4.QtCore import SIGNAL, pyqtSignal, QObject, QString | |
from PyQt4.QtGui import (QApplication, QDialog, | |
QTextBrowser, QPushButton, QVBoxLayout, | |
QLineEdit, QGridLayout, QTextCursor, | |
QLabel, QHBoxLayout, QFileDialog, | |
QCheckBox , QSizePolicy , QSpacerItem, | |
QGroupBox, QComboBox, QSpinBox) | |
import sys,os,re | |
import subprocess as subp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4.QtGui import QPixmap, QApplication | |
import os | |
namebase='screenshit_' | |
num=1 | |
outdir= os.path.abspath(os.path.join(os.environ['HOMEPATH'],'Documents')) | |
while os.path.exists(os.path.join(outdir,namebase+str(num)+'.png')): | |
num+=1 | |
fulloutname = os.path.join(outdir, namebase + str(num) + '.png') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpv() { | |
if ! type -P pv >/dev/null;then | |
echo need pv >&2 | |
return 1 | |
fi | |
case $# in | |
0|1) | |
echo invalid arguments >&2 | |
return 1 | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
from optparse import OptionParser | |
from subprocess import call | |
import os.path | |
import os | |
import tempfile | |
img_max_width_or_height = 256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import subprocess as subp | |
import sys | |
import re | |
bitratePtn = re.compile(r'^\s*Duration:.+, (bitrate: (\d+) kb/s).*$') | |
videoPtn = re.compile(r'^\s*Stream #\d+:\d+.*?: Video: ([^,]+).*$') | |
audioPtn = re.compile(r'^\s*Stream #\d+:\d+.*?: Audio: ([^,]+).*$') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
from optparse import OptionParser | |
from subprocess import call,Popen, PIPE | |
from os.path import splitext | |
import sys, os, re | |
def mediainfo(filename): | |
bitratePtn = re.compile(r'^\s*Duration:.+, (bitrate: (\d+) kb/s).*$') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import sys | |
import os.path | |
import datetime | |
from subprocess import call | |
width = 1280 | |
sec = str(datetime.timedelta(seconds=int(sys.argv[1]))) |