tag:blogger.com,1999:blog-28988955489446006302024-03-13T15:15:53.830-07:00Zsolt's Random RamblingsZsolthttp://www.blogger.com/profile/10882828214676373214noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-2898895548944600630.post-28553690254681782952011-07-04T15:32:00.000-07:002011-07-04T15:32:13.405-07:00Extracting text from pdf filesRecently found the mupdf package, which is a free pdf-viewer and utility package, at <a href="http://www.mupdf.com">www.mupdf.com</a>.<br />
Binaries can be downloaded for Windows and Linux and looks like the Mac version can be built from source also.<br />
<br />
On Ubuntu Linux it can also be installed using the package manager :<br />
sudo apt-get install mupdf-tools<br />
<br />
One of the utilities is called pdfdraw. It can render the pages of a pdf file in a few image formats.<br />
The -t command line switch can be used to dump out the text from the pages to the standard output. From there it's simply the matter of redirecting to a file:<br />
pdfdraw -t filename.pdf > filename.txtZsolthttp://www.blogger.com/profile/10882828214676373214noreply@blogger.com0tag:blogger.com,1999:blog-2898895548944600630.post-34693688276014347722009-10-10T23:06:00.000-07:002009-10-10T23:17:49.969-07:00Automatically Organize your photos by DateHere's a handy little tech-tip about how to organize your digital photos on linux from the command-line:<br /><br /><a href="http://www.linuxjournal.com/content/tech-tip-automaticaly-organize-your-photos-date">http://www.linuxjournal.com/content/tech-tip-automaticaly-organize-your-photos-date</a>Zsolthttp://www.blogger.com/profile/10882828214676373214noreply@blogger.com0tag:blogger.com,1999:blog-2898895548944600630.post-12610035528101473272009-08-13T22:50:00.000-07:002009-08-13T23:11:19.349-07:00Saving/Printing Google Reader stories through PrintFriendly.com<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjNlqYrRoEs-FfB8NfKjrq7j9YiBc5oTyQW-T74SG5vw_wSUi6wbjPcJviVlqW0okvoF02YL_3LQ9-9R-7-453C2VpRcvl6NCOZkfOKLDqxN8fk6w4wn6_enLWIk6JlunU6JdwQaphuF2G/s1600-h/PrintFriendlyExport.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 181px; height: 83px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjNlqYrRoEs-FfB8NfKjrq7j9YiBc5oTyQW-T74SG5vw_wSUi6wbjPcJviVlqW0okvoF02YL_3LQ9-9R-7-453C2VpRcvl6NCOZkfOKLDqxN8fk6w4wn6_enLWIk6JlunU6JdwQaphuF2G/s320/PrintFriendlyExport.png" alt="" id="BLOGGER_PHOTO_ID_5369696471081058642" border="0" /></a><br />Recently Google Reader added a new feature, 'Send To', that can be configured on the Reader Settings page. 'Send To' lets you pass the original article's URL to a few predefined online sites and services.<br /><br />Luckily, in addition to the predefined sites, it is also possible to add and configure custom services that you'd like to process the URL with.<br />One of my favorite pages is <a href="http://www.printfriendly.com/">PrintFriendly.com</a>, that can print a page or post after stripping away content that is not part of the main article. It can also save the page as a PDF file.<br />So right away I tried to create an custom 'Send To' item for Google Reader, that lets me forward the article to PrintFriendly for processing.<br /><br />All you have to do is go to the 'Send To' tab on the Settings page, click on the 'Create a custom link' button at the bottom and enter the following information:<br /><br /><span style="font-family:courier new;"> <span style="font-weight: bold;">Name</span> : PrintFriendly</span> <span style="font-family:courier new;"> <br /> <span style="font-weight: bold;">URL</span> : http://www.printfriendly.com/print?url=${url}<br /></span><span style="font-family:courier new;"> <span style="font-weight: bold;">Icon URL</span> : http://cdn.printfriendly.com/pf-icon.gif</span><br /><br />and click save.<br />After that, when you read an article in the Reader, the Send To list at the bottom will include the PrintFriendly option, in addition to the others you enabled. Clicking it will bring up the PrintFriendly.com page with the article already loaded and cleaned up. You can do further editing before printing or saving to PDF.Zsolthttp://www.blogger.com/profile/10882828214676373214noreply@blogger.com1tag:blogger.com,1999:blog-2898895548944600630.post-67134628736955784942009-04-08T22:50:00.000-07:002010-10-24T18:58:24.596-07:00N 6100 linux framebuffer driver<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzVvxhQ9Y17lAuCyymyQijtHf4WcXwTZAZM9PbRIE7lsP8dGzay2-jdPTovFxRDenKH3oeozt9XFYcUBj2vWKy4frFydB-ux2nEVlZfv9LDxOjF_hYEW2GA2cEu884x1zMqIX7ImjAzX74/s1600-h/lcd_console.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5322563396604701650" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzVvxhQ9Y17lAuCyymyQijtHf4WcXwTZAZM9PbRIE7lsP8dGzay2-jdPTovFxRDenKH3oeozt9XFYcUBj2vWKy4frFydB-ux2nEVlZfv9LDxOjF_hYEW2GA2cEu884x1zMqIX7ImjAzX74/s320/lcd_console.jpg" style="cursor: pointer; float: right; height: 320px; margin: 0pt 0pt 10px 10px; width: 242px;" /></a><br />
I finally sorted out the underlying spi master/slave setup issues and were able to start working on a linux framebuffer driver.<br />
The first version can be downloaded from the link below. It is a fairly standard framebuffer driver, based on the skeletonfb sample module. After the module is loaded it should create the /dev/fb0 device node. The node can then be used to send data (image data mostly) to te screen.<br />
(mmap-ed write access is not supported right now, the write() function can be used to send image data to the screen in a similar fashion.)<br />
If the fbcon driver is built into the kernel, it can also use this driver and turn the lcd into a small console screen (see image on the right).<br />
More information about rebuilding the driver and module parameters can be found in the README.txt file in the archive.<br />
<br />
Download : <a href="http://dl.dropbox.com/u/3013061/n6100fb-0.01.tar.gz">n6100fb-0.01.tar.gz</a>Zsolthttp://www.blogger.com/profile/10882828214676373214noreply@blogger.com4tag:blogger.com,1999:blog-2898895548944600630.post-6294466710440116702008-07-17T23:04:00.000-07:002010-10-24T19:01:24.810-07:00Nokia 6100 Test utilityI haven't quite gotten to the framebuffer driver part yet, but in the meantime I came up with this user mode application that displays some graphics and a bitmap on the Nokia lcd screen.<br />
Basically it is the combination of the two separate test apps (lcdtest & lcdimg) included in the driver, described in the previous post.<br />
The main difference is that this program doesn't require any drivers to access the screen, it initializes and uses the pxa255 ssp controller to communicate with the screen.<br />
By default it assumes the screen uses an Epson controller. To use with Phillips controllers, only a simple change is required: in the <span style="font-style: italic;">main()</span> function, the first parameter of the <span style="font-style: italic;">lcdInit()</span> call has to be changed from 1 to 0.<br />
The program draws some simple graphics : lines, circles, text. And it also loads and display a bitmap from raw image file. Therefore it is important to transfer the cat.rgb file to the target, together with the executable.<br />
<br />
Download : <a href="http://dl.dropbox.com/u/3013061/nokiatest-0.01.tar.gz">nokiatest</a>-0.01.tar.gz<br />
<br />
It can be seen in action below :<br />
<object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/210GBi3bFk0"></param><embed src="http://www.youtube.com/v/210GBi3bFk0" type="application/x-shockwave-flash" width="425" height="350"> </embed>
</object><br />
Now it's really time to get that framebuffer driver going ...Zsolthttp://www.blogger.com/profile/10882828214676373214noreply@blogger.com4tag:blogger.com,1999:blog-2898895548944600630.post-39477756354488406342008-05-15T22:58:00.000-07:002010-10-24T19:00:23.136-07:00Nokia 6100 Lcd Linux Driver<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM4f2gNEjGvrW-zG0IdkkHItWK3JYzHpJ379A6IQgRA9453h532VQvwYp5vbcT5p3Ul7jQrEOzK2sYw5A700cixxZ4pXVERsGU8bH5J5JEhu_04RdaRRYRUsJQAmGzejnLUfPROgMA9BcS/s1600-h/board02.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM4f2gNEjGvrW-zG0IdkkHItWK3JYzHpJ379A6IQgRA9453h532VQvwYp5vbcT5p3Ul7jQrEOzK2sYw5A700cixxZ4pXVERsGU8bH5J5JEhu_04RdaRRYRUsJQAmGzejnLUfPROgMA9BcS/s320/board02.jpg" alt="" id="BLOGGER_PHOTO_ID_5200853642398563330" border="0" /></a>This is a Linux driver for the Nokia 6100 compatible LCD screen ( I got mine from <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=569">Sparkfun Electronics</a> ).<br />
I wanted to get it working with my <a href="http://www.arcom.com/pc104-xscale-viper-lite.htm">Viper-Lite </a>development board, which runs Linux. Since I didn't find a driver already available, I figured a take a crack at writing one myself. <a href="http://www.zsolthajdu.com/ssplcd-0.01.tar.gz">ssplcd</a> is the driver I ended up with. It is published under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>, without warranty or support.<br />
<p>The Viper-Lite uses a PXA 255 processor, and I do know about the <a href="http://docwiki.gumstix.org/Connection_and_Setup_of_Nokia_6100_Knockoff">Gumstix</a> driver, which is for Linux and the same processor. But I wanted something more generic, that can be used by applications to access the screen.<br />
</p><p>My driver is a kernel module (tested with 2.6.24.3) also, but - after it has been loaded - it can be used by applications to access the screen as a file, send ioctl commands to it and write data to it.<br />
It has only been tested with my devel board, using the PXA 255 processor, so I'm not sure about any other kind of hardware. But it should work ok with other PXA 255 based systems, like the Gumstix computers.<br />
<br />
Also, my lcd has an Epson controller, so it hasn't been tested with Phillips controllers at all.<br />
There's more information available in the README in the archive.<br />
</p><p>Download : <a href="http://dl.dropbox.com/u/3013061/ssplcd-0.01.tar.gz">ssplcd-0.01.tar.gz</a><br />
</p>I know that the current programming interface is a bit awkward. If I'll have enough time, I want to look into writing a different, framebuffer driver for the same device.<br />
<br />
Update: you may also be interested in the<span style="font-style: italic;"> linux framebuffer driver </span><a style="font-style: italic;" href="http://linuxmaximus.blogspot.com/2009/04/n-6100-linux-framebuffer-driver.html">here</a><span style="font-style: italic;">.</span>Zsolthttp://www.blogger.com/profile/10882828214676373214noreply@blogger.com5