diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-06-08 16:04:51 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-06-08 16:04:51 +0200 |
commit | f33195967f0d483e4006441fb68a5fbd26d87f66 (patch) | |
tree | a0ce1523367a7d6e0e509b78b2d673ccbfd45965 | |
parent | d55d1634c2073768f1781652bb9f15ebe74be697 (diff) | |
download | ezau-f33195967f0d483e4006441fb68a5fbd26d87f66.tar.gz ezau-f33195967f0d483e4006441fb68a5fbd26d87f66.tar.bz2 ezau-f33195967f0d483e4006441fb68a5fbd26d87f66.zip |
Add README
-rw-r--r-- | README.md | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a48ef2 --- /dev/null +++ b/README.md @@ -0,0 +1,87 @@ +EVTC Zipper And Uploader +======================== + +![MIT license](https://img.shields.io/badge/license-MIT-green) ![Rustlang](https://img.shields.io/badge/language-Rust-green) + +`ezau` is a tool which watches a directory for new EVTC log files and can zip them, upload them to [dps.report](https://dps.report) and post a message to a Discord channel. + +Motivation +---------- + +EVTC logs generated by arcpds can get quite big, so having them zipped is a huge space saving (80-90%). +Though while arcdps itself works fine on Linux/Wine, the built-in zip functionality relies on PowerShell and is not available outside of Windows 10. +As such, `ezau` can be used to automatically zip newly created log files in order to save disk space. +In addition to that, `ezau` can also optionally upload new logs to dps.report, and post a link to the uploaded report to a Discord channel. + +`ezau` was inspired by [`evtc-watch`](https://gitlab.com/networkjanitor/evtc-watch/-/blob/master/evtc-watch) from Xyoz, with the difference that the file watching logic is included in the Rust part. +This makes it cross-platform and fixes some bugs that were present in the `inotifywait` version. + +Compilation +----------- + +`ezau` is compiled with the help of `cargo`, the standard Rust package manager. +Run `cargo build --release` to build the release version in `./target/release`. + +You can shrink the executable size by enabling link time optimization, at the cost of compile time. +To do that, add the following to `Cargo.toml`: + +```toml +[profile.release] +lto = true +``` + +Configuration +------------- + +`ezau` is configured via a configuration file in TOML syntax. +By default, `ezau` looks for `ezau.toml` in the current directory. +You can use `-c` to specify a different configuration file. + +A full example configuration is provided here: + +```toml +# Whether logs should be uploaded. +# If this is false, ezau will only zip new logs and do no further processing. +# (mandatory) +upload = false + +# Whether logs with an unknown boss should be uploaded. +# By default, ezau only uploads logs with bosses known to evtclib. +# (optional) +upload_unknown = false + +# Discord messaging section. +# If this section is missing, ezau will not do Discord notifications for log uploads. +# Mandatory keys in this section are only mandatory if the section is present, as the whole Discord functionality is optional. +# (optional) +[discord] +# Auth token for a bot account. +# (mandatory) +auth_token = "foobar" +# Channel ID of the channel to which the message should be posted. +# (mandatory) +channel_id = 123 +``` + +Usage +----- + +`ezau watch <dirname>`: Watch the given directory for new log files, zip them and optionally upload them. + +`ezau upload <filename>`: Upload a single log and do a Discord notification. +Note that this bypasses the `upload`/`upload_unknown` settings. + +See `ezau help` and `ezau help <subcommand>` for more information. + +License +------- + +`ezau` is licensed under the MIT license: + +Copyright © 2020 Dunj3 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |