GAS – Sort a Single Column

You can do this with a flick of the wrist when working directly on a sheet, but to use a script to do the same thing is slightly more complicated! Google have decided in their infinite wisdom that if you want to sort a range, a column, you will want to sort the data around it as well. This is not always the case. Very often I have a sheet with columns full of unrelated lists: names, locations, dates, etc., and these often need to be sorted alphabetically, by themselves, in order for functions to work further down the line: match / vlookup / filter / index and so on. A few years ago, the clever people on the Google Docs forum came up with a solution, they said it only worked in G Suite for Work or Education, so you mileage may vary when running this in a standalone google sheet? Continue reading

GAS – Insert new row in Google Sheet using script

Probably not as quick as going Edit > Add Row Above/Below, but provides the starting pointing for extending this little snippet to add content, copy down formulas or “setFormulas” to some of the columns. Useful when working with long lists. This script will add a new row above the existing active cell.

Startup Genymotion from CLI, resize and move it

My OpenGL for my graphics has been broken for a few weeks, and I have been missing using Genymotion for my AppInventor emulator. Finally fixed the graphics (another story) and Genymotion working once again. Would like a working environment on just one desktop, so need to resize the stock setup for Genymotion and move it over to the right. Here is a little bash script that does the lot: Continue reading

Thunar Custom Action – Add Filepath to Clipboard

This should be fairly straight-forward, but it isn’t.

We are going to use xclip as this takes the bash output and makes it available for X applications

There are also two variants depending upon which clipboard (there are 3!) you want

For the SECONDARY clipboard (the one that works with CTRL+C/CTRL+V or Right-Click and Paste)
enter the following in the command box for your custom action:

echo -n %f | xclip -selection c

For the PRIMARY clipboard (the one that only works if you Middle-Click your mouse)
enter the following in the command box for your custom action:

echo -n %f | xclip -i

Grab BBC News Videos with a Bash Script

A colleague asked me the other day if I could download a video clip from the BBC News website so that she could use it in her training course (to save having to load up the website and play it “live” from there!)

I said anything is possible 😉  Took me on a little journey but finally found a way without having to resort to any browser plugins or switching to Windows to download a video grabber program. Decided to write a bash script to pull all the elements together too 🙂 Continue reading

Master Document in Google Drive using Google Apps Script

Word and LibreOffice can do this as a built-in feature but Sharepoint and Google Drive/Docs can’t. Given that Sharepoint is a nightmare to just use (!) I tackled the problem on Google Drive. What we are seeking to achieve is to have a main or master document that pulls in other documents, correctly formatted to make a full document. This is useful when “writing a book”, or creating a Health and Safety file or Employee Handbook. Once again I can’t take all the credit for a lot of the coding, the initial script to pull in formatted data from other documents is due to Henrique Abreu with additional help from Mogsdad and Serge Insas. Continue reading

Automate Printing of Completed Google Form

I need to write this up before I forget what I did!

This is quite complex and draws on several resources. Why do this? Because in my organisation many have not/cannot move to online systems, we do not have the resources (e.g. tablets/laptops), or what we need is not yet written/ready, so whilst we can easily input data with google forms, we still need a paper copy in order to act on the contents and record actions. In addition this gets the data into a digital format we can work with (on the google sheet), making it easier to work with and interrogate later, without having to input it from the paper form. Continue reading

Digital Signage with Google Slides and Chromium in Kiosk Mode

Another solution to digital signage, this time using Google Slides and Chromium (or Chrome) in Kiosk mode.

I am using the base of a linux install (Crunchbang) and Chromium, but the basics transfer across to Chrome and other OS platforms with some tweaking.

Issues:

  • Kiosk Syntax
  • Fullscreen
  • The Google Slides Toolbar or Transport
  • Web Page Presentation
  • Updating the Slides
  • Sharing the Slides
  • Locking Down if keyboard/touchscreen in use

Am grateful for the work done by Mark Pajak at Bristol Museums on setting up Chrome/Chromium in kiosk mode, and to Google Slides users on the google groups forums and good old StackOverflow for other snippets.

As an overview, one needs to publish the google slides presentation, then pull this into an iframe on a web page. Then call chromium in kiosk mode to load that web page. Once the slides are loaded they will not update with new content unless the call to the slides is reset (page reload) so some html/javascript is required to refresh things. This all may seem a little disjointed at first but be patient, i will put it all together at the end with a workflow and example 😉 Continue reading