#1 2007-09-23 00:26:45

robby
New member
Registered: 2007-03-31
Posts: 8

List of installed plugins from command line?

Hi Tian, I've got a question for you. Is it possible to get a list of available plugins from the command-line, given a collection type?

Here's what I'm thinking about doing: writing an integrated import plugin for Tellico that calls GCstar directly, executes a search with a GCstar plugin, and imports the results. That way, I can start using all of your great search plugins directly in Tellico.

First, I really don't want to step on anyone's toes. Your wide variety of available website searches is one of the strengths of GCstar, in my opinion, and I don't want to steal that. So if you'd rather that I not take advantage of that directly in Tellico, I understand.

So basically in the config, I'd probably try to grab the available plugins from GCstar, offer the user the choice of which one to use, and then run GCstar again to execute the search. So you can see, I need some way of programatically figuring out what is available.

Make sense?

Congratulations on the 1.2 series of releases, by the way. It looks great!

Offline

 

#2 2007-09-23 12:16:12

Tian
Administrator
From: France
Registered: 2006-12-08
Posts: 1647
Website

Re: List of installed plugins from command line?

Hi,

robby wrote:

I've got a question for you. Is it possible to get a list of available plugins from the command-line, given a collection type?

There is nothing available for the moment. I don't think it should be too hard to implement. I'll try to provide that in next version if you wish. I just can't tell you for the moment when this will be available as my TODO list is quite huge wink

robby wrote:

Here's what I'm thinking about doing: writing an integrated import plugin for Tellico that calls GCstar directly, executes a search with a GCstar plugin, and imports the results. That way, I can start using all of your great search plugins directly in Tellico.

This looks great smile Do not hesitate to let me know if you need some help for this.

robby wrote:

First, I really don't want to step on anyone's toes. Your wide variety of available website searches is one of the strengths of GCstar, in my opinion, and I don't want to steal that. So if you'd rather that I not take advantage of that directly in Tellico, I understand.

I would do proprietary software if that would be a problem for me wink So I am really fine with that.

The only small requirement I would have would be, if that's possible, to credit the developers that made the plugins. Most of them are not from me but from external contributors. That's why their names are displayed in GCstar.

Then I think the list returned by GCstar should also contain the names of authors. What would be the most useful format for you for this?

robby wrote:

Congratulations on the 1.2 series of releases, by the way. It looks great!

Thank you very much. I also tries to follow what you do in Tellico as it is really great, and more mature than GCstar.

I thought about something but I never found some time to talk you about this. It seems you planned to use a SQL backend in a future release. Did you already begin to work on this? Actually I had the same idea for GCstar. But for the moment I only re-organized the code to make this possible with some abstraction layers.

I think it would be great if both GCstar and Tellico could share the same data model in database. I don't know yet if this is possible. Do you have any opinion on this before I began more investigations? I know I won't begin this task until I finished other work in progress are done. So there is no hurry for an answer.

Offline

 

#3 2007-09-23 16:46:21

robby
New member
Registered: 2007-03-31
Posts: 8

Re: List of installed plugins from command line?

Tian wrote:

robby wrote:

I've got a question for you. Is it possible to get a list of available plugins from the command-line, given a collection type?

There is nothing available for the moment. I don't think it should be too hard to implement. I'll try to provide that in next version if you wish. I just can't tell you for the moment when this will be available as my TODO list is quite huge wink

Believe me, I completely understand! cool

Tian wrote:

The only small requirement I would have would be, if that's possible, to credit the developers that made the plugins. Most of them are not from me but from external contributors. That's why their names are displayed in GCstar.

Then I think the list returned by GCstar should also contain the names of authors. What would be the most useful format for you for this?

It's really neat that you're making so much accessible directly from the command-line. And I agree totally, I'd love to showcase the plugin authors. I guess I could work with whatever format, either having the author included in the list of plugins somehow, or having a different option to return plugin info, given a plugin name.

Tian wrote:

I thought about something but I never found some time to talk you about this. It seems you planned to use a SQL backend in a future release. Did you already begin to work on this? Actually I had the same idea for GCstar. But for the moment I only re-organized the code to make this possible with some abstraction layers.

I think it would be great if both GCstar and Tellico could share the same data model in database. I don't know yet if this is possible. Do you have any opinion on this before I began more investigations? I know I won't begin this task until I finished other work in progress are done. So there is no hurry for an answer.

Yeah, I've been playing with a SQL backend. I've got a schema worked up, but it's probably more complex than I really need. I actually started working from the FRBR model (Functional Requirements for Bibliographic Records), which is a bibliographic model with different levels of entities, like work, endeavor and item. And things like Author become top-level objects with their own attributes. Then I changed what I didn't like. smile So it's really a hybridized schema, with several different tables, with some attempt at normalization.

I've got it basically working but the performance is nowhere close to what I need. So I'm not sure if I just need to learn SQL better or perhaps simplify things. I've been using KexiDB, which is a KDE library for abstracting database access, so there's not a single SQL file I can point you to in Tellico's SVN right now.

Offline

 

#4 2007-09-24 09:10:34

Tian
Administrator
From: France
Registered: 2006-12-08
Posts: 1647
Website

Re: List of installed plugins from command line?

robby wrote:

I guess I could work with whatever format, either having the author included in the list of plugins somehow, or having a different option to return plugin info, given a plugin name.

To have something easy to implement, to parse and also nice to read for users, I think the format could be:

Code:

Plugin name 1
  Author 1
Plugin name 2
  Author 2
...

There is a name on each line and the authors are below on a new line also. There is a small indentation before authors (a few spaces or tabulations)

I'll keep you informed about this.

Thank you for your information about SQL backend. I have no idea yet when I will begin to work on this.

Offline

 

#5 2007-10-02 13:29:28

Tian
Administrator
From: France
Registered: 2006-12-08
Posts: 1647
Website

Re: List of installed plugins from command line?

Hi Robby,

I implemented that feature. It is only available in the CVS version for the moment. So it will be in 1.3.0 version (no planned delivery date yet).

The command is this one:

Code:

gcstar -x -c GCgames --list-plugins

Where the value after -c will obviously have to be changed according to kind of collection.

The output has this format:

Code:

Plugin name 1\n
\tAuthor name 1\n
\n
Plugin name 2\n
\tAuthor name 2\n
\n

There is a tabulation character before the author name (which is on its own line). And an empty line between plugins.

Please note that a plugin name (and author name also but this should not be a problem) could contain some spaces. Then you will have to enclose it between quotes before passing it to GCstar's invocation for fetching.

This should be easy to parse while quite nice to read for humans.

Do not hesitate to let me know if you need some changes in this format.

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.