Plugin for Software Center results

Registered by Jan

Having Google search already in, what about integrating Software Center search as a plugin? The first results could be displayed directly and clicking one would open its »More Info« site in Software Center. An important thing would be to only display the software that is not already installed, as this should be handled by Cardapio already. »play« for instance also displayed 4 installed GStreamer elements that we should really not expose to people.

This would make users more aware of instantly available software. The Software Center is Ubuntu’s real joker and needs to get more exposure and integration.

I made a mockup: https://wiki.ubuntu.com/JanCBorchardt?action=AttachFile&do=view&target=Cardapio+%2B+Software+Center.png
That you can also mess with: https://wiki.ubuntu.com/JanCBorchardt?action=AttachFile&do=view&target=Cardapio+%2B+Software+Center.xcf

What do you think about it – is this even possible?

(This idea is loosely based on Frederik Nnaji’s thoughts on the Ayatana mailing list: https://lists.launchpad.net/ayatana/msg01455.html)

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
Jan
Direction:
Approved
Assignee:
cmulk
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Jan
Completed by
cmulk

Whiteboard

all[anubeon 2010-06-15]
This would definitely be a boon to Cardapio. Also, since the search functionality of Cardapio has a lot in common with Gnome-Do, I wonder whether it is worth investigating the possibility of porting or even sharing Gnome-Do's extensive list of official and community plug-ins. I don't know how (in)feasible that would be, just putting the idea out there.

----------------
[tvst 2010-06-16]
This could easily be implemented in a plugin, but I already have a lot on my plate as it is. Does anyone know how to get software center results from Python? If so, post it here and I can write the plugin in no time.

anubeon:
Looking at plugins from Do is a good idea. Just keep in mind that Cardapio is not aiming to become a full-featured "everything tool" like Do. So the plugins we port would have to make sense in the context of Cardapio.

We should not port pastebin or microblogging, for example. But it would be ok to port the tomboy plugin. So I guess we should draw the following line:

* "Search" plugins are OK
* "Action" plugins are not OK

If anyone has a different take on this, I would like to hear your rationale.

----------------
[jancborchardt 2010-06-16]
Sounds fine to me, porting search plugins would be efficient.

I was searching for a way on how to get Software Center results and thought of Ubuntu-Tweak, but they seem to have their own repositories.

----------------
[anubeon 2010-06-22]
I entirely agree with you vis. only porting search based plug-ins from Do. I imagine it would be great though, if it were possible to use Do search plug-in's out-of-the-box as it were. The option is then always there to only ship Cardapio with select search-based plug-ins and/or to explicitly block the use of action-based plug-ins. I'm not a programmer and so have no idea whether such is even possible. But I would imagine that it would be quit useful to share the development burden with regards plug-ins with Do where appropriate, not to mention reducing/negating the work needed to port their plug-ins

I mentioned this only because, if my recollection served me well serves me well, Do has an AptURL Package Installer plug-in which would seem to incorporate a software centre search functionality. That said, I've never had much luck with it, though my installation of Do is a little on the fritz at the moment. With luck said [Do] plug-in will prove useful or at least provide some inspiration to ye who programme. FYI it is a community maintained plug-in.

----------------
[milky2313 2010-07-01]
I'm not sure if anyone else is working on this right now, but I have had some time today and made some great progress. I have been able to access the search functions of software center and get application info in a format that will work for a plugin. I have written a test program and will probably have a working prototype of the plugin by tomorrow. The only thing I'm not sure about yet is the application icons. I need to look more into software-center code for that. If anyone has any tips, please let me know.

----------------
[jancborchardt 2010-07-03]
@milky2313: Wow Clifton, that works nice. :)
Except for the icons, the only 3 problems I see with the current beta:
1) It displays applications that are already installed
2) Having a search string in Cardapio and clicking »Open software center« does not take the string from Cardapio to Software Center
3) »Uninstalled Software« is misleading, it sounds like you already installed the apps at some point but uninstalled them again. I think »Software Center« is much more fitting. Please have a look at the mockup: https://wiki.ubuntu.com/JanCBorchardt?action=AttachFile&do=view&target=Cardapio+%2B+Software+Center.png
Apart from that, it’s gorgeous. Thank you very much. :)

--------------
[milky2313 2010-07-07]
Thanks for your comments! I'm glad you like it!
About some of the problems:
The plugin should filter out installed applications and packages that aren't applications (for the most part) except for a small bug in the posted version. There is an accidental missing tab on lines 125-142 that leave them out of the filtering if-statement.
As for the icons, I got them working correctly on my machine, but I requires some changes to cardapio.py for icon handling. I've been talking to Thiago about taking care of that.
As for moving the search string over to software center, I'm not sure how to do that, I will look into it more...

--------------
[tvst 2010-07-03]

Yes Clifton did a great job!

About the title "Uninstalled Software", that was my idea. Clifton originally had "Software Center". I changed because I don't think a noobie would know what "Software Center" means, while "Uninstalled Software" is a bit more obvious. But maybe "Uninstalled" *does* make people think about software that was installed and then removed --- in which case I think we should be looking for another name for this category other than either of these. "Available Software" is another option, but it also doesn't sound quite right...

jancborchardt: Your idea #2 is exactly what I wanted to do when I added that item to the plugin, but it seems that Software Center does not provide a command-line option for doing that. Now, it just so happens that Synaptic *does* have that option (the -i parameter), but alas I can't get it to work on my machines.

