abertschi / postcards

A CLI for the Swiss Postcard Creator :postbox:
https://abertschi.ch/blog/2022/receiving-postcards/
MIT License
36 stars 8 forks source link

How to pass new lines to message argument #16

Closed matbech closed 6 years ago

matbech commented 6 years ago

I was wondering how to pass a new line character to the --message argument. Are escaped strings like \n unescaped by the tool? If not, could this be added? The reason is that passing a new line inside command line arguments is in particular cumbersome (or some claim impossible) on Windows: https://superuser.com/questions/1243809/can-i-pass-a-newline-in-a-command-line-parameter-to-a-windows-executable-in-a-ba

abertschi commented 6 years ago

--message accepts valid html code. A <br/> will do the job.

matbech commented 6 years ago

Thank you. Maybe this could be documented somewhere? Readme.md? and in the argument help: -m MESSAGE ..., --message MESSAGE ... postcard message. You can use HTML tags to format the message (e.g. <br/>) PR: https://github.com/abertschi/postcards/pull/18