Get desktop notifications from application - node.js

I've created a NodeJS application which scrapes and parses the contents of a web page at regular intervals, checking if certain things on the web page have been updated since the last time it was parsed. The application runs locally, in the background.
I need the application to be able to provide me with some sort of a notification for when these things are updated. Is there any way that the application can show a tooltip in the Windows tray area, or provide any other sort of notification to me?
The only thing I can find is node-notify (https://github.com/olalonde/node-notify), but that appears to be for Ubuntu. As a last resort, I could have the application run a local web server and update the contents of a page based on whether anything on the scraped web page has been updated, then use something else entirely (e.g. an AutoHotkey script) which checks the page on the local web server to see if anything has changed, and use that to display the tooltips. Obviously, it would be much easier if the application itself could notify me in some way.

There is a node-growl module from visionmedia.
You just need to install Growl and growlnotify manually and then the node module with:
npm install growl
Then, it's as easy as doing:
var growl = require('growl');
growl('Hello World!');
There are more examples (including use of images) on the projects' site.

While Growl is definitely the more visually appealing option, I'd like to propose Notifu as an alternative for future readers of this question.
Fair warning: it has not been updated since Feb 2010, but still...
It does still work on Win7.
It does not require any additional software to be installed on the computer.
It can be packaged with the Node.js app.
Can be easily integrated using any of the numerous Node modules for running system commands.

Related

Buildfire: Debugging on IOS Test Flight

I can't seem to figure out why my plugin works fine on the Web App mode, versus the IOS Test Flight.
It seems like an angularjs dependency is not loading correctly, but I have no way of knowing.
Not sure what your app/plugin situation is precisely. However, a good place to start would be here https://github.com/BuildFire/sdk/wiki/App-Developer-Mode this will allow you to test your code live on the device without publishing. It hijacks the plugin and loads your localhost version so that you can test on the fly changes.
Also, you may want to try shipping logs with http://debug.buildfire.com this will allow you to read console logs remotely

Is it possible to execute local .exe´s from angular application running in browser?

We are about to start a new project which should be like a desktop app but still run inside a browser for creating items in a system. After these items are created, an .EXE file on the LOCAL machine must be called to do some code generation. Is this possible if using Angular to develop the application or do we need third party libs for executing local .exe's?
No, this is not possible out of the box. Browsers make very sure that local executables cannot be started. You would have to look for other solutions.
One possible idea, depending on how much effort you want to invest, would be to compile the WebKit engine yourself, i.e., create a binary "wrapper" which runs the browser engine itself. Then you are free to extend it in whatever fashion you need, including adding the possibility to start local .exe's (or if those .exe's are your own applications, you could compile them right into your WebKit wrapper).

How can I run a Chrome extension in NW.js?

This question is pretty short and self explanatory. I'm wondering how I can run my Chrome extension in NW.js.
I know you can run an app in NW.js and I think you can run extensions as well?
I can't find much on the topic. Back in 2013 the way to do it seemed to be:
nw [path to manifest.json] --load-extension
Any ideas are appreciated!
Yes you can.
First off, download the extension you want. For this example I'll be using this debugging tool, which adds an additional tab in the dev tools window.
Inside your NW.js package.json file, ensure you have an entry called chromium-args.
Ensure its value contains --enable-extensions --load-extension=relative_path_to_extension_manifest.
My package.json looks like this:
After restarting the application, the extension shows up as expected:
Something I'll add is that the full Chrome API might not be available to you. I couldn't find info about what NW.js supports, but Electron definitely does not support the entire API, so this might have similar restrictions.
I also noticed you mention in the comments that you need to assign a hotkey of sorts. I'd need to know what you were trying to do, but essentially you have the option of either using a browser mechanism such as addEventListener('keydown', myHandler) or using the NW.js API depending on your exact needs.

How to automatically update a deployed Node JS Electron program

I think the title should be quite self-explanatory. I am developing a Node JS app using Atom Electron. What I would need is a way to deploy my application in a cross-platform way (Mac OS X, Windows and Linux), while making it capable of automatically updating itself, without having to ask for administration privileges.
Here is what I would like to happen:
The application gets installed by my users, possibly via an easy-to-use installer.
I keep developing my app, adding new features, and so on.
At some point, I release a new version of my code, I pack it somehow and upload it somewhere.
All the clients that are currently online, or whenever a client gets back online, they download the new version, install it, and restart automatically, without having to ask for administration privileges.
As far as I know, there are apps that are capable of doing such a thing. For example, Google Chrome automatically installs updates without having to continuously ask for administrative privileges or, even worse, making its users download new installers all the time.
Is there an elegant and cross platform way to do such a thing? What would be the best solution for my problem?
If this is matters in any way, let me add that my project is completely open source, so I don't care about protecting my code in any way from being read.

Spotify apps dead after update?

I was developing a Spotify apps and all of the sudden Spotify restarted and updated.
Yey, great.. I got version 0.8.3.222.g317ab79d... however typing spotify:app:the_app_name doesnt work anymore. I get metadataFailed, sorry I could not find this app.
Anyone knows where I can find a downgrade?
Spotify 0.8.3 changed the app lookup slightly. The URI for getting at apps in development is now spotify:app:application-identifier-in-manifest.
This changes the behaviour in old versions, which used the application's directory name to load applications. It's also worth noting that your application must have a valid identifier and version in its manifest.json file. Remember to restart the client when changing your manifest so it notices the changes!
The keys you need to set are BundleIdentifier (which will be used to find the app) and BundleVersion. Documentation on the keys can be found here.
When you check spotify.com you can see there is a be right back message this indicated either server or application failures just hold for a few minutes/hours and return to developing after message is gone.

Resources