Add manual page and set default instance to the main one.
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/suwako/trunk@17 0b558ee1-521d-8b46-a41b-40029c97c055
This commit is contained in:
1
Makefile
1
Makefile
@@ -16,6 +16,7 @@ clean:
|
|||||||
rm -f suwako
|
rm -f suwako
|
||||||
install:
|
install:
|
||||||
install -Dm0755 suwako ${PREFIX}/bin/suwako
|
install -Dm0755 suwako ${PREFIX}/bin/suwako
|
||||||
|
install -Dm0644 suwako.1 ${PREFIX}/share/man/man1/suwako.1
|
||||||
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
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ func main() {
|
|||||||
|
|
||||||
if len(engine) == 0 || len(instance) == 0 {
|
if len(engine) == 0 || len(instance) == 0 {
|
||||||
log.Println("SUWAKO_ENGINE and/or SUWAKO_INSTANCE are unset")
|
log.Println("SUWAKO_ENGINE and/or SUWAKO_INSTANCE are unset")
|
||||||
log.Println("Defaulting to translate.chaotic.ninja with engine 'google'")
|
log.Println("Defaulting to simplytranslate.org with engine 'google'")
|
||||||
engine = "google"
|
engine = "google"
|
||||||
instance = "https://translate.chaotic.ninja"
|
instance = "https://simplytranslate.org"
|
||||||
}
|
}
|
||||||
if len(input) == 0 {
|
if len(input) == 0 {
|
||||||
log.Fatal("Missing input text.")
|
log.Fatal("Missing input text.")
|
||||||
|
|||||||
42
suwako.1
Normal file
42
suwako.1
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
.Dd $Mdocdate$
|
||||||
|
.Dt STCLI 1
|
||||||
|
.Os
|
||||||
|
.Sh NAME
|
||||||
|
.Nm suwako
|
||||||
|
.Nd Command-line client for SimplyTranslate in Go
|
||||||
|
.Sh SYNOPSIS
|
||||||
|
.Nm
|
||||||
|
.Fl e Ar engine
|
||||||
|
.Fl f Ar from
|
||||||
|
.Fl i Ar instance
|
||||||
|
.Fl I Ar input
|
||||||
|
.Fl t Ar to
|
||||||
|
.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 USAGE
|
||||||
|
.Bl -tag -width 11n -compact
|
||||||
|
.It -e
|
||||||
|
Translation engine to use
|
||||||
|
.It -f
|
||||||
|
Input language to translate from
|
||||||
|
.It -i
|
||||||
|
Instance to use
|
||||||
|
.It -I
|
||||||
|
Text to translate
|
||||||
|
.It -t
|
||||||
|
Target language to translate to
|
||||||
|
.El
|
||||||
|
.Sh AUTHORS
|
||||||
|
.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja
|
||||||
|
.Pp
|
||||||
|
.An Czar of KST Aq Mt czar@kalli.st
|
||||||
|
.Pp
|
||||||
|
.An Shokara Kou Aq Mt kou@clearnet.fqdn
|
||||||
|
.Sh BUGS
|
||||||
|
None so far.
|
||||||
|
If otherwise, please report them to
|
||||||
|
.Mt devel@chaotic.ninja
|
||||||
Reference in New Issue
Block a user