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
=== modified file 'MANIFEST'
--- MANIFEST 2010-08-16 16:38:18 +0000
+++ MANIFEST 2010-08-19 11:52:40 +0000
@@ -3,6 +3,11 @@
3photostory.desktop3photostory.desktop
4setup.py4setup.py
5pictures5pictures
6<<<<<<< TREE
6data/db7data/db
7data/photostory.svg8data/photostory.svg
8data/num9data/num
10=======
11photostory.svg
12data/nopic.png
13>>>>>>> MERGE-SOURCE
914
=== removed directory 'data'
=== removed file 'data/db'
--- data/db 2010-07-30 01:33:34 +0000
+++ data/db 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1(dp1
2.
3\ No newline at end of file0\ No newline at end of file
41
=== removed file 'data/num'
--- data/num 2010-07-30 01:33:34 +0000
+++ data/num 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1I0
2.
3\ No newline at end of file0\ No newline at end of file
41
=== modified file 'install.diff'
--- install.diff 2010-08-16 10:03:30 +0000
+++ install.diff 2010-08-19 11:52:40 +0000
@@ -1,50 +1,10 @@
1--- photostory 2010-08-16 10:51:49.585558000 +01001--- photostory 2010-08-16 17:23:41.744783667 +0100
2+++ photostory 2010-08-16 10:57:08.908925045 +01002+++ photostory 2010-08-16 17:29:36.963710900 +0100
3@@ -25,8 +25,8 @@3@@ -211,7 +211,7 @@
4 self.movPath = None
5 self.adj = gtk.Adjustment(5, 1, 10, 1)
6 self.pic=None
7- self.db = cPickle.load(open('data/db', 'rb'))
8- self.ind = int(cPickle.load(open('data/num', 'rb')))
9+ self.db = cPickle.load(open('/usr/local/share/photostory/data/db', 'rb'))
10+ self.ind = int(cPickle.load(open('/usr/local/share/photostory/data/num', 'rb')))
11 todayPicName = "pictures/" + str(self.ind) + ".png"
12 todayDate = None
13
14@@ -37,8 +37,8 @@
15 def closedown(win):
16 print 'ind ' + str(self.ind)
17 print 'db' + str(self.db)
18- cPickle.dump(self.db, open('data/db', 'wb'))
19- cPickle.dump(self.ind, open('data/num', 'wb'))
20+ cPickle.dump(self.db, open('/usr/local/share/photostory/data/db', 'wb'))
21+ cPickle.dump(self.ind, open('/usr/local/share/photostory/data/num', 'wb'))
22 gtk.main_quit()
23
24 def about(aboutBut):
25@@ -152,14 +152,14 @@
26 gaps = 0
27 i = 0
28 for element in self.db:
29- oldPath = "pictures/" + str(i) + ".png"
30+ oldPath = "/usr/local/share/photostory/pictures/" + str(i) + ".png"
31 if not os.path.exists(oldPath):
32 gaps += 1
33 i += 1
34- oldPath = "pictures/" + str(i) + ".png"
35+ oldPath = "/usr/local/share/photostory/pictures/" + str(i) + ".png"
36 if os.path.exists(oldPath):
37 key = getKey(self.db, oldPath)
38- newPath = "pictures/" + str(i-gaps) + ".png"
39+ newPath = "/usr/local/share/photostory/pictures/" + str(i-gaps) + ".png"
40 os.rename(oldPath, newPath)
41 self.db[key] = newPath
42 i += 1
43@@ -196,7 +196,7 @@
44 win.set_default_size(900, 600)4 win.set_default_size(900, 600)
45 win.set_resizable(False)5 win.set_resizable(False)
46 win.set_title("Photostory")6 win.set_title("Photostory")
47- win.set_icon_from_file("data/photostory.svg")7- win.set_icon_from_file("photostory.svg")
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")
49 movie = gtk.DrawingArea()9 movie = gtk.DrawingArea()
50 hbox = gtk.HBox(homogeneous=False, spacing=3)10 hbox = gtk.HBox(homogeneous=False, spacing=3)
5111
=== modified file 'photostory'
--- photostory 2010-08-15 12:59:17 +0000
+++ photostory 2010-08-19 11:52:40 +0000
@@ -25,9 +25,24 @@
25 self.movPath = None25 self.movPath = None
26 self.adj = gtk.Adjustment(5, 1, 10, 1)26 self.adj = gtk.Adjustment(5, 1, 10, 1)
27 self.pic=None27 self.pic=None
28 self.db = cPickle.load(open('data/db', 'rb'))28
29 self.ind = int(cPickle.load(open('data/num', 'rb')))29 # If the `~/.photostory/photos` directory doesn't exist, create it:
30 todayPicName = "pictures/" + str(self.ind) + ".png"30 if not os.path.exists(os.path.expanduser('~/.photostory/photos')):
31 os.makedirs(os.path.expanduser('~/.photostory/photos'))
32
33 # If the `~/.photostory/db` pickle doesn't exist, create it:
34 if not os.path.isfile(os.path.expanduser('~/.photostory/db')):
35 cPickle.dump({}, open(os.path.expanduser('~/.photostory/db'), 'w'))
36
37 # If the `~/.photostory/num` pickle doesn't exist, create it:
38 if not os.path.isfile(os.path.expanduser('~/.photostory/num')):
39 cPickle.dump(0, open(os.path.expanduser('~/.photostory/num'), 'w'))
40
41 # Load the `db` and `num` pickles:
42 self.db = cPickle.load(open(os.path.expanduser('~/.photostory/db'), 'rb'))
43 self.ind = int(cPickle.load(open(os.path.expanduser('~/.photostory/num'), 'rb')))
44
45 todayPicName = os.path.expanduser('~/.photostory/photos/') + str(self.ind) + ".png"
31 todayDate = None46 todayDate = None
3247
33 def chooseDay(cal):48 def chooseDay(cal):
@@ -37,14 +52,14 @@
37 def closedown(win):52 def closedown(win):
38 print 'ind ' + str(self.ind)53 print 'ind ' + str(self.ind)
39 print 'db' + str(self.db)54 print 'db' + str(self.db)
40 cPickle.dump(self.db, open('data/db', 'wb'))55 cPickle.dump(self.db, open(os.path.expanduser('~/.photostory/db'), 'wb'))
41 cPickle.dump(self.ind, open('data/num', 'wb'))56 cPickle.dump(self.ind, open(os.path.expanduser('~/.photostory/num'), 'wb'))
42 gtk.main_quit()57 gtk.main_quit()
4358
44 def about(aboutBut):59 def about(aboutBut):
45 dAbout = gtk.AboutDialog()60 dAbout = gtk.AboutDialog()
46 dAbout.set_name("Photostory")61 dAbout.set_name("Photostory")
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.")
48 dAbout.set_artists(("Josh Brown", ""))63 dAbout.set_artists(("Josh Brown", ""))
49 dAbout.set_authors(("Joel Auterson", "David Turner"))64 dAbout.set_authors(("Joel Auterson", "David Turner"))
50 dAbout.set_website("http://launchpad.net/photostory")65 dAbout.set_website("http://launchpad.net/photostory")
@@ -67,7 +82,7 @@
6782
68 filmPipe = gst.Pipeline("filmPipe")83 filmPipe = gst.Pipeline("filmPipe")
69 filmSrc = gst.element_factory_make("multifilesrc", "filmSrc")84 filmSrc = gst.element_factory_make("multifilesrc", "filmSrc")
70 filmSrc.set_property("location", "pictures/%d.png")85 filmSrc.set_property("location", "photos/%d.png")
71 filmFilt1 = gst.element_factory_make("capsfilter", "filmFilt1")86 filmFilt1 = gst.element_factory_make("capsfilter", "filmFilt1")
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")
73 filmFilt1.set_property("caps", filmCap1)88 filmFilt1.set_property("caps", filmCap1)
@@ -92,7 +107,7 @@
92 movDia.set_resizable(False)107 movDia.set_resizable(False)
93 filmBut.set_sensitive(False)108 filmBut.set_sensitive(False)
94 movVbox = gtk.VBox(homogeneous=False, spacing=2)109 movVbox = gtk.VBox(homogeneous=False, spacing=2)
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")
96 movFileButton = gtk.Button(label="Choose a location")111 movFileButton = gtk.Button(label="Choose a location")
97 movButton = gtk.Button(label="Create")112 movButton = gtk.Button(label="Create")
98 113
@@ -147,19 +162,19 @@
147 os.remove(self.db[date])162 os.remove(self.db[date])
148 setPic("")163 setPic("")
149 if date == todayDate:164 if date == todayDate:
150 takeBut.set_label("Take today's picture")165 takeBut.set_label("Take today's photo")
151 takeBut.set_sensitive(True)166 takeBut.set_sensitive(True)
152 gaps = 0167 gaps = 0
153 i = 0168 i = 0
154 for element in self.db:169 for element in self.db:
155 oldPath = "pictures/" + str(i) + ".png"170 oldPath = os.path.expanduser('~/.photostory/photos/') + str(i) + ".png"
156 if not os.path.exists(oldPath):171 if not os.path.exists(oldPath):
157 gaps += 1172 gaps += 1
158 i += 1173 i += 1
159 oldPath = "pictures/" + str(i) + ".png"174 oldPath = os.path.expanduser('~/.photostory/photos/') + str(i) + ".png"
160 if os.path.exists(oldPath):175 if os.path.exists(oldPath):
161 key = getKey(self.db, oldPath)176 key = getKey(self.db, oldPath)
162 newPath = "pictures/" + str(i-gaps) + ".png"177 newPath = os.path.expanduser('~/.photostory/photos/') + str(i-gaps) + ".png"
163 os.rename(oldPath, newPath)178 os.rename(oldPath, newPath)
164 self.db[key] = newPath179 self.db[key] = newPath
165 i += 1180 i += 1
@@ -173,18 +188,18 @@
173 if date in self.db:188 if date in self.db:
174 self.pic = gtk.Image()189 self.pic = gtk.Image()
175 self.pic.set_from_file(self.db[date])190 self.pic.set_from_file(self.db[date])
176 takeBut.set_label("Picture taken for this day.")191 takeBut.set_label("Photo taken for this day.")
177 takeBut.set_sensitive(False)192 takeBut.set_sensitive(False)
178 else: 193 else:
179 if date == todayDate:194 if date == todayDate:
180 takeBut.set_label("Take today's picture")195 takeBut.set_label("Take today's photo")
181 takeBut.set_sensitive(True)196 takeBut.set_sensitive(True)
182 else:197 else:
183 takeBut.set_label("Take today's picture")198 takeBut.set_label("Take today's photo")
184 takeBut.set_sensitive(False)199 takeBut.set_sensitive(False)
185 self.pic = gtk.Label()200 self.pic = gtk.Label()
186 self.pic.set_justify(gtk.JUSTIFY_CENTER)201 self.pic.set_justify(gtk.JUSTIFY_CENTER)
187 self.pic.set_markup("<span size='54000'>No Picture\nToday</span>");202 self.pic.set_markup("<span size='54000'>No Photo\nToday</span>");
188 self.pic.set_size_request(640, 480)203 self.pic.set_size_request(640, 480)
189 vbox1.pack_start(self.pic)204 vbox1.pack_start(self.pic)
190 vbox1.pack_start(hbox2)205 vbox1.pack_start(hbox2)
@@ -196,14 +211,14 @@
196 win.set_default_size(900, 600)211 win.set_default_size(900, 600)
197 win.set_resizable(False)212 win.set_resizable(False)
198 win.set_title("Photostory")213 win.set_title("Photostory")
199 win.set_icon_from_file("data/photostory.svg")214 win.set_icon_from_file("photostory.svg")
200 movie = gtk.DrawingArea()215 movie = gtk.DrawingArea()
201 hbox = gtk.HBox(homogeneous=False, spacing=3)216 hbox = gtk.HBox(homogeneous=False, spacing=3)
202 vbox1 = gtk.VBox(homogeneous=False)217 vbox1 = gtk.VBox(homogeneous=False)
203 vbox2 = gtk.VBox(homogeneous = False) 218 vbox2 = gtk.VBox(homogeneous = False)
204 filmBut = gtk.Button(label="Create Film")219 filmBut = gtk.Button(label="Create Film")
205 filmBut.connect("clicked", movify)220 filmBut.connect("clicked", movify)
206 deleteBut = gtk.Button(label="Delete Picture")221 deleteBut = gtk.Button(label="Delete Photo")
207 deleteBut.connect("clicked", deletePic)222 deleteBut.connect("clicked", deletePic)
208 shareBut = gtk.Button(label="Share Video")223 shareBut = gtk.Button(label="Share Video")
209 hbox2 = gtk.HBox(homogeneous=True)224 hbox2 = gtk.HBox(homogeneous=True)
@@ -214,7 +229,7 @@
214 todayDate = cal.get_date()229 todayDate = cal.get_date()
215 cal.connect("day-selected", chooseDay)230 cal.connect("day-selected", chooseDay)
216 231
217 takeBut = gtk.Button(label="Take today's picture")232 takeBut = gtk.Button(label="Take today's photo")
218 takeBut.connect("clicked", capture)233 takeBut.connect("clicked", capture)
219 234
220 setPic(todayDate)235 setPic(todayDate)
221236
=== renamed file 'data/photostory.svg' => 'photostory.svg'
=== removed directory 'pictures'
=== modified file 'setup.py'
--- setup.py 2010-07-21 16:54:55 +0000
+++ setup.py 2010-08-19 11:52:40 +0000
@@ -2,7 +2,6 @@
2# Installation script for Photostory2# Installation script for Photostory
33
4from distutils.core import setup4from distutils.core import setup
5from glob import glob
6import os5import os
76
8# Change the paths to point to the correct directories:7# Change the paths to point to the correct directories:
@@ -21,11 +20,10 @@
21 'video'],20 'video'],
22 url='http://launchpad.net/photostory',21 url='http://launchpad.net/photostory',
23 license='GNU GPL v3',22 license='GNU GPL v3',
24 data_files=[ # FIXME: Create empty 'pictures' directory.23 data_files=[
25 ('share/bin', ['photostory']),24 ('share/bin', ['photostory']),
26 ('share/photostory/data', glob('data/*')),
27 ('share/applications/', ['photostory.desktop']),25 ('share/applications/', ['photostory.desktop']),
28 ('share/icons/hicolor/scalable/apps', ['data/photostory.svg']),26 ('share/icons/hicolor/scalable/apps', ['photostory.svg']),
29 ],27 ],
30 requires=['gst', 'gtk2']28 requires=['gst', 'gtk2']
31 )29 )

Subscribers

People subscribed via source and target branches

to all changes: