mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:...
This commit is contained in:
parent
32042325b9
commit
2efa1ec708
@ -7,7 +7,6 @@ Compile resource files.
|
|||||||
'''
|
'''
|
||||||
import os, sys, glob
|
import os, sys, glob
|
||||||
sys.path.insert(1, os.path.join(os.getcwd(), 'src'))
|
sys.path.insert(1, os.path.join(os.getcwd(), 'src'))
|
||||||
from calibre import __appname__
|
|
||||||
|
|
||||||
RESOURCES = dict(
|
RESOURCES = dict(
|
||||||
opf_template = '%p/ebooks/metadata/opf.xml',
|
opf_template = '%p/ebooks/metadata/opf.xml',
|
||||||
@ -19,7 +18,7 @@ RESOURCES = dict(
|
|||||||
def main(args=sys.argv):
|
def main(args=sys.argv):
|
||||||
data = ''
|
data = ''
|
||||||
for key, value in RESOURCES.items():
|
for key, value in RESOURCES.items():
|
||||||
path = value.replace('%p', 'src'+os.sep+__appname__)
|
path = value.replace('%p', 'src'+os.sep+'calibre')
|
||||||
bytes = repr(open(path, 'rb').read())
|
bytes = repr(open(path, 'rb').read())
|
||||||
data += key + ' = ' + bytes + '\n\n'
|
data += key + ' = ' + bytes + '\n\n'
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ def main(args=sys.argv):
|
|||||||
if not translations_found:
|
if not translations_found:
|
||||||
print 'WARNING: Could not find Qt transations'
|
print 'WARNING: Could not find Qt transations'
|
||||||
|
|
||||||
dest = os.path.abspath(os.path.join('src', __appname__, 'resources.py'))
|
dest = os.path.abspath(os.path.join('src', 'calibre', 'resources.py'))
|
||||||
print 'Writing resources to', dest
|
print 'Writing resources to', dest
|
||||||
open(dest, 'wb').write(data)
|
open(dest, 'wb').write(data)
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user