Documentation update and relicense as Beerware

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/suwako/trunk@27 0b558ee1-521d-8b46-a41b-40029c97c055
This commit is contained in:
yakumo.izuru 2023-12-16 23:04:17 +00:00
parent ba24061ff5
commit 040b11054c
7 changed files with 67 additions and 34 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
* !/cmd/suwako
suwako

12
COPYING
View File

@ -1,4 +1,8 @@
Freedom License v1 (2021年08月17日) /*
* ----------------------------------------------------------------------------
全く無限的自由です。 * "THE BEER-WARE LICENSE" (Revision 42.1):
It's infinite freedom. * <yakumo.izuru@chaotic.ninja> 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
* ----------------------------------------------------------------------------
*/

View File

@ -1,8 +1,6 @@
PREFIX ?= /usr/local 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" 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` BRANCH = `git rev-parse --abbrev-ref HEAD`
BUILD = `git show -s --pretty=format:%cI` BUILD = `git show -s --pretty=format:%cI`
@ -18,6 +16,7 @@ clean:
install: install:
install -Dm0755 suwako ${PREFIX}/bin/suwako install -Dm0755 suwako ${PREFIX}/bin/suwako
install -Dm0644 suwako.1 ${PREFIX}/share/man/man1/suwako.1 install -Dm0644 suwako.1 ${PREFIX}/share/man/man1/suwako.1
install -Dm0644 suwako.conf.5 ${PREFIX}/share/man/man5/suwako.conf.5
uninstall: uninstall:
rm -f ${PREFIX}/bin/suwako rm -f ${PREFIX}/bin/suwako
rm -f ${PREFIX}/share/man/man1/suwako.1 rm -f ${PREFIX}/share/man/man1/suwako.1

View File

@ -7,9 +7,9 @@ SUWAKO(1) - FreeBSD General Commands Manual
# SYNOPSIS # SYNOPSIS
**suwako** **suwako**
**-f**&nbsp;*from* \[**-f**&nbsp;*from*]
**-t**&nbsp;*to* \[**-t**&nbsp;*to*]
*input* \[*input*]
# DESCRIPTION # DESCRIPTION
@ -19,17 +19,6 @@ and awk for dependencies.
It fully serves It fully serves
as a drop-in replacement. 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 # USAGE
**-f** **-f**
@ -45,8 +34,17 @@ on ~/.suwako/suwako.conf
> Text to be translated > Text to be translated
# SEE ALSO
suwako.conf(5)
# AUTHORS # AUTHORS
Izuru Yakumo &lt;[yakumo.izuru@chaotic.ninja](mailto:yakumo.izuru@chaotic.ninja)&gt; Izuru Yakumo &lt;[yakumo.izuru@chaotic.ninja](mailto:yakumo.izuru@chaotic.ninja)&gt;
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

2
doc.go Normal file
View File

@ -0,0 +1,2 @@
// package suwako is yet another client for SimplyTranslate https://simple-web.org/projects/simplytranslate.html written in Go.
package suwako

View File

@ -6,24 +6,15 @@
.Nd Command-line client for SimplyTranslate .Nd Command-line client for SimplyTranslate
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Fl f Ar from .Op Fl f Ar from
.Fl t Ar to .Op Fl t Ar to
.Ar input .Op Ar input
.Sh DESCRIPTION .Sh DESCRIPTION
Self-explanatory, besides, this was made as Self-explanatory, besides, this was made as
a rewrite from a shell script that had curl a rewrite from a shell script that had curl
and awk for dependencies. and awk for dependencies.
It fully serves It fully serves
as a drop-in replacement. 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 .Sh USAGE
.Bl -tag -width 11n -compact .Bl -tag -width 11n -compact
.It Fl f .It Fl f
@ -34,6 +25,8 @@ Target language to translate to
.It <input> .It <input>
Text to be translated Text to be translated
.El .El
.Sh SEE ALSO
.Xr suwako.conf 5
.Sh AUTHORS .Sh AUTHORS
.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja .An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja
.Sh BUGS .Sh BUGS

36
suwako.conf.5 Normal file
View File

@ -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