Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/sys.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Canziani <alfredo.canziani@gmail.com>2013-05-28 20:32:06 +0400
committerAlfredo Canziani <alfredo.canziani@gmail.com>2013-05-28 20:32:06 +0400
commit06c291b34a1838f01ffc685c457fec529ed60532 (patch)
treed28a85515c2b329cb43c2172242a960193908eb8
parent44e819ac4d3f7a09216d0d4dce42aea51a456f97 (diff)
Update README.md
Converted README from <txt> to <md> Reformatted the documentation Added instruction about *how* to use <sys.COLORS>
-rw-r--r--README.md26
1 files changed, 22 insertions, 4 deletions
diff --git a/README.md b/README.md
index 93ef38c..a0b6aa8 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,15 @@
-DEPENDENCIES:
+# Lua *system* package
+
+## Dependencies
Torch7 (www.torch.ch)
-INSTALL:
-$ torch-pkg install sys
+## Install
+```
+$ luarocks install sys
+```
-USE:
+## Use
+```
$ torch
> require 'sys'
> for k in pairs(sys) print(k) end -- gives you all the included functions
@@ -28,3 +33,16 @@ concat
basename
clock
filep
+```
+
+### sys.COLORS
+If you'd like print in colours, follow the following snippets of code. Let start by listing the available colours
+```
+$ torch
+> for k in pairs(sys.COLORS) do print(k) end
+```
+Then, we can generate a shortcut `c = sys.COLORS` and use it within a `print`
+```
+> c = sys.COLORS
+> print(c.magenta .. 'This ' .. c.red .. 'is ' .. c.yellow .. 'a ' .. c.green .. 'rainbow' .. c.cyan .. '!')
+```