Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
danger
Moderator
Posts: 43
Joined: Sun May 07, 2006 12:11 am

PySubLib - Python coders wanted

Sat May 30, 2009 9:28 pm

Hello guys,

as some of you already know, we are now starting to work on the next version of the opensubtitles.org web site, which will (hopefully) resolve current issues.

This is an ongoing work, and before we will actually start writing the web site code, we need to create a Python implementation of the SubLib library (http://sublib.sourceforge.net/). Having this library will allow us to start working on the new web site.

In case you have experience in writing a Python code, this is a great opportunity to help us. You can contribute with your own code and as such speed up the process of the development of the new web site.

I have created a publicly accessibly repository for this library and added some code I have already wrote. Note that I am first time python programmer, so it can contain non-optimal code, which you are welcome to optimize.

The repository can be found at http://bitbucket.org/danger/pysublib/. In order to start working on this, please check it out (it's very small right now) and go ahead.

In case of questions, please ask here.

danger
Moderator
Posts: 43
Joined: Sun May 07, 2006 12:11 am

Sun May 31, 2009 1:25 pm

forgot to mention that if you are planning to help with this, please let me know so we both won't be working on the same portion of the code ;)

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Mon Jun 01, 2009 12:57 am

Why the need to port SubLib? What's the point? SubLib already works perfectly and being a C library it'd be much faster than anything that could be done in Python. It only needs a wrapper to work anywhere else, that's the reason it's a Library.

Obviously there's no benefit in speed as Python is slower than compiled C and there's no benefit in porting it if the final functionality is the same. There would be a lot of wasted effort, tho', and plenty of places for bugs to be created where they are now cleaned up.

Wouldn't it make more sense to make a Python wrapper and use that? As I mentioned elsewhere, if you were to make a Youtube-type of site you wouldn't try to re-engineer Mencoder, MP4Box and FFMPeg as Python libraries. It wouldn't make any sense!
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

cben
Posts: 1
Joined: Sun Jun 07, 2009 12:38 pm

I can help, but why rewrtie the wheel?

Sun Jun 07, 2009 2:19 pm

I'm an experienced Python programmer, and ready to help.
But first I'd like to understand the motivation.

I agree with eduo: if SubLib is good for you except for being in C, you'll get better performance by wrapping it than by rewriting it. Not to mention avoiding code duplication.

Also, if SubLib is not so much of a requirement as a Python subs library, maybe you can use code from Gaupol. (There are also PySubtitles and KeyStroke, but they are much less mature.)

User avatar
oss
Site Admin
Posts: 5884
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Sun Jun 07, 2009 2:53 pm

cben: I am not python expert at all, but how we can use SubLib, when it is coded in C#/Mono ? I just download their library (dll) and use it on FreeBSD ?

Or I have to compile somehow, than export it to some .lib and I can use it ? I must install mono also on webserver to use it ?

Thanks

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Sun Jun 07, 2009 5:29 pm

import clr

http://pythonnet.sourceforge.net/readme.html

You just need to know the namespaces of the compiled C# library, visible from the sourcecode.

You can get a precompiled binary for the library, I believe.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
oss
Site Admin
Posts: 5884
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Mon Jun 08, 2009 1:58 pm

ok, but when used this library on server I must also install .NET/Mono right ?

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Mon Jun 08, 2009 2:05 pm

ok, but when used this library on server I must also install .NET/Mono right ?
What? No, why? You don't have to have C to run programs coded in C either.

That's what a "compiled binary" means.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
oss
Site Admin
Posts: 5884
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Mon Jun 08, 2009 2:34 pm

yes it makes sense. Thanks for info, but I think DanGer won't give up and he will rewrite that all :)

macofaco
Posts: 68
Joined: Mon Sep 22, 2008 8:31 pm
Contact: Website

Mon Jun 08, 2009 5:32 pm

optimist ;P

Christofer
Posts: 7
Joined: Tue Apr 01, 2008 5:25 pm

Wed Jun 10, 2009 2:32 am

ok, but when used this library on server I must also install .NET/Mono right ?
C# or VB assemblies for that matter are not compiled to native machine code. Just like with Java a framework is needed to execute these assemblies. So you definitely need .NET/Mono. Don't let anyone tell you otherwise.

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Mon Jun 15, 2009 1:55 am

ok, but when used this library on server I must also install .NET/Mono right ?
C# or VB assemblies for that matter are not compiled to native machine code. Just like with Java a framework is needed to execute these assemblies. So you definitely need .NET/Mono. Don't let anyone tell you otherwise.
Chris: I'm right here. You can just tell me I'm wrong. No need for the "don't let anyone tell you otherwise" jab, really.

I was under the impression that C# (VB is irrelevant here, I believe) could be compiled to native code. Your correction is welcome, as I obviously was wrong (and I clearly don't use C#).
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

Christofer
Posts: 7
Joined: Tue Apr 01, 2008 5:25 pm

Mon Jun 15, 2009 1:00 pm

You can just tell me I'm wrong. No need for the "don't let anyone tell you otherwise" jab, really.

I was under the impression that C# (VB is irrelevant here, I believe) could be compiled to native code. Your correction is welcome, as I obviously was wrong (and I clearly don't use C#).
Sorry if I offended you. You just seemed so sure and I know people have much respect for you here so I felt that I needed to make it clear that this time you were wrong.

User avatar
oss
Site Admin
Posts: 5884
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Mon Jun 15, 2009 1:39 pm

ok, thats why rewriting makes sense. Thanks guys.

danger
Moderator
Posts: 43
Joined: Sun May 07, 2006 12:11 am

update

Tue Sep 15, 2009 9:56 am

hey guys,

I wanted to let you know that I have made some progress on this. You can find the public repository at http://bitbucket.org/danger/pysublib/src/ and the documentation at http://pysublib.opensubtitles.org/. If you are any familiar with python, you are more than welcome to help me with its development.

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 46 guests