Introduction Earlier in the year I wrote a Lua implementation of xxd -i (it's at the bottom under the "Embedding" section). I wrote this because a few platforms I was working with didn't support xxd. I didn't want to attempt compiling and installing it. I had Lua installed on these platforms so it was easier … Continue reading Binary Headers
The new epub thumbnail files (.epub.thn) are what Bookeen calls t4b files. They are very similar to the older t2b thumbnail files they were using in earlier versions of the Cybook firmware. As the name suggests instead of using 2 bits to represent color values 4 bits are now used. This increases the number of … Continue reading Cybook t4b Format Specification
A while back I made a post about ASCIIizing Text. With it was a simple python application that would convert Unicode characters to ASCII equivalents. It doesn't do a basic conversion but also Latinizes the characters when they are outside of the ASCII range. The uni2ascii package I made has a few short comings I've … Continue reading Unidecoder
For the past three weeks I've been working on an editor for working with plain text files and making it easy to add markdown syntax to them. My main goal is to make it easier to format the large number of ebooks I have. Almost all of them are plain text files. It's a python … Continue reading Niw Markdown Editor
***Update: Simplified Highlighter.highlightBlock function One thing Qt lacks is an integrated spell check in the text entry components. For a project I'm working on this is necessary. Using python-enchant and the QSyntaxHighlighter I was able to implement this functionality. Here is how to add an in line spell check support to a QPlainTextEdit. The SpellTextEdit's … Continue reading QPlainTextEdit With In Line Spell Check
My last post was an implementation of a Qt widget which displays text with line numbers. I found that it has a few limitations. The biggest was a performance penalty when dealing with large documents. I've since re-factored and rewritten the class to make the performance acceptable. I've also cleaned up the code a bit … Continue reading Better QPlainTextEdit With Line Numbers
Here is a Qt4 widget written in Python that allows for line numbers next to a QTextEdit. Similar to what is seen in a number of text editors such as gedit and kate.