Dashboards, API’s and YQL

I’ve been working on some ideas for dashboards using API’s and Yahoo Query Language and I have a proof of concept below of the kind of thing you can do with an API and a little ingenuity.

Screenshot_2014-04-02-10-34-52

Screenshot_2014-04-02-10-34-00

This is an example pulling from one YQL query for the first 3 headlines from Google News, and the API for the tool I use for monitoring my library websites.

The  app this is built on is Minimalistic Text,  one of my favorite apps for creating custom information displays on Android devices.

The app used to program and parse the YQL  and the API XML is Tasker

I am pulling the News content from YQL using this query

select title from rss where url="https://news.google.com/news/feeds?pz=1&cf=all&ned=us&hl=en&output=rss"

That gives me this XML response

I’m using UptimeRobot and it’s API for monitoring all my critical patron-facing systems

One Tasker profile checks the two XML files every 1/2 hour and splits the content into a set of variables. Those variables are passed on to Minimalistic Text and displayed in this widget on my Android homescreen.

When a connection failure is detected by UptimeRobot,  the ‘Catalog Up’ section highlights in red.

I’ll expand on how this is accomplished in Tasker later.

 

 

Excluding internal IP’s from EZproxy Authentication

I’ve noticed that this is somewhat unclear in the EZproxy documentation

ExcludeIP is a very cool function available in configuring your config.txt exproxy file that allows you to automatically bounce internal users to the database without going through EZproxy authentication.

If your local IT department has a specific range, use theirs. But if they are unresponsive when you ask about the internal range of IP addresses, the international standards are a good place to start

These three sets of ExcludeIP directives should cover all of your internal users.

ExcludeIP 10.0.0.0-10.255.255.255
ExcludeIP 172.16.0.0-172.31.255.255
ExcludeIP 192.168.0.0-192.168.255.255

ExcludeIP directives got at the end of your config.txt file.

ISBN Title Lookup Google Doc Spreadsheet

We needed to do a quick inventory of some discarded books, and while we could pull the majority of the information from our catalog, we have some donations and other books we had no quick method of getting title data.

We’ll scan the barcodes in using a barcode scanner

This uses the ISBNdb API and a quick bit of importXML

There is a 25 ISBN/day limit on this API key for testing. Google limits importXML to 50/sheet. Please get your own ISBNdb account to implement this.

https://isbndb.com/

Here’s the bit of code for the spreadsheet. Copy the example here

=importXML( concatenate( "http://isbndb.com/api/v2/xml/EV31C4LJ/books?q=", A2), "//title")

=importXML( – grabs the XML response from the ISBNdb API

concatenate( – assembles the API call URL

http://isbndb.com/api/v2/xml/EV31C4LJ/books?q= – initial APIcall string. Specifies v2 API, XML response, key and the source we’re pulling from (books)

A2 – The cell from which we’re pulling the ISBN from

“//title” – The section of the XML response that we want to put in the cell, in this case the title of the book.

Alpha Release: An EZProxy Bookmarklet

When at a journal or ebook, this bookmarklet will create a proxied link in a highlighted, popover window that you can add to a bookmark or link. The first link is a standard link that can be dragged to the desktop or bookmark bar in Windows or Mac computers. Android supports bookmarking to the homescreen The textarea contains the full link, making it much easier to create proxied bookmarks in Mobile Safari.

5-16-2013 8-35-27 AM

This project is based on the generic server-side Javascript bookmarklet described here

If you would like to try out my custom bookmarklet go here and drag the bookmarklet to your toolbar.

Here’s the bookmarklet code

javascript:javascript:var i,s,ss=['https://googledrive.com/host/0Bz8u5aAPKuh1cVZYTDZOSG41ZlE/ebk_srvrside2.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);

You can take a look at the server-side javascript hosted in my Google Drive

Link to Javascript

To try it out with your institution’s proxy server, download the code here, and just replace the var proxyURL = ""; with your institutions proxy URL.

Here are some of my development plans for this bookmarklet.

1) Better CSS styling, both more consistent cross-browser and better look & feel
2) Streamlining the javascript (It’s currently very, very clumsy)
3) Cleaning up the whitelisting
4) Re-writing URL’s that have been proxied by Hostname and/or by Port to create a link that will work under any circumstances.

Creative Commons License
Early Beta: An EZProxy Bookmarklet by Brett Williams is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

CSS Code for Hiding LibGuides Elements

This is CSS code for hiding the majority of LibGuides elements on a page, useful for creating library websites in LibGuides. This code does not hide tabs.

*WARNING* This code hides the Admin Sign In link *WARNING*

If you don’t understand this CSS from the beginning, build it one element at a time so you understand what it does. There are more efficient ways to block whole sections of the LibGuides interface, but a piece by piece method works better for my unique circumstances.

.lastupdate, .guideurl, .lgsearch, .printguideurl, .emailalertlink{
display:none;
}
#bc_library_home, #bc_libguides_home, #bc_guide_name, #breadcrumbsr, #lastupdate, #guide_header_title, #guide_tab_title_bar, #guide_tab_title_bar_page_name, #guide_tab_title_bar_page_comments, #guide_tab_title_bar_page_print{
display:none;
}

This was built with the help of the help page from Springshare. Check out your own libguides page with Chrome Developer Tools to make sure you get it right.

http://help.springshare.com/content.php?pid=28624&sid=218728

Bookbox Update – Pictures

I did an update to my BookBox project, adding additional storage in the form of a rescued 320 GB harddrive from my old media center computer. This was a simple matter of formatting, copying the ebooks and mounting the new drive on the /books folder that I used in the earlier form of the project.

This project has proved extremely robust, running 24/7 for two years.

20130214_200410 - Labels

 

Bookbox HTML Bookbox Landing

 

 

Quick and dirty Android to anything (Including IOS) notifications

Prowl is a Growl compatible notification client/server for IOS that comes with its own API that is very easy for beginners to use

I used Tasker and Prowl to roll my own notification master system

In Tasker, Net > HTTP Post

This is the base URL string

https://api.prowlapp.com/publicapi/add?

Then in the data section of the Tasker HTTP Post action

apikey=[Prowl API key]
application=[User Variable]
event=[User Variable]
description=[User Variable]

I use this to send both SMS and Call notifications from my Android profile to my iPad.

Crosspost from Quora

https://www.quora.com/Brett-Williams/Posts/Quick-and-dirty-Android-to-anything-Including-IOS-notifications

Follow

Get every new post delivered to your Inbox.

Join 180 other followers