Esempio n. 1
0
def main():
	import sys
		
	iPXSettings.initSettings()
	iPXSettings.DEBUG = 1
	iPXSettings.delList, iPXSettings.sizeTaken = getAllowedDelList()
	
	size = 0
	
	try:
		size = sys.argv[1]
	except:
		printMSG('Please secify a whole number ')
		sys.exit(0)
	
	try:
		size = long(size)
	except Exception, msg:
		printMSG('Invalid param "' + str(size) + '", please use a whole number')
		sys.exit(0)
Esempio n. 2
0
def firstInit():
	import os
	
	iPXSettings.initSettings()
	checkDir(iPXSettings.tmpDownloadDir)
	
	if os.path.isdir(iPXSettings.historyFile):
		logIt('History is a directory? - Resetting history')
		delTree(iPXSettings.historyFile)
		os.removedirs(iPXSettings.historyFile)
		try:
			#Resetting downloadBehavior
			logIt('Resetting downloadBehavior to 3')
			FeedListPrefs	= plistlib.Plist.fromFile(file('%sfeeds.plist' % iPXSettings.rssPath))
			feedDetails = FeedListPrefs['iPodderXFeeds']
			
			for feed in feedDetails:
				feed['downloadBehavior']	= 3
			
			FeedListPrefs.write('%sfeeds.plist' % iPXSettings.rssPath)
		except Exception, msg:
			logIt('ERRMSG: %s' % str(msg))
Esempio n. 3
0
#Creative Commons Attribution-Noncommercial 3.0 United States License
#
#Python Developyment By:
#
#Ray Slakinski
#August Trometer

import iPXSettings
from iPXTools import *

iPXSettings.progName = 'iPodderX'
for arg in sys.argv:
	if re.search('-progName', arg, re.IGNORECASE):
		progNameSplit = arg.split('==')
		iPXSettings.progName = progNameSplit[len(progNameSplit)-1]
iPXSettings.initSettings()

def usage():
	print '\r\nUsage: none really... It just swaps two files'
	#print '\r\nUsage:\r\n%s -d <textToDecrypt>\r\n%s -e <textToEncrypt>\r\n' % (sys.argv[0],sys.argv[0])

try:
	if sys.argv[1] == '-d':
		print decrypt(sys.argv[2].strip())
	elif sys.argv[1] == '-e':
		print encrypt(sys.argv[2].strip())
	else:
		usage()
except Exception, msg:
	print msg
	usage()