-
Notifications
You must be signed in to change notification settings - Fork 79
/
README
56 lines (36 loc) · 1.43 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
========================================
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/