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