D22352: Add option --decode-emails for the show command.

Kevin Krammer noreply at phabricator.kde.org
Thu Jul 11 09:01:59 BST 2019


krake added a comment.


  In D22352#494026 <https://phabricator.kde.org/D22352#494026>, @dfaure wrote:
  
  > I don't think output codec is needed, toLocal8Bit/qPrintable is the expected output codec for commandline programs.
  
  
  Output codec was mostly important for certain outputs, e.g. VCard 2, which doesn't have a standard codec.
  For now I agree we should be fine with either of these two methods of creating "local" output.
  
  > So the current two ideas are --decoded (default raw) and --raw (default decoded). I chose the former to avoid breaking existing users, but if you guys prefer, I'm also OK with the latter.
  
  I prefer "raw" as the exception due to the command being "show", i.e. "human consumable".
  "raw" is more like "internal format, you have been warned".
  
  > This is playground after all (unfortunately...).
  
  Originally I was planning to get it into pim/console just like kabcclient and konsolecalendar used to, but the multi data nature makes it much more complex than these two and I never got around to really think about the API in enough detail to risk "official" releasing.
  
  > And yes if someone wants to choose between vcard and csv for contacts, that would be a --contact-format switch. This way it works even in an unlikely mixed folder, but more importantly it's easier to document (contact-format lists the contact formats, event-format lists the event formats etc.).
  
  Documentation/discoverability is a good point.
  
  For the generic switch I was thinking maybe something like
  
  --output-format email=full,contact=vcard
  
  i.e. allowing the argument to be a list of sorts.
  
  Encountering different types of items is unlikely, but the command allows to specify a list of item IDs, which could even come from different collections.
  So it is a decision of either not allowing/supporting different types in the same invocation or being capable of specifying options individually.
  
  > Hmm, does this mean instead of --decoded, what I want is `--email-format decoded` ?
  
  That was my initial take, but now I think quoted printables should always be decoded unless specifically requested not to.
  I.e. if you want to process the item's payload with a mail capable program you simply use "--raw", if you are manually parsing information of any sort you probably don't want to deal with quoted printable encoding yourself.

REPOSITORY
  R723 Akonadi CLI Client

REVISION DETAIL
  https://phabricator.kde.org/D22352

To: dfaure, marten, krake
Cc: kde-pim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190711/eb9d7e69/attachment.html>


More information about the kde-pim mailing list