Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Deb generator code review

  • Loading branch information...
commit 7e03d1681479909b3fdcdb9dbb05eaf922caa530 1 parent 9ce7288
@varche1 varche1 authored
View
3  argparser.py
@@ -2,9 +2,6 @@
import os, sys
-# path to libs in unix systems
-sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
from log import logging
import out
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
4 deb_maker.py → deb_generator.py
@@ -19,7 +19,7 @@
p.arch="all"
# application
-p["/usr/bin"] = ["geeknote.py|geeknote", "gnsync.py|gnsync"]
+p["/usr/bin"] = ["deb/geeknote.py|geeknote", "deb/gnsync.py|gnsync"]
# bash auto complite
p["/etc/bash_completion.d"] = ["bash_completion/geeknote|geeknote"]
@@ -41,7 +41,7 @@
items[install_dir].extend(fake_file)
# project files
-project_files = ["geeknote.py" ,"argparser.py", "editor.py", "log.py", "oauth.py", "out.py", "storage.py", "tools.py"]
+project_files = ["geeknote.py", "gnsync.py" ,"argparser.py", "editor.py", "log.py", "oauth.py", "out.py", "storage.py", "tools.py"]
items[install_dir].extend(project_files)
for key, value in items.items():
View
3  editor.py
@@ -2,9 +2,6 @@
import os, sys
-# path to libs in unix systems
-sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import tempfile
import html2text
import markdown
View
4 geeknote.py
@@ -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.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-sys.path.insert(0, 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.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import argparse
import glob
import logging
@@ -269,7 +265,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')
@@ -292,4 +288,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.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
import logging
FORMAT = "%(asctime)-15s %(module)s : %(message)s"
View
4 oauth.py
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-
import os, sys
-
-# path to libs in unix systems
-sys.path.insert(0, 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.insert(0, 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.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone', 'lib'))
-
import datetime
import pickle
View
4 test.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 unittest
import out
import tools
View
3  tools.py
@@ -2,9 +2,6 @@
import os, sys
-# path to libs in unix systems
-sys.path.insert(0, os.path.join('/', 'usr', 'local', 'lib', 'geeknone'))
-
from log import logging
def checkIsInt(value):
Please sign in to comment.
Something went wrong with that request. Please try again.