distribusi '-nf' option bug fix
+ run.sh update
This commit is contained in:
parent
e634d3b2fb
commit
9999e5a3a8
3 changed files with 8 additions and 8 deletions
|
|
@ -33,12 +33,12 @@ def thumbnail(image, name, args):
|
||||||
size = (450, 450)
|
size = (450, 450)
|
||||||
im = Image.open(image)
|
im = Image.open(image)
|
||||||
im.thumbnail(size)
|
im.thumbnail(size)
|
||||||
|
|
||||||
if (im.mode == 'RGBA'):
|
if (im.mode == 'RGBA'):
|
||||||
bg = Image.new('RGBA', im.size, (255,255,255))
|
bg = Image.new('RGBA', im.size, (255,255,255))
|
||||||
composite = Image.alpha_composite(bg, im)
|
composite = Image.alpha_composite(bg, im)
|
||||||
im=composite.convert('RGB')
|
im=composite.convert('RGB')
|
||||||
|
|
||||||
output = BytesIO()
|
output = BytesIO()
|
||||||
im.save(output, format='JPEG')
|
im.save(output, format='JPEG')
|
||||||
im_data = output.getvalue()
|
im_data = output.getvalue()
|
||||||
|
|
@ -143,7 +143,7 @@ def distribusify(args, directory): # noqa
|
||||||
print('Found', name, 'as', mime)
|
print('Found', name, 'as', mime)
|
||||||
|
|
||||||
if type_ in FILE_TYPES:
|
if type_ in FILE_TYPES:
|
||||||
|
|
||||||
a = FILE_TYPES[type_].format(name, caption)
|
a = FILE_TYPES[type_].format(name, caption)
|
||||||
|
|
||||||
# expansion for different kind of text files
|
# expansion for different kind of text files
|
||||||
|
|
@ -168,7 +168,7 @@ def distribusify(args, directory): # noqa
|
||||||
caption = ""
|
caption = ""
|
||||||
if args.captions:
|
if args.captions:
|
||||||
caption = caption(full_path)
|
caption = caption(full_path)
|
||||||
a = FILE_TYPES[type_].format(name, caption)
|
a = FILE_TYPES[type_].format(name, caption)
|
||||||
|
|
||||||
if subtype in SUB_TYPES:
|
if subtype in SUB_TYPES:
|
||||||
a = SUB_TYPES[subtype]
|
a = SUB_TYPES[subtype]
|
||||||
|
|
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "distribusi-nodejs-server",
|
"name": "expressive-distribusi-server",
|
||||||
"version": "0.0.0",
|
"version": "0.0.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
4
run.sh
4
run.sh
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
pip3 install -r py3/requirements.txt
|
pip install -r py3/requirements.txt
|
||||||
python3 run.py -d ./data/
|
python run.py -d ./data/ -nf -s custom.css --no-hidden -v
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue