miércoles, 6 de octubre de 2010

Fast update

I've been off lately, in fact I haven't posted nothing new since almost a month. I'm sorry for that, but I'm having some health problems.
I hope that I'll be fine soon so I can continue working on Jake-PyQt4.

Anyways, this update is to let you guys know that WingIDE just gave me an Open Source License for their IDE so I can keep working on this project. (Note that this IDE is paid!)
Go and check their website and the product, you'll like it!

About the project, I have a few news to give you, but I'd like to do that when I'm better. Anyways, you can find out that I'm doing something cool if you check SVN.

Keep checking this blog from time to time and have a nice time!

Bye

jueves, 9 de septiembre de 2010

Finally!

It has been a really long long long time since my last post and I'm really sorry for that, but I have good news! I finally managed to build Jake-PyQT4 on both Windows and Linux platforms, and create a single executable file that can be run without having to install Python, PyQt4, Xlib, pyHook, PyWin32 nor any other dependency! Isn't that great?
I'm sorry for Mac users, but right now I'm trying to release for Windows and Linux. But don't worry, code runs just fine, so the only show-stopping "bug" is an app that will let me create a single standalone file that could be ran on Mac OS. I don't know how exactly does Mac manages executable files, but I'm looking at py2app. You'll soon have a release too ;)
Here goes some info. The executable file for Linux was made with cx_Freeze and MakeSelf and it's final size is 4,8mb. On Windows the executable file was created with cx_Freeze, 7z and SFX 7z module, I'm still having some small problems with UPX, but that isn't that important as this only causes a little bigger size (we're talking about ~1mb)

And here goes the full list of changes that I made since my last post:

* Some fixes in the TAB autocompleter. Several crashes were fixed.

* A lot of fixes in the locale system. Missing imports, some strings weren't unicode, etc.

* Now skins and folders can be stored in users folder. This way users can create their own plugins/skins and test them.

* Some more changes in the config system. Most of them related to the combo control.

* I worked for a week on an updated, but it seems that I won't be able to make Jake-PyQT4 autoupdate itself. The best that I can do for now is to show a message telling the user that there is an update, a short description of the update and a button to download the update. Maybe the download will be made by my own QDownloader.

* I moved pyXhook and pyHook outside of Jake-PyQT4. Now if you want to run from source you'll have to read the INSTALL file and install all dependencies.

* Nanotube finally upgraded pyHook and made it compatible with Python 2.7 Thanks!

* Some problems with the focus on Windows were fixed, but there might be left one. Please test when you get binaries, and report.

* Red, Green and Blue skins were removed because they don't look good (for now). As soon as they look good they will be merged again.

* I wrote my own svn2log script. You can have a look at the output of that script here. This way you can track all the changes that I make.

I hope you're wishing to test my app! It will be here in a few days :)
I'll write again when I'll be releasing it. Until then, have fun.

Bye!

domingo, 22 de agosto de 2010

Almost there...

Last time I wrote a lot of things were in the to-do list. But now I'm glad to announce that Jake-PyQT4 is almost ready for a first release!
There are still some things that I'd like to patch before releasing, and also fix a little bit the default skin. It's not that ugly, but I'd like to have a designer doing that part, and I just didn't thought about it but Andrew's sister is a designer, so maybe she could help me :)

And here is the list of things that I added/fixed since last week:

