This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME
63 lines (51 loc) · 2.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
* About LuaPretty
---------------
LuaPretty is a syntax aware code highlighter and formatter for the Lua language.
It can be used separately as a standalone application or as a library from
within your own Lua project.
Output of LuaPretty consists of reformatted input source code according to a
given template, which can be later highlighted using custom CSS to produce
a valid HTML document containing the highlighted and reformatted code.
Formatter templates have the ability to make any change in the given source
code. Reformatting the source code is only a small subset of changes that
can be made inside a formatter user template.
* Availability
------------
LuaPretty is freely available for both academic and commercial purposes under
MIT license. See COPYRIGHT for details.
* Dependecies
-----------------------------------------
LuaPretty requires following modules to be installed:
lua >= 5.1 (not tested with 5.2)
alt_getopt >= 0.7
cosmo >= 10.04.06
leg == 0.1.3 (leg version 0.1.3 is provided by LuaDist and supports lpeg >= 0.10)
lpeg >= 0.10
* Installation
------------
Simplest way to install LuaPretty is to use the LuaDist (www.luadist.org) deployment
tool by invoking:
> ./luadist _luapretty install luapretty
which will install LuaPretty and all it's dependecies into the _luapretty folder.
LuaPretty can be also installed using CMake (www.cmake.org). For manual installation
copy the luapretty folder from src into your LUA_PATH folder.
* Running
-------
When using LuaDist for installation, LuaPretty installs to a standalone directory
and can be invoked from _luapretty/bin directory. LuaPretty provides two small
applications:
src/lua-formatter.lua - Lua source code reformater
src/lua-highlighter.lua - Lua source code syntax highlighter
Both scripts can be simply executed using the lua runtime interpreter in the install
directory, e.g.:
$ cd _luapretty/bin/
$ lua lua-formatter.lua
LuaDist also installs binary versions of these sripts.
* Compatibility
-------------
LuaPretty was tested only on Linux platform, but should work on all main platforms.
* Authors
-------
LuaPretty is developed and maintained by:
Viliam Kubis (main developer)
Peter Kapec (project supervisor)