Canton Public Library - CPL Tech The goings-on, innovations, and musings of the library's IT department. en-US MeLCat Server Down Time October 25 The <a href="">MeLCat server</a> is currently down, and MeL is working to resolve the problem. This means that you will not be able to search MeLCat, place new requests, or renew items on MeLCat. We apologize for any inconvenience, and will update this message when MeLCat is back up and running.<br /><div><br /><div><strong>Update</strong>: <span style="line-height:1.22;">MeLCat is back up and running. </span><span style="line-height:1.22;">Thank you for your patience.</span></div><p class="MsoPlainText"></p><p></p></div> Kids Teens Adults Database CPL Tech Fri, 25 Oct 2013 15:04:44 +0000 beesleya 66408 at MeLCat Server Scheduled Down Time July 24 The <a href="">MeLCat server</a> will be down Wednesday, July 24 beginning at 1:00 PM to perform a software upgrade. This upgrade should take approximately two hours and will mean that you will not be able to search MeLCat, place new requests or renew items on MeLCat. We apologize for any inconvenience. Kids Teens Adults Database CPL Tech Tue, 23 Jul 2013 18:52:28 +0000 goldenl 63380 at Library ROI Calculator <p>On our <a href="/donate">Donate page</a> you can calculate the approximate value you've received from CPL in the last year. This calculator is similar to <a href="">those used at other libraries</a>, with a few important differences.</p> <h3>Calculating Books and DVDs</h3> <p>Most library use calculators have you put in the number of books (or DVDs) that you checked out in some period of time. The value per book tends to range from $15 to over $25. That cost reflects the average cost of buying a book, not the average value of checking out a book.</p> <p>Instead, we simply have checkboxes. If you checked out a book in the last year, you check a box. Same for DVDs. The checkbox reflects the annual cost of Netflix (and similar services for books, which exist but tend not to last). In any year, you could use Netflix to borrow a virtually-unlimited number of DVDs; the same as in the library. This more-accurately reflects the actual value you derive from using the library.</p> <h3>Behind the Scenes</h3> <p>Our calculator is a slightly-tweaked version of our open source <a href="">library-roi-calc project</a>. The project lives on github and can be cloned, forked, modified, and used by anyone. If you'd like to contribute to the project, you can <a href="">submit pull requests</a> to update the repository.</p> <p>Technical details are available in the readme, but here are some ways that this project is a technical improvement on previous calculators:</p> <ul><li>Calculator updates as you type</li> <li>HTML5 "number" &lt;input&gt; elements for easy number entry</li> <li>Event listeners to separate content from behavior</li> <li>Ability to have multiple calculators on one page</li> <li>&lt;output&gt; elements and other good HTML semantics</li> <li>Intuitive data- attribute way to store/use calculations</li> <li>Built using the popular jQuery library</li> <li>Inline help text with pure-CSS icons</li> </ul><p>I hope you get good use out of this project. It was a lot of fun to create the calculator, and I'm proud of how it turned out.</p> CPL Tech Fri, 30 Nov 2012 18:48:41 +0000 Brad Czerniak 56099 at Hosting a Digitized Newspaper Collection <p>At CPL we host the <a href="/canton-observer">full run of Canton Observer newspapers</a>. You can browse the issues by date or search the full text.</p> <p>In the past we hosted a few recent years as files, but the current incarnation of the collection is a lot more data — over 3800 issues totaling almost 180 gigabytes. Nearly every aspect of this project was a learning experience, so for other people looking to host tons of big files, here are some useful tips and tricks.</p> <h3>Digitizing</h3> <p>Thanks to our <a href="/friends">Friends</a>, we were able to secure funding to get our paper and microfilm archive scanned to pdf with <a href="">Optical character recognition</a>, making each issue's text searchable.</p> <p>We worked with the vendor to optimize the files so they were easy-to-read and had better OCR success. This is mostly a matter of tweaking the contrast prior to running OCR. Since changing contrast can degrade the visual information of an image irrevocably, it's best to save the original scan as a preservation copy. This can likely be arranged with the vendor.</p> <p>Contrast ratio is extremely important. Cranking up the contrast to a really high level reduces errors for the OCR engine and makes the text more legible, but tends to make any pictures useless. We found a level that generally worked gave the pages a light grey appearance (original scans were medium grey) and only marginally degraded on-page graphics. The text isn't ideal, but it's good enough for the OCR to be mostly accurate.</p> <h3>Storing</h3> <p>With digitization projects you have to worry about both preservation <strong>and</strong> access. In order to ensure that we don't lose our data, we use a multiply-redundant backup scheme.</p> <p>New scans get sent to us from the vendor on a flash drive. We load them onto two different internal servers. Each of those servers is mirrored at a satellite location. If our building were to burn down (but not hit by a tornado since the satellite is across the street), we'd be able to restore from those backups. If one server began corrupting the data, we could use the other server to restore the data. We likewise keep the files on a USB hard drive that's kept in a safe. This isn't so much for planned contingencies, but because we had it and it could come in handy.</p> <p>Geographically-remote offsite storage can often be prohibitively expensive, depending on the size of your storage needs. It's important, though, to have a backup strategy to ensure preservation, so storage planning should be a big part of a digitization project.</p> <h3>Hosting</h3> <p>Fast storage is expensive. Our web server has 15,000-rpm hard drives that can spool up the data stored on them super quickly. This, combined with a bunch of memory reserved for caching, allows us to fulfill most website requests in less than 2 seconds.</p> <p>Super-fast infrastructure isn't always practical, especially for a big collection of 40-megabyte files. Instead, we mount a regular-grade file server with lots of storage to the web server and symbolically link the newspaper directory into the web-hosted filesystem.</p> <p>Before we built out the interface, we made the files navigable using <a href="">Directory Indexes</a>. However, we immediately disabled this ability once the interface was live, as directory indexes can be a real security concern.</p> <h3>Indexing</h3> <p>Indexing the files for building the browse and search interfaces in <a href="">Drupal</a> was a daunting task.</p> <p>We tried attaching the files to the native search index using the <a href="">Search Files module</a>. The test server responded by slowing to a crawl. The culprit was the stock drupal search index; it bloated the database with huge numbers of terms.</p> <p>The next attempt was a pdf-aware crawler for adding the files to an <a href="">Apache Solr</a> index. This would eventually have been the way to build an in-house solution. It was pretty straightforward to install Solr on a dedicated server and <a href="">get it talking to our test Drupal site</a> to build a site search index. Adding the newspaper files to the index using <a href="">Tika</a> (or <a href="">Aperture</a>) proved to be a big drain of development time, though someone with background in Solr could probably pull it off much quicker.</p> <p>Since it was the file format causing grief with indexing, we also tried importing the plain OCRed text into Drupal, disabling the regular search index, and letting Solr crawl the site in the usual way. This tested the limits of Drupal, as the size of the OCR text on a given file was larger than the core database functions could handle.</p> <p>Luckily, a slowdown on our live server led us to discover a good solution. It turns out that since we linked to the directory indexes, Google had started to crawl all the issues. This was a tremendous load on the server, but it led to a complete index.</p> <h3>Browse</h3> <p>With the search index problem out of the way, attaching the 3800+ files to Drupal was a much easier proposition. We just wrote a little module that can recursively scan a directory and attach files to new nodes. It checks Drupal's `files` table to see if the file has been attached before, and adds a node creation operation to the cron <a href="">job queue</a> if it's not in the database yet.</p> <p>The module also parses the filename to set the node's creation date and format the node title all nice. This left us with 3800 nodes with creation dates that match the published dates of the newspaper issues and titles that can be used by <a href="">Views</a> to build out a nice browsing interface.</p> <p>When new issues get delivered (once every 6 months), we can just load the files onto the server and re-scan the directory to add them to the site.</p> <p>This solution is dynamic, which we've found useful for adding new files and tweaking the interface. However, it's pretty straightforward to create a static listing page. For instance, you could use:</p> <code>ls -R &gt; staticlisting.html</code> <p>From there, just run [likely a regex] find/replace to build out the HTML for a nice list.</p> <h3>Search</h3> <p>With the files in Google, we have two search scenarios:</p> <ol><li>People who want to search the Observer specifically</li> <li>People who do a regular Google search and get results from the newspaper</li> </ol><p>For our patrons that want to only search the newspaper, we set up a <a href="">Google Custom Search</a> that essentially performs <a href="">"query"</a> and put a search box on the archive's home page. It works really well.</p> <p>Non-patron searchers using regular-ole Google frequently find interesting query strings in the Canton Observer archive. This information may be helpful for people who didn't even know our archive existed, but more frequently the results are probably just bad hits. It makes <a href="">Google Analytics</a> and <a href="">Google Webmaster Tools</a> more fun to explore.</p> <h3>Other Stuff</h3> <p>A project like this would be inadvisable without your server being connected to the internet via a high-bandwidth connection.</p> <p>If more performance is needed to accommodate future usage, we have a few options available. For one, a faster file server for the access copies is a possibility. A 256 gb SSD would do the trick. On top of that, we could switch from apache to <a href="">nginx</a>, and <a href="">use php as a fastcgi</a>. This would make it so mod_php doesn't load just to serve out files. In a similar vein, we could push the files onto a dedicated server and use redirects to keep the file attachments live.</p> <h3>tl;dr</h3> <p>It took lots of experimentation, but we ended up with a useful tool by using simple Drupal hooks and the good fortune of Google's crawler.</p> CPL Tech Wed, 28 Nov 2012 16:54:55 +0000 Brad Czerniak 56071 at Chrome Theme <a href=""><img src="/sites/default/files/images/3001.png" alt="" /></a> <p><a href="">Install CPL's Chrome theme</a> for an stylish, unobtrusive way to show your support for CPL.</p> <h3>The Project</h3> <p>Like the <a href="/blog/post/firefox-persona">Firefox Persona</a>, the Chrome theme design centered on being unobtrusive and using the space effectively.</p> <p>The <a href="">Chrome theme guide</a> explains the huge number of ways you can customize your theme. This gives a lot more flexibility compared to a Firefox persona, but also makes creating a theme somewhat more difficult and time-consuming.</p> <p>Chrome theme images are left-aligned for the most part, so the putting your most important graphical elements to the left ensures they will appear in your design. Since the "frame" gets obscured as the user opens [tons of] tabs, the real graphical canvas is the "toolbar".</p> <p>The back, forward, and reload buttons appear in the toolbar, so the graphics should be understated enough to keep those buttons usable, with contrast provided by sound color decisions in the manifest. More-distracting graphics can appear in the frame, as they'll disappear as tabs get opened; just be sure to color and tint the tabs so they always have good text contrast.</p> <p>It's important to thoroughly test your theme, including incognito mode. If you have access to multiple platforms (Windows, Mac, Linux, Chromebook), testing them can also be useful. New tab page graphics, for instance, should scale for a huge 27" iMac screen. Button tints can sometimes look different across platforms as well. Also, keep your finished theme installed after you're done; if you don't want to use the finished product, chances are other people won't either.</p> CPL Tech Mon, 26 Nov 2012 18:50:56 +0000 Brad Czerniak 56042 at Firefox Persona <a href=""><img src="/sites/default/files/images/ff-screencap.png" alt="" /></a> <p><a href="">Dress up your Firefox with Canton Public Library</a>! Personas are "easy-to-install, <a href="">easy-to-use themes</a> that change the look of your <a href="">Firefox web browser</a>."</p> <h3>The Project</h3> <a href="/sites/default/files/">Get the project files</a> — for <a href="">Paint.NET</a> <p>Creating a firefox persona is pretty straightforward:</p> <ul><li>Install the <a href="">Personas Plus add-on</a></li> <li><a href="">Create 2 images</a></li> <li>Test it with the add-on</li> <li>Submit it to Mozilla</li> </ul><p>In making and testing a persona, I found some important design considerations. For instance, you really want to pay attention to how the upper-right-hand corner looks. It's usually the only part that's readily-visible; especially once you have more than one tab open. The most upper-right 275h x 65w pixels are the real target for the whole thing.</p> <p>Besides the two images, the other available options are "text color" and "accent color". It's important the text color has sufficient contrast with the background of your images — especially in the header. From a day-to-day usage standpoint, being able to read the titles in your tabs is important.</p> <p>Real-world testing of the persona is important and revealing. 'Busy' graphics might be initially appealing, but they end up just being distracting when used for more than an hour or so. A persona that doesn't distract from browsing is more likely to be retained, so don't go overboard.</p> <p>Text in the header image is also inadvisable. The header is the background to the tabs, so text will likely under-lap the tabs and look ever busier than ornate graphics.</p> <p>A new trend in personas is to have animated images. Don't do this.</p> <p>I ended up starting with a gray gradient and putting graphics on top. This seems to work across platforms and avoids pitfalls relating to distraction and eye strain. The background can be found in the project files above.</p> <p>I hope you find these observations useful. If you make a firefox persona using these tips, link to it in the comments!</p> CPL Tech Wed, 21 Nov 2012 19:15:57 +0000 Brad Czerniak 55991 at Scheduled Downtime <a href="/sites/default/files/images/P1030483.JPG"><img src="/sites/default/files/images/P1030483.preview.JPG" alt="" style="float:right;" /></a>The CPL catalog, databases, patron records, program calendar, and some other services will be <strong>unavailable on Tuesday, September 25th</strong>, from 8:30 AM to Noon while we upgrade our library software.<br /><br /> CPL will remain open and you will be able to check out books, use the computers, and otherwise enjoy the library. Please note:<ul><li>You will need to <strong>have your CPL card with you</strong> in order to check out anything</li> <li>If you return a book during that time, it'll be checked in after Noon</li> <li>We rely on our Catalog for a lot, so there may be lines and delays while it's down</li> </ul> Thank you for your patience as we work to serve you better. Websites CPL Tech Fri, 21 Sep 2012 18:30:17 +0000 Brad Czerniak 55103 at GoodReads Book Link <p><a href=""><img src="/sites/all/themes/zen/cpl/images/gr_logo.gif" alt="GoodReads logo" style="float:right;" /></a>If you you use popular personal book management site <a href="">GoodReads</a>, you can <a href="" class="action-link">Add CPL</a> as a <a href="">book link</a> for quick access to items in our catalog.</p> CPL Tech Wed, 12 Sep 2012 14:00:00 +0000 Brad Czerniak 55993 at Scheduled Downtime <a href="/sites/default/files/images/P1030483.JPG"><img src="/sites/default/files/images/P1030483.preview.JPG" alt="" style="float:right;" /></a> The CPL catalog, databases, program calendar, and some other services will be <strong>unavailable on Tuesday, August 21st</strong>, starting at 11:00 AM. At that time and for up to 24 hours afterward, we will be upgrading the catalog server, requiring downtime.<br /><br /> The library will remain open and you will be able to check out books, use the computers, and otherwise enjoy the library. Please note:<ul><li>You will need to have your CPL card with you in order to check out anything</li> <li>If you return a book on Tuesday, it won't be checked in until Wednesday. This won't cause fines, though</li> <li>We rely on our Catalog for a lot, so there may be lines and delays while it's down</li> <li>Your online Patron Record will also be unavailable during the outage</li> </ul> Thank you for your patience as we work to serve you better. CPL Tech Fri, 17 Aug 2012 12:44:00 +0000 Brad Czerniak 54429 at Chrome Extension 2.0 <a href="/sites/default/files/images/chrome-ext.png"><img src="/sites/default/files/images/chrome-ext.medium.png" alt="" style="float:right;" /></a>If you're like 10% of CPL website visitors, you came here in <a href="">Google Chrome</a>. Chrome is a fast, secure, easy-to-use web browser — and the improved CPL extension is just one more reason to use it. <h4>Books at CPL</h4> As you browse the web, the extension finds books mentioned on each site. For instance, if you're shopping for a book on Amazon, a subtle notification will appear with a direct link to the book in our catalog. This feature stays out of your way (it disappears automatically after 15 seconds) and respects your privacy. <h4>Search Quickly</h4> When you want to search the CPL Catalog, just type "cpl" into the <a href="">omnibox</a>. This temporarily switches the search engine to the Catalog, and provides title suggestions as you type. If one of the suggestions is the book you want, just arrow down to it and press Enter or click on the result. <h4><a href="">Get the Extension</a></h4> If you'd like to know when the books you find are available at your library, and if you'd like an easier way to search our Catalog, you can <br /><a href="">install the free extension at Chrome Web Store</a><br /><span style="font-size:.75em;">[web developers: <a href="">cpl-chrome-ext</a> is available on GitHub]</span> Technology Adults Websites CPL Tech Google Fri, 17 Feb 2012 17:11:34 +0000 Brad Czerniak 44695 at Do You Like Convenience? <img src="/sites/default/files/images/sppoint.preview.png" alt="" align="right" />Look in the right-hand corner of this window. Do you see a search bar up there? Do you use it? If you do — and you use Internet Explorer 7+ or Firefox 2+ — you can <a onclick="window.external.AddSearchProvider('');return false;" engineurl="/response/cantcat.xml" jsinstallmethod="search_engine_install" href="/response/cantcat.xml" class="action-link">Add the CPL Catalog</a> to your search providers.<br /><br />Here's why you should:<ul> <li>It saves time — one-click search wherever you are</li> <li>It saves money — search CPL instead of Amazon</li> <li>It's cool — get suggestions as you type (with jacket images in IE8!)</li> </ul> Check out <a href="/tools">our other search tools</a> for more time-saving widgets. Technology Adults Websites CPL Tech Fri, 28 May 2010 15:54:45 +0000 Brad Czerniak 18765 at