diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2013-05-28 22:05:40 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2013-05-28 22:05:40 +0400 |
commit | 0fbff5e41a3c42688208bb42adb56d7d8af8ad52 (patch) | |
tree | d28a85515c2b329cb43c2172242a960193908eb8 | |
parent | 1f5a71296a6982bef7305b5203ca9316932e8608 (diff) | |
parent | 06c291b34a1838f01ffc685c457fec529ed60532 (diff) |
Merge pull request #2 from Atcold/master
Added some well formatted documentation
-rw-r--r-- | README.md | 48 | ||||
-rw-r--r-- | README.txt | 30 |
2 files changed, 48 insertions, 30 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..a0b6aa8 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# Lua *system* package + +## Dependencies +Torch7 (www.torch.ch) + +## Install +``` +$ luarocks install sys +``` + +## Use +``` +$ torch +> require 'sys' +> for k in pairs(sys) print(k) end -- gives you all the included functions +dirname +dirp +usleep +ls +prefix +uname +pwd +fstat +COLORS +lla +tic +toc +OS +la +execute +ll +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 .. '!') +``` diff --git a/README.txt b/README.txt deleted file mode 100644 index 93ef38c..0000000 --- a/README.txt +++ /dev/null @@ -1,30 +0,0 @@ -DEPENDENCIES: -Torch7 (www.torch.ch) - -INSTALL: -$ torch-pkg install sys - -USE: -$ torch -> require 'sys' -> for k in pairs(sys) print(k) end -- gives you all the included functions -dirname -dirp -usleep -ls -prefix -uname -pwd -fstat -COLORS -lla -tic -toc -OS -la -execute -ll -concat -basename -clock -filep |