aboutsummaryrefslogtreecommitdiffstats
path: root/Cargo.lock
AgeCommit message (Collapse)Author
2021-03-14Strip HTML tags from single-part HTML emailsTeddy Wing
When an HTML body is fed to 'whatlang', it recognises it as English. This is likely due to the English HTML syntax. Remove all HTML tags with a simple regex substitution to get the language recognition working more properly. This doesn't remove CSS, which could also confuse the language recogniser. In a limited test, it seemed to work without having to remove any CSS, so not bothering with that. Still need to get this working for multipart emails.
2021-03-14Add additional sysexits error codes for other errorsTeddy Wing
Give types to the errors in `run()` and exit with appropriate error codes. Split out an additional error type so we can wrap errors from the non-main functions. Remove 'anyhow', replacing it with 'thiserror' now that we're using error types.
2021-03-14Exit with sysexits.h error codes on errorTeddy Wing
2021-03-14Wrap errors in a custom `OttolangyError` typeTeddy Wing
Give us a way to match on the type of error so we can return an appropriate exit code.
2021-03-13Add context to errorsTeddy Wing
Include the 'anyhow' crate to add additional context to errors.
2021-03-13Write an attribution config fileTeddy Wing
Set attribution config strings for French and English. If the input email's body language is in French, set my French attribution string. Otherwise use English. Write the attribution string to a config file at `~/.local/share/ottolangy/attribution.muttrc`. We can then source this config file to set the attribution.
2021-03-09Use 'whatlang' to detect the language of the email bodyTeddy Wing
2021-03-09Work out how to get the body of a multipart emailTeddy Wing
Figured out why I was getting an empty string before: I was inputting a multipart email. I need to actually look through each part to get the message body. Look for the body of the "text/plain" part.
2021-03-09Testing out different libraries for email parsingTeddy Wing
2021-03-08New Rust v1.50.0 projectTeddy Wing
Generated with: $ cargo init --bin