Glyph – Using the stats command

Glyph includes a stats command that can be used to display useful statistics about your Glyph project. If you try running Glyph's command help, you'll see that this command can take quite a few options:

 1$ glyph help stats
 2Glyph v0.5.0
 3
 4stats [options] 
 5    Display statistics
 6
 7Options:
 8    -b, --bookmarks - Display stats about bookmarks
 9    --bookmark=arg  - Display stats about a single bookmark
10    -f, --files     - Display stats about project files
11    -l, --links     - Display stats about links
12    --link=arg      - Display stats about links matching a regular expression
13    -m, --macros    - Display stats about macros
14    --macro=arg     - Display stats about a single macro
15    -s, --snippets  - Display stats about snippets
16    --snippet=arg   - Display stats about a single snippet

If no options are specified, the command returns a summary containing different element totals, i.e.:

  • The files used in the project
  • Macro definitions and instances
  • Snippets
  • Bookmarks
  • Links and references

Example:

 1=====================================
 2Glyph - Statistics
 3=====================================
 4
 5===== Files
 6-- Total Files: 50
 7-- /text    -- 46
 8-- /images  -- 3
 9-- /styles  -- 0
10-- /layouts -- 0
11-- /lib     -- 1
12
13===== Macros
14-- Total Macro Instances: 2950
15-- Total Macro Definitions: 22
16-- Total Macro Aliases: 57
17-- Total Used Macro Definitions: 60
18
19===== Snippets
20-- Total Snippets: 21
21-- Total Used Snippets: 21
22-- Total Unused Snippets: 0
23
24===== Bookmarks
25-- Total Bookmarks: 221
26-- Total Referenced Bookmarks: 87
27-- Total Unreferenced Bookmarks: 135
28
29===== Links
30-- Total Internal Links: 87
31-- Total External Links: 97