It is currently Sat Nov 26, 2011 8:20 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Daemon / Headless mode
PostPosted: Fri Mar 06, 2009 10:12 am 
Offline

Joined: Fri Mar 06, 2009 10:06 am
Posts: 5
Hello,

I'm trying to run TED as a startup script in linux (/etc/init.d). However I could not find a flag to launch it in headless mode. Is this feature available?

What I want to achieve is: lauch TED with GUI to configure my shows, then quit TED. Configure a /etc/init.d script to lauch headless TED on boot (poiting to my .conf file) that handles all the torrent download. This way TED's GUI would work as a fancy configuration editor, and the headless version would do all the work.

Is this possible?

As an alternative, I'm willing to code this feature but I couldn't find ted's source anywhere. Isn't TED opensource?

Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 10:35 am 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 5:46 pm
Posts: 904
Location: Netherlands
This option is not available (yet).

ted is indeed open source, you can have a look at the source code on our SourceForge page: http://sourceforge.net/projects/ted

I don't think it will be very easy to decouple the UI from the rest of the program (bad architecture :)). But be my guest and take a look. If you've some questions please let us know.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 12:18 pm 
Offline

Joined: Fri Mar 06, 2009 10:06 am
Posts: 5
First things first:

- Does TED generate a .config file containing all the configured options?


What I plan to do:
- Create a standalone (not TED's) main method that invokes some methods on some classes of ted's jar.

I'll take a look at the code today, the only prerequisite is that the routine that downloads the torrents are decoupled from any awt pollution.

Do you have any IM contact available?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 12:43 pm 
Offline

Joined: Fri Mar 06, 2009 10:06 am
Posts: 5
let me add/reformulate a question:

- do you have a routine that searches all the feeds and downloads the .torrent files ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 5:46 pm 
Offline

Joined: Fri Mar 06, 2009 10:06 am
Posts: 5
Hello,

3rd question:

I've made some changes to TED's main classes and I'd like to build a .jar to test it in linux, and verify that I didn't brake anything. Do you have an ant script, or such? how do you package your .jar files ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 10:05 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 5:46 pm
Posts: 904
Location: Netherlands
BlueBus wrote:
- Does TED generate a .config file containing all the configured options?

Yes, it's called config.ted. You can probably find it in your application data folder (on windows).

Quote:
Do you have any IM contact available?

I'll PM you where you can contact me.

Quote:
Do you have a routine that searches all the feeds and downloads the .torrent files ?

Take a look at the TedParser class. (Which is a mess btw, it's on our list to be rewritten).

Quote:
I've made some changes to TED's main classes and I'd like to build a .jar to test it in linux, and verify that I didn't brake anything. Do you have an ant script, or such? how do you package your .jar files ?

Euh, I've no clue :)Roel always creates the jar file. But can't you just start ted from your SDK?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 11:09 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 4:11 pm
Posts: 645
Location: Netherlands
I am afraid it is not that easy to create a headless version of ted, at least not with our current parser implementation. It is rather ugly, the parser needs the UI (tedmaindialog) for some callbacks and error messages. We need to rewrite that when we are going to rewrite our parser...

I create jar files via eclipse, see the jardesc file in the "ted runnable" folder

_________________
Roel

i watch: simpsons, south park, lost, top gear, true blood & fringe
download - documentation - bugs/feature requests - sourceforge -


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 07, 2009 12:29 am 
Offline

Joined: Fri Mar 06, 2009 10:06 am
Posts: 5
I'm now pretty comfortable with TED's code. I don't think its gonna be so hard at all to write the headless version. In fact, a draft version is already at place at my PC.

I also added an option to allow TED to work behing a proxy. I'm currently struggling with the Advanced configuration tab, as I'm not currently getting the new textboxes to show up.

I'll be in touch.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 10:22 pm 
Offline

Joined: Fri Jan 25, 2008 10:24 pm
Posts: 3
BlueBus wrote:
I'm now pretty comfortable with TED's code. I don't think its gonna be so hard at all to write the headless version. In fact, a draft version is already at place at my PC.


I noticed https://ted.nu/bugs/index.php?do=details&task_id=258. From the discussion contained in the bug entry I get that you want to write a daemon, but since it cannot be done in a cross-platform manner, you want to use some lib which interfaces to the OS.

Would it not be better to be able to start ted in headless mode to do a single check and then exit, so it can be called from cron or some OS/distro specific script (like "start-stop-daemon" used by Debian and possibly Ubuntu)?

/wojci


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group