* Configuration system was rewritten, and also all plugins. Now plugins have two main lists. One is for how the config dialog should look. The second one is for the default values (or the stored values in user's hard drive).

* Total rewrite of how config files are saved/loaded. Now only really important things are written to disk. That means less space in disk and major load/save speed :p

* Total rewrite of the part where combobox where created. I was saving the index of all combos, and that was totally wrong. Now values are saved.

*  Total rewrite of plugins system. Don't crash if one plugin fails to load (or maybe bad coded, missing libs, etc). Also, show info about what plugin crashed, what line and why.

* Total rewrite of how moving the cursor left/right is handled. No more weird html inserts! Special thanks to girishr from #qt in Freenode

* Major speed improvements on how cursor is managed, things done after hit, after hit, etc...

* A lot of code was moved to it's own class/file to make code more cleaner and easy to read. Also a lot of unused imports were removed (yes, more speed :p)

* More control when doing cut/copy/paste. Now only available-for-edit text can be cut.

* A global event filter was created! That filter manages all keyboard/mouse events and sends them to the right control.

* A bug was sent to Nokia, so they can fix it. The bug that I'm talking about is that weird behavior when moving a tab inside the tab widget. A cut-effect caused by a wrong rect size. You can see the bug report here.

* Now auto complete works everywhere instead only at the beginning of a command.


As you see I haven't wasted any time, and even more features are coming soon ;)

I should do some things before releasing. Here is a list:

* Check if it's possible to read/write to disk (that will let users to store their plugins settings and also update Jake-PyQT4)

* Check for updates and update if newer version is available.

* Fix a little bit the default skin.

Once those three things are done, I'll wait a little bit more for mgrant to release python-xlib 0.15 and nanotube to release pyHook compatible with Python 2.7
If no releases, I'll release with current python-xlib 0.15rc and with pyHook compatible with Python 2.6 (that will force me to release everything on Python 2.6 instead of 2.7).

I'll probably write again next weekend. Until then have a good time and enjoy the summer!
Bye!

domingo, 15 de agosto de 2010

Tons of new features

A lot of new thing were implemented during the whole week! Both Andrew and me made ~30commits/day and result is impressive. This is what we did:

* Translation system major fixes. Now each plugin has it's own translation method, and also, if no locales were detected, a global fake-locale system will be used. Fixes in how strings were managed (now everything is done using unicode).

* Spanish locales. Yes! Andrew spent a day translating all plugins and main app, and now we have Jake-PyQT4 in Spanish! Test it, and report bad translated words, please.

* TAB fancy sorting. Using TAB to auto-complete commands is handy, but seeing available commands is a must-have feature too. Sadly, available commands were shown as a list of commands, separated by one white space. That was really hard to read. Now, using QFontMetrics, Jake-PyQT4 is able to print those commands in a really nice html table (just like Unix shell).

* Pastebin lib and Pastebin plugin were made. I use pastebin a lot, and I hate having to open my browser, go to www.pastebin.com, paste the text, and copy the link. So, I made use of pastebin APIs.

* More skins were added. Now we have black (as default), green, red, blue and white. Those skins were made in less than 15 minutes, so don't except any breath-taking design. QSS (skin system) is really powerful, but I'm not a designer. That's why I need a designer. If you're interested, please mail me.

* Multi-line commands were implemented. This was a blocking bug for Pastebin plugin.

* Major speed improvements. Stop using .toPlainText() all the time. More improvements are comming!

* In SVN: everything was moved to trunk folder. And two new folders were created (tags and branches). Forum guides on how to get Jake-PyQT4 were updated according to those changes, so, please go to forums and check them.




Currently, I'm working on the config system. There are some bugs that I saw, and I'd like to fix them asap. Once done, I'll be doing more libs & plugins.
A stable 1.0 version will be available really soon. Still no release date, but "soon" means soon, for real.

I'll write when config system is done, until then have a good time!

Bye!

lunes, 9 de agosto de 2010

Song download plugin available!

I haven't made much commits this weekend, but a lot of new features were added. How? Easy, but before I tell you how, I should say that plugins are just wrapper for libs. So, there is no need to actually understand a lot of python to make a plugin.
Said that, after finishing the urbandictionary lib, I spent a day or so teaching andresmcid some basic python and how plugins, configsystem and pluginsystem work, and he made both urbandicionary plugin and mp3-goear plugin.
I gave him SVN permissions, so you can even check his commits :)
And this is how both plugins look like:




I made some work on how plugins access their config. Before the actual change, accessing an item from a config was a real PITA. Config was saved as list with sublists, so you could perfectly have something like config[0][1][2][0][4]. Pretty scary for noobs, right? But now accessing an item is just as easy as everything else in Jake-PyQT4. You just need to call the config system this way: configsystem.value(config, 'plaintextcolor') and you'll get the value for the default color of plain text. I told you! A piece of a cake :p

Some options were added to main config, and also some bugs were fixed.
And finally, project status in sourceforge was changed from Alpha to Beta.
I'd really like to keep the good commit-rythm and make a stable release by the end of month. Of course, Not all plugins are going to be available, nor much skins, but that release will aim to a stable base release. Once that stability is reached, no major changes will be made to internal structure. This way we'll be able to start working only on plugins and skins.

Currently, I'm working on a filestube library, and once finished, andresmcid will make another plugin, so, just have a look from time to time to this page and you'll know it.

I'll write again this weeked. Until then, have a good time!

Bye!


sábado, 7 de agosto de 2010

What a waste of time...

