From c4ec958576aa09b9293308646d5e4dee63edb344 Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Mon, 12 Feb 2024 22:21:47 +0600 Subject: [PATCH] Moved the code from src to the root. --- README.md | 11 +++++------ {src/convertor => convertor}/repository.go | 2 +- {src/convertor => convertor}/service.go | 2 +- {src/convertor => convertor}/view.go | 4 ++-- {src/convertor => convertor}/view_setting.go | 2 +- .../view_setting_button_download_ffmpeg_anyos.go | 0 ...view_setting_button_download_ffmpeg_windows.go | 0 {src/data => data}/.gitignore | 0 {src/error => error}/view.go | 2 +- src/go.mod => go.mod | 2 +- src/go.sum => go.sum | 0 {src/handler => handler}/convertor.go | 6 +++--- {src/handler => handler}/convertor_anyos.go | 2 +- {src/handler => handler}/convertor_windows.go | 0 {src/handler => handler}/main.go | 2 +- {src/handler => handler}/menu.go | 4 ++-- {src/helper => helper}/helper.go | 0 {src/helper => helper}/path_separator.go | 0 {src/helper => helper}/path_separator_window.go | 0 .../prepare_background_command.go | 0 .../prepare_background_command_windows.go | 0 src/icon.png => icon.png | Bin {src/languages => languages}/active.en.toml | 0 {src/languages => languages}/active.kk.toml | 0 {src/languages => languages}/active.ru.toml | 0 {src/languages => languages}/translate.en.toml | 0 {src/languages => languages}/translate.kk.toml | 0 {src/localizer => localizer}/repository.go | 2 +- {src/localizer => localizer}/service.go | 0 {src/localizer => localizer}/view.go | 0 src/main.go => main.go | 14 +++++++------- {src/menu => menu}/view.go | 2 +- {src/migration => migration}/migration.go | 2 +- {src/setting => setting}/entity.go | 0 {src/setting => setting}/repository.go | 0 35 files changed, 29 insertions(+), 30 deletions(-) rename {src/convertor => convertor}/repository.go (94%) rename {src/convertor => convertor}/service.go (98%) rename {src/convertor => convertor}/view.go (98%) rename {src/convertor => convertor}/view_setting.go (98%) rename {src/convertor => convertor}/view_setting_button_download_ffmpeg_anyos.go (100%) rename {src/convertor => convertor}/view_setting_button_download_ffmpeg_windows.go (100%) rename {src/data => data}/.gitignore (100%) rename {src/error => error}/view.go (96%) rename src/go.mod => go.mod (97%) rename src/go.sum => go.sum (100%) rename {src/handler => handler}/convertor.go (97%) rename {src/handler => handler}/convertor_anyos.go (87%) rename {src/handler => handler}/convertor_windows.go (100%) rename {src/handler => handler}/main.go (94%) rename {src/handler => handler}/menu.go (97%) rename {src/helper => helper}/helper.go (100%) rename {src/helper => helper}/path_separator.go (100%) rename {src/helper => helper}/path_separator_window.go (100%) rename {src/helper => helper}/prepare_background_command.go (100%) rename {src/helper => helper}/prepare_background_command_windows.go (100%) rename src/icon.png => icon.png (100%) rename {src/languages => languages}/active.en.toml (100%) rename {src/languages => languages}/active.kk.toml (100%) rename {src/languages => languages}/active.ru.toml (100%) rename {src/languages => languages}/translate.en.toml (100%) rename {src/languages => languages}/translate.kk.toml (100%) rename {src/localizer => localizer}/repository.go (91%) rename {src/localizer => localizer}/service.go (100%) rename {src/localizer => localizer}/view.go (100%) rename src/main.go => main.go (89%) rename {src/menu => menu}/view.go (99%) rename {src/migration => migration}/migration.go (75%) rename {src/setting => setting}/entity.go (100%) rename {src/setting => setting}/repository.go (100%) diff --git a/README.md b/README.md index 769b0cd..7ab1146 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ ## Установка через fyne: 1. go install fyne.io/fyne/v2/cmd/fyne@latest -2. fyne get git.kor-elf.net/kor-elf/gui-for-ffmpeg/src +2. fyne get git.kor-elf.net/kor-elf/gui-for-ffmpeg ## Скомпилировать через исходники: 1. git clone https://git.kor-elf.net/kor-elf/gui-for-ffmpeg.git -2. Переходим в папку проекта и там переходим в папку src: **cd gui-for-ffmpeg/src** +2. Переходим в папку проекта и там переходим в папку src: **cd gui-for-ffmpeg** 3. Ознакамливаемся, что нужно ещё установить для Вашей ОС для простого запуска (через go run) тут: https://docs.fyne.io/started/ 4. *(не обязательный шаг)* Просто запустить можно так: **go run main.go** 5. go install github.com/fyne-io/fyne-cross@latest @@ -35,9 +35,8 @@ ## Работа с переводами: 1. go install -v github.com/nicksnyder/go-i18n/v2/goi18n@latest -2. Переходим в папке проекта в папку src: **cd ./src** -3. goi18n merge -sourceLanguage ru -outdir languages languages/active.\*.toml languages/translate.\*.toml -4. В файлах **languages/translate.\*.toml** переводим текст на нужный язык -5. goi18n merge -sourceLanguage ru -outdir languages languages/active.\*.toml languages/translate.\*.toml +2. goi18n merge -sourceLanguage ru -outdir languages languages/active.\*.toml languages/translate.\*.toml +3. В файлах **languages/translate.\*.toml** переводим текст на нужный язык +4. goi18n merge -sourceLanguage ru -outdir languages languages/active.\*.toml languages/translate.\*.toml Более подробно можно почитать тут: https://github.com/nicksnyder/go-i18n \ No newline at end of file diff --git a/src/convertor/repository.go b/convertor/repository.go similarity index 94% rename from src/convertor/repository.go rename to convertor/repository.go index 3f26bf5..e31f64a 100644 --- a/src/convertor/repository.go +++ b/convertor/repository.go @@ -1,7 +1,7 @@ package convertor import ( - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/setting" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/setting" ) type RepositoryContract interface { diff --git a/src/convertor/service.go b/convertor/service.go similarity index 98% rename from src/convertor/service.go rename to convertor/service.go index bdeb256..9b89f1f 100644 --- a/src/convertor/service.go +++ b/convertor/service.go @@ -2,7 +2,7 @@ package convertor import ( "errors" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/helper" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper" "io" "os/exec" "regexp" diff --git a/src/convertor/view.go b/convertor/view.go similarity index 98% rename from src/convertor/view.go rename to convertor/view.go index 7a18160..2ac293d 100644 --- a/src/convertor/view.go +++ b/convertor/view.go @@ -8,8 +8,8 @@ import ( "fyne.io/fyne/v2/dialog" "fyne.io/fyne/v2/storage" "fyne.io/fyne/v2/widget" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/helper" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/localizer" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer" "github.com/nicksnyder/go-i18n/v2/i18n" "image/color" "path/filepath" diff --git a/src/convertor/view_setting.go b/convertor/view_setting.go similarity index 98% rename from src/convertor/view_setting.go rename to convertor/view_setting.go index c09acba..703259f 100644 --- a/src/convertor/view_setting.go +++ b/convertor/view_setting.go @@ -7,7 +7,7 @@ import ( "fyne.io/fyne/v2/dialog" "fyne.io/fyne/v2/storage" "fyne.io/fyne/v2/widget" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/helper" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper" "github.com/nicksnyder/go-i18n/v2/i18n" "image/color" "net/url" diff --git a/src/convertor/view_setting_button_download_ffmpeg_anyos.go b/convertor/view_setting_button_download_ffmpeg_anyos.go similarity index 100% rename from src/convertor/view_setting_button_download_ffmpeg_anyos.go rename to convertor/view_setting_button_download_ffmpeg_anyos.go diff --git a/src/convertor/view_setting_button_download_ffmpeg_windows.go b/convertor/view_setting_button_download_ffmpeg_windows.go similarity index 100% rename from src/convertor/view_setting_button_download_ffmpeg_windows.go rename to convertor/view_setting_button_download_ffmpeg_windows.go diff --git a/src/data/.gitignore b/data/.gitignore similarity index 100% rename from src/data/.gitignore rename to data/.gitignore diff --git a/src/error/view.go b/error/view.go similarity index 96% rename from src/error/view.go rename to error/view.go index 61bd0f4..f34d72b 100644 --- a/src/error/view.go +++ b/error/view.go @@ -4,7 +4,7 @@ import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/localizer" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer" "github.com/nicksnyder/go-i18n/v2/i18n" ) diff --git a/src/go.mod b/go.mod similarity index 97% rename from src/go.mod rename to go.mod index 66edcf3..89427e3 100644 --- a/src/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.kor-elf.net/kor-elf/gui-for-ffmpeg/src +module git.kor-elf.net/kor-elf/gui-for-ffmpeg go 1.21 diff --git a/src/go.sum b/go.sum similarity index 100% rename from src/go.sum rename to go.sum diff --git a/src/handler/convertor.go b/handler/convertor.go similarity index 97% rename from src/handler/convertor.go rename to handler/convertor.go index e878665..5a2cff1 100644 --- a/src/handler/convertor.go +++ b/handler/convertor.go @@ -4,9 +4,9 @@ import ( "bufio" "errors" "fyne.io/fyne/v2/widget" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/convertor" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/helper" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/localizer" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/convertor" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer" "github.com/nicksnyder/go-i18n/v2/i18n" "io" "regexp" diff --git a/src/handler/convertor_anyos.go b/handler/convertor_anyos.go similarity index 87% rename from src/handler/convertor_anyos.go rename to handler/convertor_anyos.go index 16b85a0..4db2fd4 100644 --- a/src/handler/convertor_anyos.go +++ b/handler/convertor_anyos.go @@ -6,7 +6,7 @@ package handler import ( "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/widget" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/convertor" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/convertor" ) func getPathsToFF() []convertor.FFPathUtilities { diff --git a/src/handler/convertor_windows.go b/handler/convertor_windows.go similarity index 100% rename from src/handler/convertor_windows.go rename to handler/convertor_windows.go diff --git a/src/handler/main.go b/handler/main.go similarity index 94% rename from src/handler/main.go rename to handler/main.go index 7253b05..48b99a4 100644 --- a/src/handler/main.go +++ b/handler/main.go @@ -1,7 +1,7 @@ package handler import ( - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/localizer" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer" ) type MainHandler struct { diff --git a/src/handler/menu.go b/handler/menu.go similarity index 97% rename from src/handler/menu.go rename to handler/menu.go index bf7e332..eabbef2 100644 --- a/src/handler/menu.go +++ b/handler/menu.go @@ -2,8 +2,8 @@ package handler import ( "fyne.io/fyne/v2" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/localizer" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/menu" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/menu" "github.com/nicksnyder/go-i18n/v2/i18n" ) diff --git a/src/helper/helper.go b/helper/helper.go similarity index 100% rename from src/helper/helper.go rename to helper/helper.go diff --git a/src/helper/path_separator.go b/helper/path_separator.go similarity index 100% rename from src/helper/path_separator.go rename to helper/path_separator.go diff --git a/src/helper/path_separator_window.go b/helper/path_separator_window.go similarity index 100% rename from src/helper/path_separator_window.go rename to helper/path_separator_window.go diff --git a/src/helper/prepare_background_command.go b/helper/prepare_background_command.go similarity index 100% rename from src/helper/prepare_background_command.go rename to helper/prepare_background_command.go diff --git a/src/helper/prepare_background_command_windows.go b/helper/prepare_background_command_windows.go similarity index 100% rename from src/helper/prepare_background_command_windows.go rename to helper/prepare_background_command_windows.go diff --git a/src/icon.png b/icon.png similarity index 100% rename from src/icon.png rename to icon.png diff --git a/src/languages/active.en.toml b/languages/active.en.toml similarity index 100% rename from src/languages/active.en.toml rename to languages/active.en.toml diff --git a/src/languages/active.kk.toml b/languages/active.kk.toml similarity index 100% rename from src/languages/active.kk.toml rename to languages/active.kk.toml diff --git a/src/languages/active.ru.toml b/languages/active.ru.toml similarity index 100% rename from src/languages/active.ru.toml rename to languages/active.ru.toml diff --git a/src/languages/translate.en.toml b/languages/translate.en.toml similarity index 100% rename from src/languages/translate.en.toml rename to languages/translate.en.toml diff --git a/src/languages/translate.kk.toml b/languages/translate.kk.toml similarity index 100% rename from src/languages/translate.kk.toml rename to languages/translate.kk.toml diff --git a/src/localizer/repository.go b/localizer/repository.go similarity index 91% rename from src/localizer/repository.go rename to localizer/repository.go index 03c7fa3..46e36f2 100644 --- a/src/localizer/repository.go +++ b/localizer/repository.go @@ -1,7 +1,7 @@ package localizer import ( - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/setting" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/setting" ) type RepositoryContract interface { diff --git a/src/localizer/service.go b/localizer/service.go similarity index 100% rename from src/localizer/service.go rename to localizer/service.go diff --git a/src/localizer/view.go b/localizer/view.go similarity index 100% rename from src/localizer/view.go rename to localizer/view.go diff --git a/src/main.go b/main.go similarity index 89% rename from src/main.go rename to main.go index f992a23..8b1dbc1 100644 --- a/src/main.go +++ b/main.go @@ -6,13 +6,13 @@ import ( "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/convertor" - error2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/error" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/handler" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/localizer" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/menu" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/migration" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/setting" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/convertor" + error2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/error" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/handler" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/menu" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/migration" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/setting" _ "github.com/mattn/go-sqlite3" "golang.org/x/text/language" "gorm.io/driver/sqlite" diff --git a/src/menu/view.go b/menu/view.go similarity index 99% rename from src/menu/view.go rename to menu/view.go index 377dd6e..0dc0896 100644 --- a/src/menu/view.go +++ b/menu/view.go @@ -5,7 +5,7 @@ import ( "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/localizer" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer" "github.com/nicksnyder/go-i18n/v2/i18n" "golang.org/x/image/colornames" "net/url" diff --git a/src/migration/migration.go b/migration/migration.go similarity index 75% rename from src/migration/migration.go rename to migration/migration.go index 91787ff..932b98a 100644 --- a/src/migration/migration.go +++ b/migration/migration.go @@ -1,7 +1,7 @@ package migration import ( - "git.kor-elf.net/kor-elf/gui-for-ffmpeg/src/setting" + "git.kor-elf.net/kor-elf/gui-for-ffmpeg/setting" "gorm.io/gorm" ) diff --git a/src/setting/entity.go b/setting/entity.go similarity index 100% rename from src/setting/entity.go rename to setting/entity.go diff --git a/src/setting/repository.go b/setting/repository.go similarity index 100% rename from src/setting/repository.go rename to setting/repository.go