mirror of
https://github.com/declaresub/pygments-xojo.git
synced 2026-05-15 06:05:50 -06:00
Update README.
Signed-off-by: Charles <charles@declareSub.com>
This commit is contained in:
parent
06f5570c4e
commit
9d4de208ba
1 changed files with 30 additions and 9 deletions
39
README.md
39
README.md
|
|
@ -3,18 +3,36 @@
|
|||
Pygments-Xojo implements Xojo language markup for [Pygments](http://pygments.org/), 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](https://tox.readthedocs.org/) to run unit tests.
|
||||
Like Pygments, Pygments-Xojo requires Python >= 2.6 or >= 3.3.
|
||||
|
||||
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).
|
||||
To try it out, clone this repository to your computer. If you don't have a supported
|
||||
version of Python installed, you can [download](https://www.python.org/downloads/) an
|
||||
installer or build from source, depending on your platform and preferences. If you are
|
||||
working on a Mac, you'll save a lot of annoyance by installing a version of Python for
|
||||
your own work instead of using the system install.
|
||||
|
||||
source python2.env/bin/activate
|
||||
You will need pip, a Python package manager. This is included with Python 3.4; if you
|
||||
want to use an earlier version, you'll need to install it yourself.
|
||||
|
||||
curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py
|
||||
sudo python get-pip.py
|
||||
|
||||
And if you are using Python 2, you will also need to install virtualenv.
|
||||
|
||||
sudo pip install virtualenv
|
||||
|
||||
Once your Python world is configured, run `make venv`. This will create
|
||||
virtual environments for all supported Python versions installed on your machine. These
|
||||
are installed mostly for testing. You can activate the one for your preferred Python version.
|
||||
You can delete the other .venv directories to reduce perceived clutter, or run `make clean`
|
||||
to get rid of all of them.
|
||||
|
||||
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 3.4).
|
||||
|
||||
source python3.4.env/bin/activate
|
||||
|
||||
You can format some Xojo code in a file /path/to/foo as follows.
|
||||
You can now 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
|
||||
|
||||
|
|
@ -23,3 +41,6 @@ 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.
|
||||
|
||||
|
||||

|
||||
Loading…
Add table
Add a link
Reference in a new issue