Merge lp:~joshbrown/photostory/datafiles into lp:~photostory/photostory/trunk

Proposed by Josh Brown
Status: Merged
Merge reported by: Josh Brown
Merged at revision: not available
Proposed branch: lp:~joshbrown/photostory/datafiles
Merge into: lp:~photostory/photostory/trunk
Diff against target: 260 lines (+45/-71) (has conflicts)
6 files modified
MANIFEST (+5/-0)
data/db (+0/-2)
data/num (+0/-2)
install.diff (+4/-44)
photostory (+34/-19)
setup.py (+2/-4)
Text conflict in MANIFEST
To merge this branch: bzr merge lp:~joshbrown/photostory/datafiles
Reviewer Review Type Date Requested Status
Joel Auterson Pending
Review via email: mp+32791@code.launchpad.net
To post a comment you must log in.
lp:~joshbrown/photostory/datafiles updated
19. By Josh Brown

Changed all instances of `picture` to `photo`.

Revision history for this message
Josh Brown (joshbrown) wrote :

Since there hasn't been any activity for a while, I'm going to go ahead and merge this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MANIFEST'
2--- MANIFEST 2010-08-16 16:38:18 +0000
3+++ MANIFEST 2010-08-19 11:52:40 +0000
4@@ -3,6 +3,11 @@
5 photostory.desktop
6 setup.py
7 pictures
8+<<<<<<< TREE
9 data/db
10 data/photostory.svg
11 data/num
12+=======
13+photostory.svg
14+data/nopic.png
15+>>>>>>> MERGE-SOURCE
16
17=== removed directory 'data'
18=== removed file 'data/db'
19--- data/db 2010-07-30 01:33:34 +0000
20+++ data/db 1970-01-01 00:00:00 +0000
21@@ -1,2 +0,0 @@
22-(dp1
23-.
24\ No newline at end of file
25
26=== removed file 'data/num'
27--- data/num 2010-07-30 01:33:34 +0000
28+++ data/num 1970-01-01 00:00:00 +0000
29@@ -1,2 +0,0 @@
30-I0
31-.
32\ No newline at end of file
33
34=== modified file 'install.diff'
35--- install.diff 2010-08-16 10:03:30 +0000
36+++ install.diff 2010-08-19 11:52:40 +0000
37@@ -1,50 +1,10 @@
38---- photostory 2010-08-16 10:51:49.585558000 +0100
39-+++ photostory 2010-08-16 10:57:08.908925045 +0100
40-@@ -25,8 +25,8 @@
41- self.movPath = None
42- self.adj = gtk.Adjustment(5, 1, 10, 1)
43- self.pic=None
44-- self.db = cPickle.load(open('data/db', 'rb'))
45-- self.ind = int(cPickle.load(open('data/num', 'rb')))
46-+ self.db = cPickle.load(open('/usr/local/share/photostory/data/db', 'rb'))
47-+ self.ind = int(cPickle.load(open('/usr/local/share/photostory/data/num', 'rb')))
48- todayPicName = "pictures/" + str(self.ind) + ".png"
49- todayDate = None
50-
51-@@ -37,8 +37,8 @@
52- def closedown(win):
53- print 'ind ' + str(self.ind)
54- print 'db' + str(self.db)
55-- cPickle.dump(self.db, open('data/db', 'wb'))
56-- cPickle.dump(self.ind, open('data/num', 'wb'))
57-+ cPickle.dump(self.db, open('/usr/local/share/photostory/data/db', 'wb'))
58-+ cPickle.dump(self.ind, open('/usr/local/share/photostory/data/num', 'wb'))
59- gtk.main_quit()
60-
61- def about(aboutBut):
62-@@ -152,14 +152,14 @@
63- gaps = 0
64- i = 0
65- for element in self.db:
66-- oldPath = "pictures/" + str(i) + ".png"
67-+ oldPath = "/usr/local/share/photostory/pictures/" + str(i) + ".png"
68- if not os.path.exists(oldPath):
69- gaps += 1
70- i += 1
71-- oldPath = "pictures/" + str(i) + ".png"
72-+ oldPath = "/usr/local/share/photostory/pictures/" + str(i) + ".png"
73- if os.path.exists(oldPath):
74- key = getKey(self.db, oldPath)
75-- newPath = "pictures/" + str(i-gaps) + ".png"
76-+ newPath = "/usr/local/share/photostory/pictures/" + str(i-gaps) + ".png"
77- os.rename(oldPath, newPath)
78- self.db[key] = newPath
79- i += 1
80-@@ -196,7 +196,7 @@
81+--- photostory 2010-08-16 17:23:41.744783667 +0100
82++++ photostory 2010-08-16 17:29:36.963710900 +0100
83+@@ -211,7 +211,7 @@
84 win.set_default_size(900, 600)
85 win.set_resizable(False)
86 win.set_title("Photostory")
87-- win.set_icon_from_file("data/photostory.svg")
88+- win.set_icon_from_file("photostory.svg")
89 + win.set_icon_from_file("/usr/local/share/photostory/data/photostory.svg")
90 movie = gtk.DrawingArea()
91 hbox = gtk.HBox(homogeneous=False, spacing=3)
92
93=== modified file 'photostory'
94--- photostory 2010-08-15 12:59:17 +0000
95+++ photostory 2010-08-19 11:52:40 +0000
96@@ -25,9 +25,24 @@
97 self.movPath = None
98 self.adj = gtk.Adjustment(5, 1, 10, 1)
99 self.pic=None
100- self.db = cPickle.load(open('data/db', 'rb'))
101- self.ind = int(cPickle.load(open('data/num', 'rb')))
102- todayPicName = "pictures/" + str(self.ind) + ".png"
103+
104+ # If the `~/.photostory/photos` directory doesn't exist, create it:
105+ if not os.path.exists(os.path.expanduser('~/.photostory/photos')):
106+ os.makedirs(os.path.expanduser('~/.photostory/photos'))
107+
108+ # If the `~/.photostory/db` pickle doesn't exist, create it:
109+ if not os.path.isfile(os.path.expanduser('~/.photostory/db')):
110+ cPickle.dump({}, open(os.path.expanduser('~/.photostory/db'), 'w'))
111+
112+ # If the `~/.photostory/num` pickle doesn't exist, create it:
113+ if not os.path.isfile(os.path.expanduser('~/.photostory/num')):
114+ cPickle.dump(0, open(os.path.expanduser('~/.photostory/num'), 'w'))
115+
116+ # Load the `db` and `num` pickles:
117+ self.db = cPickle.load(open(os.path.expanduser('~/.photostory/db'), 'rb'))
118+ self.ind = int(cPickle.load(open(os.path.expanduser('~/.photostory/num'), 'rb')))
119+
120+ todayPicName = os.path.expanduser('~/.photostory/photos/') + str(self.ind) + ".png"
121 todayDate = None
122
123 def chooseDay(cal):
124@@ -37,14 +52,14 @@
125 def closedown(win):
126 print 'ind ' + str(self.ind)
127 print 'db' + str(self.db)
128- cPickle.dump(self.db, open('data/db', 'wb'))
129- cPickle.dump(self.ind, open('data/num', 'wb'))
130+ cPickle.dump(self.db, open(os.path.expanduser('~/.photostory/db'), 'wb'))
131+ cPickle.dump(self.ind, open(os.path.expanduser('~/.photostory/num'), 'wb'))
132 gtk.main_quit()
133
134 def about(aboutBut):
135 dAbout = gtk.AboutDialog()
136 dAbout.set_name("Photostory")
137- dAbout.set_comments("Photostory is an application that lets you tell the story of your life in pictures, by taking a snapshot of you each day. You can then make these into a video to share with friends or on the internet.")
138+ dAbout.set_comments("Photostory is an application that lets you tell the story of your life in photos, by taking a snapshot of you each day. You can then make these into a video to share with friends or on the internet.")
139 dAbout.set_artists(("Josh Brown", ""))
140 dAbout.set_authors(("Joel Auterson", "David Turner"))
141 dAbout.set_website("http://launchpad.net/photostory")
142@@ -67,7 +82,7 @@
143
144 filmPipe = gst.Pipeline("filmPipe")
145 filmSrc = gst.element_factory_make("multifilesrc", "filmSrc")
146- filmSrc.set_property("location", "pictures/%d.png")
147+ filmSrc.set_property("location", "photos/%d.png")
148 filmFilt1 = gst.element_factory_make("capsfilter", "filmFilt1")
149 filmCap1 = gst.Caps("image/png,framerate=" + str(self.adj.get_value()) + "/1,pixel-aspect-ratio=1/1")
150 filmFilt1.set_property("caps", filmCap1)
151@@ -92,7 +107,7 @@
152 movDia.set_resizable(False)
153 filmBut.set_sensitive(False)
154 movVbox = gtk.VBox(homogeneous=False, spacing=2)
155- movLabel = gtk.Label("Here you can create a video made up of all your pictures. \n\nJust choose a save location and hit 'create'.\n\nRemember, the path must end in '.mp4'.\n")
156+ movLabel = gtk.Label("Here you can create a video made up of all your photos. \n\nJust choose a save location and hit 'create'.\n\nRemember, the path must end in '.mp4'.\n")
157 movFileButton = gtk.Button(label="Choose a location")
158 movButton = gtk.Button(label="Create")
159
160@@ -147,19 +162,19 @@
161 os.remove(self.db[date])
162 setPic("")
163 if date == todayDate:
164- takeBut.set_label("Take today's picture")
165+ takeBut.set_label("Take today's photo")
166 takeBut.set_sensitive(True)
167 gaps = 0
168 i = 0
169 for element in self.db:
170- oldPath = "pictures/" + str(i) + ".png"
171+ oldPath = os.path.expanduser('~/.photostory/photos/') + str(i) + ".png"
172 if not os.path.exists(oldPath):
173 gaps += 1
174 i += 1
175- oldPath = "pictures/" + str(i) + ".png"
176+ oldPath = os.path.expanduser('~/.photostory/photos/') + str(i) + ".png"
177 if os.path.exists(oldPath):
178 key = getKey(self.db, oldPath)
179- newPath = "pictures/" + str(i-gaps) + ".png"
180+ newPath = os.path.expanduser('~/.photostory/photos/') + str(i-gaps) + ".png"
181 os.rename(oldPath, newPath)
182 self.db[key] = newPath
183 i += 1
184@@ -173,18 +188,18 @@
185 if date in self.db:
186 self.pic = gtk.Image()
187 self.pic.set_from_file(self.db[date])
188- takeBut.set_label("Picture taken for this day.")
189+ takeBut.set_label("Photo taken for this day.")
190 takeBut.set_sensitive(False)
191 else:
192 if date == todayDate:
193- takeBut.set_label("Take today's picture")
194+ takeBut.set_label("Take today's photo")
195 takeBut.set_sensitive(True)
196 else:
197- takeBut.set_label("Take today's picture")
198+ takeBut.set_label("Take today's photo")
199 takeBut.set_sensitive(False)
200 self.pic = gtk.Label()
201 self.pic.set_justify(gtk.JUSTIFY_CENTER)
202- self.pic.set_markup("<span size='54000'>No Picture\nToday</span>");
203+ self.pic.set_markup("<span size='54000'>No Photo\nToday</span>");
204 self.pic.set_size_request(640, 480)
205 vbox1.pack_start(self.pic)
206 vbox1.pack_start(hbox2)
207@@ -196,14 +211,14 @@
208 win.set_default_size(900, 600)
209 win.set_resizable(False)
210 win.set_title("Photostory")
211- win.set_icon_from_file("data/photostory.svg")
212+ win.set_icon_from_file("photostory.svg")
213 movie = gtk.DrawingArea()
214 hbox = gtk.HBox(homogeneous=False, spacing=3)
215 vbox1 = gtk.VBox(homogeneous=False)
216 vbox2 = gtk.VBox(homogeneous = False)
217 filmBut = gtk.Button(label="Create Film")
218 filmBut.connect("clicked", movify)
219- deleteBut = gtk.Button(label="Delete Picture")
220+ deleteBut = gtk.Button(label="Delete Photo")
221 deleteBut.connect("clicked", deletePic)
222 shareBut = gtk.Button(label="Share Video")
223 hbox2 = gtk.HBox(homogeneous=True)
224@@ -214,7 +229,7 @@
225 todayDate = cal.get_date()
226 cal.connect("day-selected", chooseDay)
227
228- takeBut = gtk.Button(label="Take today's picture")
229+ takeBut = gtk.Button(label="Take today's photo")
230 takeBut.connect("clicked", capture)
231
232 setPic(todayDate)
233
234=== renamed file 'data/photostory.svg' => 'photostory.svg'
235=== removed directory 'pictures'
236=== modified file 'setup.py'
237--- setup.py 2010-07-21 16:54:55 +0000
238+++ setup.py 2010-08-19 11:52:40 +0000
239@@ -2,7 +2,6 @@
240 # Installation script for Photostory
241
242 from distutils.core import setup
243-from glob import glob
244 import os
245
246 # Change the paths to point to the correct directories:
247@@ -21,11 +20,10 @@
248 'video'],
249 url='http://launchpad.net/photostory',
250 license='GNU GPL v3',
251- data_files=[ # FIXME: Create empty 'pictures' directory.
252+ data_files=[
253 ('share/bin', ['photostory']),
254- ('share/photostory/data', glob('data/*')),
255 ('share/applications/', ['photostory.desktop']),
256- ('share/icons/hicolor/scalable/apps', ['data/photostory.svg']),
257+ ('share/icons/hicolor/scalable/apps', ['photostory.svg']),
258 ],
259 requires=['gst', 'gtk2']
260 )

Subscribers

People subscribed via source and target branches

to all changes: