Browse files

增加kindlereader.exe

  • Loading branch information...
1 parent c00e24f commit 48d4b1563b4ddf5cf1daaf594fa7dc4ec1d0cdc2 @dogear-cn committed Jun 21, 2011
Showing with 16 additions and 13 deletions.
  1. +1 −1 .gitignore
  2. +1 −0 README.md
  3. +4 −3 build_exe.py
  4. BIN kindlereader.exe
  5. +10 −9 kindlereader.py
View
2 .gitignore
@@ -2,4 +2,4 @@
*.DS_Store
dist
config.ini
-kindlegen
+kindlegen*
View
1 README.md
@@ -5,6 +5,7 @@
* [master](https://github.com/jiedan/kindlereader/) 分支为单用户版(基于python), 运行于 Linux, Mac OSX, Windows
* [gae](https://github.com/jiedan/kindlereader/tree/gae) 分支为运行于 Google app engine 的多用户版, demo: [http://reader.dogear.mobi](http://reader.dogear.mobi)
+
## 单用户版使用说明
* 安装 Python (建议版本 2.5~2.7, 2.4 和 3.0未测试), 大多Liunx和OSX已内置Python
View
7 build_exe.py
@@ -3,17 +3,18 @@
from distutils.core import setup
import py2exe
+from kindlereader import __version__
options = {"py2exe":
{ "compressed": 1,
"optimize": 2,
- "includes":"os,sys",
+ "includes":"os,sys,sgmllib",
"bundle_files": 1
}
}
setup(
- version = "0.3.2",
- description = "Send google reader to your kindle",
+ version = __version__,
+ description = "Push google reader to your kindle",
name = "kindlereader",
options = options,
zipfile=None,
View
BIN kindlereader.exe
Binary file not shown.
View
19 kindlereader.py
@@ -6,7 +6,7 @@
"""
__author__ = "Jiedan<lxb429@gmail.com>"
-__version__ = "0.3.2"
+__version__ = "0.3.3"
import sys
import os
@@ -28,7 +28,9 @@
import Queue,threading
import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), 'lib'))
+
+work_dir = os.path.dirname(sys.argv[0])
+sys.path.append(os.path.join(work_dir, 'lib'))
from libgreader import *
from tornado import template
@@ -697,7 +699,6 @@ def main(self):
logging.basicConfig(level=logging.INFO, format='%(asctime)s:%(msecs)03d %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M')
- work_dir = os.path.dirname(sys.argv[0])
conf_file = os.path.join(work_dir, "config.ini")
if os.path.isfile(conf_file) is False:
@@ -718,11 +719,11 @@ def main(self):
st = time.time()
logging.info("welcome, start ...")
- # try:
- kr = KindleReader(work_dir=work_dir, config=config)
- kr.main()
- # except Exception, e:
- # logging.info("Error: %s " % e)
+ try:
+ kr = KindleReader(work_dir=work_dir, config=config)
+ kr.main()
+ except Exception, e:
+ logging.info("Error: %s " % e)
logging.info("used time %.2fs" % (time.time()-st))
logging.info("done.")
@@ -735,5 +736,5 @@ def main(self):
except:
auto_exit = False
- if auto_exit:
+ if not auto_exit:
raw_input("Press any key to exit...")

0 comments on commit 48d4b15

Please sign in to comment.