Skip to main content

Posts

Showing posts from August, 2015

Google script to generate expense spreadsheet in Google Sheets

Google has started scripting support for all its products. So Google docs now support scripting which will allow end users to automate routine tasks. Google Scripts is a Javascript cloud scripting language (as opposed to Javascript being client-side only) which can make life easier for most of us (Or at least the tech-savvy ones). But if you are not a programmer, don't despair -- this tutorial does not assume coding experience but the ability to copy and paste in the right places. Now all Google products support scripting and this includes Google Maps. So for example, if you want to write a script which will import the restaurant data from Google Maps, then make it into a list in Google Sheets, and then sort the list by distance from home and email that list to colleagues, it is now possible to achieve all of this due to the support of Google Scripts. This means that now many things can be automated and the end result is an increased level of productivity. Let's say, we ha

Convert a batch of scans into a djvu file

To convert a batch of image files (scans) into a single djvu document we first need to convert those files into pbm format first. Then convert each pbm file into a djvu document and then finally merge those multiple djvu into a single djvu document. But for those conversions we need Imagemagick (for convert ) sudo apt-get install imagemagick --fix-missing And we would need the djvulibre toolbox also sudo apt-get install djvulibre* After these softwares are installed we are ready to run the following script. This script will convert all jpg images into pbm and then to djvu and finally merge them into one single djvu file. I have assumed that the scans are in jpeg format. For tiff files replace  the TYPE with tif. Or you can call the script with the command line option of the file type. Just replace "jpg" by $1 in the script below. #!/bin/bash TYPE = "jpg" for x in *. $TYPE do y = ` basename $x . $TYPE ` convert $y . $TYPE $y .pbm cjb2 -