diff options
author | Nicolas Lécureuil <neoclust@mageia.org> | 2013-09-17 22:15:16 +0200 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2013-09-17 22:15:16 +0200 |
commit | 5fc9a8e67f3b93ee820eb1a3c1e92e8d87077903 (patch) | |
tree | 2aef1e3b6e1ad8df4f6cce2c268f5fc2ef759b39 /usr/share/mageiawelcome/helpers.py | |
parent | 18f4c683b5e5e2e4bf6ba3356251aca9e10f3d80 (diff) | |
download | mageiawelcome-5fc9a8e67f3b93ee820eb1a3c1e92e8d87077903.tar mageiawelcome-5fc9a8e67f3b93ee820eb1a3c1e92e8d87077903.tar.gz mageiawelcome-5fc9a8e67f3b93ee820eb1a3c1e92e8d87077903.tar.bz2 mageiawelcome-5fc9a8e67f3b93ee820eb1a3c1e92e8d87077903.tar.xz mageiawelcome-5fc9a8e67f3b93ee820eb1a3c1e92e8d87077903.zip |
Install in /usr/share instead of /usr/lib
Diffstat (limited to 'usr/share/mageiawelcome/helpers.py')
-rw-r--r-- | usr/share/mageiawelcome/helpers.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/usr/share/mageiawelcome/helpers.py b/usr/share/mageiawelcome/helpers.py new file mode 100644 index 0000000..027da77 --- /dev/null +++ b/usr/share/mageiawelcome/helpers.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + + +import csv +import os + + +def get_listapp(): + listapp = '' + with open("apps.csv", 'rb') as f: + mycsv = csv.reader(f,delimiter='|') + mycsv.next() + for r in mycsv: + if (r[6] == 'false'): + start_btn = "" + else: + start_btn = "<button class='cmd small pill green' data-run='"+ r[6] + "'><i class='icon-ok-sign'> </i> start</button>" + if (r[7] != ''): + label = "<span class='label red'>" + r[7] + "</span>" + else: + label = "" + if ( not os.path.isfile(r[5])):# DO ZAINSTALOWANIA + listapp += "<li class='" + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /> \ +<h6>" + r[2] + "</h6><p class=description>" + r[4] + "</p>" + start_btn + label + "<button class='inst small pill' data-rpm='" + r[1] + "'><i class='icon-circle-arrow-down'> </i> install</button></li>" + else: # JEST ZAINSTALOWANY + listapp += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /> \ +<h6>" + r[2] + "</h6><p class=description>" + r[4] + "</p>" + start_btn + label + "<button class='uninst small pill red' data-rpm='" + r[1] + "'><i class='icon-minus-sign'> </i> remove</button></li>" + return listapp +
\ No newline at end of file |