File: grip.txt

package info (click to toggle)
grip 4.6.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: python: 1,497; makefile: 13
file content (137 lines) | stat: -rw-r--r-- 4,085 bytes parent folder | download | duplicates (2)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
NAME
  grip - Preview GitHub Markdown files like Readme locally

SYNOPSIS
  grip [options] [PATH] [ADDRESS]

DESCRIPTION
  Grip is a command-line server application written in Python that uses the
  GitHub markdown API to render a local readme file. The styles come directly
  from GitHub, so you'll know exactly how it will appear. Changes you make to
  the Readme will be instantly reflected in the browser without requiring a
  page refresh.

  Privacy notice: by default all documents will be sent to GitHub (Microsoft).

OPTIONS
  PATH is a file to render or a directory containing README.md. Use - for stdin.

  ADDRESS is what to listen on, of the form HOST[:PORT], or just PORT

  --user-content     Render as user-content like comments or issues.

  --context=<repo>   The repository context, only taken into account
                     when using --user-content.

  --user=<username>  A GitHub username for API authentication. If used
                     without the --pass option, an upcoming password
                     input will be necessary.

  --pass=<password>  A GitHub password or auth token for API auth.

  --wide             Renders wide, i.e. when the side nav is collapsed.

  --clear            Clears the cached styles and assets and exits.

  --export           Exports to <path>.html or README.md instead of
                     serving, optionally using [<address>] as the out
                     file (- for stdout).

  --no-inline        Link to styles instead inlining when using --export.

  -b --browser       Open a tab in the browser after the server starts.

  --api-url=<url>    Specify a different base URL for the github API,
                     for example that of a Github Enterprise instance.
                     Default is the public API: https://api.github.com

  --title=<title>    Manually sets the page's title. The default is the
                     filename.

  --norefresh        Do not automatically refresh the Readme content when
                     the file changes.

  --quiet            Do not print to the terminal.

  -V, --version      Version info.

  -h, --help         Show help message and exit.

ENVIRONMENT VARIABLES

  GRIPHOME      Specify an alternative settings.py location, "~/.grip" by
                default.

  GRIPURL       The URL of the Grip server, "/__/grip" by default.

EXAMPLES
  To render the readme of a repository:

    $ grip

  Now open a browser and visit http://localhost:6419. Or run with -b and Grip
  will open a new browser tab for you.

  You can also specify a port:

    $ grip 80

  Or an explicit file:

    $ grip AUTHORS.md

  Alternatively, you could just run grip and visit
  http://localhost:6419/AUTHORS.md since Grip supports relative URLs.

  You can combine the previous examples:

    $ grip AUTHORS.md 80

  Or specify a hostname instead of a port.:

    $ grip CHANGES.md 0.0.0.0

  Or provide both:

    $ grip . 0.0.0.0:80

  You can even bypass the server and export to a single HTML file, with all the
  styles and assets inlined:

    $ grip --export

  Control the output name with the second argument:

    $ grip README.md --export readme.html

  If you're exporting a bunch of files, you can prevent styles from being
  inlined to save space with --no-inline:

    $ grip README.md --export --no-inline introduction.html

  Reading from stdin:

    $ cat README.md | grip -

  Writing to stdout:

    $ grip AUTHORS.md --export - | bcat

  And both is also supported, allowing you to use Grip with other programs:

    $ cat README.md | grip --export - | less

  Rendering as user-content like comments and issues is also supported, with an
  optional repository context for linking to issues:

    $ grip --user-content --context=joeyespo/grip

BUGS
  Bugs should be reported as issues at the project's GitHub page:
  <https://github.com/joeyespo/grip/issues>

AUTHOR
  Grip is developed by Joe Esposito <joe@joeyespo.com>.

  This man page was written by Tiago Ilieve <tiago.myhro@gmail.com> for the
  Debian distribution (but it may be used by others).