Skip to content

Morph is a language used for describing the appearance of printable documents written in the mark-up language Graph.

Notifications You must be signed in to change notification settings

BenjaminTMilnes/MorphPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MorphPython

Morph, from Morphē, a Greek word meaning 'form', 'shape', 'beauty', 'outward appearance'.


Morph is a language used for describing the appearance of printable documents written in the mark-up language Graphe. Morph is based heavily on CSS, and many of the names of style properties are the same.

This repository contains a Python implementation of Morph.

An example Morph style sheet

.main {
    page-size: a4;
    font-height: 12pt;
}

h1 {
    font-height: 20pt;
    font-weight: bold;
}

p.red {
    font-colour: red;
}

Basic usage

Get a Morph document from a string:

from morph.core import *

document = importMorphDocument(morphString)

Convert a Morph document to a string:

from morph.core import *

morphString = exportMorphDocument(document)

Running the Unit Tests

py -m unittest discover

About

Morph is a language used for describing the appearance of printable documents written in the mark-up language Graph.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages