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
=== added file 'accomplishments/ubuntu-desktop/en/multimedia/importshotwell.accomplishment'
--- accomplishments/ubuntu-desktop/en/multimedia/importshotwell.accomplishment 1970-01-01 00:00:00 +0000
+++ accomplishments/ubuntu-desktop/en/multimedia/importshotwell.accomplishment 2012-08-14 23:18:22 +0000
@@ -0,0 +1,18 @@
1[accomplishment]
2title = Import To Shotwell
3description = Import photos/videos into Shotwell Photo Manager
4category = Multimedia
5icon = default.png
6author = Tony Vec <tvec623@gmail.com>
7collection = ubuntu-desktop
8summary = Shotwell Photo Manager allows you to import, organize, view, and edit images
9 This accomplishment is awarded when you <b>import photos or videos</b> to your Shotwell library
10steps = Click the <i>Dash Home</i>
11 Enter <i>Shotwell Photo Manager</i>
12 You will be presented with the Shotwell application
13 Click the the icon
14 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>
15tips = Shotwell supports JPEG, PNG, TIFF, BMP, and RAW photo files. It even supports video files!
16pitfalls = Shotwell does not support GIF images.
17links = http://yorba.org/shotwell/help/
18
019
=== modified file 'accomplishments/ubuntu-desktop/en/multimedia/multimedia-added-music.accomplishment'
--- accomplishments/ubuntu-desktop/en/multimedia/multimedia-added-music.accomplishment 2012-05-22 16:41:31 +0000
+++ accomplishments/ubuntu-desktop/en/multimedia/multimedia-added-music.accomplishment 2012-08-14 23:18:22 +0000
@@ -1,7 +1,7 @@
1[accomplishment]1[accomplishment]
2id = ubuntu-desktop/multimedia-added-music2id = ubuntu-desktop/multimedia-added-music
3title = Added Music3title = Added Music
4description = You have added music to your computer4description = You have added music to your computer through Rhythmbox
5category = Multimedia5category = Multimedia
6icon = default.png6icon = default.png
7summary = There lots of different types of music you can 7summary = There lots of different types of music you can
88
=== modified file 'accomplishments/ubuntu-desktop/en/multimedia/musicinrhythmbox.accomplishment'
--- accomplishments/ubuntu-desktop/en/multimedia/musicinrhythmbox.accomplishment 2012-06-10 11:46:06 +0000
+++ accomplishments/ubuntu-desktop/en/multimedia/musicinrhythmbox.accomplishment 2012-08-14 23:18:22 +0000
@@ -14,6 +14,6 @@
14 Right click the 'music' entry under library and choose 'import file...' for a single song or 'import folder...' for a folder of music14 Right click the 'music' entry under library and choose 'import file...' for a single song or 'import folder...' for a folder of music
15 Navigate to the folder or song desired15 Navigate to the folder or song desired
16tips = You can even buy music through Rhythmbox16tips = You can even buy music through Rhythmbox
17pitfalls = Using a network share could resultin Rhythmbox reporting that you have missing files if you have not mounted the share prior to launching Rhythmbox.17pitfalls = 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.
18help = Click the <i>Help</i> menu.18help = Click the <i>Help</i> menu.
1919
2020
=== added file 'scripts/ubuntu-desktop/multimedia/importshotwell.py'
--- scripts/ubuntu-desktop/multimedia/importshotwell.py 1970-01-01 00:00:00 +0000
+++ scripts/ubuntu-desktop/multimedia/importshotwell.py 2012-08-14 23:18:22 +0000
@@ -0,0 +1,35 @@
1#!/usr/bin/python
2import os
3import sqlite3
4import sys
5
6homeDir = os.getenv('HOME')
7path = os.path.join(homeDir,'.shotwell/data/photo.db')
8
9if os.path.exists(path):
10 #connect to Shotwell library db
11 db = sqlite3.connect(path)
12
13 photo_curs = db.cursor()
14 video_curs = db.cursor()
15
16 photo_curs.execute('SELECT count(id) FROM PhotoTable')
17 video_curs.execute('SELECT count(id) FROM VideoTable')
18
19 image_count = photo_curs.fetchone()
20 video_count = video_curs.fetchone()
21
22 #Close the cursor and Database
23 photo_curs.close()
24 video_curs.close()
25 db.close()
26
27 if image_count[0] > 0 or video_count[0] > 0:
28 #user has images in Shotwell
29 print image_count[0], video_count[0]
30 sys.exit(0)
31 else:
32 #user does not have images in Shotwell
33 sys.exit(1)
34else:
35 sys.exit(1)

Subscribers

People subscribed via source and target branches