Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A python interface to pango-view. Not totally complete but easy to extend.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 pyango_view
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.py
README.md

Pyango View

Pyango View is a Python library for calling pango-view.

Pyango View is licensed under the Apache Licence, Version 2.0

Features

Pyango View is simply a mapping and some pythonish documentation for accessing the pango-view command line tool.

Goopytrans supports translating a single body of text.

>>> from pyango_view import str2img
>>> str2img('texty text', font='Courier New')
0

Urdu works nicely. Pango is very robust!

>>> str2img('اس صفحہ کو ترامیم کیلیۓ نـیـم محفوظ کر دیا گیا ہے اور صارف کو اندراج کر کے داخل نوشتہ ہونا لازم ہے۔', 
...         pango_view='/opt/local/bin/pango-view',
...         output='/Users/jd/Desktop/urdu_works.png',
...         width=538)
0

It can handle newlines and print programming code nicely.

>>> text = """
... >>> def foo():
... ...     print 'foo foo foo foo foo'
... ...
... >>>
... """
>>> text
"\n>>> def foo():\n...     print 'foo foo foo foo foo'\n...\n>>>\n"
>>> str2img(text, font='Courier New', output='/Users/jd/Desktop/programming_code.jpg')
0

Install

python ./setup.py install

James Dennis <jd@j2labs.net>

Something went wrong with that request. Please try again.