chrisfsampaio / imsg Goto Github PK
View Code? Open in Web Editor NEWChat using iMessage from your terminal!
License: MIT License
Chat using iMessage from your terminal!
License: MIT License
Special characters like ö, ç or ğ unfortunately don't go through, even not with escaping.
Improve documentation related to characters that need to be escaped (single quotes, parenthesis, etc) so users don't just see an EOF alert
With many chats, you see the most recently used chats are at the top of the list. For example, the my most recently used conversation that I see on the "choose a conversation" screen is about 2 months old.
Alas--this build seems to fail, at least with 2.0.0.
/Users/me/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- _aem/mactypes (LoadError)
from /Users/me/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/me/.rvm/gems/ruby-2.0.0-p0/gems/rb-appscript-0.6.1/lib/appscript.rb:8:in `<top (required)>'
from /Users/me/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/me/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/me/.rvm/gems/ruby-2.0.0-p0/gems/imsg-0.0.2/lib/imsg.rb:3:in `<top (required)>'
from /Users/me/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/me/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/me/.rvm/gems/ruby-2.0.0-p0/gems/imsg-0.0.2/bin/imsg:2:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-2.0.0-p0/bin/imsg:23:in `load'
from /Users/me/.rvm/gems/ruby-2.0.0-p0/bin/imsg:23:in `<main>'
from /Users/me/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/me/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
imsg '"test1"'
37:43: syntax error: A identifier can’t go after this “"”. (-2740)
imsg "I'm testing"
sh: -c: line 0: unexpected EOF while looking for matching `"'
Being able to send iMessages from the terminal is awesome, but when someone iMessage's me, I either have to see it and read it while its a growl message so if I miss it I still need to open iMessage.app. Anyway to read the latest unread iMessages from imsg
?
Include documentation on how to use this tool. It's not clear from the landing page how to use it.
Use the last recipient as default when no one is chosen.
This would be so awesome.
On Ubuntu 13.10 I tried ruby v1.8, v1.9, v2.1 for installing imsg using gem install imsg and it failed on all giving a common error msg.
Building native extensions. This could take a while...
ERROR: Error installing imsg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
create /var/lib/gems/1.8/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /var/lib/gems/1.8/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile
make
Makefile:184: warning: overriding commands for target `/var/lib/gems/1.8/gems/rb-appscript-0.6.1/lib'
Makefile:182: warning: ignoring old commands for target `/var/lib/gems/1.8/gems/rb-appscript-0.6.1/lib'
gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/1.8/x86_64-linux -Isrc -D_FORTIFY_SOURCE=2 -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-optimize-sibling-calls -fno-tree-dce -fno-strict-aliasing -g -g -O2 -fPIC -Wall -c src/SendThreadSafe.c
In file included from src/SendThreadSafe.c:75:0:
src/SendThreadSafe.h:73:53: fatal error: ApplicationServices/ApplicationServices.h: No such file or directory
#include <ApplicationServices/ApplicationServices.h>
^
compilation terminated.
make: *** [SendThreadSafe.o] Error 1
I am very new to Ruby. But I did some googling and found that rb-appscript is a gem that is supposed to be compatible only with MAC OSX. I might be wrong but still please can you look at the error and tell me if there's anything to be fixed ?
It would be good to be able to message yourself using imsg. That way you could write scripts, that used imsg, to notify you when they are complete etc.
please release for 2.4.1
Hi Chris!
I’d really like to try your imsg, but ran in a lot of trouble while installing it. So, I let it be ;-(
Maybe the out put helps you to improve your software.
Greetz,
P
System:
Macbook Pro
OS X Mavericks
Ruby 2.0.0p247
Building native extensions. This could take a while...
ERROR: Error installing imsg:
ERROR: Failed to build gem native extension.
/Users/PDXIII/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
extconf.rb:44:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:44:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
create /Users/PDXIII/.rvm/gems/ruby-2.0.0-p247/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /Users/PDXIII/.rvm/gems/ruby-2.0.0-p247/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile
make "DESTDIR="
compiling src/rbae.c
src/rbae.c:501:8: warning: 'FSRefMakePath' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
err = FSRefMakePath(&outAppRef, path, PATH_MAX);
^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:4086:18: note: 'FSRefMakePath' declared here
extern OSStatus FSRefMakePath(const FSRef *ref, UInt8 *path, UInt32 pathBufferSize) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
^
src/rbae.c:514:8: warning: 'FSPathMakeRef' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
err = FSPathMakeRef((UInt8 *)StringValuePtr(path), &appRef, NULL);
^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:4115:18: note: 'FSPathMakeRef' declared here
extern OSStatus FSPathMakeRef(const UInt8 *path, FSRef *ref, Boolean *isDirectory) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
^
src/rbae.c:517:9: warning: 'GetNextProcess' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
err = GetNextProcess(&psn);
^
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:452:1: note: 'GetNextProcess' declared here
GetNextProcess(ProcessSerialNumber * PSN) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9;
^
src/rbae.c:519:9: warning: 'GetProcessBundleLocation' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
err = GetProcessBundleLocation(&psn, &foundRef);
^
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:815:1: note: 'GetProcessBundleLocation' declared here
GetProcessBundleLocation(
^
src/rbae.c:521:7: warning: 'FSCompareFSRefs' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
if (FSCompareFSRefs(&appRef, &foundRef) == noErr)
^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:1850:15: note: 'FSCompareFSRefs' declared here
extern OSErr FSCompareFSRefs(const FSRef *ref1, const FSRef *ref2) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
^
src/rbae.c:533:8: warning: 'GetProcessForPID' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
err = GetProcessForPID(NUM2INT(pid), &psn);
^
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:930:1: note: 'GetProcessForPID' declared here
GetProcessForPID(
^
src/rbae.c:546:8: warning: 'FSPathMakeRef' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
err = FSPathMakeRef((UInt8 *)StringValuePtr(path), &appRef, NULL);
^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:4115:18: note: 'FSPathMakeRef' declared here
extern OSStatus FSPathMakeRef(const UInt8 *path, FSRef *ref, Boolean *isDirectory) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
^
src/rbae.c:709:8: warning: 'FSPathMakeRef' is deprecated: first deprecated in OS X 10.8 [-Wdeprecated-declarations]
err = FSPathMakeRef((UInt8 *)StringValuePtr(path), &fsRef, NULL);
^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:4115:18: note: 'FSPathMakeRef' declared here
extern OSStatus FSPathMakeRef(const UInt8 *path, FSRef *ref, Boolean *isDirectory) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
^
8 warnings generated.
compiling src/SendThreadSafe.c
src/SendThreadSafe.c:362:15: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
if (sendMode && kAEWaitReply) {
^ ~~~~~~~~~~~~
src/SendThreadSafe.c:362:15: note: use '&' for a bitwise operation
if (sendMode && kAEWaitReply) {
^~
&
src/SendThreadSafe.c:362:15: note: remove constant to silence this warning
if (sendMode && kAEWaitReply) {
~^~~~~~~~~~~~~~~
1 warning generated.
linking shared-object ae.bundle
ld: warning: directory not found for option '-L/Users/mpapis/.sm/pkg/active/lib'
ld: framework not found Carbon
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ae.bundle] Error 1
Gem files will remain installed in /Users/PDXIII/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rb-appscript-0.6.1 for inspection.
Results logged to /Users/PDXIII/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rb-appscript-0.6.1/./gem_make.out
Provide an example of how to send a specific message to a specific number in one line.
Currently you can write imsg hello
and then type in a number. I want to do it in one step i.e. imsg 1 hello
Tried:
∴ imsg -h
∴ imsg --help
∴ sudo su
∴ imsg
∴ imsg -h
∴ imsg "Hello"
∴ imsg "Hello"
∴ imsg -vvv
∴ imsg --verbose "Hello"
∴ imsg WTF
∴
What am I doing wrong?
Running OSX 10.8.4
I'd like to see significantly more info in the readme about how this works behind the scenes.
Terminal won't send emoji trough to iMessage.
Having the abillity to send a messag ealready passing the user number would be nice:
imsg Hello There! -u 2
or just
imsg 2 Hello There!
$ sudo gem install imsg
Fetching: rb-appscript-0.6.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing imsg:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/rb-appscript-0.6.1
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190224-45868-sj77rw.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME)
extconf.rb:44:in `<main>': uninitialized constant Config (NameError)
Did you mean? RbConfig
CONFIG
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/rb-appscript-0.6.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/rb-appscript-0.6.1/gem_make.out
!1
****
I just followed the instructions to install the gem and found that the version installed is 0.0.7 via gem list
. I see on the repo that the latest tagged version is 0.0.6.
What did I just install?
I ask, specifically, because it seems that I have the overflowing color problem that seems to have been fixed with #29.
If you hit Control+C then it blows chunks all over the terminal (before closing, as expected).
^C/Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/lib/imsg.rb:42:in `gets': Interrupt
from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/lib/imsg.rb:42:in `gets'
from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/lib/imsg.rb:42:in `<top (required)>'
from /Users/rseys/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/rseys/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/gems/imsg-0.0.2/bin/imsg:2:in `<top (required)>'
from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/bin/imsg:23:in `load'
from /Users/rseys/.rvm/gems/ruby-1.9.3-p448/bin/imsg:23:in `<main>'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.