chrisfsampaio / imsg

Chat using iMessage from your terminal!
MIT License
693 stars 51 forks source link

Implemented Thor #24

Closed jwarykowski closed 10 years ago

jwarykowski commented 10 years ago

Hi Christian,

Thought this was a great little project and thought it could benefit from using Thor! Let me know what you think, no worries if this doesn't get merged as it's all in my own fork and has been a good learning experience. Please see my updates listed below. Give me a shout if you have any questions.

I think my changes can be extended and further modularised. I wanted to do additional work to check whether a buddy or chat exists etc but thought I would put this initial PR in first.

chrisfsampaio commented 10 years ago

Hello Jonathan! Your pull request covers one of my open issues (send message with one line, list available chats). I really appreciate your work on this! :+1: However, the whole thing about imsg is how handy it is, if you're on your terminal screen and need to quickly answer someone, you should be able to do this as fast as possible. I don't want to be picky, but I'm afraid that using subcommands might decrease the usability of imsg. Maybe I'm wrong, and subcommands is the way to go. But I'd like to give it a little more thought before making a decision. I'll keep that open for now in case someone else wants to chime in. What do you think?

jwarykowski commented 10 years ago

Hi Christian, No problems, I though this might be the case. No worries however as it's been cool to play with the project over the weekend and I still have my own fork to add additional functionality etc. I recommend using editorconfig however, you can find out more information here: http://editorconfig.org/

chrisfsampaio commented 10 years ago

I'll definitely take a look at editorconfig! I'm glad you had fun with the project! :smile:

chrisfsampaio commented 10 years ago

Closing the issue... Nobody chimed in :-1: :-(

jwarykowski commented 10 years ago

No worries, looks like I'll push this implementation on solo :(

skela commented 10 years ago

Does it count if I wanted to chime in yesterday? I had the comment written and everything :(

Basically, I think jonathan's work here works really well, adds a lot of stuff that's needed to run this thing in bash scripts etc.

My suggestion is that if you use imsg parameterless, it would go into interactive mode, and then could work the same way chris prefers. Alternatively add some logic so that imgs "Hi this is my message" works the same way as it does in Chris' version.

Most ideal scenario: imsg "hello from the terminal" -b 'Christian Sampaio' => Sends the message directly to Christian without any form of interaction imsg "hello from the terminal" => Prints out a chat list and sends the message after you choose a number from that chat list

imsg message ... is a bit annoying :(

Jonathan, if I wanted to use your stuff instead of Chris', how do I do it? I'm not too familiar with ruby and gems. (I installed Chris' version via gem install imsg).

jwarykowski commented 10 years ago

Hi @skela,

Thanks for your feedback. There is a way to send any input to a default command in Thor e.g. imsg "testing message" instead of imsg message "testing this works". I'll see if I can add this tonight.

In regards to using this version of the project I would need to hear back from Christian on whether we would to reopen this PR and merge my new changes. in If not, I can create a new version of the project and create a different version of the gem, note that it would need a different gem name.

I would rather not create a new project and version of the gem but if Christian wants to take the project in a different direction thats his choice.

I'll wait to hear back from him first before I do anything.

skela commented 10 years ago

Ok excellent! :)

Chris, what do you think? If Jonathan makes his proposed change, would you accept these changes? Jonathan's change will enable you to keep using your script the way you intended, as far as I can tell anyway, and yet, it enables all of us who want to use this for various bash / alert purposes :+1: :computer:

chrisfsampaio commented 10 years ago

That would be perfect! :smiley: The perfect scenario would be a new pull request based on the current state of the project, since some stuff has changed since this pull request was created.

Just one question, would Thor make it possible to send a message without quotes (we have that currently), like in:

imsg my message without quotes

That would super ultra awesome! (:

Thanks @jonathanchrisp for your efforts on this! :+1: :smiley:

chrisfsampaio commented 10 years ago

BTW, sorry for the late response, I think we have some timezone issues :sweat_smile:

jwarykowski commented 10 years ago

Hey Christian, I'm currently in Australia so that would explain it :), I'll need to look into whether Thor can implement the functionality. I will hopefully get time to do this tonight. I'll let you know.

jwarykowski commented 10 years ago

Hi Christian, I haven't been able to look at this tonight and I'm on a three week holiday from Saturday so I might not get chance to do this as of yet. I can look at this when I get back if your happy to wait.

chrisfsampaio commented 10 years ago

Take your time Jonathan, no hurry, you're collaborating! :]

Enjoy your holiday! :]

On Thu, Feb 20, 2014 at 7:55 AM, Jonathan Chrisp notifications@github.comwrote:

Hi Christian, I haven't been able to look at this tonight and I'm on a three week holiday from Saturday so I might not get chance to do this as of yet. I can look at this when I get back if your happy to wait.

Reply to this email directly or view it on GitHubhttps://github.com/chrisfsampaio/imsg/pull/24#issuecomment-35608985 .

Att,

Christian