free page 5 - Dave's Blog

Search
My timeline on Mastodon

Recap Firefox Extension | "turning PACER around"

2009 Aug 14, 3:55The government program PACER is an online archive of court records and even though the documents are public domain, PACER charges access to them ostensibly to pay for PACER. This plugin uses the Internet Archive as a kind of free intermediate cache, rewriting the PACER HTML to reference the free Internet Archive versions of the documents when available and uploading PACER documents to the IA cache when you download one it doesn't yet have.PermalinkCommentsvia:waxy firefox government politics research reference legal law plugin technical

Anyone can write this crap (Phil Gyford’s website)

2009 Jul 31, 5:57"Is it worth the sensationalism and scaremongering? The endlessly inaccurate and dangerous science reporting? The pointless and news-free lifestyle articles? Do newspapers that prioritise stories based on celebrities and spectacle rather than importance to the world deserve to exist?"PermalinkCommentsvia:sambrook internet news journalism media

Charlie Rose - A conversation with Chris Anderson of Wired Magazine

2009 Jul 29, 10:58Chris Anderson of Wired Magazine promotes and discusses the concepts in his book "Free" on the Charlie Rose show.PermalinkCommentscharlie-rose chris-anderson wired free internet web economics video interview via:bengoldacre

40 Free and Useful GUI Icon Sets for Web Designers | Icons

2009 Jul 28, 9:21PermalinkCommentsweb free css gui icon graphic technical

Solar Wi-Fi Flowers Create Harmony Between Man, Nature And Machine - The Design blog

2009 Jul 23, 10:32Toyota's 3rd gen Prius ad. campaign features giant solar powered flowers that seat ten, provide free wi-fi and power, and will be placed outdoors in major cities across the US.
PermalinkCommentswifi power prius solar advertising toyota

Bringing Web Fonts Closer | Kernest

2009 Jul 23, 3:23Web fonts plus appropriate style sheets for embedding.PermalinkCommentscss font typography free web design technical

Pterodactyl Squad - A video game music netlabel - Weezer - The 8-bit Album

2009 Jul 20, 11:27Various Weezer songs remixed on Game Boys, NES, etc.
PermalinkCommentsmusic mp3 free remix weezer 8bit via:xblah

Hanlon's razor - Wikipedia, the free encyclopedia

2009 Jul 20, 8:07Includes plenty of variations on the quote like Grey's Law: "Any sufficiently advanced incompetence is indistinguishable from malice."PermalinkCommentshumor quote paranoia

Tor.com / Science fiction and fantasy / Blog posts / Cory Doctorow’s <em>Makers</em> Index

2009 Jul 15, 7:00"Tor.com is proud to be serializing Makers, Cory Doctorow’s upcoming novel, which goes on sale from Tor Books in November."PermalinkCommentscory-doctorow scifi tor makers book literature cc free

Code Rush - Mozilla documentary (PCR | Click Movement)

2009 Jul 10, 7:37"Code Rush aired nationally on PBS in March 2000. It documents the Mozilla team as they struggle to publish the first open source release of the Netscape Browser."PermalinkCommentsvideo mozilla browser browser-war internet opensource documentary free download web technical

Free Associations

2009 Jul 7, 1:01Zeke's blog|Zeke Odins-LucasPermalinkCommentszeke friend blog microsoft ie ie8 programming

The Music of Erich Zann

2009 Jun 29, 1:20"The Music of Erich Zann is a short film based on the story by H.P. Lovecraft. Though conditions inside the abandoned Savoy Hotel made this a very challenging project (Sub-freezing temperatures; cramped quarters; enough dust to suffocate Cthulhu himself), I was thrilled with the opportunity to work in such a haunting location, with such a talented and dedicated group of filmmakers."PermalinkCommentschris-shelton hp-lovecraft video movie

PowerShell Scanning Script

2009 Jun 27, 3:42

I've hooked up the printer/scanner to the Media Center PC since I leave that on all the time anyway so we can have a networked printer. I wanted to hook up the scanner in a somewhat similar fashion but I didn't want to install HP's software (other than the drivers of course). So I've written my own script for scanning in PowerShell that does the following:

  1. Scans using the Windows Image Acquisition APIs via COM
  2. Runs OCR on the image using Microsoft Office Document Imaging via COM (which may already be on your PC if you have Office installed)
  3. Converts the image to JPEG using .NET Image APIs
  4. Stores the OCR text into the EXIF comment field using .NET Image APIs (which means Windows Search can index the image by the text in the image)
  5. Moves the image to the public share

Here's the actual code from my scan.ps1 file:

param([Switch] $ShowProgress, [switch] $OpenCompletedResult)

$filePathTemplate = "C:\users\public\pictures\scanned\scan {0} {1}.{2}";
$time = get-date -uformat "%Y-%m-%d";

