Some more refinements to the logo
Make the ends caps ont heyellow book more like the ones in the original logo. Adda dfrop shadow to the bookmark.
@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import os, shutil, subprocess
|
||||
import os, shutil, subprocess, sys
|
||||
|
||||
d, j, a = (getattr(os.path, x) for x in ('dirname', 'join', 'abspath'))
|
||||
base = d(a(__file__))
|
||||
@ -14,6 +14,8 @@ os.chdir(base)
|
||||
|
||||
imgsrc = j(d(d(base)), 'imgsrc')
|
||||
sources = {'calibre':j(imgsrc, 'calibre.svg'), 'ebook-edit':j(imgsrc, 'tweak.svg'), 'ebook-viewer':j(imgsrc, 'viewer.svg'), 'book':j(imgsrc, 'book.svg')}
|
||||
if sys.argv[-1] == 'only-logo':
|
||||
sources = {'calibre':sources['calibre']}
|
||||
|
||||
for name, src in sources.iteritems():
|
||||
iconset = name + '.iconset'
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 50 KiB |
@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import os, shutil, subprocess
|
||||
import os, shutil, subprocess, sys
|
||||
|
||||
d, j, a = (getattr(os.path, x) for x in ('dirname', 'join', 'abspath'))
|
||||
base = d(a(__file__))
|
||||
@ -14,6 +14,8 @@ os.chdir(base)
|
||||
|
||||
imgsrc = j(d(base), 'imgsrc')
|
||||
sources = {'library':j(imgsrc, 'calibre.svg'), 'ebook-edit':j(imgsrc, 'tweak.svg'), 'viewer':j(imgsrc, 'viewer.svg'), 'favicon':j(imgsrc, 'calibre.svg')}
|
||||
if sys.argv[-1] == 'only-logo':
|
||||
sources = {'library':sources['library']}
|
||||
|
||||
for name, src in sources.iteritems():
|
||||
os.mkdir('ico_temp')
|
||||
|
||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 29 KiB |
37
imgsrc/render-logo.py
Executable file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
from __future__ import (unicode_literals, division, absolute_import,
|
||||
print_function)
|
||||
import os, subprocess, sys, shutil
|
||||
|
||||
j = os.path.join
|
||||
base = os.path.dirname(os.path.abspath(__file__))
|
||||
resources = j(os.path.dirname(base), 'resources')
|
||||
icons = j(os.path.dirname(base), 'icons')
|
||||
srv = j(os.path.dirname(os.path.dirname(base)), 'srv')
|
||||
|
||||
def render(outpath, sz):
|
||||
sz = str(sz)
|
||||
cmd = ['rsvg-convert', j(base, 'calibre.svg'), '-w', sz, '-h', sz, '-d', '96', '-p', '96', '-o', outpath]
|
||||
subprocess.check_call(cmd)
|
||||
subprocess.check_call(['optipng', '-o7', '-strip', 'all', outpath])
|
||||
|
||||
render(j(resources, 'images', 'library.png'), 1024)
|
||||
render(j(resources, 'images', 'lt.png'), 256)
|
||||
render(j(resources, 'content-server', 'calibre.png'), 128)
|
||||
shutil.copy2(j(resources, 'content-server', 'calibre.png'), j(resources, 'content_server', 'calibre.png'))
|
||||
shutil.copy2(j(resources, 'images', 'lt.png'), j(srv, 'common', 'favicon.png'))
|
||||
shutil.copy2(j(resources, 'images', 'lt.png'), j(srv, 'common', 'favicon.png'))
|
||||
|
||||
subprocess.check_call([sys.executable, j(icons, 'make_ico_files.py'), 'only-logo'])
|
||||
shutil.copy2(j(icons, 'library.ico'), j(srv, 'common', 'favicon.ico'))
|
||||
shutil.copy2(j(icons, 'library.ico'), j(srv, 'main/static/resources/img', 'favicon.ico'))
|
||||
shutil.copy2(j(icons, 'library.ico'), j(srv, 'open-books/drmfree/static/img', 'favicon.ico'))
|
||||
subprocess.check_call([sys.executable, j(icons, 'icns', 'make_iconsets.py'), 'only-logo'])
|
||||
|
||||
os.chdir(srv)
|
||||
subprocess.check_call(['git', 'commit', '-am', 'Update calibre favicons'])
|
||||
for s in 'main code open-books dl1'.split():
|
||||
subprocess.check_call(['./publish', s, 'update'])
|
||||
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 16 KiB |