Git Product home page Git Product logo

pyth's Introduction

========================================
pyth - Python text markup and conversion
========================================

Pyth is intended to make it easy to convert marked-up text between different common formats.

*Marked-up text* means text which has:

* Paragraphs
* Headings
* Bold, italic, and underlined text
* Hyperlinks
* Bullet lists
* Simple tables
* Very little else


Formats I initially want to support are:

* xhtml
* rtf
* pdf (output)


These three formats cover web, Word / OpenOffice, and print. 


Design principles
=================

* Ignore unsupported information in input formats (e.g. page layout)
* Ignore font issues -- output in a single font.
* Ignore specific text sizes -- support relative sizes (bigger, littler) only. Output in a single base size.
* Have no dependencies unless they are written in Python, and work
* Make it easy to add support for new formats, by using an architecture based on *plugins* and *adapters*.



Examples
========

See http://github.com/brendonh/pyth/tree/master/examples/


Unit tests
==========

The sources contains some unit tests (written using python unittest
module) in the 'tests' directory.

To run the tests we can either run them individually as python script,
either use `python nose`_.  If using nose then we just need to go into
the tests directory and invoke nosetest from there (make sure that
pyth module is in PYTHONPATH).

.. _python nose: http://code.google.com/p/python-nose/

pyth's People

Contributors

brendonh avatar guillaumechereau avatar watercrossing avatar shepdl avatar sets88 avatar eriol avatar meirkriheli avatar mihaip avatar somakrdas avatar yairchu avatar ayal avatar

Watchers

James Cloos avatar  avatar

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.