forked from Hopkins1/TradSimpChinese
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
28 lines (22 loc) · 1.07 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL 3'
__docformat__ = 'restructuredtext en'
from calibre.customize import EditBookToolPlugin
PLUGIN_NAME = "Chinese Text Conversion"
PLUGIN_SAFE_NAME = PLUGIN_NAME.strip().lower().replace(' ', '_')
PLUGIN_DESCRIPTION = 'A plugin to convert traditional and simplified Chinese text'
PLUGIN_VERSION_TUPLE = (2, 3, 4)
PLUGIN_VERSION = '.'.join([str(x) for x in PLUGIN_VERSION_TUPLE])
PLUGIN_AUTHORS = 'Hopkins'
class ChineseTextPlugin(EditBookToolPlugin):
name = PLUGIN_NAME
version = PLUGIN_VERSION_TUPLE
author = PLUGIN_AUTHORS
supported_platforms = ['windows', 'osx', 'linux']
description = PLUGIN_DESCRIPTION
minimum_calibre_version = (3, 37, 0)
def cli_main(self,argv):
#Typical Usage: calibre-debug --run-plugin "Chinese Text Conversion" -- -h
from calibre_plugins.chinese_text.main import main as chinese_text_main
chinese_text_main(argv[1:], self.version, usage='%prog --run-plugin '+'\"self.name\"'+' --')