Because I can’t stop playing with something that already works fine, I’ve continued to tweak my syllabus-generating spreadsheet. With the addition of an external script, I’m able to link directly to a specific cell in the spreadsheet — letting me share a link to my syllabi that takes people not just to the overall document, but to the current day (or the next day that’s closest to the current day) in the syllabus. The script could be used to link to any cell in any published Google Spreadsheet, with the caveat that if there are multiple cells with that match that value, the link will take you to the first appearance of the value in the spreadsheet.
$url = $_REQUEST["url"]; $key = $_REQUEST["key"]; $anchor = $_REQUEST["anchor"]; $html = file_get_contents($url); $output = str_replace($key, "<a name="$anchor"></a>$key", $html); $output = str_replace("href='/", "href='https://docs.google.com/", $output); header("Content-Type: text/html"); echo $output;
This takes a GET URL of the format http://server/script?url=[url]&key=[key]&anchor=[anchor]#[anchor], where…
Nota Bene: You have to add your own link to the anchor — this is a quick, slapped-together connection to my script.
Update: I was sitting here staring at the script, trying to figure out why I hadn’t put the anchor tag around the key, and then I realized what’s going on. The key (on my spreadsheet) is formatted to be white text on a white background (Rothko-style, if you will). If it gets converted to an anchor, its styling is affected and (without more work in the script) it turns blue and underlined. Lame. So… the anchor goes before the key, so the key’s CSS style won’t be affected.
This is why you document your code. Even when it’s short.
Seth Battis October 31st, 2012
Posted In: How To
I came across Rahul Mahtani and Yofred Moik’s conceptual design of a Google Mail Envelope a few days ago and was… instantly captivated. I’m not sure if it’s just the aesthetics of a design on the envelope in general, the way it hearkens back to an old school airmail envelope, or the conceptual neatness of the route between the two addresses. I just know that I love it and I want it.
So, I spent some time making a version of it.
Right now, my implementation is very much hacked together (I was teaching myself the Google Maps API as I went — it’s not hard, but it’s not familiar vocabulary, yet — I have a few other projects that will get me more expert soon, I hope). The things to know are:
More to come as way opens.
Seth Battis April 11th, 2010
Posted In: Computer Science
This post is part of a series that are components of my “Expert Plan” at my school, looking to create a shared resource for my colleagues as the school moves towards greater adoption of laptops and technology in our pedagogy.
This AppleScript application converts any word processing files that Pages can open into PDFs. This application will only work on Macs.
To use this application, drag a icon(s) of a file or group of files on to the icon for the application. When asked, pick which folder you would like to save the PDFs into. As the application runs, if Pages cannnot open a particular file, you will see a message warning you of this. When the application completes, it will display a list of all the files that could not be converted (or simply quit if all of the files were converted).
To install this application, click the link below to download it as a ZIP archive. Double-click the “Convert Word Processing Files to PDFs.zip” icon to expand the ZIP archive and drag the application icon to where you want to use it.
Seth Battis November 22nd, 2009