Make repo a monorepo

Also fixed the module URLs.

git-svn-id: file:///srv/svn/repo/mai/trunk@9 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
fattalion
2022-09-21 09:01:41 +00:00
parent 897a8b37e4
commit c4d051d74f
11 changed files with 44 additions and 11 deletions

View File

@@ -1,12 +1,10 @@
## SimplyTranslate Engines ## SimplyTranslate
The core part of SimplyTranslate that actually gets the data from translation websites. This is a work-in-progress rewrite of https://codeberg.org/SimpleWeb/SimplyTranslate-Engines and https://codeberg.org/SimpleWeb/SimplyTranslate-Web in Go (yes, in one repo). Much work remains until this rewrite will replace the original Python repositories.
Note that this is a work-in-progress rewrite of https://codeberg.org/SimpleWeb/SimplyTranslate-Engines in Go. Much work remains until this rewrite will replace the original Python repository.
### License ### License
SimplyTranslate Engines is free software: you can redistribute it and/or modify SimplyTranslate is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.

View File

@@ -1,4 +1,4 @@
package simplytranslate_engines package engines
type TranslationResult struct { type TranslationResult struct {
SourceLanguage Language SourceLanguage Language

View File

@@ -1,4 +1,4 @@
module codeberg.org/Simple-Web/simplytranslate_engines_go module codeberg.org/SimpleWeb/SimplyTranslate/engines
go 1.16 go 1.16

View File

@@ -1,4 +1,4 @@
package simplytranslate_engines package engines
import ( import (
"fmt" "fmt"

View File

@@ -1,4 +1,4 @@
package simplytranslate_engines package engines
import ( import (
"crypto/md5" "crypto/md5"

View File

@@ -1,4 +1,4 @@
package simplytranslate_engines package engines
type Language struct { type Language struct {
Name, Code string Name, Code string

View File

@@ -1,4 +1,4 @@
package simplytranslate_engines package engines
import ( import (
"bytes" "bytes"

7
web/go.mod Normal file
View File

@@ -0,0 +1,7 @@
module codeberg.org/SimpleWeb/SimplyTranslate/web
go 1.16
require codeberg.org/SimpleWeb/SimplyTranslate/engines v0.0.0
replace codeberg.org/SimpleWeb/SimplyTranslate/engines v0.0.0 => ../engines

16
web/go.sum Normal file
View File

@@ -0,0 +1,16 @@
github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=
github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4=
golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

12
web/main.go Normal file
View File

@@ -0,0 +1,12 @@
package main
import (
"codeberg.org/SimpleWeb/SimplyTranslate/engines"
)
// TODO: port web frontend to Go.
func main() {
engine := &engines.GoogleTranslateEngine{}
print(engine.DisplayName())
}