[void]([reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll"))

$deviceManager = new-object -ComObject WIA.DeviceManager
$device = $deviceManager.DeviceInfos.Item(1).Connect();

foreach ($item in $device.Items) {
        $fileIdx = 0;
        while (test-path ($filePathTemplate -f $time,$fileIdx,"*")) {
                [void](++$fileIdx);
        }

        if ($ShowProgress) { "Scanning..." }

        $image = $item.Transfer();
        $fileName = ($filePathTemplate -f $time,$fileIdx,$image.FileExtension);
        $image.SaveFile($fileName);
        clear-variable image

        if ($ShowProgress) { "Running OCR..." }

        $modiDocument = new-object -comobject modi.document;
        $modiDocument.Create($fileName);
        $modiDocument.OCR();
        if ($modiDocument.Images.Count -gt 0) {
                $ocrText = $modiDocument.Images.Item(0).Layout.Text.ToString().Trim();
                $modiDocument.Close();
                clear-variable modiDocument

                if (!($ocrText.Equals(""))) {
                        $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $fileName
                        if (!($fileName.EndsWith(".jpg") -or $fileName.EndsWith(".jpeg"))) {
                                if ($ShowProgress) { "Converting to JPEG..." }

                                $newFileName = ($filePathTemplate -f $time,$fileIdx,"jpg");
                                $fileAsImage.Save($newFileName, [System.Drawing.Imaging.ImageFormat]::Jpeg);
                                $fileAsImage.Dispose();
                                del $fileName;

                                $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $newFileName 
                                $fileName = $newFileName
                        }

                        if ($ShowProgress) { "Saving OCR Text..." }

                        $property = $fileAsImage.PropertyItems[0];
                        $property.Id = 40092;
                        $property.Type = 1;
                        $property.Value = [system.text.encoding]::Unicode.GetBytes($ocrText);
                        $property.Len = $property.Value.Count;
                        $fileAsImage.SetPropertyItem($property);
                        $fileAsImage.Save(($fileName + ".new"));
                        $fileAsImage.Dispose();
                        del $fileName;
                        ren ($fileName + ".new") $fileName
                }
        }
        else {
                $modiDocument.Close();
                clear-variable modiDocument
        }

        if ($ShowProgress) { "Done." }

        if ($OpenCompletedResult) {
                . $fileName;
        }
        else {
                $result = dir $fileName;
                $result | add-member -membertype noteproperty -name OCRText -value $ocrText
                $result
        }
}

I ran into a few issues:

PermalinkCommentstechnical scanner ocr .net modi powershell office wia

Setting Up AWStats

2009 Jun 26, 5:44A person with nearlyfreespeech.net hosting their web content recalls how they setup awstatsPermalinkCommentsawstats statistics nearlyfreespeech.net linux howto tutorial technical

Cory Doctorow's Futuristic Tales of the Here and Now reaches 30,000 downloads | Robot Comics

2009 Jun 25, 11:45"Cory Doctorow's Futuristic Tales of the Here and Now is the Creative Commons comics adaptation of six short stories by Boing Boing editor and science-fiction writer Cory Doctorow... The result are eight Creative Commons mobile comics specifically designed for iPhone, iPod touch and Android devices."PermalinkCommentscory-doctorow comic android iphone mobile download book free

Free OCR software? You may already have it... - Jon Galloway

2009 Jun 20, 9:39If you have Office installed you may have an OCR library sitting on your hard drive just waiting to be used via C#...PermalinkCommentsocr microsoft office .net automation scanner camera windows technical

Implementations in Web browsers - WHATWG Wiki

2009 Jun 8, 4:56"List of known implementations of HTML 5 in web browsers (list is incomplete, feel free to extend it)"PermalinkCommentsreference browser html ie8 firefox html5 opera whatwg wiki

Hulu, a Victim of Its Own Success? | Epicenter

2009 May 12, 2:32If Hulu removes programming or Netflix doesn't make something available to watch instantly, its a safe bet it wasn't their idea to make their service worse. '"Whose retarded idea was that?" Well, not Hulu's. The move was taken at the network's request. Powerful forces are working against free, legal online TV - and the decision to pull Sunny may have made that show the canary in the server farm.'PermalinkCommentshulu business wired tv web internet

Category:Astronomical observatories in Washington (U.S. state) - Wikipedia, the free encyclopedia

2009 May 3, 8:07Wikipedia's list of observatories in Washington.PermalinkCommentswikipedia list todo observatory washington tourist

Download details: Microsoft Network Monitor 3.3

2009 Apr 23, 5:22"Network Monitor 3.3 is a protocol analyzer. It allows you to capture network traffic, view and analyze it. Version 3.3 is an update and replaces Network Monitor 3.2. Network Monitor 3.x is a complete overhaul of the previous Network Monitor 2.x version."PermalinkCommentsmicrosoft network traffic netmon free msdn windows
Older EntriesNewer Entries Creative Commons License Some rights reserved.