Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the template command #80

Closed
soywod opened this issue Apr 8, 2021 · 6 comments
Closed

Improve the template command #80

soywod opened this issue Apr 8, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@soywod
Copy link
Member

soywod commented Apr 8, 2021

As an aside, I like the template command.

I plan to use himalaya mostly in scripts, and being able to even fill in "template variables" would be handy in that workflow. For eg.,

echo Ping | h template new [email protected] --subject=Hello --body-stdin | h send --stdin

Originally posted by @srid in #79 (comment)

@soywod soywod added cli enhancement New feature or request labels Apr 8, 2021
@srid
Copy link
Contributor

srid commented Apr 16, 2021

Being able to set custom headers (eg: when sending from rss-watch, I'd like to set some header so as to be able to filter rss emails to be sent to some folder) would be nice too.

@soywod soywod added this to the v1 milestone Apr 17, 2021
@soywod
Copy link
Member Author

soywod commented May 3, 2021

Being able to set custom headers (...) would be nice too.

How do you see this? Sth alla cURL?

himalaya template new --to [email protected] --subject Hello --header "key: val" --header "key: val"

@soywod
Copy link
Member Author

soywod commented May 30, 2021

I refactored the Template system, it is way more flexible now. Here the list of the new options you can use to override parts of the template:

  • --subject
  • --from
  • --body
  • --signature

Those ones can be used multiple times:

  • --to
  • --cc
  • --bcc
  • --header (it should follow the format KEY: VAL, for eg: --header "TheKey: TheVal")

I just miss the body via stdin + tests + doc and I should be able to release it. I let you know @srid!

@srid
Copy link
Contributor

srid commented May 31, 2021

Nice! I haven't been using himalaya for a while (doing other things now) but I intend to eventually come back to it so as to customize and finalize a new email-based workflow for me (eg: get rss via email, then do a CLI workflow for reading and archiving links; then GTD, etc.).

@soywod
Copy link
Member Author

soywod commented May 31, 2021

Great :)

@soywod
Copy link
Member Author

soywod commented Jun 2, 2021

Added on master, it will be included in the next release!

@soywod soywod closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants