Code Monkey home page Code Monkey logo

gerbil's People

Contributors

bochenski avatar bwghughes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gerbil's Issues

Barf when font is not installed

I'm getting this: > gerbil -i scrum-book.pdf -o david-scrum-book.pdf -t "davidSbochenski.co.uk"
~/[email protected]
Traceback (most recent call last):
File "/Users/david/.pyenv/versions/2.7.5/bin/gerbil", line 9, in
load_entry_point('gerbil==0.7', 'console_scripts', 'gerbil')()
File "/Users/david/.pyenv/versions/2.7.5/lib/python2.7/site-packages/gerbil/init.py", line 37, in main
pdfmetrics.registerFont(TTFont(*create_font_args(options)))
File "/Users/david/.pyenv/versions/2.7.5/lib/python2.7/site-packages/gerbil/init.py", line 10, in create_font_args
if isfile(options.font):
File "/Users/david/.pyenv/versions/2.7.5/lib/python2.7/genericpath.py", line 29, in isfile
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

[14:59] david: when trying to use gerbil. Any suggestions @bwghughes

[14:59] david: ?

[14:59] david: sorted it - was missing the font

[15:00] david: I know I said this before - but it's a bloody good utility that Mr Hughes; well played

crash with default color

There's an issue with the default font color value:

$ gerbil -i in.pdf -o out.pdf -t "Foo Bar" -f /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
Traceback (most recent call last):
  File "/home/tw/w/watermark-env/bin/gerbil", line 9, in <module>
    load_entry_point('gerbil==1.5.5', 'console_scripts', 'gerbil')()
  File "/home/tw/w/watermark-env/local/lib/python2.7/site-packages/gerbil/__init__.py", line 65, in main
    f, err = create_footer(options)
  File "/home/tw/w/watermark-env/local/lib/python2.7/site-packages/gerbil/gerbil.py", line 76, in create_footer
    color = colors.HexColor(options.font_color)
  File "/home/tw/w/watermark-env/local/lib/python2.7/site-packages/reportlab/lib/colors.py", line 385, in HexColor
    return Color(((val>>16)&0xFF)/255.0,((val>>8)&0xFF)/255.0,(val&0xFF)/255.0)
TypeError: unsupported operand type(s) for >>: 'instance' and 'int'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.