From 490002645d8897d200921b7b538f1e6b437afb22 Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Sat, 16 Dec 2023 23:04:17 +0000 Subject: [PATCH] Documentation update and relicense as Beerware Signed-off-by: Izuru Yakumo git-svn-id: https://svn.yakumo.dev/yakumo.izuru/suwako/trunk@27 0b558ee1-521d-8b46-a41b-40029c97c055 --- .gitignore | 3 ++- COPYING | 12 ++++++++---- Makefile | 3 +-- README.md | 28 +++++++++++++--------------- doc.go | 2 ++ suwako.1 | 17 +++++------------ suwako.conf.5 | 36 ++++++++++++++++++++++++++++++++++++ 7 files changed, 67 insertions(+), 34 deletions(-) create mode 100644 doc.go create mode 100644 suwako.conf.5 diff --git a/.gitignore b/.gitignore index 72e8ffc..7a9b2f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -* +!/cmd/suwako +suwako diff --git a/COPYING b/COPYING index 9d27966..e31cea1 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,8 @@ -Freedom License v1 (2021年08月17日) - -全く無限的自由です。 -It's infinite freedom. \ No newline at end of file +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42.1): + * wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a bottle of sake in return Izuru Yakumo + * ---------------------------------------------------------------------------- + */ diff --git a/Makefile b/Makefile index fc633a7..02ad292 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,6 @@ PREFIX ?= /usr/local -GOARCH ?= amd64 GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=${VERSION} -X `go list`.Commit=${COMMIT} -X `go list`.Build=${BUILD}" -tags "static_build" -GOOS ?= linux BRANCH = `git rev-parse --abbrev-ref HEAD` BUILD = `git show -s --pretty=format:%cI` @@ -18,6 +16,7 @@ clean: install: install -Dm0755 suwako ${PREFIX}/bin/suwako install -Dm0644 suwako.1 ${PREFIX}/share/man/man1/suwako.1 + install -Dm0644 suwako.conf.5 ${PREFIX}/share/man/man5/suwako.conf.5 uninstall: rm -f ${PREFIX}/bin/suwako rm -f ${PREFIX}/share/man/man1/suwako.1 diff --git a/README.md b/README.md index 9031bf6..6e84d8b 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ SUWAKO(1) - FreeBSD General Commands Manual # SYNOPSIS **suwako** -**-f** *from* -**-t** *to* -*input* +\[**-f** *from*] +\[**-t** *to*] +\[*input*] # DESCRIPTION @@ -19,17 +19,6 @@ and awk for dependencies. It fully serves as a drop-in replacement. -# CONFIGURATION - -**suwako** -takes two variables, those being -`SUWAKO_INSTANCE` -and -`SUWAKO_ENGINE` - -Both must be filled and placed -on ~/.suwako/suwako.conf - # USAGE **-f** @@ -45,8 +34,17 @@ on ~/.suwako/suwako.conf > Text to be translated +# SEE ALSO + +suwako.conf(5) + # AUTHORS Izuru Yakumo <[yakumo.izuru@chaotic.ninja](mailto:yakumo.izuru@chaotic.ninja)> -FreeBSD 13.2-RELEASE-p1 - October 21, 2023 +# BUGS + +You cannot translate the string "version", this is +a direct consequence of using flaggy. + +FreeBSD 13.2-RELEASE-p4 - December 16, 2023 diff --git a/doc.go b/doc.go new file mode 100644 index 0000000..730eb37 --- /dev/null +++ b/doc.go @@ -0,0 +1,2 @@ +// package suwako is yet another client for SimplyTranslate https://simple-web.org/projects/simplytranslate.html written in Go. +package suwako diff --git a/suwako.1 b/suwako.1 index 12cb6b0..984e9dc 100644 --- a/suwako.1 +++ b/suwako.1 @@ -6,24 +6,15 @@ .Nd Command-line client for SimplyTranslate .Sh SYNOPSIS .Nm -.Fl f Ar from -.Fl t Ar to -.Ar input +.Op Fl f Ar from +.Op Fl t Ar to +.Op Ar input .Sh DESCRIPTION Self-explanatory, besides, this was made as a rewrite from a shell script that had curl and awk for dependencies. It fully serves as a drop-in replacement. -.Sh CONFIGURATION -.Nm -takes two keys, those being -.Ev instance -and -.Ev engine -.Pp -Both must be filled and placed -on ~/.suwako/suwako.conf .Sh USAGE .Bl -tag -width 11n -compact .It Fl f @@ -34,6 +25,8 @@ Target language to translate to .It Text to be translated .El +.Sh SEE ALSO +.Xr suwako.conf 5 .Sh AUTHORS .An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja .Sh BUGS diff --git a/suwako.conf.5 b/suwako.conf.5 new file mode 100644 index 0000000..39c0e98 --- /dev/null +++ b/suwako.conf.5 @@ -0,0 +1,36 @@ +.Dd $Mdocdate$ +.Dt SUWAKO.CONF 5 +.Os +.Sh NAME +.Nm suwako.conf +.Nd INI-style configuration file for +.Xr suwako 1 +.Sh DESCRIPTION +The +.Nm +file specifies the instance address, +including the API path and the +translation engine to be used on +the +.Xr suwako 1 +command. +.Sh OPTIONS +.Bl -tag -width 11n -compact +.It instance +Contains the HTTPS URI to the +server's up to the +.Sy /api/translate +endpoint. +.It engine +For most use cases, the +.Em google +engine should be enough, +though some endpoints +support more translation +engines. +.El +.Sh FILES +.Pa ~/.suwako/suwako.conf +path to this file +.Sh AUTHORS +.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja