robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
122 stars 12 forks source link

How to send content which is inside a TXT file? #3

Closed MrAlester closed 1 year ago

MrAlester commented 1 year ago

Hi, I'm trying to send a whatsapp text message with the content inside a TXT file but I'm not able to.

I know this might be a really basic problem but I'm not linux nor npx savvy.

I'm using the command:

cat /tmp/FILE.txt | npx mudslide send me --stdin

MrAlester commented 1 year ago

I'll respond myself, maybe it's not the best option but this works.

npx mudslide send me "$(cat FILE.txt)"

robvanderleek commented 1 year ago

Hi @MrAlester

There's indeed no support for reading from stdin (yet, maybe if there's more interest the feature can be added although it can also confuse users since the data would not "stream" to WhatsApp but will be buffered before sending).

Great that you found a workaround 😃
Do not hesitate to propose new features in an issue, this is however a side project so my time is limited (PRs are welcome also of course). Also thanks for the sponsor donation, really appreciated.

KR, Rob