Wee-slack: Specify slack upload additional params

Created on 8 Mar 2018  路  3Comments  路  Source: wee-slack/wee-slack

  • filename
  • title
  • initial_comment

These would be useful to set. Particularly for me filename/title, as it affects what others see.

enhancement

Most helpful comment

@guyfedwards: I think the most fitting would be to use hyphen-options (-filename <filename>) with quotes around the argument if it contains spaces. Multiple commands use hyphen-options to provide optional arguments, e.g. /print -buffer <some_buffer> text. Not many commands accepts quotes, because most commands don't have arguments which can contain spaces, but /trigger uses quotes for it's arguments, so it fits with that.

So the command could be:

/slack upload [-filename "<filename>"] [-title "<title>"] [-comment "<comment>"] <path>

All 3 comments

I have been looking into adding these, but not sure of the best way to parse the args.
Due to the nature of allowing spaces in file paths, we can't just split the args on spaces so was wondering of a unix style /slack upload <file_path> title=xxx initial_comment=xxx

@trygveaa any thoughts? I am interested in implementing this for my own use but would like to create a more general solution to contribute upstream.

@guyfedwards: I think the most fitting would be to use hyphen-options (-filename <filename>) with quotes around the argument if it contains spaces. Multiple commands use hyphen-options to provide optional arguments, e.g. /print -buffer <some_buffer> text. Not many commands accepts quotes, because most commands don't have arguments which can contain spaces, but /trigger uses quotes for it's arguments, so it fits with that.

So the command could be:

/slack upload [-filename "<filename>"] [-title "<title>"] [-comment "<comment>"] <path>

Is it possible to make the upload work with the clipboard? The use case is to upload an image copied to the clipboard

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JanKoppe picture JanKoppe  路  6Comments

k-dannemand picture k-dannemand  路  3Comments

chreekat picture chreekat  路  7Comments

tedwardd picture tedwardd  路  7Comments

tuananh picture tuananh  路  9Comments