View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 36 posts ] 
Go to page Previous  1, 2, 3  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Oct 31, 2005 2:36 pm 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
Aubrey, this writeup was fantastic! I'm in the process of making an install script that automates the manual installation and configuration steps. It uses sed scripting to insert or modify the lines of iPodder source code as you directed, so it may prevent you from having to maintain your own fork.

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject: castpodder?
PostPosted: Tue Nov 01, 2005 12:16 am 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
According to a post on the iPodder forum, the Linux version split off into castpodder: http://www.ipodderlemon.com/support/viewtopic.php?t=659

Hmm. I was going to ask how to tell iPodder to download things in alphanumeric order and/or how to tell it to skip episodes I've already seen, but I guess it makes more sense to check out castpodder and see how it is meant to work. Anyone here tried it yet?

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 07, 2005 8:29 pm 
Offline
Joined: Sat Nov 05, 2005 6:23 pm
Posts: 11
I am trying to set this up since transfering files is a pain every time I get a new podcast in but its not working this is the error I am getting

Code:
sh-3.00$ python /opt/iPodder/iPodder.py
Traceback (most recent call last):
  File "/opt/iPodder/iPodder.py", line 38, in ?
    from ipodder import configuration
  File "/opt/iPodder/ipodder/configuration.py", line 143
    parser.add_option('-D', '--downloads',
                                          ^
IndentationError: unindent does not match any outer indentation level


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 07, 2005 8:35 pm 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
Please try this script I wrote to install iPodder. It installs iPodder and its dependencies in R5A22, plus set up some default subscriptions, and is mostly just an automation of what's already been posted in this thread. If it tests well, I'll post it on http://mythic.tv and submit it for inclusion in the next KnoppMyth ISO.

BTW, has anyone gotten CastPodder working?

Code:
#!/bin/bash

# This script takes the manual steps listed on
# http://mysettopbox.tv/phpBB2/viewtopic.php?t=5609 and automates
# them.

if [ `whoami` != "root" ]; then
    echo "This script must be run as root."
    exit -1
fi

# Every file we may create, edit, or delete
###########################################
export IPODDER_SKINS=/opt/iPodder/gui/skin.py
export CONFIGURATION=/opt/iPodder/ipodder/configuration.py
export PLAYERS=/opt/iPodder/ipodder/players.py
export VIDEOFEEDS=/home/mythtv/iPodderData/videofeeds.txt
export AUDIOFEEDS=/home/mythtv/iPodderData/musicfeeds.txt
export RUNIPODDER=/home/mythtv/runipodder.sh
export MYTHCRONTAB=/var/spool/cron/crontabs/mythtv

# need to get python-related packages with specific versions
############################################################
echo "updating package repository..."
apt-get update > /dev/null
apt-get install -y -q2 libwxgtk2.4-python
apt-get install -y -q2 python-xmms

echo "downloading and auto-installing iPodder 2.1..."
cd /root
wget -q http://unc.dl.sourceforge.net/sourceforge/ipodder/iPodder-linux-2.1.tar.bz2
tar -xjf iPodder-linux-2.1.tar.bz2
cd iPodder-linux
# make installer auto-install, using default paths for everything
sed -i "s/read var/# read var/" install.sh
./install.sh > /dev/null

echo "configuring iPodder software..."
# Tweaks to make this better for MythTV
#######################################
sed -i "/DEFAULT_SUBS = .*$/{N; N; s/DEFAULT_SUBS = .*/DEFAULT_SUBS = []/; }" $IPODDER_SKINS

sed -i "/return parser$/{N; s/return parser/parser.add_option('-s', '--statedb',\n                      dest = 'state_db_file',\n                      action = 'store',\n                      type = 'string',\n                      default = None,\n                      help = \"Override: specify which state_db file to use\")\n\n    return parser/; }" $CONFIGURATION

sed -i "/# ('key',default, exposed)$/{N; s/('appdata_dir', None, True),/('appdata_dir', None, True),\n    ('favorites_file', None, True),\n    ('state_db_file', None, True),/; }" $CONFIGURATION

sed -i "s/self.favorites_file = join(appdata, \"favorites.txt\")/if self.favorites_file is None:\n            self.favorites_file = join(appdata, \"favorites.txt\")/" $CONFIGURATION

sed -i "s/self.state_db_file = join(appdata, \"iPodder.db\")/if self.state_db_file is None:\n            self.state_db_file = join(appdata, \"iPodder.db\")/" $CONFIGURATION

chmod 644 $PLAYERS

# Set up preferences as the mythtv user
#######################################

echo "setting up iPodder for mythtv user..."

# This code currently only works if run locally; running in a remote
# shell can fail if the DISPLAY isn't set properly.
su - mythtv -c "cd; python /opt/iPodder/iPodder.py"

# Set up video feeds default file
#################################
su - mythtv -c mkdir -p -m a+rw /home/mythtv/iPodderData
su - mythtv -c echo "# SYSTM" > $VIDEOFEEDS
su - mythtv -c echo "#http://revision3.com/systm/feed/large.xvid.avi.torrent.xml" >> $VIDEOFEEDS
su - mythtv -c echo "# diggnation" >> $VIDEOFEEDS
su - mythtv -c echo "#http://revision3.com/diggnation/feed/small.mov" >> $VIDEOFEEDS
chown mythtv:mythtv $VIDEOFEEDS

# Set up audio feeds default file
#################################
su - mythtv -c echo "# This Week in Tech" > $AUDIOFEEDS
su - mythtv -c echo "http://twit.tv/vorbis-b/rss.php" >> $AUDIOFEEDS
su - mythtv -c echo "# SecurityNOW" >> $AUDIOFEEDS
su - mythtv -c echo "http://leoville.tv/podcasts/sn.xml" >> $AUDIOFEEDS
chown mythtv:mythtv $AUDIOFEEDS

# Create a script that will download the media in the feeds
###########################################################

echo "setting up iPodder to run twice a day..."

echo "#!/bin/sh " > $RUNIPODDER
echo "#" >> $RUNIPODDER
echo "# This file will sequentially run instances of iPodder" >> $RUNIPODDER
echo "# This is needed because of conflicts with the bit torrent port." >> $RUNIPODDER
echo "python /opt/iPodder/iPodder.py --favorites="$VIDEOFEEDS" --statedb=/home/mythtv/iPodderData/video.db --downloads=/myth/video > /dev/null 2>&1" >> $RUNIPODDER
echo "python /opt/iPodder/iPodder.py --favorites="$AUDIOFEEDS" --statedb=/home/mythtv/iPodderData/music.db --downloads=/myth/music >> /dev/null 2>&1 " >> $RUNIPODDER
chmod a+x $RUNIPODDER
chown mythtv:mythtv $RUNIPODDER

# Have cron run this at 2:00 AM and 2:00 PM every day
#####################################################
if [ ! -e $MYTHCRONTAB ] || [[ `grep -c runipodder $MYTHCRONTAB` == "0" ]]; then
    echo "0 2,14 * * * "$RUNIPODDER" > /dev/null 2>&1" >> $MYTHCRONTAB
fi

echo "DONE installing and configuring iPodder!"

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 3:22 pm 
Offline
Joined: Sat Nov 05, 2005 6:23 pm
Posts: 11
I used your shell script and it worked but it dosen't seem like any files are beeing downloaded. I manually ran runipodder.sh and then I let it run it self and no files ever made it to the video or music folders, and idea why? Thanks for the script by the way.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 4:27 pm 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
I'm glad you like it :)

If it doesn't seem like it's running, you should debug it by running the individual commands in /home/mythtv/runipodder.sh without the redirect to /dev/null, e.g.:
Code:
python /opt/iPodder/iPodder.py --favorites=/home/mythtv/iPodderData/musicfeeds.txt --statedb=/home/mythtv/iPodderData/music.db --downloads=/myth/music

(NOTE: you may need to fix line wrap before you paste that into a terminal.)

That'll show you some useful output and maybe explain why it isn't running.

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 5:51 pm 
Offline
Joined: Sat Nov 05, 2005 6:23 pm
Posts: 11
Well I am getting an error but I imagin its due to the fact that I am running this over ssh

Code:
python /opt/iPodder/iPodder.py --favorites=/home/mythtv/iPodderData/musicfeeds.txt --statedb=/home/mythtv/iPodderData/music.db --downloads=/myth/music
[<class 'ipodder.players.XMMSPlayer'>, <class 'ipodder.players.NoPlayer'>]

Gtk-WARNING **: cannot open display:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 6:43 pm 
Offline
Joined: Sat Nov 05, 2005 6:23 pm
Posts: 11
looking into this more I noticed that I don't even have a music.db and video.db file in my iPodderData folder. I am going to guess that this is the real issue.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 6:47 pm 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
zoglesby wrote:
Well I am getting an error but I imagin its due to the fact that I am running this over ssh

Yep. Do this:

As root, edit /etc/ssh/sshd_config and change
Code:
X11Forwarding no

to
Code:
X11Forwarding yes


That tells sshd to automatically set up X display forwarding to display X apps on the machine from which you connect.

Then run:
Code:
killall -1 sshd


That restarts sshd to incorporate the changes to the config file. It'll also log you out of any ssh sessions.

Now ssh back in, this time passing the -X parameter to ssh when you connect to the box. That'll make sure X forwarding happens. (In most cases, you can skip the -X parameter, but I needed to do it for certain cases.) Example:

Code:
ssh -X mythtv@dragon

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 6:59 pm 
Offline
Joined: Sat Nov 05, 2005 6:23 pm
Posts: 11
I got it working from my mythtv box (looking at a terminal window on a tv screen sucks!), but just for the record I am getting another error when I set up ssh like you said.

Code:
sh-3.00$ sh runipodder.sh
X11 connection rejected because of wrong authentication.


Thanks for all the help.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 7:08 pm 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
zoglesby wrote:
Code:
sh-3.00$ sh runipodder.sh
X11 connection rejected because of wrong authentication.

Hmm. If you did everything I outlined, I don't know why it would still reject you. I posted the steps I took, and it worked on my system.

zoglesby wrote:
Thanks for all the help.

Sure thing! Sorry I only got you so far :( You may have to run it locally on the box, instead of via ssh.

The irony here is that with the modifications to iPodder, it doesn't even generate a GUI when you invoke it as in runipodder.sh, but apparently it still checks to see if it could display something.

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 8:06 pm 
Offline
Joined: Sat Nov 05, 2005 6:23 pm
Posts: 11
Yeah I did run it on the local box I just had to pull my eyes out after. Reading off a tv screen is not easy.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 7:24 pm 
Offline
Joined: Sun Nov 16, 2003 11:26 pm
Posts: 42
Is there a trick to remove feeds that you don't want anymore? I found a better feed for a show that I want and I removed the old feed from the videofeeds.txt and it just readds it. I am not sure where I am supposed to edit to clear these things out.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 12, 2005 11:25 am 
Offline
Joined: Sat Nov 05, 2005 6:23 pm
Posts: 11
I deleted the db for the videos when I wanted to change my feed, that was the only way that I could get it to work.

Now for my question. The cron job that I set up to do this doesn't seem to be working. Any one else have this problem?


Top
 Profile  
 
PostPosted: Mon Nov 14, 2005 6:52 am 
Offline
Joined: Sun Jul 24, 2005 1:37 am
Posts: 42
Human wrote:
Aubrey, this writeup was fantastic! I'm in the process of making an install script that automates the manual installation and configuration steps. It uses sed scripting to insert or modify the lines of iPodder source code as you directed, so it may prevent you from having to maintain your own fork.


Oh thanks! I didn't know that people were still discussing about this. I wish I had been paying closer attention.

I've been using the version of iPodder that I linked to originally, and I've been quite happy with it so far and haven't been updating this as I probably should have. From discussing with the Linux iPodder guy (or rather the castpodder guy) I've heard that the changes I made probably won't work with castpodder any more as he was going to change a lot of the internals.

Anyway, I'm glad to see that other people are picking up the ball and doing something useful with this idea. Quite cool.

By the way, I also really respect anyone that knows how to use sed.

-Aubrey


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ] 
Go to page Previous  1, 2, 3  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 13 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:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu