mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-23 22:51:30 +02:00
Removing unneeded from __future__ import statements.
Since we are on Python 3.6 and up, we don't need those anymore.
This commit is contained in:
@@ -1,12 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
__all__ = ["Unihandecoder"]
|
||||
|
||||
'''
|
||||
"""
|
||||
Decode unicode text to an ASCII representation of the text.
|
||||
Translate unicode characters to ASCII.
|
||||
|
||||
@@ -16,11 +8,16 @@ of calibre.
|
||||
Copyright(c) 2009, John Schember
|
||||
|
||||
Tranliterate the string from unicode characters to ASCII in Chinese and others.
|
||||
|
||||
'''
|
||||
"""
|
||||
import unicodedata
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
__all__ = ["Unihandecoder"]
|
||||
|
||||
|
||||
class Unihandecoder(object):
|
||||
preferred_encoding = None
|
||||
decoder = None
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
"""
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
"""
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010 Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
'''
|
||||
|
||||
CODEPOINTS = {
|
||||
'x34':[
|
||||
'Qiu ','Tian ','','','Kua ','Wu ','Yin ','','','','','','Si ','','','',
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
# coding:utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
"""
|
||||
Decode unicode text to an ASCII representation of the text for Japanese.
|
||||
Translate unicode string to ASCII roman string.
|
||||
|
||||
@@ -17,15 +10,20 @@ and perl module Text::Unidecode
|
||||
This functionality is owned by Kakasi Japanese processing engine.
|
||||
|
||||
Copyright (c) 2010 Hiroshi Miura
|
||||
'''
|
||||
|
||||
"""
|
||||
import re
|
||||
|
||||
from ebook_converter.ebooks.unihandecode.unidecoder import Unidecoder
|
||||
from ebook_converter.ebooks.unihandecode.unicodepoints import CODEPOINTS
|
||||
from ebook_converter.ebooks.unihandecode.jacodepoints import CODEPOINTS as JACODES
|
||||
from ebook_converter.ebooks.unihandecode.pykakasi.kakasi import kakasi
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
class Jadecoder(Unidecoder):
|
||||
kakasi = None
|
||||
codepoints = {}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
"""
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
"""
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010 Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
'''
|
||||
|
||||
CODEPOINTS = {
|
||||
'x34':[
|
||||
'Qiu ','Tian ','','','Kua ','Wu ','Yin ','','','','','','Si ','','','',
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
"""
|
||||
Decode unicode text to an ASCII representation of the text in Korean.
|
||||
Based on unidecoder.
|
||||
"""
|
||||
from ebook_converter.ebooks.unihandecode.unidecoder import Unidecoder
|
||||
from ebook_converter.ebooks.unihandecode.krcodepoints import CODEPOINTS as HANCODES
|
||||
from ebook_converter.ebooks.unihandecode.unicodepoints import CODEPOINTS
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
Decode unicode text to an ASCII representation of the text in Korean.
|
||||
Based on unidecoder.
|
||||
|
||||
'''
|
||||
|
||||
from ebook_converter.ebooks.unihandecode.unidecoder import Unidecoder
|
||||
from ebook_converter.ebooks.unihandecode.krcodepoints import CODEPOINTS as HANCODES
|
||||
from ebook_converter.ebooks.unihandecode.unicodepoints import CODEPOINTS
|
||||
|
||||
|
||||
class Krdecoder(Unidecoder):
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
"""
|
||||
Unicode code point dictionary.
|
||||
|
||||
Based on Text::Unidecode's xAB.pm lists. This combines all xAB.pm files into
|
||||
a single dictionary.
|
||||
'''
|
||||
"""
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
CODEPOINTS = {
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
"""
|
||||
Decode unicode text to an ASCII representation of the text in Chinese.
|
||||
Transliterate unicode characters to ASCII based on chinese pronounce.
|
||||
|
||||
@@ -58,14 +51,19 @@ purpose.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
'''
|
||||
|
||||
"""
|
||||
import re
|
||||
|
||||
from ebook_converter.ebooks.unihandecode.unicodepoints import CODEPOINTS
|
||||
from ebook_converter.ebooks.unihandecode.zhcodepoints import CODEPOINTS as HANCODES
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
class Unidecoder(object):
|
||||
|
||||
codepoints = {}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
"""
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
"""
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010 Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
'''
|
||||
|
||||
CODEPOINTS = {
|
||||
'x34':[
|
||||
'Qiu ','Tian ','','','Kua ','Wu ','Yin ','','','','','','Si ','','','',
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
"""
|
||||
Decode unicode text to an ASCII representation of the text in Vietnamese.
|
||||
"""
|
||||
|
||||
from ebook_converter.ebooks.unihandecode import unidecoder
|
||||
from ebook_converter.ebooks.unihandecode import vncodepoints
|
||||
from ebook_converter.ebooks.unihandecode import unicodepoints
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010, Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
Decode unicode text to an ASCII representation of the text in Vietnamese.
|
||||
|
||||
'''
|
||||
|
||||
from ebook_converter.ebooks.unihandecode.unidecoder import Unidecoder
|
||||
from ebook_converter.ebooks.unihandecode.vncodepoints import CODEPOINTS as HANCODES
|
||||
from ebook_converter.ebooks.unihandecode.unicodepoints import CODEPOINTS
|
||||
|
||||
|
||||
class Vndecoder(Unidecoder):
|
||||
class Vndecoder(unidecoder.Unidecoder):
|
||||
|
||||
codepoints = {}
|
||||
|
||||
def __init__(self):
|
||||
self.codepoints = CODEPOINTS
|
||||
self.codepoints.update(HANCODES)
|
||||
self.codepoints = unicodepoints.CODEPOINTS
|
||||
self.codepoints.update(vncodepoints.CODEPOINTS)
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
"""
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
"""
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2010 Hiroshi Miura <miurahr@linux.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
Unicode code point dictionary.
|
||||
Based on Unicode.org Unihan database.
|
||||
'''
|
||||
|
||||
CODEPOINTS = {
|
||||
'x34':[
|
||||
'Qiu ','Tian ','','','Kua ','Wu ','Yin ','','','','','','Si ','','','',
|
||||
|
||||
Reference in New Issue
Block a user