From 1561d164650fd08d596eda0c9ca83b6963ca4066 Mon Sep 17 00:00:00 2001 From: Maksym Litvynov <1058433+rxx@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:54:47 +0300 Subject: [PATCH] Fix paths --- sim_log/CHANGELOG => CHANGELOG | 0 README.md | 53 ++++++++++++++++++++++++++- sim_log/TODO.md => TODO.md | 0 sim_log/go.mod => go.mod | 2 +- sim_log/go.sum => go.sum | 0 sim_log/justfile => justfile | 0 {sim_log => sim}/commands.go | 0 {sim_log => sim}/generate_log.go | 0 {sim_log => sim}/generate_log_test.go | 0 {sim_log => sim}/helpers.go | 0 {sim_log => sim}/main.go | 0 {sim_log => sim}/parse_log.go | 0 sim_log/README.md | 45 ----------------------- 13 files changed, 53 insertions(+), 47 deletions(-) rename sim_log/CHANGELOG => CHANGELOG (100%) rename sim_log/TODO.md => TODO.md (100%) rename sim_log/go.mod => go.mod (94%) rename sim_log/go.sum => go.sum (100%) rename sim_log/justfile => justfile (100%) rename {sim_log => sim}/commands.go (100%) rename {sim_log => sim}/generate_log.go (100%) rename {sim_log => sim}/generate_log_test.go (100%) rename {sim_log => sim}/helpers.go (100%) rename {sim_log => sim}/main.go (100%) rename {sim_log => sim}/parse_log.go (100%) delete mode 100644 sim_log/README.md diff --git a/sim_log/CHANGELOG b/CHANGELOG similarity index 100% rename from sim_log/CHANGELOG rename to CHANGELOG diff --git a/README.md b/README.md index 1423bfc..b333d48 100644 --- a/README.md +++ b/README.md @@ -1 +1,52 @@ -# od_tools \ No newline at end of file +# Log generator for [OpenDominion Game](https://github.com/OpenDominion/OpenDominion) + +Converted from the script included in sim file from [Yami-10/OD-Simulator](https://github.com/Yami-10/OD-Simulator) + +# The idea + +I work on Linux so don't have Excel and has no ability to generate `log.txt` from sim file. + +This tool writen in [GO](https://go.dev/) can generate `log.txt` from Excel file +both local and downloaded from Google Sheet. It should work in any Operation System. + +The code contains only final script generation logic. All other things left the same in Excel file. + +Remember to open Excel sim before generation. ALl formulas should run and update their values with Excel. + +# Get binary + +You can use prebuilt binaries at [Releases](https://github.com/rxx/od_tools/releases) or build from sources with + +To install `go` check [instructions here](https://go.dev/doc/install) + +and then run + +``` +go install github.com/rxx/od_tools/sim@latest +``` + +it installs to `GOPATH/bin` with a name `sim`. + +Rename it whatever you like. + +Make sure `GOPATH` is visible to the system. [This guide](https://go.dev/wiki/SettingGOPATH) will help you. + +# Usage + +Next will work for Linux and Mac + +``` +sim generate_log -sim OpenDominionSim.xlsm -result sim.txt +``` + +For windows you can also run `sim` from terminal or put command line to the exe options. + +I don't have Windows and can't test and describe the actual process, it would be helpfull if someone describe that and make a pull request ^\_^ + +Get file from [Yami-10/OD-Simulator](https://github.com/Yami-10/OD-Simulator) + +# Bug reports + +If you see any issues or want an improvement, feel free to create an issue and describe the problem. + +Write me in Discord @max_masterius diff --git a/sim_log/TODO.md b/TODO.md similarity index 100% rename from sim_log/TODO.md rename to TODO.md diff --git a/sim_log/go.mod b/go.mod similarity index 94% rename from sim_log/go.mod rename to go.mod index 4ef7c29..4bab2dd 100644 --- a/sim_log/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/rxx/od_sim +module github.com/rxx/od_tools go 1.21.8 diff --git a/sim_log/go.sum b/go.sum similarity index 100% rename from sim_log/go.sum rename to go.sum diff --git a/sim_log/justfile b/justfile similarity index 100% rename from sim_log/justfile rename to justfile diff --git a/sim_log/commands.go b/sim/commands.go similarity index 100% rename from sim_log/commands.go rename to sim/commands.go diff --git a/sim_log/generate_log.go b/sim/generate_log.go similarity index 100% rename from sim_log/generate_log.go rename to sim/generate_log.go diff --git a/sim_log/generate_log_test.go b/sim/generate_log_test.go similarity index 100% rename from sim_log/generate_log_test.go rename to sim/generate_log_test.go diff --git a/sim_log/helpers.go b/sim/helpers.go similarity index 100% rename from sim_log/helpers.go rename to sim/helpers.go diff --git a/sim_log/main.go b/sim/main.go similarity index 100% rename from sim_log/main.go rename to sim/main.go diff --git a/sim_log/parse_log.go b/sim/parse_log.go similarity index 100% rename from sim_log/parse_log.go rename to sim/parse_log.go diff --git a/sim_log/README.md b/sim_log/README.md deleted file mode 100644 index f30be29..0000000 --- a/sim_log/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Log generator for [OpenDominion Game](https://github.com/OpenDominion/OpenDominion) - -Converted from the script included in sim file from [Yami-10/OD-Simulator](https://github.com/Yami-10/OD-Simulator) - -# The idea -I work on Linux so don't have Excel and has no ability to generate `log.txt` from sim file. - -This tool writen in [GO](https://go.dev/) can generate `log.txt` from Excel file -both local and downloaded from Google Sheet. It should work in any Operation System. - -The code contains only final script generation logic. All other things left the same in Excel file. - -Remember to open Excel sim before generation. ALl formulas should run and update their values with Excel. - -# Get binary -You can use prebuilt binaries at [Releases](https://github.com/rxx/od_sim/releases) or build from sources with - -To install `go` check [instructions here](https://go.dev/doc/install) - -and then run -``` -go install github.com/rxx/od_sim/app@latest -``` -it installs to `GOPATH/bin` with a name `app`. (weird, huh?) - -Rename it to `od_sim` or whatever you like. - -Make sure `GOPATH` is visible to the system. [This guide](https://go.dev/wiki/SettingGOPATH) will help you. - -# Usage -Next will work for Linux and Mac -``` -od_sim generate_log -sim OpenDominionSim.xlsm -result sim.txt -``` - -For windows you can also run `od_sim` from terminal or put command line to the exe options. - -I don't have Windows and can't test and describe the actual process, it would be helpfull if someone describe that and make a pull request ^_^ - -Get file from [Yami-10/OD-Simulator](https://github.com/Yami-10/OD-Simulator) - -# Bug reports -If you see any issues or want an improvement, feel free to create an issue and describe the problem. - -Write me in Discord @max_masterius