Browse files

Deb review v2

  • Loading branch information...
2 parents 2dbc2a1 + 7e03d16 commit 54f9ecb6336378a26305945914444f5f8fdc50f6 @varche1 varche1 committed Jun 22, 2012
Showing with 83 additions and 64 deletions.
  1. +1 −4 argparser.py
  2. +13 −0 deb/geeknote.py
  3. +13 −0 deb/gnsync.py
  4. +50 −0 deb_generator.py
  5. +0 −29 deb_maker.py
  6. +0 −3 editor.py
  7. +0 −4 geeknote.py
  8. BIN geeknote_0.0.1_all.deb
  9. +5 −6 gnsync.py
  10. +0 −4 log.py
  11. +0 −4 oauth.py
  12. +0 −4 out.py
  13. +0 −5 storage.py
  14. +0 −1 test.py
  15. +1 −0 tools.py
View
5 argparser.py
@@ -2,9 +2,6 @@
import os, sys
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
from log import logging
import out
@@ -285,7 +282,7 @@ def printAutocomplete(self):
else:
# фильтруем аргументы которые еще не ввели
- if self.CMD_ARGS.has_key(PREV_LAST_VAL) or self.CMD_FLAGS.has_key(self.LAST_VAL) :
+ if self.CMD_ARGS.has_key(PREV_LAST_VAL) or self.CMD_FLAGS.has_key(LAST_VAL) :
printGrid([item for item in ARGS_FLAGS_LIST if item not in INP])
# автозаполнение для неполной команды
View
13 deb/geeknote.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os, sys
+
+# path to libs in unix systems
+sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
+sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone', 'lib'))
+
+import geeknote
+
+# start application
+geeknote.main()
View
13 deb/gnsync.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+import os, sys
+
+# path to libs in unix systems
+sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
+sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone', 'lib'))
+
+import gnsync
+
+# start application
+gnsync.main()
View
50 deb_generator.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+from glob import glob
+import os
+
+from py2deb import Py2deb
+
+p=Py2deb("geeknote")
+
+p.author="Vitaliy Rodnenko, Simon Moiseenko, Ivan Gureev"
+p.mail="vitaly@webpp.ru"
+p.description="Geeknote - is a command line client for Evernote, that can be use on Linux, FreeBSD and OS X."
+p.url = "http://geeknote.me"
+p.depends="python"
+p.license="gpl"
+p.section="utils"
+p.arch="all"
+
+# application
+p["/usr/bin"] = ["deb/geeknote.py|geeknote", "deb/gnsync.py|gnsync"]
+
+# bash auto complite
+p["/etc/bash_completion.d"] = ["bash_completion/geeknote|geeknote"]
+
+# lib files
+dir_name='lib'
+install_dir = '/usr/local/lib/geeknone'
+
+items = {}
+items[install_dir] = []
+for root, dirs, files in os.walk(dir_name):
+ fake_file = []
+ for f in files:
+ file_name, file_extension = os.path.splitext(root + os.sep + f)
+ if file_extension != '.pyc':
+ fake_file.append(root + os.sep + f)
+
+ if len(fake_file) > 0:
+ items[install_dir].extend(fake_file)
+
+# project files
+project_files = ["geeknote.py", "gnsync.py" ,"argparser.py", "editor.py", "log.py", "oauth.py", "out.py", "storage.py", "tools.py", "config.py"]
+items[install_dir].extend(project_files)
+
+for key, value in items.items():
+ p[key] = value
+
+# start deb generating
+p.generate("0.0.1")
View
29 deb_maker.py
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-#-*- coding:utf-8 -*-
-
-from glob import glob
-import os
-
-from py2deb import Py2deb
-
-p=Py2deb("geeknote")
-
-p.author="Ivan Gureev, Vitaliy Rodnenko, Simon Moiseenko"
-p.mail="vitaly@webpp.ru"
-p.description="Geeknote - is a command line client for Evernote, that can be use on Linux, FreeBSD and OS X."
-p.url = "http://geeknote.me"
-p.depends="python"
-p.license="gpl"
-p.section="utils"
-p.arch="all"
-
-p["/usr/bin"] = ["geeknote.py|geeknote", "gnsync.py|gnsync"]
-
-p["/etc/bash_completion.d"] = ["bash_completion/geeknote"]
-
-# p["/usr/local/lib/geeknone"] = ["lib"]
-# p["/usr/local/lib/geeknone"] = glob("unit/*.*")
-
-p["/usr/local/lib/geeknone"] = ["geeknote.py" ,"argparser.py", "editor.py", "log.py", "oauth.py", "out.py", "storage.py", "tools.py"]
-
-p.generate("0.0.1")
View
3 editor.py
@@ -2,9 +2,6 @@
import os, sys
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import tempfile
import html2text
import markdown
View
4 geeknote.py 100755 → 100644
@@ -5,10 +5,6 @@
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
sys.path.append( os.path.join(PROJECT_ROOT, 'lib') )
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone', 'lib'))
-
import hashlib
import binascii
import time
View
BIN geeknote_0.0.1_all.deb
Binary file not shown.
View
11 gnsync.py
@@ -2,10 +2,6 @@
# -*- coding: utf-8 -*-
import os, sys
-
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import argparse
import glob
import logging
@@ -248,7 +244,7 @@ def _get_notes(self):
return GeekNote().findNotes(keywords, 10000).notes
-if __name__ == "__main__":
+def main():
try:
parser = argparse.ArgumentParser()
parser.add_argument('--path', '-p', action='store', help='Path to synchronize directory')
@@ -271,4 +267,7 @@ def _get_notes(self):
GNS.sync()
except Exception, e:
- logger.error(str(e));
+ logger.error(str(e));
+
+if __name__ == "__main__":
+ main()
View
4 log.py
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-
import os, sys
-
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import logging
import config
View
4 oauth.py
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-
import os, sys
-
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import httplib
import time
import Cookie
View
4 out.py
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-
import os, sys
-
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import getpass
import time
import thread
View
5 storage.py
@@ -1,11 +1,6 @@
# -*- coding: utf-8 -*-
import os, sys
-
-# path to libs in unix systems
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-sys.path.append( os.path.join('/', 'usr', 'local', 'lib', 'geeknone', 'lib'))
-
import datetime
import pickle
View
1 test.py
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-
import os, sys
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
sys.path.append( os.path.join(PROJECT_ROOT, 'lib') )
View
1 tools.py
@@ -2,6 +2,7 @@
import out
from log import logging
+import sys
def checkIsInt(value):
try:

0 comments on commit 54f9ecb

Please sign in to comment.