| Age | Commit message (Collapse) | Author | 
|---|
|  |  | 
|  |  | 
|  | Make it easy to find out what version of the program is installed. | 
|  |  | 
|  |  | 
|  |  | 
|  |  | 
|  | Realised that there wasn't really a difference between the content for
the two. | 
|  |  | 
|  |  | 
|  | The file reading code I had previously was incorrect: it only read the
first line of the file into `$generated_config` instead of the whole
file. Fix the file reading code and add the new `$attribution_locale`
config line. | 
|  | The French attribution from before capitalised the month name because I
have an EN locale by default. The month shouldn't be capitalised in
French. Set the `$attribution_locale` to match the language of the
attribution template string.
Hard-coding `en_US` on the English one as that's the locale I'm used to. | 
|  |  | 
|  | License the muttrc file under the Unlicense to allow the macros to be
used freely. | 
|  |  | 
|  | Now that we've handled 'multipart/relative' and HTML-only
'text/plain'-less emails, we can remove these. | 
|  | Now that we're using it in two places, move it to a function. Also
remove the `unwrap` call. | 
|  | We're already doing this for single-part emails. This change makes it
work additionally for multipart emails. | 
|  | Now that I know the `Content-Type` header is already parsed in the
original email parse call, use that instead of looping over the headers
trying to find the content type. | 
|  | 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. | 
|  | Figuring out the different content types and subparts for different
kinds of emails. | 
|  | Fix date. That was last night. | 
|  |  | 
|  | Parse the text email body out of `multipart/alternative` parts. | 
|  |  | 
|  |  | 
|  | In `index` view, the `L` binding maps to `bottom-page`. | 
|  | Don't require a key to be pressed when using the overridden reply
macros. | 
|  | Add the Mutt macros necessary to make the system work. Override the
reply commands, wrapping them to pipe the message to Ottolangy. | 
|  |  | 
|  | Now that we're no longer using `anyhow::Error` as `Error`. | 
|  | Collapse arms that return the same exit code. | 
|  | 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. | 
|  |  | 
|  | Give us a way to match on the type of error so we can return an
appropriate exit code. | 
|  | Feed a sample email to the program and test whether it wrote the correct
Muttrc config. | 
|  | Now that the program is basically finished. | 
|  | Now that I've figured out what was wrong with parsing email bodies. | 
|  |  | 
|  | Include the 'anyhow' crate to add additional context to errors. | 
|  |  | 
|  | Replace the temporary error string with one that provides a hair more
context. | 
|  |  | 
|  | These print outputs were for help developing and debugging. They're no
longer necessary since the program is basically working. | 
|  | Move the `main()` function contents to a new `run()` function that
returns a `Result`. This way we can easily print the error in `main()`. | 
|  |  | 
|  | 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. | 
|  |  | 
|  | Isolate this block. | 
|  | The old code was from when I was testing with a multipart email and
hadn't figured out how to extract the body from it. |