This is a quick update. SVN hasn't seen too much commits this week because I was trying to make something with those tabs. I was trying to resize the rect of the QTabBar that handles the tabs in order to fix that "bug" that's there right now. You can see it if you move a tab to one side. Do you see how the tab gets cutted? That's what I have been trying to fix, but without luck...
The code is still there, committed, but commented. Maybe I'll try to do it again some when in the future, or maybe not.

Because of lack of new cool stuff, I decided to implement better the text cursor. Now it works just like a real console :)

Nothing more for today, but I'll try to finish the urban dictionary plugin and start working on those mp3 plugins that I promised. I'll write next week.

Have a good time until then!

Bye!

lunes, 2 de agosto de 2010

Not that hard after all

In my last post I said that I was having a lot of problems with QTextBrowser implementation because of images size and poor HTML support in general. Well, I was wrong!
After sending a few mails to Roberto Alsina (Lateral Opinion) I managed to display images with custom width and height, without needing to subclass more functions nor using QWebView. Thanks fo the help!

Once done that, I thought it would be cool to fix google-maps-streetview plugin, so I did it, and that's how it looks like:


But that wasn't enough. I was having a lot of free time, so I did a full commits party! Right away from commit 57 to commit 85! Almost 30 commits in one day!
Starting with 57. There was an error in all plugins that support *-more command. They were showing wrong results/current page number/result number.
Next important commit was the range 64-66 in which I implemented Jake-PyQT4 config dialog. I also added another skin. They both look this way:


Some small bug fixes, related with how I was managing prompt and cursor text, configuration parsing/saving, qss coding style, plugins typos, etc.

Commit 81 is interesting because of the focus-on-first-run bug described in my last post.

I should thanks to andresmcid for being such a good beta-tester and reporting bugs instantly via MSN. Thanks!

Also, thanks to nanotube (creator of pyHook) for promising making a release compatible with Python 2.7. Thanks!

Also, thanks to mgrant (creator of python-xlib) for promising making a release fixing some bugs and some annoying output messages. Thanks!

What now?
I'll be probably working on mp3 plugins. But first I'll level up a little bit my skills using Beautiful Soup. Once I think I'm done, I'll start making plugins for goear and filestube. Once I'm done with those, I'll add more.

I don't know when I'll post, but don't expect it too late. (or subscribe via RSS)

Bye!

sábado, 31 de julio de 2010

New plugins and more problems...

It has been a week since my last post. I didn't though that I was going to spend that much time working on only two plugins, but I have an excuse. Let's start from the beginning.

As I said in my last post, I was going to work on !google-maps-streetview and !google-maps-route plugins. I finished them both and you can see them in SVN. That's how !google-maps-route looks like:


