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
=== added directory 'accomplishments/ubuntu-desktop/en/productivity'
=== added file 'accomplishments/ubuntu-desktop/en/productivity/libreoffice-create-document.accomplishment'
--- accomplishments/ubuntu-desktop/en/productivity/libreoffice-create-document.accomplishment 1970-01-01 00:00:00 +0000
+++ accomplishments/ubuntu-desktop/en/productivity/libreoffice-create-document.accomplishment 2012-06-02 14:00:26 +0000
@@ -0,0 +1,12 @@
1[accomplishment]
2id = ubuntu-desktop/libreoffice-create-document
3title = Created a LibreOffice document
4description = You have created a LibreOffice document
5category = Productivity
6icon = default.png
7summary = LibreOffice is a powerful office suite that makes it easy to create documents, presentations and manage personal
8 <ul><li>Open either LibreOffice, Writer, Calc or Impress from the Launcher</li>
9 <li>Create a document/spreadsheet/presentation and save it in your Documents folder</li></ul>
10 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.
11help = https://wiki.ubuntu.com/LibreOffice
12author = Joel Pickett <jpickett@ubuntu.com>
013
=== added directory 'scripts/ubuntu-desktop/productivity'
=== added file 'scripts/ubuntu-desktop/productivity/libreoffice-create-document.py'
--- scripts/ubuntu-desktop/productivity/libreoffice-create-document.py 1970-01-01 00:00:00 +0000
+++ scripts/ubuntu-desktop/productivity/libreoffice-create-document.py 2012-06-02 14:00:26 +0000
@@ -0,0 +1,22 @@
1#!/usr/bin/python
2import commands, sys, os
3homeDir = os.getenv("HOME")
4path = os.path.join(homeDir,'.config/user-dirs.dirs')
5result = open(path, "r")
6content = result.readline()
7while (content != "" ):
8 content.replace( "\n", "" )
9 content = result.readline()
10 startStr = content[0:17]
11 if startStr == 'XDG_DOCUMENTS_DIR':
12 documentDir = content
13documentDir = documentDir[21:]
14documentDir = documentDir[:-2]
15fileCount = commands.getstatusoutput('ls ~/'+documentDir+'/ -1 | wc -l')
16fileCount = fileCount[1:]
17if fileCount[0] == 0:
18 #user has no documents
19 sys.exit(1)
20else:
21 #user has documents
22 sys.exit(0)

Subscribers

People subscribed via source and target branches