Glyph’s command-line interface has been built using the gli (Git-like interface) gem. Therefore, Glyph commands are all written like this:
glyph global_options command options parameters
Where:
- global_options and options are in the form:
-nvalue or--name=value, e.g.-f pdfor--format=pdf - parameters are separated by whitespaces, and can be wrapped in quotes.
Global Options
-d, --debug
If specified, the command is executed in debug mode and additional diagnostic information is printed on the screen.
-h, --help
Displays help on the program.
add
Creates a new text file in the text/ folder.
Example: glyph add introduction.textile
Parameters
| Parameter | Description |
|---|---|
| file_name | The name (or relative path) of the new file to be created. |
compile
Compiles a Glyph document into an output file. If no options are specified, the document.glyph file
is used as source to produce a standalone HTML file.
Example: glyph compile -f pdf
Parameters
| Parameter | Description |
|---|---|
| source | The source glyph file to compile (Optional). |
| destination | The destination file (Optional). |
Options
| Option | Description |
|---|---|
-s (--source) |
The source file to compile.
Default Value: document.glyph
|
-f (--format) |
The format of the output file.
Default Value: html
*Possible Values:* @html, pdf@
|
-a (--auto) |
If specified, enable auto regeneration (requires the directory_watcher gem to be installed). |
config
Examples
glyph config document.filename
glyph config -g document.author "Fabio Cevasco"
Options
| Option | Description |
|---|---|
-g (--global) |
If specified, the global configuration file is processed instead of the project file.
Default Value: false
|
Parameters
| Parameter | Description |
|---|---|
| setting | The name of a valid configuration setting. |
| value | The new value of the configuration setting. |
help
Examples
glyph help
glyph help compile
Parameters
| Parameter | Description |
|---|---|
| command | A valid Glyph command. |
init
Example: glyph init
outline
Options
| Option | Description |
|---|---|
-l (--limit) |
Only display headers until the specified level. |
-i (--ids) |
Display section IDs. |
-f (--files) |
Display file names. |
-t (--titles) |
Display section titles. |
Examples
glyph outline -it -l 1
glyph outline -l 2
glyph outline -f
stats
Displays project statistics (for more information on this command, see Document Statistics).
Examples
glyph stats -m
glyph stats --link=h3rald.com
Options
| Option | Description |
|---|---|
-b (--bookmarks) |
If specified, general statistics about bookmarks are displayed (see Bookmark Statistics). |
--bookmark |
Display detailed statistics about the specified bookmark. |
-f (--files) |
If specified, general statistics about project files are displayed. |
-l (--links) |
If specified, general statistics about links are displayed (see Link Statistics). |
--link |
Display detailed statistics about all links whose target matches the specified regular expression. |
-m (--macros) |
If specified, general statistics about macros are displayed (see Macro Statistics). |
--macro |
Display detailed statistics about the specified macro. |
-s (--snippets) |
If specified, general statistics about snippets are displayed (see Snippet Statistics). |
--snippet |
Display detailed statistics about the specified snippet. |
todo
todo macro.
Example: glyph todo