gst.1 (3561B)
1 .TH GST 1 "April 2020" "gst 0.1" 2 .PP 3 .SH NAME 4 gst \- painless gist creator 5 .PP 6 .SH SYNOPSIS 7 gst [-pPhv] [-e ID [-D FILE]] [-d DESCRIPTION] [-f FILENAME] [-g URL] [-u USER[:PASSWORD] | -U] FILES ... 8 .PP 9 .SH DESCRIPTION 10 .PP 11 Easy way to create GitHub Gists through the command line. Simply give it the files to upload and gst will return the URL to the new gist. 12 .PP 13 .SH OPTIONS 14 .TP 15 \fB-e \fP\fIID\fP 16 Edit previously created gist specified with \fIID\fP 17 .PP 18 .TP 19 \fB-d \fP\fIDESCRIPTION\fP 20 Set gist description 21 .PP 22 .TP 23 \fB-D \fP\fIFILE\fP 24 Delete \fIFILE\fP from gist being edited 25 .PP 26 .TP 27 \fB-f \fP\fIFILENAME\fP 28 Set file name when reading from 'stdin' 29 .PP 30 .TP 31 \fB-g \fP\fIURL\fP 32 Change the GitHub API URL (default: https://api.github.com/gists) 33 .PP 34 .TP 35 \fB-p\fP 36 Make gist private 37 .PP 38 .TP 39 \fB-P\fP 40 Make gist public (default) 41 .PP 42 .TP 43 \fB-u \fP\fIUSER\fP:PASSWORD 44 Change the GitHub account the gist will be posted under. A password can given as well with a separating colon, a prompt is provided if not. 45 .PP 46 .TP 47 \fB-U\fP 48 Post gist anonymously (default) 49 .PP 50 .TP 51 \fB-h\fP 52 Print help and exit 53 .PP 54 .TP 55 \fB-v\fP 56 Print version info and exit 57 .PP 58 .SH USAGE 59 .PP 60 Create a new gist of 'file.txt': 61 .PP 62 .RS 4 63 .EX 64 65 $ gst file.txt 66 https://gist.github.com/<new-id> 67 68 .EE 69 .RE 70 There is also support for multiple files in a single gist: 71 .PP 72 .RS 4 73 .EX 74 75 $ gst README.md Makefile prog.c 76 https://gist.github.com/<new-id> 77 78 .EE 79 .RE 80 Specify the gist's description: 81 .PP 82 .RS 4 83 .EX 84 85 $ gst -d 'a cool shell script' script.sh 86 https://gist.github.com/<new-id> 87 88 .EE 89 .RE 90 The gist's URL can be piped to other programs, for example to your clipboard to be pasted elsewhere: 91 .PP 92 .RS 4 93 .EX 94 95 $ gst file.txt | xsel -bi 96 97 .EE 98 .RE 99 You can also create a new gist from 'stdin'. The file name needs to be supplied however: 100 .PP 101 .RS 4 102 .EX 103 104 $ cmd-which-errors | gst -f log.txt 105 https://gist.github.com/<new-id> 106 107 .EE 108 .RE 109 The new gist can be posted under a GitHub user, a prompt will ask for your password: 110 .PP 111 .RS 4 112 .EX 113 114 $ gst -u your-name good-proj.rs 115 GitHub password: 116 https://gist.github.com/<new-id> 117 118 .EE 119 .RE 120 To skip the prompt your password can be supplied after a colon with the username: 121 .PP 122 .RS 4 123 .EX 124 125 $ gst -u your-name:password plugin/func.vim doc/func.txt 126 https://gist.github.com/<new-id> 127 128 .EE 129 .RE 130 New gists can be private when created under a user: 131 .PP 132 .RS 4 133 .EX 134 135 $ gst -p -u name personal.info 136 https://gist.github.com/<new-id> 137 138 .EE 139 .RE 140 You can also edit a previously created gist under your account, such as adding a new file or updating the description: 141 .PP 142 .RS 4 143 .EX 144 145 $ gst -e <id> -u name -d "new description" additional-file.txt 146 https://gist.github.com/<id> 147 148 .EE 149 .RE 150 It is even possible to delete files, although it should be noted the gist still exists even if you delete all the files within it due to the limitations of the API: 151 .PP 152 .RS 4 153 .EX 154 155 $ gst -e <id> -u name -D old.py 156 https://gist.github.com/<id> 157 158 .EE 159 .RE 160 .SH INSTALLATION 161 .PP 162 The only dependency needed to build gst is cURL. gst be compiled with a simple 'make' and 'sudo make install' will install the executable and man page. 163 .PP 164 .SH CUSTOMIZATION 165 .PP 166 gst can be customized by editing the custom 'config.h' and (re)compiling the source code. This keeps it fast, secure and simple. All customization can be done through the command line interface however, so basic aliases could also be utilized to change default options. 167 .PP 168 .SH AUTHOR 169 .PP 170 Ed van Bruggen <ed@edryd.org> 171 .PP 172 .SH SEE ALSO 173 .PP 174 See project page at <https://edryd.org/projects/gst.html> 175 .PP 176 View source code at <https://git.edryd.org/gst> 177 .PP 178 .SH LICENSE 179 .PP 180 zlib License 181 .PP 182