Commit graph

124 commits

Author SHA1 Message Date
Christian Rocha
fa7c8f09f9 Respect -i/--identity flag in the TUI 2020-10-05 13:52:22 +02:00
Christian Rocha
6aadaf8a69 Remove stash list, get and delete commands 2020-10-05 13:52:07 +02:00
Christian Rocha
d16c13f929 Disable mouse for now 2020-10-05 13:52:07 +02:00
Christian Rocha
c954898009 Add basic mouse wheel support to pager 2020-10-05 13:47:16 +02:00
Christian Rocha
7f9cc95893 Update altscreen calls per latest Bubble Tea update 2020-10-05 13:47:16 +02:00
Christian Rocha
6e72cbdc4f Consolidate debug config stuff 2020-10-05 13:46:49 +02:00
Christian Rocha
671eade0b5 Remove Boba residue 2020-10-05 13:45:22 +02:00
Christian Rocha
964be85e6d Parse subcommands before main command arguments int the CLI 2020-10-05 13:44:20 +02:00
Christian Rocha
05a56388a9 Comments 2020-10-05 13:44:20 +02:00
Christian Rocha
28f8f185d7 Make --force-key/-f a persistent flag, like --identity 2020-10-05 13:44:20 +02:00
Christian Rocha
c3ceed2c04 Log to a given path if GLOW_LOG_TO_FILE is set 2020-10-05 13:41:17 +02:00
Christian Rocha
5d2ca090ac Pass style argument to the Boba program 2020-10-05 13:37:35 +02:00
Christian Rocha
359828a719 Silence this Go linter message 2020-10-05 13:37:35 +02:00
Christian Rocha
25340455a7 Do it fullscreen 2020-10-05 13:37:33 +02:00
Christian Rocha
bb6904afe2 Load stash + fix spinner issues + render nothing useful
Note that this is we're currently building aginst unreleased versions of Charm and Boba.
2020-10-05 13:36:51 +02:00
Christian Rocha
b58ee10487 Stub out Tea UI: create Charm client and generate keys if necessary 2020-10-05 13:36:11 +02:00
Toby Padilla
4792345f31 Delete from stash command 2020-10-05 13:32:36 +02:00
Toby Padilla
bd52d1cee4 Get markdown command 2020-10-05 13:32:36 +02:00
Toby Padilla
395ae998dd List stash 2020-10-05 13:32:36 +02:00
Toby Padilla
a106bc0163 Working stash command 2020-10-05 13:32:34 +02:00
Jesse Millar
6025e736ea
Enable use of the GLAMOUR_STYLE environment variable (#152) 2020-07-23 18:03:03 +02:00
Christian Muehlhaeuser
d433820a1b
Validate options once 2020-05-05 07:48:05 +02:00
Christian Muehlhaeuser
c9af84b75a
Automatically detect terminal width, with a 120 char limit 2020-05-05 07:43:11 +02:00
Christian Muehlhaeuser
18fcf68c0f
Change default rendering width to 80 2020-05-05 07:28:33 +02:00
Christian Muehlhaeuser
c5d7aa0155
Rename readerFromArg to sourceFromArg 2020-03-31 08:57:49 +02:00
Christian Muehlhaeuser
ec9cc0bde4
Make source private 2020-03-31 08:53:35 +02:00
Christian Muehlhaeuser
5cdf8294a8
Use glamour's WithAutoStyle option as default 2020-03-31 06:58:21 +02:00
Christian Muehlhaeuser
5038a7b69f Use glamour's 'auto' style per default 2020-01-14 02:20:33 +01:00
Christian Muehlhaeuser
c5517add19
Search for READMEs case-insensitively & recursively 2020-01-13 01:42:59 +01:00
Christian Muehlhaeuser
85c0cde9c7
Pass writer to executeArg to make code easier to test 2020-01-08 21:50:34 +01:00
Christian Muehlhaeuser
b7304db99e
Fix starting glow without sources 2020-01-08 17:23:04 +01:00
Carlos Alexandro Becker
f04f2a8292 feat: support multiple files
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-01-08 17:18:43 +01:00
Christian Muehlhaeuser
e7c92ddfa7
Add -p flag to render output in default pager
Starts the user's default $PAGER or defaults to 'less -r'.
2019-12-31 11:13:06 +01:00
Christian Muehlhaeuser
be911b4609 Fix typo in comment 2019-12-31 08:13:05 +01:00
Christian Muehlhaeuser
79fad4d06c
Bump glamour dependency and adopt functional options API 2019-12-28 03:03:20 +01:00
Christian Muehlhaeuser
fa9d64c4ef
Trim unstyled padding spaces from output 2019-12-25 07:01:56 +01:00
Christian Muehlhaeuser
f090b74c60
Fix init when reading from stdin 2019-12-23 04:27:27 +01:00
Christian Muehlhaeuser
cb7fedfa5e
Rename to glow 2019-12-20 22:47:47 +01:00
Christian Muehlhaeuser
6a8462e414
Import glamour 2019-12-19 01:01:26 +01:00
Christian Muehlhaeuser
cbf61974bf Move ANSIRenderer into a separate package 2019-12-14 00:11:29 +01:00
Christian Muehlhaeuser
3ddece16e4 Don't panic, forward the error to the caller 2019-12-13 22:36:55 +01:00
Christian Muehlhaeuser
68a2909669 Add godoc comments to public types 2019-12-10 17:18:59 +01:00
Christian Muehlhaeuser
584adfdbd1 Fix baseURL for relative paths 2019-12-10 15:55:49 +01:00
Christian Muehlhaeuser
ee81103ce0 Shorten commit SHA in version output 2019-12-09 14:01:47 +01:00
Christian Muehlhaeuser
2bae07eac9 Enable version command for release builds 2019-12-09 13:50:17 +01:00
Christian Muehlhaeuser
c31c06a793 Calculate block width from BlockStack & RenderContext 2019-12-07 19:49:24 +01:00
Christian Muehlhaeuser
58c97dc8db Check for err before trying to access the stat struct 2019-12-07 08:31:15 +01:00
Christian Muehlhaeuser
de91f6ae53 Automatically use the notty style when stdout is no terminal
If the user provided a style flag, this still takes precedence.
2019-12-06 19:22:34 +01:00
Christian Muehlhaeuser
95670866e0 When passed a directory as cli-arg, find a README[.md] in it 2019-12-06 18:44:58 +01:00
Christian Muehlhaeuser
37c9cfad80 Return potential error from ioutil.ReadAll 2019-12-06 18:10:51 +01:00
Christian Muehlhaeuser
292f06052f Embed styles in gold library 2019-12-06 01:34:27 +01:00
Christian Muehlhaeuser
d6c1b7fa73 Render each paragraph individually and reflow text only inside paragraphs 2019-11-28 02:23:29 +01:00
Christian Muehlhaeuser
1f5aa27934 Embed default dark style into binary 2019-11-26 21:05:37 +01:00
Christian Muehlhaeuser
532fceed22 Calculate baseURL for local files 2019-11-26 00:35:11 +01:00
Christian Muehlhaeuser
8eabf0f403 Handle relative URLs in markdown, when a BaseURL is provided 2019-11-26 00:35:11 +01:00
Christian Muehlhaeuser
5766f35363 Fix word-wrapping in colored output 2019-11-25 10:04:55 +01:00
Christian Muehlhaeuser
9ffa4d5b16 Basic GitLab support 2019-11-25 06:57:44 +01:00
Christian Muehlhaeuser
240eb4f2f8 Word-wrap text at 100 chars per default
The default can be overwritten by the user:

./gold -w 80
2019-11-25 06:44:10 +01:00
Christian Muehlhaeuser
2bfaa5ece9 Check for supported HTTP/HTTPS protocols explicitly 2019-11-25 05:15:35 +01:00
Christian Muehlhaeuser
1baefbbec1 Support github URLs without protocol 2019-11-25 04:55:54 +01:00
Christian Muehlhaeuser
f09d2907bd Use a plain-text renderer when not printing to Terminal 2019-11-25 04:32:24 +01:00
Toby Padilla
9adff17b70 Move Render and RenderBytes to TermRenderer 2019-11-24 13:35:01 -06:00
Christian Muehlhaeuser
14bc95c272 Find README(.md) in current working dir when no arg was supplied 2019-11-24 05:07:14 +01:00
Christian Muehlhaeuser
5c3ad999ea Cleanup/simplify main.go 2019-11-24 02:41:03 +01:00
Christian Muehlhaeuser
08dd80a922 Support fetching markdown from arbitrary HTTP sources 2019-11-24 02:04:12 +01:00
Christian Muehlhaeuser
16048357a0 Use cobra to handle command line parameters 2019-11-22 18:47:42 +01:00
Christian Muehlhaeuser
b58f777e91 Support reading from stdin
When you start gold with "-" as an argument it will read directly
from stdin, instead of opening a file.

Example calls:

./gold -s dark.json README.md

or

cat README.md | ./gold -s dark.json
2019-11-22 04:23:02 +01:00
Christian Muehlhaeuser
bbd2e15001 Support fetching READMEs from GitHub
When passing a valid GitHub URL instead of a filename to gold,
it will fetch either README.md or README (in that order) from
GitHub and displays the markdown content.

Example:

./gold -s dark.json https://github.com/muesli/beehive
2019-11-22 03:52:21 +01:00
Toby Padilla
c7686d7131 Update repo org 2019-11-15 12:35:04 -06:00
Toby Padilla
5d9883623d Remove blackfriday requirement from clients 2019-11-12 16:36:51 -05:00
Toby Padilla
439ee25c7e Remove test md 2019-11-09 16:24:57 -06:00
Toby Padilla
09bb6b3dd1 Much better parsing, README example 2019-11-09 16:12:54 -06:00
Toby Padilla
dda88169f4 Load style from json 2019-11-09 14:07:01 -06:00
Toby Padilla
9da65bd2da init 2019-11-04 17:35:50 -06:00