| Age | Commit message (Collapse) | Author |
|
**🌼 all: fix logging in client tests**
**💧 all: replace golangci-lint with internal linter**
The internal/cmd/gocheck use the go static analysis [Analyzer] that are
not included in the default go vet.
By using gocheck we found un-alignment and shadowing,
* client.go:18:13: struct with 24 pointer bytes could be 16
* dictionary.go:23:17: struct with 32 pointer bytes could be 16
* client_test.go:18:13: struct with 56 pointer bytes could be 48
* client_test.go:62:13: struct with 56 pointer bytes could be 48
* cmd/kamusku-telegram-bot/main.go:31:3: declaration of "err" shadows
declaration at line 25
* kamusku_test.go:49:3: declaration of "err" shadows declaration at
line 38
[Analyzer]: https://pkg.go.dev/golang.org/x/tools/go/analysis#hdr-Analyzer
**💧 README: add section about development and license**
**💧 all: fix test due to missing testdata directory**
|
|
|
|
The internal/cmd/gocheck use the go static analysis [Analyzer] that are
not included in the default go vet.
By using gocheck we found un-alignment and shadowing,
* client.go:18:13: struct with 24 pointer bytes could be 16
* dictionary.go:23:17: struct with 32 pointer bytes could be 16
* client_test.go:18:13: struct with 56 pointer bytes could be 48
* client_test.go:62:13: struct with 56 pointer bytes could be 48
* cmd/kamusku-telegram-bot/main.go:31:3: declaration of "err" shadows
declaration at line 25
* kamusku_test.go:49:3: declaration of "err" shadows declaration at
line 38
[Analyzer]: https://pkg.go.dev/golang.org/x/tools/go/analysis#hdr-Analyzer
|
|
Since v0.60.1 the lib/hunspell package has been removed due to inactivity.
We replace it by copying the internal function MergeDictionaries directly.
|
|
|
|
This fix kbbi login issue due to minimal TLS version (1.3) cause the
connection being blocked by CloudFlare.
The new kamusd version has been deployed immediately.
|
|
kamusku is implementation of HTTP API server for Kamus Besar Bahasa
Indonesia https://kbbi.kemdikbud.go.id as free software project.
There are two services provided by this project:
- kamusd: the HTTP server as proxy to KBBI server.
- kamusku-telegram-bot: Telegram bot as interface to HTTP server.
|
|
The kamusku CLI accept one or more words to be lookup their definition
on the server.
|
|
Since we now only have one client, apiClient, rename it to Client so it
can be used by other module or package later.
|
|
|
|
Using AppEngine is not flexible and hard to debug.
For example, if we changes the dependecies on module "pakakeh.go"
there is no way to deploy it manually without pusing new commit to
"pakakeh.go" and update the go.mod manually.
|
|
The "embed" command generate memory file system in memfs_www.go file
which will be used by kamusd service.
|
|
In TestMain we run dummy server to test the client.
Sometimes when test running the server has not ready yet.
To fix this we check if the server is ready using [libnet.WaitAlive].
|
|
For the reason why we choose GPL v3 see
https://kilabit.info/journal/2022/gpl/.
While at it, we make the project comply with REUSE Specification
version 3.0.
|
|
The "share" module has been moved to new forge, SourceHut, with new name
"pakakeh.go".
|
|
This commit move the directClient to different repository called kamusku
and changes the module name from kamusku to kamusd.
|
|
|
|
|
|
|
|
Deploying to App Engine require the port to be initialized through
environment variable PORT.
|
|
|
|
|
|
Bersamaan dengan ini, perbaiki juga respons pada halaman proyek untuk
menampilkan kolom "pesan".
|
|
|
|
When creating new client, the directClient will autoload cookies in
predefined location.
If Login is called, the cookies will autosave directly to predefined
location.
This will allow the server to use authenticated directClient to mitigate
the limit on KBBI official server.
|
|
|
|
|
|
Hal ini supaya perintah tersebut tidak bisa diklik oleh user.
|
|
Disebabkan banyak yang kebingungan menggunakan bot, pada saat user
mulai pertama kali menggunakan bot dengan perintah "start" maka akan
ditampilkan contoh penggunaan perintah "definisi".
|
|
Sebelumnya bila kata adalah kata tidak baku, definisi kata akan berisi
karaketer "→" saja.
Perubahan ini memeriksa bila definisi kata adalah "→" maka akan dianggap
tidak baku dan kata yang baku berada satu elemen sesudahnya.
|
|
Seharusnya untuk mendapatkan token attribut yang dicari adalah "value"
bukan "name".
|
|
Selain itu sederhanakan deskripsi dari perintah "definisi".
|
|
Jika argumen pada perintah "definisi" kosong, maka bot akan membalas
dengan pesan yang memberitahu cara menggunakan perintah tersebut.
|
|
|
|
Tambahkan informasi tentang Bot Telegram dan definisi API.
Samakan isi antara halaman HTML dengan README di Github.
|
|
|
|
|
|
Disebabkan server www-kbbi sekarang melayani tautan ke program, maka
server tidak men-generate berkas static.go lagi, namun konten dari
situs di salin langsung ke server.
|
|
|
|
The content page show the definition and capabilities of the API.
|
|
|
|
|
|
|
|
|
|
|
|
The deploy task build the specific binary for server OS and architecture
and copy them to server.
|
|
Currently the server and client can onyl handle API for looking up
definitions of the words through "/api/definisi" URL.
|
|
The client will have two mode: direct or API. The direct mode connect
to official KBBI website, request the word page, and parse the HTML to
get the definition. The API mode connect to server API that provide
caching of dictionary.
|
|
|
|
|