From 8ede1a2ecbb62577afd32996956c5feaf7ddf9b6 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 5 Oct 2011 13:34:52 -0500 Subject: replacing the old HTML user guide with a Sphinx-managed user guide --- user_guide_src/cilexer/README | 22 ++++++++++++++++++++++ user_guide_src/cilexer/cilexer/__init__.py | 1 + user_guide_src/cilexer/cilexer/cilexer.py | 24 ++++++++++++++++++++++++ user_guide_src/cilexer/setup.py | 23 +++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 user_guide_src/cilexer/README create mode 100644 user_guide_src/cilexer/cilexer/__init__.py create mode 100644 user_guide_src/cilexer/cilexer/cilexer.py create mode 100644 user_guide_src/cilexer/setup.py (limited to 'user_guide_src/cilexer') diff --git a/user_guide_src/cilexer/README b/user_guide_src/cilexer/README new file mode 100644 index 000000000..b9d9baf09 --- /dev/null +++ b/user_guide_src/cilexer/README @@ -0,0 +1,22 @@ +To install the CodeIgniter Lexer to Pygments, run: + + sudo python setup.py install + +Confirm with + + pygmentize -L + + +You should see in the lexer output: + +* ci, codeigniter: + CodeIgniter (filenames *.html, *.css, *.php, *.xml, *.static) + +You will need to run setup.py and install the cilexer package anytime after cilexer/cilexer.py is updated + +NOTE: Depending on how you installed Sphinx and Pygments, +you may be installing to the wrong version. +If you need to install to a different version of python +specify its path when using setup.py, e.g.: + + sudo /usr/bin/python2.5 setup.py install \ No newline at end of file diff --git a/user_guide_src/cilexer/cilexer/__init__.py b/user_guide_src/cilexer/cilexer/__init__.py new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/user_guide_src/cilexer/cilexer/__init__.py @@ -0,0 +1 @@ + diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py new file mode 100644 index 000000000..265b4077f --- /dev/null +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -0,0 +1,24 @@ +import re +import copy + +from pygments.lexer import DelegatingLexer +from pygments.lexers.web import PhpLexer, HtmlLexer + +__all__ = ['CodeIgniterLexer'] + + +class CodeIgniterLexer(DelegatingLexer): + """ + Handles HTML, PHP, JavaScript, and CSS is highlighted + PHP is highlighted with the "startline" option + """ + + name = 'CodeIgniter' + aliases = ['ci', 'codeigniter'] + filenames = ['*.html', '*.css', '*.php', '*.xml', '*.static'] + mimetypes = ['text/html', 'application/xhtml+xml'] + + def __init__(self, **options): + super(CodeIgniterLexer, self).__init__(HtmlLexer, + PhpLexer, + startinline=True) diff --git a/user_guide_src/cilexer/setup.py b/user_guide_src/cilexer/setup.py new file mode 100644 index 000000000..db4bbea43 --- /dev/null +++ b/user_guide_src/cilexer/setup.py @@ -0,0 +1,23 @@ +""" +Install and setup CodeIgniter highlighting for Pygments. +""" + +from setuptools import setup + +entry_points = """ +[pygments.lexers] +cilexer = cilexer.cilexer:CodeIgniterLexer +""" + +setup( + name='pycilexer', + version='0.1', + description=__doc__, + author="EllisLab, Inc.", + packages=['cilexer'], + install_requires=( + 'sphinx >= 1.0.7', + 'sphinxcontrib-phpdomain >= 0.1.3-1' + ), + entry_points=entry_points +) -- cgit v1.2.3-24-g4f1b From f4a4bd8fac188ebc9cda822ffc811c218fd92b45 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 20 Oct 2011 12:18:42 -0500 Subject: adding new license file (OSL 3.0) and updating readme to ReST added notice of license to all source files. OSL to all except the few files we ship inside of the application folder, those are AFL. Updated license in user guide. incrementing next dev version to 3.0 due to licensing change --- user_guide_src/cilexer/cilexer/cilexer.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'user_guide_src/cilexer') diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index 265b4077f..e571ce627 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -1,3 +1,25 @@ +# CodeIgniter +# http://codeigniter.com +# +# An open source application development framework for PHP 5.1.6 or newer +# +# NOTICE OF LICENSE +# +# Licensed under the Open Software License version 3.0 +# +# This source file is subject to the Open Software License (OSL 3.0) that is +# bundled with this package in the files license.txt / license.rst. It is +# also available through the world wide web at this URL: +# http://opensource.org/licenses/OSL-3.0 +# If you did not receive a copy of the license and are unable to obtain it +# through the world wide web, please send an email to +# licensing@ellislab.com so we can send you a copy immediately. +# +# Copyright (c) 2008 - 2011, EllisLab, Inc. (http://ellislab.com/) +# http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + + + import re import copy -- cgit v1.2.3-24-g4f1b From 0defe5d33ee2633f377a109519ca818becc60f64 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Sun, 1 Jan 2012 18:46:41 -0600 Subject: Updating copyright date to 2012 --- user_guide_src/cilexer/cilexer/cilexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/cilexer') diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index e571ce627..713268e9c 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -15,7 +15,7 @@ # through the world wide web, please send an email to # licensing@ellislab.com so we can send you a copy immediately. # -# Copyright (c) 2008 - 2011, EllisLab, Inc. (http://ellislab.com/) +# Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) # http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) -- cgit v1.2.3-24-g4f1b From 07c1ac830b4e98aa40f48baef3dd05fb68c0a836 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Fri, 9 Mar 2012 17:03:37 +0000 Subject: Bumped CodeIgniter's PHP requirement to 5.2.4. Yes I know PHP 5.4 just came out, and yes I know PHP 5.3 has lovely features, but there are plenty of corporate systems running on CodeIgniter and PHP 5.3 still is not widely supported enough. CodeIgniter is great for distributed applications, and this is the highest we can reasonably go without breaking support. PHP 5.3 will most likely happen in another year or so. Fingers crossed on that one anyway... --- user_guide_src/cilexer/cilexer/cilexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/cilexer') diff --git a/user_guide_src/cilexer/cilexer/cilexer.py b/user_guide_src/cilexer/cilexer/cilexer.py index 713268e9c..1c41f2aa0 100644 --- a/user_guide_src/cilexer/cilexer/cilexer.py +++ b/user_guide_src/cilexer/cilexer/cilexer.py @@ -1,7 +1,7 @@ # CodeIgniter # http://codeigniter.com # -# An open source application development framework for PHP 5.1.6 or newer +# An open source application development framework for PHP 5.2.4 or newer # # NOTICE OF LICENSE # -- cgit v1.2.3-24-g4f1b