Set instant messenger display message programmatically - scripting

Would a script that sets display messages for instant messengers be simple or complex? After some searching, there doesn't seem to be any information about this at all.
For the sake of an example, if I had a text file of quotations, would it be possible to have the google talk display message change to a different quotation hourly?

Depends on which client you're using. As far as I know, Google's client doesn't offer any interface for plugins, but the open source instant messenger Pidgin does. I think there already is a plugin for what you want to do, but you can write your own using the documentation and examples they give you.
The complexity of writing something like this is based on how much C or Perl you know, since you can program in either of those for Pidgin. Reading code from other people's plugins, you should be able to figure out the Pidgin API.

You can use Kik API to programmatically send rich content and files between mobile applications. It is available for iPhone and Android platforms and takes only about 5 lines of code to integrate into your app. There is more info at the API website: http://www.kik.com/dev
Disclaimer: I'm on of the developers behind Kik API :)

Related

google home reading from website

I'm currently working on a project where my main focus is to create an Action for Google Home which can be invoked and asked to read out some articles (chosen previously from a list, also by voice) from a particular website.
I was wondering if it was possible, or if it were already some similar projects.
What I'd like to do is something like the feature in Pocket or instapaper, where you can make the device read the article for you.
I also thought to make something like a database with all the articles I'm interested in, which auto-updates itself whenever a new article is posted, but my main concern now is to be able to separate the articles in various lists, parse the article and in the end implement text to speech into the Action.
Also some implementations with 3rd party services and apps would be useful.
Please ask me if anything isn't exactly clear, english is not my first language.
Yes, this is possible. Not necessarily easy, but possible.
First - there is nothing in the Actions on Google library or in Google Home that will automatically scrape a website. That will be up to you.
Second - Responses from your Action are limited in how much they can send at a time.
If you're having it do text-to-speech, you're limited to two "text bubbles" of 640 characters each before the user has to reply. You should keep well below that and should probably stick to just one "text bubble".
If you're playing an audio cut, then you're limited to two minutes.
You can work around both of these limitations by using the Media Response. With TTS, you would play a portion of the text, a brief Media response, at the conclusion of which, your server would be triggered to send the next chunk of text. If it is all recorded, you can just send the longer audio as the Media.
Be advised, however, that if you're using the inline editor or using Firebase Cloud Functions (which the inline editor uses), that by default you're not able to access most sites outside Google's network. You need to upgrade to a paid plan to do so. I suggest the Blaze plan which is pay-as-you-go, but includes a free tier which is typically good enough for development work and light production usage.

How to fetch POP3/SMTP email using Cordova

I'm new to mobile development and have been looking for a way to retrieve basic email information from simple POP3/SMTP email servers.
I've seen many posts on how to send email using numerous Cordova plugins, etc., but I'm simply trying to retrieve email information for various listing and analysis purposes.
Is this even possible?
Thanks for the help and suggestions on where to start.
Cordova does not have built-in functionality for POP3/SMTP access. As inside your codova app you are running in the javascript/webview sandbox, you don't have socket access, so you can't implement this kind of functionality there.
This leaves you no choice but to implement a Cordova Plugin. You are in Objective-C land now, but unfortunately there aren't any convenient classes in the standard framework for accessing POP3/SMTP. Your best bet is using a library like MailCore.
Details on how to implement a Cordova Plugin (as well as passing the relevant email data from and to your javascript layer) are outside the scope of a simple StackOverflow answer, but the process is (fortunately) well documented.

Google Analytics for Mac OSx application

Is it possible to use Google Analytics API's to track Mac OSX applications?
If not could any one suggest me an alternative for Google Analytics.
Google Analytics is designed to work with web applications not for desktop apps. Although it might be possible to collect info about your application and send it to your Google Analytic account but the amount of work required to retrofit might be better spent, building your own Analytic solution.
A good starting point would be to create a simple web service, which collects information regarding clicks. Then rewrite your application to call that web service on every click within your application.
You would ideally want to store this information locally and submit it to the web service in batches. You would also want to design the application, so that if you ever shut down the web service, the application would still be able to operate.
UPDATE: As pointed out in the comments by Václav Slavík, they have added apps analytics for iOS/Android.
I made a simple set of classes for doing this:
https://github.com/stephenlind/SimpleCocoaGoogleAnalytics
Google Analytics is not only for web applications, but also for mobile. It's available on the platform like android, iOS, etc. If you want to track your MAC OS X application, you can choose DeskAppTrack or DeskMetrics. DeskAppTrack is only available on MAC. It provide a professional data statistical analysis and it's free. While DeskMetrics is available on MAC and Windows. Either one is ok.
This really depends on how detailed you want to get. If you are are truly looking for analytics with detail and control flow data, you are better suited to created your own web service, as mentioned.
However, if you simply want to know a small number of operations, that occur at a small volume, i.e. when the app is launched (a quick and dirty solution): then in theory you could create a landing page on your site that contains a minimal head section, and a blank body, and then load the URL with an NSURL when you want to trigger the action.
Of course, you would have to include the google analytics tracking codes in the header, and you may need to load an off-screen webview to get the javascript to run. Like I said, quick and dirty.
In either case, you want to make sure the application will continue to perform properly, even if the web service / page is not present.

I want to build a web service that sends articles to my Kindle

Where do I start?
Is there some sort of API - or something I can get access to that allows me to format articles and send them to my kindle?
I would like to do this in Rails.
Edit: For further clarity, I guess my real question is, how does instapaper.com get articles from the web to my kindle? Can someone explain the technology behind that please and do they have access to the Kindle SDK?
Take a look at Calibre (http://calibre-ebook.com/), runs on Linux, Win and OS X. Python based, has a GUI and a command line, suitable for automation. You can do all kind of conversions to .mobi format as well as fetching news from website and packing it to .mobi, which can be then transferred via USB or sent to kindle email address. It's very simple to fetch & send articles automatically either on a server system with cron or leaving it running on desktop (with GUI) for non-technical users.
Calibre's command line tools are your best bet: http://calibre-ebook.com/user_manual/cli/ebook-convert.html is the call you would most likely be interested in.
I believe all Instapaper does is convert to .mobi format, and then send mail (with the .mobi file attached) to your specified Kindle email address (eg. foo#kindle.com).
If you're more interested in specifics, Marco (Instapaper's author) tends to be very forthcoming when people ask him technical questions. His Twitter account is #marcoarment.
Check out this ruby gem, it seems to do what you want:
https://github.com/29decibel/kindler

How to interact with the Panoramio API using services?

I'm writing a location base client and would love to integrate Panoramio with my client, now the problem is that I can't find a way to interact with the Panoramio using a ~REST-like service.
I know they do have an API but it's mostly for embedding the content into a website and not as to interact thru me code (at least from documentation)
Have any of you hacked a way thru this?
I am writing the clients natively for android and iphone in case you are wondering.
cheers,
G.
well it seems like the answer came a bit fast... and although this is easily accessible thru their website it is discussed in their forum and even google has posted about it in their geo developer blog
a sample request to get images from a bounding box will go along the lines of the following example:
http://www.panoramio.com/map/get_panoramas.php?order=popularity&set=public&from=0&to=10&minx=-124.29382324218749&miny=36.089060460282006&maxx=-119.8773193359375&maxy=38.724090458956965&callback=MyCallback
Update: I have found also the official page to their data api.
hope it helps!