Giter Site home page Giter Site logo

tornaxo7 / himalaya Goto Github PK

View Code? Open in Web Editor NEW

This project forked from soywod/himalaya

2.0 2.0 1.0 1.36 MB

๐Ÿ“ซ CLI email client

License: BSD 3-Clause "New" or "Revised" License

Rust 85.77% Shell 0.50% Vim Script 10.34% Lua 0.95% Nix 2.44%

himalaya's Introduction

himalaya's People

Contributors

acksld avatar alexwennerberg avatar chambln avatar chawyehsu avatar chenrui333 avatar fancycade avatar igbanam avatar matthiasbeyer avatar msfjarvis avatar mtoohey31 avatar paolobarbolini avatar remche avatar soywod avatar srid avatar toastal avatar tornaxo7 avatar vladimyr avatar yanganto avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

hmpthcs

himalaya's Issues

Discussion about `mail_refactor`

Envelope

I'm a bit suspicious about the name "Envelope". Theoretically, the envelope is the container of the message. The struct looks more like headers for me. I checked what you put in the doc (about the Envelope of the crate imap_proto), and it matches well indeed. But imap_proto and himalaya are not on the same level: imap_proto is really low level, whereas himalaya is at the top level. The meaning of Envelope is not really the same. The 2 options I see so far is:

  • Rename Envelope (sth like Headers for example)
  • Use the imap_proto struct directly instead of creating our own one

Feel free to argue of course, maybe I miss some information.

Signature in envelope

I do not think the signature should be there. Also (it's not fully related to what you propose, it was already the case before), I'm half satisfied with how the signature is processed. It's a bit overwhelming. We never know when to append \n, how many of them etc. I thought about introducing a function like append_signature that takes in parameter a mutable body and appends the signature if exists. Feel free to propose btw.

Signature position in a forward message

I see that you put the signature before the quote in a forward message, what are your motivations? I think it should be after the quote instead. The default (and recommanded) option in Thunderbird is below the quote:

screenshot

I may add more points in the future.

PS: don't think I'm bashing your work, in fact you did quite well (like the tests based on RFC examples, the try_from etc). I just list here all points that I partially agree with ๐Ÿ˜‰

Improve tests

Trying to find a solution for this case for example. Also thinking about a test trait... or not...

Template shows raw data with JSON format

himalaya --output json template reply/forward shows the raw buffer data (it should be discarded).

[EDIT]: in fact it should not be discarded, but it should show the raw message as string (not buffer). This way we align with the existing behaviour (it is useful for UIs).

Process

@soywod When I started to rewatch the code I found the following:

  • A robust type-safety change like here wouldn't be bad: Changing the parameter type of flags to our struct Flags
    Do you agree to this?

  • I also found an issue when I tried to add a flag. In general I'd like to write some tests for the subcommands and so on first.

I'll wait for your respond first before I keep implementing (I've already started to adjust the Flags struct).

Forwarded message's signature misplaced

We already discussed this (#9), and I really think the signature should be below the forwarded message (not above). Later we could add an option for this, but for now I would prefer to stay "standard".

Read

  • The JSON output does not have the same shape (it misses hasAttachment)
  • The JSOn output should show the text/html version of the mail if no text/plain is found.

General

  • The From header contains only the email address (it should contains the name if available My Name <[email protected]>
  • The signature is missing
  • The Subject header is missing

Template

[] The raw should be excluded from the JSON export (#[serde(skip_serializing)])
[] The JSON export should be in camelCase, not in snake_case (#[serde(rename_all = "camelCase")])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.