forked from ipconfiger/txt2mobi
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
LiMing
committed
Dec 13, 2016
1 parent
94d6f02
commit 22c0c9d
Showing
20 changed files
with
14,804 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# coding=utf8 | ||
|
||
import sys | ||
from txt2mobi.scaffold import init_project, generate_project, test_project | ||
|
||
|
||
def main(): | ||
commands = ['init', 'gen', 'test', 'help'] | ||
if len(sys.argv) < 2: | ||
print "Missing argument! Arguments must be [ %s ]" % " ".join(commands) | ||
sys.exit(1) | ||
command = sys.argv[1] | ||
if command not in commands: | ||
print "Wrong argument! Arguments must be [ %s ]" % " ".join(commands) | ||
sys.exit(1) | ||
if command == commands[0]: | ||
init_project() | ||
print 'project init successfull!' | ||
sys.exit(0) | ||
if command == commands[1]: | ||
generate_project() | ||
print 'project generated successfull!' | ||
sys.exit(0) | ||
if command == commands[2]: | ||
test_project() | ||
print 'project test successfull!' | ||
sys.exit(0) | ||
if command == commands[3]: | ||
print '----help end----' | ||
sys.exit(0) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package unique-identifier="shinemoon" version ="1.0" xmlns="http://www.idpf.org/2007/opf"> | ||
<metadata> | ||
<dc-metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"> | ||
<dc:Title>[title_input]</dc:Title> | ||
<dc:Language>zh</dc:Language> | ||
<dc:Creator>[author_input]</dc:Creator> | ||
<!--dc:Copyrights>Copyright owner</dc:Copyrights--> | ||
<dc:Publisher>txt2Kindle</dc:Publisher> | ||
<x-metadata> | ||
<EmbeddedCover>cover.png</EmbeddedCover> | ||
</x-metadata> | ||
</dc-metadata> | ||
</metadata> | ||
<manifest> | ||
<item id="toc" properties="nav" href="combined.html" media-type="application/xhtml+xml"/> | ||
<item id="content" media-type="application/xhtml+xml" href="combined.html"></item> | ||
<item id="cover-image" media-type="image/png" href="cover.png"/> | ||
<item href="title.otf" id="title.otf" media-type="application/vnd.ms-opentype"/> | ||
<item href="normal.otf" id="normal.otf" media-type="application/vnd.ms-opentype"/> | ||
|
||
<!--item id="ncx" media-type="application/x-dtbncx+xml" href="toc.ncx"/--> | ||
</manifest> | ||
<spine> | ||
<itemref idref="cover-image"/> | ||
<itemref idref="toc"/> | ||
<itemref idref="content"/> | ||
</spine> | ||
<!--guide> | ||
<reference type="toc" title="Table of Contents" href="toc.html"/> | ||
<reference type="text" title="Book" href="index.html"/> | ||
</guide--> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
# coding=utf8 | ||
__author__ = 'liming' | ||
|
||
from setuptools import setup | ||
|
||
setup(name='txt2mobi', | ||
version='0.0.1', | ||
description='Convert Chinese-Novel txt book to kindle .mobi file', | ||
url='https://github.com/ipconfiger/txt2mobi', | ||
author='Alexander.Li', | ||
author_email='[email protected]', | ||
license='GNU GENERAL PUBLIC LICENSE', | ||
packages=['txt2mobi'], | ||
install_requires=[ | ||
'shutil', | ||
'chardet' | ||
], | ||
entry_points = { | ||
'console_scripts': ['txt2mobi=main:main'], | ||
}, | ||
zip_safe=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[txt2mobi] | ||
kindlegen=kindlegen | ||
|
||
[book] | ||
cover-img=cover.png | ||
title=书名 | ||
author=作者 |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.