# HG changeset patch # User Ludovic Chabant # Date 1483490462 28800 # Node ID 486c2349598ef0af070d1248ad8bc2cfe9ebf7f6 # Parent 22f5f13741432269560c47bc7a3349b071c162b1 Add README, LICENSE, and requirements files. diff -r 22f5f1374143 -r 486c2349598e LICENSE.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LICENSE.rst Tue Jan 03 16:41:02 2017 -0800 @@ -0,0 +1,13 @@ +Copyright 2011 Ludovic Chabant + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff -r 22f5f1374143 -r 486c2349598e README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Tue Jan 03 16:41:02 2017 -0800 @@ -0,0 +1,65 @@ + +######## +FONTAINE +######## + + +`Fountain`_ is a plain text markup language for screenwriting. Fontaine +is a Python package for parsing and rendering Fountain documents. + +Fontaine supports: + +* Most of the Fountain specification (see limitations below). +* Rendering to HTML and terminals. + +.. _fountain: http://fountain.io/ + + +Installation +============ + +As with many Python packages, it's recommended that you use `virtualenv`_, +but since Fontaine doesn't have many dependencies, you should be fine. + +You can install Fontaine the usual way:: + + pip install fontaine + +If you want to test that it works, you can feed it a Fountain screenplay and +see if it prints it nicely in your terminal:: + + fontaine + +You should then see the Fountain file rendered with colored and indented +styles. + +.. _virtualenv: https://virtualenv.pypa.io/en/stable/ + + +Usage +===== + +The Fontaine API goes pretty much like this:: + + from fontaine.parser import FontaineParser + from fontaine.html import HtmlDocumentRenderer + + parser = FontaineParser() + document = parser.parse(path_to_file) + renderer = HtmlDocumentRenderer() + markup = renderer.render_doc(document) + return markup + + +Limitations +=========== + +Fontaine doesn't support the complete Fountain syntax yet. The following things +are not implemented yet: + +* Dual dialogue +* Notes +* Boneyards +* Sections and synopses + + diff -r 22f5f1374143 -r 486c2349598e requirements.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/requirements.txt Tue Jan 03 16:41:02 2017 -0800 @@ -0,0 +1,2 @@ +colorama==0.3.7 +MarkupSafe==0.23