new plugin development

120 views
Skip to first unread message

Bogdan C

unread,
Mar 16, 2012, 1:23:46 PM3/16/12
to griffit...@googlegroups.com
Hello,

I am trying to develop a plugin that would allow the user to choose a folder from a local hard drive (or ideally from a network samba location) then scan the folder for movies and then add them one by one into Griffith using the information downloaded from the web (IMDB preffered, but any other would do as well).
Now, it seemed reasonable that such plugin should be an import plugin since I'm importing new data into Griffith.
All good until I've actually attempted to write one. I've realized that Griffith expects a file or a list of files from an import plugin and not a folder.
I've already have some code to scan the folders and return an IMDB movie id or movie name from the movie folders and from there to use a IMDB pyton library to get the movie details but I need a way to integrate this code into Griffith hence this message. So my question is what would be the best way to obtain what I want and extend Griffith? Is the import plugin way the wrong way to do that? If so what do I need to do?
I've noticed that I am not the only one who wants that and I've seen on the group a previous attempt but there no news about that for some time now.

Thank you,
Bogdan

James Miller

unread,
Mar 16, 2012, 2:27:48 PM3/16/12
to griffit...@googlegroups.com
Hello Bogdan, I have developed a plugin that works for scanning files from the harddrive.  I was waiting to hear back from the group about the new repository location before I committed it.  It is complete but the project lead (I can't remember his name unfortunately) requested that I make some changes and I haven't had any time since then.

I can pass you the code that I have written if you would like but I warn you, it is my first attempt to write in python, sql, regex and the gui kit, so it might not be great.

I got to the point with the plugin where I was about to start developing it so that it would be possible to set each film's permissions appropriately according to certificate, so that I can store my films on a public folder and so that the kids can't watch films.

I will have to get it off my dev machine, so I will email it to you as soon as I can (a couple of days).  I was kind of waiting for the project lead to get back to me, as I was hoping he was going to be releasing a new version of griffith with different code, as the code in griffith is a little messy and all over the place and doesn't really follow oop design, but its not that bad and it works.

Actually, I just remembered I'm going on holiday next week, and may not be able to send you the code until the following week, unless I can dig it out now.

Cheers,

James
--
James Stewart Miller Bsc(hons) Psych.

Bogdan C

unread,
Mar 19, 2012, 3:27:52 AM3/19/12
to griffit...@googlegroups.com
James,

Thank you for the reply. I'd like to get a copy of your extension and give it a try. I've also got mine almost working in 99% of the cases but I still need to add some exception handlers and validations.
And yeah, I still use it as an import plugin with the hack (the path to the folder I import is in a file which is passed to the import plugin).

James Miller

unread,
Mar 26, 2012, 9:20:56 AM3/26/12
to griffit...@googlegroups.com
Hi Bogdan,  here's some griffith stuff.  It's the whole project, and includes in the extensions directory, some extra plugins that I wrote.  The gtk files are in the gtk folder but use a version of gtk that's a little outdated.  

http://dl.dropbox.com/u/65097440/griffith.tar.gz

Personally, I am an oop developer by preference and have no experience of collaborating with others having been developing code in isolation from other programmers for well over ten years.  The code is my first attempt at gtk, python etc, so please be kind!
(it works so heh!).

I was hoping to find the time to write in the ability for the user to be able to set the permissions on the locally stored movie files so that kids that might use that laptop/pc etc wouldn't be able to access them.  It's not that I'm a great fan of censorship but it might help in some way.  It was to take the certificate from IMDB and compare it against a lookup table of appropriate ages adjustable from the default uk/us guidelines by the 'appropriate adult' and then set the group permissions of the file appropriately.  However, I kind of lost interest as this is my first experience of collaborative open source development and there doesn't seem to be a great deal of interest, which has kind of put me off.

Although I am in favour of a complete rewrite of the code behind griffith, which I know the project lead is also in favour of, in order to get the above idea working, I would at the minimum rewrite the plugins so that instead of using string handling they use dom traversal.

Cheers,

James

On Fri, Mar 16, 2012 at 5:23 PM, Bogdan C <bogdan....@gmail.com> wrote:

Bogdan C

unread,
Mar 26, 2012, 3:58:09 PM3/26/12
to griffit...@googlegroups.com
James,

Thank you for getting back to me with this.
I am a little busy at the moment, but I'll most definitely give your code a look and a try and I'll let you know my thoughts.

Bogdan

Piotr Ożarowski

unread,
Mar 26, 2012, 4:01:10 PM3/26/12
to griffit...@googlegroups.com
[James Miller, 2012-03-26]
> http://dl.dropbox.com/u/65097440/griffith.tar.gz

will try to take a look soon; it would be great if you could produce a
patch against our repo (one per feature), though

> Although I am in favour of a complete rewrite of the code behind griffith,

yeah, I started something some time ago (in Python3) but I've been too
busy with RL to write enough to push the initial commit to gitorious

> which I know the project lead is also in favour of, in order to get the
> above idea working, I would at the minimum rewrite the plugins so that
> instead of using string handling they use dom traversal.

that transition is already on actually (see anidb plugin - it is using
lxml), the next step is to design new API for movie plugins (the old one
is not really friendly and doesn't take into account the fact that
usually all you need is the right XPATH)
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

James Miller

unread,
Mar 27, 2012, 7:11:03 AM3/27/12
to griffit...@googlegroups.com
Thanks Piotr,

Like I said, I'm afraid that I have no experience of collaborative development, although I'd really like to get some.  As soon as I have time, I'll tidy up the code and commit it properly.  The berlios repo is working so I'll try and do it today.
I'll post on this group as soon as I have, and I'd be grateful if someone could check that I haven't done anything wrong that might prevent the code from being accessible, as I haven't used version control yet.

Cheers,

James

James Miller

unread,
Mar 27, 2012, 7:12:59 AM3/27/12
to griffit...@googlegroups.com
btw, if its possible to help work on the python3 code that you've been working on, I'd be grateful.  RL is something I don't have to worry about too much in my situation.

Cheers,

James

James Miller

unread,
Mar 27, 2012, 10:17:18 AM3/27/12
to griffit...@googlegroups.com
Hi, I've just tried checking out the latest revision from the berlios svn repo address from griffith homepage and the connection is being reset by the server regularly.  Is the repo stable enough to consider making commits?

Cheers

2012/3/27 James Miller <jamesstew...@gmail.com>

Michael Jahn

unread,
Apr 2, 2012, 3:11:03 PM4/2/12
to griffit...@googlegroups.com
The berlios repo works for me like a charm. Checked in a small fix some minutes before.

Michael

Am 27.03.2012 16:17, schrieb James Miller:
Hi, I've just tried checking out the latest revision from the berlios svn repo address from griffith homepage and the connection is being reset by the server regularly.ďż˝ Is the repo stable enough to consider making commits?

Cheers

2012/3/27 James Miller <jamesstew...@gmail.com>
btw, if its possible to help work on the python3 code that you've been working on, I'd be grateful.ďż˝ RL is something I don't have to worry about too much in my situation.

Cheers,

James


On Tue, Mar 27, 2012 at 12:11 PM, James Miller <jamesstew...@gmail.com> wrote:
Thanks Piotr,

Like I said, I'm afraid that I have no experience of collaborative development, although I'd really like to get some.ďż˝ As soon as I have time, I'll tidy up the code and commit it properly.ďż˝ The berlios repo is working so I'll try and do it today.

I'll post on this group as soon as I have, and I'd be grateful if someone could check that I haven't done anything wrong that might prevent the code from being accessible, as I haven't used version control yet.

Cheers,

James
On Mon, Mar 26, 2012 at 9:01 PM, Piotr O�arowski <pi...@griffith.cc> wrote:
[James Miller, 2012-03-26]
> http://dl.dropbox.com/u/65097440/griffith.tar.gz

will try to take a look soon; it would be great if you could produce a
patch against our repo (one per feature), though

> Although I am in favour of a complete rewrite of the code behind griffith,

yeah, I started something some time ago (in Python3) but I've been too
busy with RL to write enough to push the initial commit to gitorious

> which I know the project lead is also in favour of, in order to get the
> above idea working, I would at the minimum rewrite the plugins so that
> instead of using string handling they use dom traversal.

that transition is already on actually (see anidb plugin - it is using
lxml), the next step is to design new API for movie plugins (the old one
is not really friendly and doesn't take into account the fact that
usually all you need is the right XPATH)
--
Piotr O�arowski � � � � � � � � � � � � Debian GNU/Linux Developer
www.ozarowski.pl � � � � �www.griffith.cc � � � � � www.debian.org

GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
--
James Stewart Miller Bsc(hons) Psych.




--
James Stewart Miller Bsc(hons) Psych.

Reply all
Reply to author
Forward
0 new messages