Posts about urssus

I knew not doing it was smarter, or how HTML5 and Qt do my work for me.

I wrote a while ago a RSS program called uRSSus. I expect I am the only user of it because it has some problems (all of them my fault ;-) but I really like it.

For a while now I have wanted it to have podcast support. The thing is... that always seemed like a lot of work. Sure, using phonon I can create an audio player and everything, but...

I am using a HTML widget to display the posts, so I would have to find a way to add the audio player to the UI and ... too much work.

So, today I woke up and thought... wait a minute... Qt's HTML widget is based on Webkit. And Webkit supports HTML5. And HTML5 has an "audio" tag.

So, if I fixed uRSSus to fetch the enclosure links, and added them in the database, and then added this to the post template:

<?py for enclosure in  post.enclosures: ?>
  <audio autobuffer="Yes" controls="controls" src=#{enclosure.href}></audio><br>
<?py #end ?>

Wouldn't that actually work? Well, yeah!

urssus26

So there you have it, I was right not to implement it, because the easiest way is to let Qt do it ;-)

Using assistant from PyQt

The uRSSus doc is slowly growing, so I hooked assistant to the UI. Not difficult, but I have not seen it elsewhere.

Here's how:

Assume the "Handbook action" is called action_Handbook. Set window.assistant to None in __init__.

def on_action_Handbook_triggered(self, i=None):
    if i==None: return

    if not self.assistant or \
       not self.assistant.poll()==None:

        helpcoll=os.path.join(os.path.abspath(os.path.dirname(__file__)),\
                              'help',\
                              'out',\
                              'collection.qhc')
        cmd="assistant -enableRemoteControl -collectionFile %s"%helpcoll
        self.assistant=subprocess.Popen(cmd,
                                        shell=True,
                                        stdin=subprocess.PIPE)
    self.assistant.stdin.write("SetSource qthelp://urssus/doc/handbook.html\n")

And that's it. Now I ned to figure out context help.

Now you, too can create Qt Help Files painlessly

I decided to add a manual for uRSSus. Since it's a Qt app, I checked how to do one of those neat help files, like the ones that come with Qt apps.

It turns out it's not so simple to create one of those.

You need to create your help in one or more HTML files, then create a XML file that describes what each file is, references for each section, and references for each keyword you want in the index.

For any real-life-size document, that's going to be incredibly annoying.

So, I took my usual escape route when I don't want to do grunt work on docs: Docutils.

Specifically, I wrote rst2qhc which takes one (or more) restructured text files, and creates a nice and clean Qt Help Project file from them, including section titles, references and keywords, which you mark on the text using the 'keyword' role.

What does this mean? Let me be graphical:

rst2qhc2

The one on the right is nice to read. The one on the left is nice to write. The arrow in the middle is rst2qhc :-)

And here's how the generated qhp file looks for a trivial outline of a manual (and the reason why I don't want to do this manually ;-):

<?xml version="1.0" encoding="UTF-8"?>
<QtHelpProject version="1.0">
    <namespace>urssus</namespace>
    <virtualFolder>doc</virtualFolder>
    <customFilter name="Unknown">
        <filterAttribute></filterAttribute>
    </customFilter>
    <filterSection>
        <filterAttribute></filterAttribute>
        <toc>
            <section title="The uRSSus Handbook" ref="manual.html">
                <section title="Introduction" ref="manual.html#introduction"/>
                <section title="Quick Start" ref="manual.html#quick-start"/>
                <section title="Configuration" ref="manual.html#configuration"/>
                <section title="Credits and License" ref="manual.html#credits-and-license"/>
            </section>
        </toc>
        <keywords>
                <keyword name="what can you" ref="manual.html#what-can-you-do-using-urssus"/>
                <keyword name="quick" ref="manual.html#quick-start"/>
                <keyword name="main window" ref="manual.html#the-main-window"/>
        </keywords>
        <files>
                <file>manual.html</file>
        </files>
    </filterSection>
</QtHelpProject>

Also, as a bonus, you can create PDF, LaTeX, HTML and ODT files from the same source (heck, you can create freaking man pages).

uRSSus 0.2.12 released!

Yay!

Announcing release 0.2.12 or uRSSus a RSS/Atom aggregator.

This release fixes the big crashy updater bug in 0.2.11, and makes some minor improvements, like nicer date display, and a xdg resource installer.

Counting unread items is HARD

I mean, if google can get it wrong, I have an excuse, right?

urssus24

See how at the same time you see:

  • At the left: "All items (8)"
  • At the top-center: "8 new items"
  • In the tree: 8 items
  • In the list: 14 new items

Each of those numbers can get out of sync with each other if you do something the "wrong" way.

But what the heck, it seems as of r678 urssus does it right. The list of unread posts even updates when you have it open adding the new posts in the right places without disturbing you, and keeping the right numbers everywhere, AFAICS!

urssus23

So here, in uRSSUs:

  • 13 unread articles in the "Unread Articles" item
  • 13 in "All Feeds"
  • 13 adding each folder
  • 13 in the article list

Sadly, this is all post-0.2.11 release.

uRSSus 0.2.11 is out!

Since I did some neat coding on it yesterday and today, I decided it was a good moment to release uRSSus 0.2.11 into the wild.

It doesn't look much different from 0.2.9 but it works much, much better.

Gone are the crazy disappearing/duplicate feeds when dragging/dropping in the feed tree.

Gone is the broken update scheduler, and now feeds update smoothly.

Gone are the inconsistent displays (like All feeds <> Unread items)

Gone is the CPU guzzling

Gone seems to be the DB locking and IO churning.

Sadly, gone is the DB schema migration because I can't get miruku to work with current alchemy/migrate/Elixir. Since I don't remember if the DB schema changed since 0.2.9 this may be bad ... or not. Backup, friends. Export to OPML and back. Whatever, this is alpha stuff ;-)

So, head to the uRSSus homepage and take a look. Maybe you will like it!

Urssus update: 12/2/2009

Yes, after months of doing nothing, I hve made some changes in uRSSus, my RSS aggregator.

Basically, I removed the Qt MVC tree for feeds and replaced it with a old, reliable item-based tree.

And now, magically you can drop feeds into folders, sort feeds by unread count, and it all seems to work.

I am probably the only uRSSus user in the world, so I am not bothering with a release until I kick the beast into shape with at least some nice features, but it's something.

Back to my own dogfood.

So, I must confess something. I have not been using uRSSus for a couple of months. It all started on my vacations. Since I had only my eee, I ran into some problems and was forced to use google reader.

And it was NOT terrible. Mind you, it was not great, either, but really, not terrible at all.

Since switching RSS apps is a pain (because you need to REALLY catchup on your reading before switching), it took me a long time to get back.

And now I find all sorts of problems in uRSSus which I will have to fix. Which means I better start cranking.

Not that it looks bad, it's a handsome program!

urssus22

I don't expect to do anything like last year's "A release of something every friday" madness, but I will do something.

Also, I need to rewrite BartleBlog, the app that generates this blog you are reading. It's broken in many ways.