You can also read a short description on forums (Yes! Jake-PyQT4 has it's own forums now! And a few more things). After finishing them I started testing and I noticed that my current implementation of the text area can't handle images sizes, and that's a really big problem. I'm thinking in possible solutions, and till now the only thing that I see kind-of-possible is a complete web browser (QWebView). That won't be easy to implement at all, because my actual code relies heavily on QTextCursor. Anyways, I'll be working on it. Let's hope that I'll make it.

Good news is that, as some of you may have noticed, this page now has a Screenshots, Downloads and Forum areas. Also, now Jake-PyQT4 has a forum. I started writing in it. There isn't too much to read for now, but I'll keep writing.  andresmcid will be acting like moderator (I can't do everything because of lack of time). He has already written a few posts here, and the forum rules here, so, make sure you don't make him angry or he'll delete your posts :p

So, what now?
I'll be working on the QWebView thing, but not at full-time. Maybe some of you know that I'm working on aMSN2, and billiob and me (main devs) want to release 0.1 ASAP. Anyways, this doesn't mean that you won't see commits. It's just that you'll see 1 commit per day rather than 5.

I'll write next post probably after finishing that QWebView thing. Till then, feel free to write suggestions/ideas/comments/whatever in forums, enjoy released plugins, test Jake-PyQT4 and most important, have a good time!

Bye!

sábado, 24 de julio de 2010

I made big progress (thanks to mgrant)

As I said in my last post, I was having problems with how Linux manages the focus. Well, thanks to mgrant and python-xlib I finally fixed that problem. Well, there's still some really little bug, but I'll try to fix it next weekend.
The little bug: Run Jake-PyQT4 but don't click on it's window. Now it doesn't have the focus. Hide it and show it. It won't get the focus, but it should get it.
Now quit Jake-PyQT4. Run it again, and this time click on it's window. Hide it and show it. It has the focus! Hide and show it as many times as you want. It will get the focus.
So, the bug is that it won't get the focus if the main app never had the focus. Kind of weird...

Next problem I talked about in my last post was Mac and Xlib for it. After a short conversation in #macports somebody told me that the only way of doing it is using cocoa (wtf?). I really would like to use something else, if not python-pure, at least not cocoa. If I'm not able to do that, sorry Mac users, but I'll have to drop hook system for Mac until I know how to do it.

Last problem was Symbian. Well, I'mm really too far from releasing for Symbian, so I won't even talk for it right now.

So, what have I done last week or so? I did the keyboard hook system! It's on it's own class/file (you can have a look at SVN log for commit 30 here). Also, I did another plugin. !google-maps-distance Realle easy to use. It will return the distance (in km) from point A to point B. I'll do two more plugins using gmaps API. The first one is !google-maps-streetview and the second one is !google-maps-route.

What's next?
After finishing those plugins, I'll work a little bit on the skining manager, I'll fix the look of the config dialog (right now really fscked), I'll right the special config dialog for the main app, and then make the app use those settings.

What about after those changes? 
Most probably I'll do some plugins. I really want to make the !mp3 plugin.
Also, I'm looking at whoosh and I'm starting to think about making a file indexer and searcher plugin. It won't be like strigi and it won't have any fancy things. It will just search for files given a string. Anyways, if you wish to see something more advanced, make a patch, send it to me and I could merge it if it doesn't break anything nor it kills my dog. :)

Next post will appear shortly after finishing !google-maps plugins and it will have some screenshots. Until then, have a good time.
Bye!

domingo, 18 de julio de 2010

[Devs] Blocking problems

One major problem that I'm having is the way that Linux manages the focus. On Windows, the top window has the focus after hiding and showing it, but on Linux things are different.
A top window can exist, but this doesn't mean that it will have the focus.
Also, windows with AlwaysOnTop flag won't have the focus (after hiding and showing the window)
There is also another problem. Most desktop environments have a thing called focus-steal-prevention-system. Yes! People get annoyed when they are typing something and a window pops up and steals the focus. I hate that too. But the nature of my app is different. The idea is to have a global key that will show/hide the app. Once the app is shown, it should steal the focus (really, this sounds annoying, but it isn't at all. In fact, it's usefull. Just try yakuake.)

So, what am I going to do to fix (or work-arround) this problem? I'm talking with mgrant, python-xlib maintainer, and he told me that he's going to merge some fixes into current 0.15rc1 branch, and that he'll work on my problem. Once it gets fixed, I could use his code to make my app steal the focus.
Meanwhile, I'll keep working on plugins.

Another big problem is Mac. Recently VirtualBox added native support for Mac, and I already have a basic install, but I'm lazy I haven't tested Jake-PyQT4 at all on Mac. Also, I don't know what could I use to hook the keyboard (that will let me implement the global key show/hide option). This has low priority for now. I'll try to release first for Linux and Windows. Then for Mac, and finally for Symbian.

Yes, Symbian. That's my last problem. Jake-PyQT4 is written in python and qt4, and both things run perfectly on Symbian devices. Also I don't do any fancy things (well, except the keyboard hook thingy), so it should work somehow on that platform. Or not... I guess that it will work fine on my phone (Nokia N97) because it has a keyboard, but how will users with only touch-screen-keyboard-devices type? If you have any ideas, feel free to share them here.
I'll post again once mgrant has added my feature-request.
Bye!

jueves, 15 de julio de 2010

[Devs] Basic design

In this post I'll explain a little bit more how Jake-PyQT4 works. If you're not a developer or if you don't have any coding skills, you can skip this post (if you want :p)

First part: Plugin system

The plugin system is loaded at start up. Once loaded, it will search in "plugins" directory. For each found folder it will search "main.py". If found, it will import it.
Once all plugins have been imported, plugin system will send a "get_capabilities" event.  All plugins can register to events, and every time the plugin system sends that event, all plugins that are currently registered to that event will run certain part of code. NOTES:

* more than one plugin can be registered for the same event.
* events are sent to each plugin synchronously, that means that only one plugin will run at the same time, so don't worry about printing things to the console, as it won't get mixed with the output of another plugins.
* each plugin can return a list of commands that can handle, and also, two plugins can handle the same command. Both plugins will be ran synchronously.

Second part: Libs

Currently I'm using Xlib on Linux and pyHook on Windows to handle the global keys. I'm still missing a Mac OS library, so if you know about some library that I could use, please write me an email, or comment here. I was thinking in using Xlib from darwin ports, but I'm not sure if it will work. Anyways, I guess I'll just have to setup a virtual machine and try it myself.
Also, I'm using googlepy for searching in google. But I have rewriten some parts from that lib because it wasn't working at all or as I wanted.
I'll write one lib per each website that I want to search in, and then I'll use that lib from a plugin. This will keep things simpler, and let more people code plugins without having to rewrite the same code for making queries in the same website.

Third part: Configuration system

Plugins must have the option to store settings. That's why the configuration system exists.
Plugins can have a list of options that will be passed to the configuration system. That list will be parsed and converted in a nice dialog. Settings will be stored in current user home folder.
If you want to look how does that list of options looks like, I suggest you to open up configsystem.py and see it yourself.
There is a large comment section will all types of settins, and a little example.


Forth and last part: Skin system

In fact, there is no skin system :p
I'll make a configuration dialog for Jake-PyQT4 (the main app) and I'll let users to choose a skin from there.
All UI elements can be styled using QSS. Also, tab position and transparency can be set with styles. If you need some help trying to make Jake-PyQT4 look as you like it you may need to read this and this. 

That's all for today! I'll post soon about what problems I think I'll have and what problems I'm having right now.
Bye! 

miércoles, 14 de julio de 2010

So, what can I do with this?

As I said in my last post, plugins can/will do almost anything.
A really simple example is a search in google:


Nothing special, but really quick. Think about using this instead of having to open a web browser. Jake-PyQT4 is as quick as hitting the global hide/show key (by default F8) and typing the search command. Also, as every unix/linux console, Jake-PyQT4 has the ability to autocomplete commands.
At start up the plugin system searches for all plugins, then makes them declare what commands do they accept and stores them. After that, you can easy access all of them with the autocomplete button (TAB by default).

Let's see another example! Searching photos:


Pretty cool. Well, also you can change how does every query looks like. You can change every single data color. Oh, best thing is that every plugin can have it's own query style. You're able to make !google to output everything in green, !google-images to output images size in red, images format en blue, images description in yellow, etc.
If you're thinking in a complex file-edit based config system, you're totally wrong. All that is done using a dynamically created configuration window dialog. Every plugin can have it's own array-of-options code block, and when that plugin calls plugin system's dialog, that array-of-options code block will be parsed and a dialog will be created according to those options. This way all plugins can use the same config dialog. I know you wanna some screenshots, don't you?


Finished looking the configuration dialog and wondering what are all those options? Yes! Exactly! !google-images supports everything that a normal search in google images can offer you. You can sort images by their type, size, color, style...
(A little bug, configuration window tabs are looking somehow bad, but don't worry, I'll fix that ASAP)

Another great thing about Jake-PyQT4 is that you can have as much console's as you wish! It's tab based. Look again on one of the screenshots. You'll notice that there is a little minus button at the left down edge, and a little plus button at the right down edge. Those are used to remove and add tabs. You can also remove tabs by clicking the little red cross on the right size of each tab.

Finally, the general appearence of Jake-PyQT4 is not hard-coded, so don't worry if you don't like transparency. You'll be able to choose the skin that you most love, or even make our own skin, as Jake-PyQT4 skin system is QSS based.

That's all for today! I'll post again tomorrow or maybe friday.
Bye

martes, 13 de julio de 2010

Hello World! (What's all that about?)

Hello world!
So, now that you're already here, you'd like to know what's all that about, right? Well, Jake-PyQT4 is a console based app written in Python and Qt4 bindings that aims to make your life easy searching those things that you want, for example search in google, show the weather, find a download link for an mp3, and a lot more stuff.
Actually, Jake-PyQT4 doesn't do anything of that. What Jake-PyQT4 does is:

* manage plugins, configs, skins
* behave like yakuake (linux console app that looks like quake's console)
* manage global keys / focus

Everything else is done by plugins. And plugins are able to print almost anything to the console (Jake-PyQT4), like photos, rich text, basic html, etc.

The project is hosted here, on sourceforge. You can wait for official releases or use SVN. I don't like breaking things, so SVN will be really stable too.

I'll post some screenshots soon.
Bye