Merge lp:~tvec623/ubuntu-desktop-accomplishments/20120814_accomp_importshowell into lp:ubuntu-desktop-accomplishments

Proposed by Tony Vec
Status: Rejected
Rejected by: Matt Fischer
Proposed branch: lp:~tvec623/ubuntu-desktop-accomplishments/20120814_accomp_importshowell
Merge into: lp:ubuntu-desktop-accomplishments
Diff against target: 87 lines (+55/-2)
4 files modified
accomplishments/ubuntu-desktop/en/multimedia/importshotwell.accomplishment (+18/-0)
accomplishments/ubuntu-desktop/en/multimedia/multimedia-added-music.accomplishment (+1/-1)
accomplishments/ubuntu-desktop/en/multimedia/musicinrhythmbox.accomplishment (+1/-1)
scripts/ubuntu-desktop/multimedia/importshotwell.py (+35/-0)
To merge this branch: bzr merge lp:~tvec623/ubuntu-desktop-accomplishments/20120814_accomp_importshowell
Reviewer Review Type Date Requested Status
Rafał Cieślak Needs Fixing
Review via email: mp+119643@code.launchpad.net

Description of the change

Added: New accomplishment set called importshotwell
Minor Fix: Fixed small typos for clarity in multimedia-added-music and musicinrhythmbox accomplishments

To post a comment you must log in.
Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Great accomplishment, Tony! Thanks for submitting it. I have tested it, and I have two notes for you:

 * In the 'steps' field, step 4 is unclear ("Click the icon"). While I know that you meant 'click the icon you are presented with in dash search results' (though it took me some time to guess), I'd suggest to merge this step with the previous one, because it makes an impression that one needs to click some icon /after/ they launch Shotwell. And, after all, the point of this accomplishment is not explaining how to launch an application via dash, but how to get shotwell to manage one's images :-)
 * For some reason I am not awarded with this accomplishment even though I have imported photos to Shotwell. The script still exits with code 1... I have done a simple debugging, and it seems that ~/.shotwell directory is not present on my system. Can it be it stores my images DB in some other location? It would be great if you managed to fix this. If you need me to assist you by trying some scripts on my system which misses the ~/.shotwell directory, feel free to get in touch with me at #ubuntu-accomplishments on freenode :-)

review: Needs Fixing
Revision history for this message
Matt Fischer (mfisch) wrote :

Tony,

Any updates?

Revision history for this message
Matt Fischer (mfisch) wrote :

Tony,

Thanks for your work on this. Daniel picked up the code and is merging it in a new MP now and you will still get credit.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'accomplishments/ubuntu-desktop/en/multimedia/importshotwell.accomplishment'
2--- accomplishments/ubuntu-desktop/en/multimedia/importshotwell.accomplishment 1970-01-01 00:00:00 +0000
3+++ accomplishments/ubuntu-desktop/en/multimedia/importshotwell.accomplishment 2012-08-14 23:18:22 +0000
4@@ -0,0 +1,18 @@
5+[accomplishment]
6+title = Import To Shotwell
7+description = Import photos/videos into Shotwell Photo Manager
8+category = Multimedia
9+icon = default.png
10+author = Tony Vec <tvec623@gmail.com>
11+collection = ubuntu-desktop
12+summary = Shotwell Photo Manager allows you to import, organize, view, and edit images
13+ This accomplishment is awarded when you <b>import photos or videos</b> to your Shotwell library
14+steps = Click the <i>Dash Home</i>
15+ Enter <i>Shotwell Photo Manager</i>
16+ You will be presented with the Shotwell application
17+ Click the the icon
18+ To import, you can: <ul><li>Drag and drop a folder/file onto the application; or</li><li> Go to <b>File</b> and choose <b>Import from folder...</b>; Select the folder you want imported and press <b>OK</b></li></ul>
19+tips = Shotwell supports JPEG, PNG, TIFF, BMP, and RAW photo files. It even supports video files!
20+pitfalls = Shotwell does not support GIF images.
21+links = http://yorba.org/shotwell/help/
22+
23
24=== modified file 'accomplishments/ubuntu-desktop/en/multimedia/multimedia-added-music.accomplishment'
25--- accomplishments/ubuntu-desktop/en/multimedia/multimedia-added-music.accomplishment 2012-05-22 16:41:31 +0000
26+++ accomplishments/ubuntu-desktop/en/multimedia/multimedia-added-music.accomplishment 2012-08-14 23:18:22 +0000
27@@ -1,7 +1,7 @@
28 [accomplishment]
29 id = ubuntu-desktop/multimedia-added-music
30 title = Added Music
31-description = You have added music to your computer
32+description = You have added music to your computer through Rhythmbox
33 category = Multimedia
34 icon = default.png
35 summary = There lots of different types of music you can
36
37=== modified file 'accomplishments/ubuntu-desktop/en/multimedia/musicinrhythmbox.accomplishment'
38--- accomplishments/ubuntu-desktop/en/multimedia/musicinrhythmbox.accomplishment 2012-06-10 11:46:06 +0000
39+++ accomplishments/ubuntu-desktop/en/multimedia/musicinrhythmbox.accomplishment 2012-08-14 23:18:22 +0000
40@@ -14,6 +14,6 @@
41 Right click the 'music' entry under library and choose 'import file...' for a single song or 'import folder...' for a folder of music
42 Navigate to the folder or song desired
43 tips = You can even buy music through Rhythmbox
44-pitfalls = Using a network share could resultin Rhythmbox reporting that you have missing files if you have not mounted the share prior to launching Rhythmbox.
45+pitfalls = Using a network share could result in Rhythmbox reporting that you have missing files if you have not mounted the share prior to launching Rhythmbox.
46 help = Click the <i>Help</i> menu.
47
48
49=== added file 'scripts/ubuntu-desktop/multimedia/importshotwell.py'
50--- scripts/ubuntu-desktop/multimedia/importshotwell.py 1970-01-01 00:00:00 +0000
51+++ scripts/ubuntu-desktop/multimedia/importshotwell.py 2012-08-14 23:18:22 +0000
52@@ -0,0 +1,35 @@
53+#!/usr/bin/python
54+import os
55+import sqlite3
56+import sys
57+
58+homeDir = os.getenv('HOME')
59+path = os.path.join(homeDir,'.shotwell/data/photo.db')
60+
61+if os.path.exists(path):
62+ #connect to Shotwell library db
63+ db = sqlite3.connect(path)
64+
65+ photo_curs = db.cursor()
66+ video_curs = db.cursor()
67+
68+ photo_curs.execute('SELECT count(id) FROM PhotoTable')
69+ video_curs.execute('SELECT count(id) FROM VideoTable')
70+
71+ image_count = photo_curs.fetchone()
72+ video_count = video_curs.fetchone()
73+
74+ #Close the cursor and Database
75+ photo_curs.close()
76+ video_curs.close()
77+ db.close()
78+
79+ if image_count[0] > 0 or video_count[0] > 0:
80+ #user has images in Shotwell
81+ print image_count[0], video_count[0]
82+ sys.exit(0)
83+ else:
84+ #user does not have images in Shotwell
85+ sys.exit(1)
86+else:
87+ sys.exit(1)

Subscribers

People subscribed via source and target branches