~chrisppy/beagles-devel

Added man pages: beagles(1) and beagles-config(5) v1 APPLIED

Will Tiffany: 1
 Added man pages: beagles(1) and beagles-config(5)

 5 files changed, 198 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~chrisppy/beagles-devel/patches/11576/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Added man pages: beagles(1) and beagles-config(5) Export this patch

---
 Makefile                 | 28 +++++++++++--
 README.md                |  3 +-
 doc/beagles-config.5.scd | 88 ++++++++++++++++++++++++++++++++++++++++
 doc/beagles.1.scd        | 78 +++++++++++++++++++++++++++++++++++
 ui.go                    |  5 +++
 5 files changed, 198 insertions(+), 4 deletions(-)
 create mode 100644 doc/beagles-config.5.scd
 create mode 100644 doc/beagles.1.scd

diff --git a/Makefile b/Makefile
index 01397dd..be85f69 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,19 @@
.POSIX:
.SUFFIXES:
.SUFFIXES: .1 .5 .1.scd .5.scd

PKGNAME=beagles

VERSION=0.1.0

VPATH=doc
PREFIX?=/usr/local
_INSTDIR=$(DESTDIR)$(PREFIX)
BINDIR=$(_INSTDIR)/bin
SHAREDIR?=$(HOME)/.local/share
CONFIGDIR?=$(HOME)/.config
CACHEDIR?=$(HOME)/.cache
MANDIR?=$(_INSTDIR)/share/man
GO?=go
GOFLAGS?=

@@ -27,7 +30,19 @@ beagles: $(GOSRC)
		-X main.CacheDir=$(CACHEDIR)/$(PKGNAME)" \
		-o $@

all: beagles 
DOCS := \
	$(PKGNAME).1 \
	$(PKGNAME)-config.5

.1.scd.1:
	scdoc < $< > $@

.5.scd.5:
	scdoc < $< > $@

doc: $(DOCS)

all: beagles doc

# Exists in GNUMake but not in NetBSD make and others.
RM?=rm -f
@@ -38,8 +53,10 @@ clean:
	$(RM) -r vendor

install: all
	mkdir -m755 -p $(BINDIR)
	mkdir -m755 -p $(BINDIR) $(MANDIR)/man1 $(MANDIR)/man5
	install -m755 $(PKGNAME) $(BINDIR)/$(PKGNAME)
	install -m644 $(PKGNAME).1 $(MANDIR)/man1/$(PKGNAME).1
	install -m644 $(PKGNAME)-config.5 $(MANDIR)/man5/$(PKGNAME)-config.5

RMDIR_IF_EMPTY:=sh -c '\
if test -d $$0 && ! ls -1qA $$0 | grep -q . ; then \
@@ -48,7 +65,12 @@ fi'

uninstall:
	$(RM) $(BINDIR)/$(PKGNAME)
	$(RM) $(MANDIR)/man1/$(PKGNAME).1
	$(RM) $(MANDIR)/man5/$(PKGNAME)-config.5
	$(RMDIR_IF_EMPTY) $(BINDIR)
	$(RMDIR_IF_EMPTY) $(MANDIR)/man1
	$(RMDIR_IF_EMPTY) $(MANDIR)/man5
	$(RMDIR_IF_EMPTY) $(MANDIR)

check:
	$(GO) get -u golang.org/x/lint/golint
@@ -75,4 +97,4 @@ package: check clean

.DEFAULT_GOAL := all

.PHONY: all clean install uninstall check package
.PHONY: all doc clean install uninstall check package
diff --git a/README.md b/README.md
index bc4a95d..f8c0780 100644
--- a/README.md
+++ b/README.md
@@ -3,13 +3,14 @@

## Use

see :help in the application
see :help in the application or beagles(1)

## Building

Install the dependencies:

- go (>=1.13)
- scdoc

Then compile beagles:

diff --git a/doc/beagles-config.5.scd b/doc/beagles-config.5.scd
new file mode 100644
index 0000000..cec6b2c
--- /dev/null
+++ b/doc/beagles-config.5.scd
@@ -0,0 +1,88 @@
beagles-config(5)

# NAME

beagles-config - configuration file format for *beagles*(1)

# CONFIG FILE

The config file for beagles is config.toml, by default it is located in++
~/.config/beagles. If no config file is found, a default will be created.

As indicated by the extension, the config file is in the TOML format.

# OPTIONS

Colors can be specified either as W3C color names, RGB hexadecimal strings++
(e.g. #88c0d0), or "transparent".

*background_color* - string
	The main background color of the application

*foreground_color* - string
	The main foreground color of the application

*error_color* - string
	The color of error messages

*separator_color* - string
	The color of separator objects

*command_line* - object

	*background_color* - string
		The background color of the command line

	*foreground_color* - string
		The foreground color of the command line

*status_line* - object

	*background_color* - string
		The background color of the status line

	*foreground_color* - string
		The foreground color of the status line

*title_line* - object

	*background_color* - string
		The background color of the title line

	*foreground_color* - string
		The foreground color of the title line

*list* - object

	*background_color* - string
		The background color of the list pane

	*foreground_color* - string
		The foreground color of the list pane

*content* - object

	*background_color* - string
		The background color of the content pane

	*foreground_color* - string
		The foreground color of the content pane

*help* - object

	*background_color* - string
		The background color of the help window

	*foreground_color* - string
		The foreground color of the help window

# SEE ALSO
	*beagles*(1)

# AUTHORS

Written and maintained by Chris Palmer

beagles v0.1.0/beagles is available under the terms of the GPL-3.0 license.

Copyright © 2020  Chris Palmer <chris@red-oxide.org>
diff --git a/doc/beagles.1.scd b/doc/beagles.1.scd
new file mode 100644
index 0000000..f6ecb82
--- /dev/null
+++ b/doc/beagles.1.scd
@@ -0,0 +1,78 @@
beagles(1)

# NAME

beagles - TUI RSS feed aggregator

# SYNOPSIS

*beagles*

# USAGE

## GENERAL

*h, left-arrow*
	move to the left section (if applicable)

*j, down-arrow*
	navigate down in the current section (if applicable)

*k, up-arrow*
	navigate up in the current section (if applicable)

*l, right-arrow*
	move the the right section (if applicable)

*m*
	mark current post as read when in --LIST-- or --CONTENT--

*n*
	open post url when in --LIST-- or --CONTENT--

*:*
	enter command mode

## COMMAND MODE

*add* [url]
	add a feed

*remove, rm* [url]
	remove the feed

*update, up*
	update all feeds

*help, h, ?*
	display help page

*list*
	display list page

*quit, q*
	exit the application

# CONFIGURATION

See *beagles-config*(5)

# BUGS

https://todo.sr.ht/~chrisppy/beagles

# HOMEPAGE

https://sr.ht/~chrisppy/beagles

# SEE ALSO

*beagles-config*(5)

# AUTHORS

Written and maintained by Chris Palmer

beagles v0.1.0/beagles is available under the terms of the GPL-3.0 license.

Copyright © 2020  Chris Palmer <chris@red-oxide.org>
diff --git a/ui.go b/ui.go
index 3e1d1bb..3a53da5 100644
--- a/ui.go
+++ b/ui.go
@@ -378,6 +378,11 @@ COMMANDS:
	
	quit,q
		exit the application

SEE ALSO:
	Additional information can be found in the manual pages:
		beagles(1)
		beagles-config(5)
`

	h := tui.NewTextView()
-- 
2.27.0
Thanks for the patch Will, it all looks good.