Skip to content

Commit

Permalink
Fixed issue #4
Browse files Browse the repository at this point in the history
fixed an issue in the script where it doesn't use the user given output directory.
  • Loading branch information
oumad committed Mar 3, 2018
1 parent 1759a4e commit 3dba7a3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/menu/scripts/composite/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ def main(script,myDir,mySel,magickExec,composeType,background,scale,size,quality
args.extend(['convert',mySel[0],mySel[1]])

#resolving file name from source
pre, ext = os.path.splitext(mySel[0])
pre, ext = os.path.splitext(os.path.split(mySel[0])[1])
print ("compose type = " + composeType)

if outName != 'None':
outFile = '{0}.{1}'.format(outName,outFormat)
else:
outFile = pre + '_{0}.{1}'.format(composeType,outFormat)
print outFile


args.extend(['-compose',composeType])
Expand All @@ -58,7 +59,7 @@ def main(script,myDir,mySel,magickExec,composeType,background,scale,size,quality
outRender = os.path.join(myDir,outFile)
args.extend(["-composite",outRender])


print args
#execute the args
subprocess.Popen(args)

Expand Down
2 changes: 1 addition & 1 deletion src/menu/scripts/composite/selectedFiles.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:\Users\moumoumad\Desktop\testing_proton-io\facebook-radius-transparent-logo-15.png,C:\Users\moumoumad\Desktop\testing_proton-io\BNSS0100_22_0199_0001.jpg
C:\Users\Mohamed\Desktop\proton_forge\testing\facebook-radius-transparent-logo-15.png,C:\Users\Mohamed\Desktop\proton_forge\testing\BNSS0100_22_0199_0001.jpg
6 changes: 3 additions & 3 deletions src/menu/scripts/imageConvert/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import subprocess

def main(script,myDir,mySel,magickExec,background,scale,size,myFormat,quality,outName,outDir) :

mySel = open(mySel,"r")
mySel = mySel.read()
mySel = mySel.split(',')
Expand All @@ -25,7 +25,7 @@ def main(script,myDir,mySel,magickExec,background,scale,size,myFormat,quality,ou
args.extend(['convert',myFile])

#resolving file name from source
pre, ext = os.path.splitext(myFile)
pre, ext = os.path.splitext(os.path.split(myFile)[1])

outFile = pre + '.{}'.format(myFormat)

Expand Down Expand Up @@ -69,4 +69,4 @@ def main(script,myDir,mySel,magickExec,background,scale,size,myFormat,quality,ou
print traceback.format_exc()
print "Press Enter to continue ..."
raw_input("Press ENTER to exit")
"""
"""
2 changes: 1 addition & 1 deletion src/menu/scripts/imageConvert/selectedFiles.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:\Users\moumoumad\Desktop\R&D\TESTING\refs\Peugeot-3008-2017-1280-45.jpg,C:\Users\moumoumad\Desktop\R&D\TESTING\refs\Peugeot-3008-2017-1280-46.jpg,C:\Users\moumoumad\Desktop\R&D\TESTING\refs\Peugeot-3008-2017-1280-47.jpg,C:\Users\moumoumad\Desktop\R&D\TESTING\refs\Peugeot-3008-2017-1280-48.jpg,C:\Users\moumoumad\Desktop\R&D\TESTING\refs\Peugeot-3008-2017-1280-49.jpg
C:\Users\Mohamed\Desktop\proton_forge\testing\facebook-radius-transparent-logo-15_Plus.jpeg
4 changes: 2 additions & 2 deletions src/menu/scripts/packImages/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def main(script,myDir,mySel,magickExec,background,quality,tiles,margin,maxSize,d
#resolving file name from source
myDir = os.path.dirname(mySel[0])
if outName != 'None':
outFile = os.path.join(myDir,'{0}.{1}'.format(outName,outFormat))
outFile = '{0}.{1}'.format(outName,outFormat)
else :
outFile = os.path.join(myDir,'packed.{}'.format(outFormat))
outFile = 'packed.{}'.format(outFormat)

#constructing the geometry argument
geometry = []
Expand Down
2 changes: 1 addition & 1 deletion src/menu/scripts/packImages/selectedFiles.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-3b.jpg,C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-3c.jpg,C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-3d.jpg,C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-3e.jpg,C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-40.jpg,C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-41.jpg,C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-42.jpg,C:\Users\moumoumad\Desktop\testing_proton-io\refs\Peugeot-3008-2017-1280-43.jpg,C:\Users\moumoumad\Documents\Apowersoft\ApowerREC\20180226_151732.mp4,C:\Users\moumoumad\Documents\Apowersoft\ApowerREC\20180226_152155.mp4,C:\Users\moumoumad\Documents\Apowersoft\ApowerREC\20180226_152514.mp4,C:\Users\moumoumad\Documents\Apowersoft\ApowerREC\20180226_152843.mp4,C:\Users\moumoumad\Documents\Apowersoft\ApowerREC\20180226_153153.mp4,C:\Users\moumoumad\Documents\Apowersoft\ApowerREC\20180226_153400.mp4
C:\Users\Mohamed\Desktop\proton_forge\testing\BNSS0100_22_0199_0001.jpg,C:\Users\Mohamed\Desktop\proton_forge\testing\facebook-radius-transparent-logo-15.png,C:\Users\Mohamed\Desktop\proton_forge\testing\facebook-radius-transparent-logo-15_Plus.jpeg,C:\Users\Mohamed\Desktop\proton_forge\testing\packed.jpeg

0 comments on commit 3dba7a3

Please sign in to comment.