Merge lp:~jpickett/ubuntu-desktop-accomplishments/add-libreoffice-doc-create-trophy into lp:ubuntu-desktop-accomplishments

Proposed by Joel Pickett
Status: Merged
Merged at revision: 74
Proposed branch: lp:~jpickett/ubuntu-desktop-accomplishments/add-libreoffice-doc-create-trophy
Merge into: lp:ubuntu-desktop-accomplishments
Diff against target: 45 lines (+34/-0)
2 files modified
accomplishments/ubuntu-desktop/en/productivity/libreoffice-create-document.accomplishment (+12/-0)
scripts/ubuntu-desktop/productivity/libreoffice-create-document.py (+22/-0)
To merge this branch: bzr merge lp:~jpickett/ubuntu-desktop-accomplishments/add-libreoffice-doc-create-trophy
Reviewer Review Type Date Requested Status
Matt Fischer Approve
Review via email: mp+108455@code.launchpad.net

Description of the change

Add productivity/ and libreoffice-create-document.accomplishment and corresponding .py script based off s.fox multimedia-music

To post a comment you must log in.
Revision history for this message
Matt Fischer (mfisch) wrote :

Approved and merged. Sorry for the long delay!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'accomplishments/ubuntu-desktop/en/productivity'
2=== added file 'accomplishments/ubuntu-desktop/en/productivity/libreoffice-create-document.accomplishment'
3--- accomplishments/ubuntu-desktop/en/productivity/libreoffice-create-document.accomplishment 1970-01-01 00:00:00 +0000
4+++ accomplishments/ubuntu-desktop/en/productivity/libreoffice-create-document.accomplishment 2012-06-02 14:00:26 +0000
5@@ -0,0 +1,12 @@
6+[accomplishment]
7+id = ubuntu-desktop/libreoffice-create-document
8+title = Created a LibreOffice document
9+description = You have created a LibreOffice document
10+category = Productivity
11+icon = default.png
12+summary = LibreOffice is a powerful office suite that makes it easy to create documents, presentations and manage personal
13+ <ul><li>Open either LibreOffice, Writer, Calc or Impress from the Launcher</li>
14+ <li>Create a document/spreadsheet/presentation and save it in your Documents folder</li></ul>
15+ LibreOffice is a powerful suite that provides six feature-rich office applications: Writer (word-processor), Calc (spreadsheet), Impress (presentation software), Draw (graphics editor), Math (math formulae) and Base (database management). Try each of them out to see what's available and how it can help you.
16+help = https://wiki.ubuntu.com/LibreOffice
17+author = Joel Pickett <jpickett@ubuntu.com>
18
19=== added directory 'scripts/ubuntu-desktop/productivity'
20=== added file 'scripts/ubuntu-desktop/productivity/libreoffice-create-document.py'
21--- scripts/ubuntu-desktop/productivity/libreoffice-create-document.py 1970-01-01 00:00:00 +0000
22+++ scripts/ubuntu-desktop/productivity/libreoffice-create-document.py 2012-06-02 14:00:26 +0000
23@@ -0,0 +1,22 @@
24+#!/usr/bin/python
25+import commands, sys, os
26+homeDir = os.getenv("HOME")
27+path = os.path.join(homeDir,'.config/user-dirs.dirs')
28+result = open(path, "r")
29+content = result.readline()
30+while (content != "" ):
31+ content.replace( "\n", "" )
32+ content = result.readline()
33+ startStr = content[0:17]
34+ if startStr == 'XDG_DOCUMENTS_DIR':
35+ documentDir = content
36+documentDir = documentDir[21:]
37+documentDir = documentDir[:-2]
38+fileCount = commands.getstatusoutput('ls ~/'+documentDir+'/ -1 | wc -l')
39+fileCount = fileCount[1:]
40+if fileCount[0] == 0:
41+ #user has no documents
42+ sys.exit(1)
43+else:
44+ #user has documents
45+ sys.exit(0)

Subscribers

People subscribed via source and target branches