No description
Find a file
Charles 06f5570c4e Check for python version before attempting virtual environment installation.
Signed-off-by: Charles <charles@declareSub.com>
2015-07-29 18:58:21 -04:00
make_scripts Check for python version before attempting virtual environment installation. 2015-07-29 18:58:21 -04:00
pygments_xojo Rename xojo.py to lexer.py, xojostyle to styles.py. 2015-07-29 18:21:23 -04:00
.gitignore Add .eggs directory to .gitignore. 2015-07-28 12:48:34 -04:00
.travis.yml Add .trsvis.yml. 2015-07-29 18:30:56 -04:00
LICENSE Initial commit 2015-07-24 11:28:40 -04:00
Makefile Remove moof command from Makefile. 2015-07-29 18:22:24 -04:00
MANIFEST.in Add MANIFEST.in. 2015-07-28 10:40:23 -04:00
pytest.ini Initial commit. 2015-07-24 11:25:49 -04:00
README.md Update README. 2015-07-26 15:43:12 -04:00
requirements.txt Add tox to requirements. 2015-07-29 18:20:41 -04:00
setup.cfg Add setup.cfg. 2015-07-28 10:46:07 -04:00
setup.py Add long_description, keywords; remove unneeded imports. 2015-07-29 18:30:27 -04:00
tox.ini Add py26, py33 to tox. 2015-07-28 10:39:34 -04:00

Pygments-Xojo

Pygments-Xojo implements Xojo language markup for Pygments, the Python syntax highlighter.

To try it out, clone this repository to your computer. Pygments requires Python >= 2.6 or >= 3.3, so you'll need the same, plus pip and virtualenv. Pygments-Xojo uses tox to run unit tests.

Once your Python world is configured, run the script make_virtualenv.bash. This will create virtual environments for Python2 and Python3, if installed. To activate a virtual environment, open a Terminal window and cd to the repository directory. Then execute the following command (assuming you want to use Python 2).

source python2.env/bin/activate

You can format some Xojo code in a file /path/to/foo as follows.

pygmentize -O full,style=xojo,linenos=1 -f html -l xojo /path/to/foo

which writes output to stdout, or

pygmentize -O full,style=xojo,linenos=1 -f html -l xojo -o /path/to/foo.html /path/to/foo 

which writes the output to a file that you can view in the browser of your choice.