Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 986b032

Browse files
committedAug 5, 2017
versioning tweak
1 parent bf379bf commit 986b032

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed
 

‎usr/share/pyshared/stopgolibs/about.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import wx
22
import os
3+
from datetime import date
34

45
def OnAboutBox(self):
56

@@ -24,8 +25,8 @@ def OnAboutBox(self):
2425
info.SetName('StopGo')
2526
info.SetVersion('0.8.18')
2627
info.SetDescription(description)
27-
info.SetCopyright('(C) VERSION_STRING6 - VERSION_STRING7 Seth Kenlon')
28-
info.SetWebSite('http://www.makerbox.co.nz')
28+
info.SetCopyright('(C) 2016 - ' + str(date.today().year) + ' Seth Kenlon')
29+
info.SetWebSite('http://makerbox.org.nz')
2930
info.SetLicence(licence)
3031
info.AddDeveloper('Klaatu, Seth Kenlon, Jess Weichler')
3132

‎usr/share/pyshared/stopgolibs/app.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ def getOptions():
1515
parser.add_argument("project",nargs="?")
1616
parser.add_argument("-c", "--config",nargs="?",dest='config',
1717
help="Optional path to a non-default config file.")
18-
parser.add_argument("-d", "--debug",dest='debug',action='store_true',help="Run in debug mode.")
18+
parser.add_argument("-l", "--logfile",nargs="?",dest='logfile',
19+
help="Optional path to log file. Default is /tmp")
20+
parser.add_argument("-v", "--verbose",dest='verbose',action='store_true',help="Print debugging to terminal.")
21+
#parser.add_argument("-w", "--which",dest='which',action='store_true',help="Print version to terminal.")
1922
parser.add_argument("-s", "--shell",dest='shell',action='store_true',help="Keep it in the shell. Do not launch the GUI.")
2023
parser.add_argument("-m", "--make-project",nargs="?",dest='make',
2124
help="Path to a directory of sequential images to load as if it were a StopGo project.")

‎usr/share/pyshared/stopgolibs/gui.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@
3030

3131
class GUI(wx.Frame):
3232
def __init__(self, parent, id, title, style, clargs):
33-
HANDLER = logging.handlers.WatchedFileHandler(os.environ.get("LOGFILE", os.path.join(os.path.expanduser('~'), 'stopgo.log')))
33+
if _plat.startswith('win'):
34+
HANDLER = logging.handlers.WatchedFileHandler(os.environ.get("LOGFILE", os.path.join(os.path.expanduser('~'), 'stopgo.log')))
35+
else:
36+
HANDLER = logging.handlers.WatchedFileHandler(os.environ.get("LOGFILE", os.path.join('/','tmp','stopgo.log')))
37+
3438
FORMATTER = logging.Formatter(logging.BASIC_FORMAT)
3539
HANDLER.setFormatter(FORMATTER)
3640

37-
if clargs.has_key('debug'):
41+
if not clargs.has_key('verbose'):
3842
root = logging.getLogger()
3943
root.setLevel(os.environ.get("LOGLEVEL", "INFO"))
4044
root.addHandler(HANDLER)
41-
45+
4246
logging.exception("Debugging on.")
4347
#First retrieve the screen size of the device
4448
self.screenSize = wx.DisplaySize()

‎usr/share/pyshared/stopgolibs/pref.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def OnCancel(self,e):
131131
class PrefProbe():
132132
def __init__(self):
133133
# does path exist
134+
self.newprefs = {"profile":"hd1080", "container":"mp4", "bitrate":"21M", "fps":"8", "encoder":"ffmpeg", "dir":"Desktop","prompt":"New project prompt"}
135+
134136
if not os.path.exists(os.path.join(os.path.expanduser("~"), '.config')):
135137
os.makedirs( os.path.join(os.path.expanduser("~"), '.config'))
136138

@@ -143,20 +145,18 @@ def __init__(self):
143145

144146

145147
def PrefGet(self):
146-
newprefs = {"profile":"1080p", "container":"mp4", "bitrate":"21Mbps", "fps":"8", "encoder":"ffmpeg", "dir":"Desktop","prompt":"New project prompt"}
147-
148148
myprefs = {}
149149

150150
try:
151151
dosiero = open(os.path.join(os.path.expanduser("~"), '.config', 'stopgo.conf.json'), 'r')
152152
myprefs = json.load(dosiero)
153153

154154
except:
155-
self.PrefDef(newprefs)
155+
self.PrefDef()
156156
dosiero = open(os.path.join(os.path.expanduser("~"), '.config', 'stopgo.conf.json'), 'r')
157157
myprefs = json.load(dosiero)
158158

159-
for nkey in newprefs.items():
159+
for nkey in self.newprefs.items():
160160
#print(type(myprefs))#DEBUG
161161
if myprefs.get(nkey[0]) == None:
162162
#print(str(nkey[0]) + str(' not found') ) #DEBUG
@@ -165,9 +165,9 @@ def PrefGet(self):
165165

166166
return myprefs
167167

168-
def PrefDef(self,newprefs):
168+
def PrefDef(self):
169169
homedir = os.path.expanduser("~/")
170170

171171
with open(os.path.join(homedir, '.config', 'stopgo.conf.json'), 'w') as outfile:
172-
json.dump(newprefs, outfile)
172+
json.dump(self.newprefs, outfile)
173173

0 commit comments

Comments
 (0)
Please sign in to comment.