aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
AgeCommit message (Collapse)Author
2021-10-07Modernize error handlingDaniel Schadt
This sprinkles in some thiserror and anyhow instead of the hand-rolled 'error_froms!' macros and the MainResult. The benefit of this is that we're hooking into an established ecosystem of error handling and we're saving a lot of effort in the hand-written Display and Error implementations. The reason for not sprinkling anyhow everywhere is because the retrieval/rendering part of kondou could be split off into a library at some point, in which case we want to have a proper KondouError type. However, the argument could be made that the current split of errors is not very good, especially because many of them boil down to the same inner errors (RenderError wrapping ApiError wrapping reqwest::Error), which keeps unnecessary information. Some future improvements may include 1.) Unifying those error enums into one bigger enum 2.) Attaching more context through anyhow in the application layer 3.) Properly define an API and split off the inner logic from the UI logic
2020-02-19update dependenciesDaniel Schadt
image should also be updated to 0.23, but imageproc currently still uses 0.22, so we need to match it.
2019-12-25Merge branch 'user-options'Daniel Schadt
2019-12-25add flag to disable cachingDaniel Schadt
2019-12-25use byteorder for chatlink parsingDaniel Schadt
2019-12-20remove hard coded palette IDsDaniel Schadt
Now that the API actually returns the proper palette IDs, we can use those values instead of relying on the hard coded values. This also gets rid of the make_table script that was mostly hackish anyway, and the lazy static HashMap.
2019-12-14add preliminary support for user configurationsDaniel Schadt
2019-12-13better output for image rendering errorsDaniel Schadt
So far, we silently ignored all errors, because we assumed that they would be the EmptyBuild anyway. This fixes this by not swallowing errors anymore, and instead displays them.
2019-12-12remove quick_errorDaniel Schadt
quick_error used the deprecated Error::cause interface, therefore we want to use our own error enums with proper methods.
2019-12-12use helper traits for better codeDaniel Schadt
2019-12-12add some more doc commentsDaniel Schadt
2019-12-10avoid crashing with empty build templatesDaniel Schadt
This would occur if e.g. only the profession was given.
2019-12-10make skill lookup table staticDaniel Schadt
2019-12-08add console output for build templatesDaniel Schadt
2019-12-08use if on boolean instead of matchDaniel Schadt
2019-12-08add support for brightness gradientsDaniel Schadt
2019-12-07implement chatlink parsingDaniel Schadt
2019-12-07basic color supportDaniel Schadt
2019-12-07lint fixesDaniel Schadt
2019-12-07add chatlink + revenant legends supportDaniel Schadt
2019-12-06initial commitDaniel Schadt