--------------
[jancborchardt 2010-07-03]
»Available Software« sounds better, but then again it is not quite available yet. Software Center being the name of the app would be the obvious choice. But you’re right, there has to be a more self-explanatory choice. Maybe »Free Software« or even better »Get Software«?

Yes, I read through the manpage on Software Center as well – pretty short. :\

--------------
[milky2313 2010-07-03]
I just downloaded and tested the latest revision (279). Everything works great with the updated icon handling in cardapio.py and the filtering fixes that were mentioned previously. This functionality now is just what I had hoped for (thanks Thiago and Jan-Christoph)! As for the name, I think that "Get Software" would be best in order to be consistent with the labels in the Software Center.

--------------
[tvst 2010-07-03]

Just found this bug: https://bugs.launchpad.net/cardapio/+bug/601505

About the category name: I like that "Get Software" is the same string that appears in Software Center itself, but I don't think it matches the other Cardapio category names. Namely, it denotes an *action* while the other names are *classes*.

Maybe I'll just go with "Available software" after all, although I feel like it's not *exactly* right since the software is only available in the sense of being freely downloadable, but not in the sense of being available for immediate use in your computer...

----------------
[TheCaméleon 2010-07-04]

Right-Clic > Install ?
Using apt://
Wouldn't that be such a great feature ?

----------------
[tvst 2010-07-04]

TheCaméleon:
Great idea! But I would have to extend the plugin API to allow plugins to add items to the context menu first. So we'll see about this one.

----------------
[jancborchardt 2010-07-04]
tvst:
About the label: You’re right, I had the same conversation with frederik.nnaji earlier. ;)
»Available Software« is certainly better than »Uninstalled Software« and until we find a better one we should use it.

And directly installing using apt:PACKAGENAME without Software Center in the way would be great. Probably not as the default option but still great as Caméleons proposal via right-click. (I only discovered that you can use apt:PACKAGENAME a few days ago.)

----------------
[tvst 2010-07-30]

Just a head's up, in case someone else noticed this:

It turns out that searching the software center takes a few hundredths of a second more than it should, causing the find-as-you type to be a little "jumpy". To solve this issue, I'm planning on making making plugins run on a separate "plugin thread", shared by all plugins. This should make the UI a little snappier.

Note that I don't plan on giving *each* plugin *its own* thread, though, because I think that would be overkill. But we'll see. Maybe it's necessary.

----------------
[jancborchardt 2010-07-31]
Speaking of taking more time than it should: When I use the Software Center plugin and click on a result, the Software Center is opened and the main page is displayed for 3–5 seconds, only then the specific page is loaded. Is that only happening for me or a general problem with Software Center?

As it is happening on my fresh Ubuntu 10.04 install as well, I guess it unfortunately is a general problem.

Some other problems:
If Software Center gets opened that way, it is not possible to go back to the main page because the breadcrumb navigation is not activated for some reason.
If Software Center is already open, regardless if on main page or on an application’s page, nothing happens.
The search function does not search inside of PPAs.

I don’t know if these things are even possible to fix since I can imagine Software Center being quite hard to work with. Just like earlier with »Having a search string in Cardapio and clicking ›Open software center‹ does not take the string from Cardapio to Software Center«. Only some things I noticed. :)

--------------------------
[milky2313 2010-08-01]
I get the exact same behavior. It's definitely some software center weirdness as far as I can tell. Searching directly in software center has the same delay that searching from Cardapio does, although it seems to only be noticeable when you enter a search string with spaces in it. I also get the same problems that jancborchardt reports. The good news is that software center is apparently undergoing pretty major changes so Maverick, so that will hopefully result in improvements for us!

--------------------------
[jancborchardt 2010-08-01]
I couldn’t restrain myself from upgrading to Maverick again. ;) And it seems some of the problems already got fixed!
Searching now immediately takes you to the application page and does not stop on the main page. Also it is much faster.
To top it off; the breadcrumb navigation as well as searching inside PPAs now seems to work. :)

I filed bugs for the two problems that are left:
No parameter to pass a search string: https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/612507
If already running, using »software-center PACKAGENAME« does nothing: https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/612509

Oh, and on seeing this bug:
»apt:package-name isn't handled by the Store when appropriate«: https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/426215
We should remove the right-click option for »Install PACKAGENAME« (at least when maverick is released), because it is not faster than Software Center anymore and certainly not more user-friendly.

--------------------------
[jancborchardt 2010-08-05]
And in case you did not notice, great news!
Unity now has Software Center search integrated. :)
http://www.webupd8.org/2010/08/une-1010-unity-update-brings-lots-of.html

I also talked about that to GNOME Shell designer William Jon McCann last week at GUADEC.

-------------------------
[jancborchardt 2010-08-13]
Wow, thanks to Kiwinote for fixing all the bugs related to this. :)

There now is a parameter to pass a search string:
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/612507/comments/3

Clifton, could you take a look at it? I’m currently not sure if just editing line 83 would do it and can not test it either way.

-------------------------
[milky2313 2010-08-13]
Thanks for the info! I will definitely work on this.

-------------------------
[milky2313 2010-08-26]
The software center plugin has now been updated to use the new search feature in maverick. As mentioned above, many of the bugs with opening delay and package view have also been fixed in Ubuntu software center. Anyone using maverick please check out the updated plugin!!

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.