Version 9 (modified by schachte@…, 7 years ago)

--

Installation

To install Shepherd:

  1. Download http://www.whuffy.com/shepherd/tv_grab_au
  2. Make it executable
  3. Run it. The script will attempt to install and configure itself.

These can be accomplished via:

wget http://www.whuffy.com/shepherd/tv_grab_au
chmod +x tv_grab_au
./tv_grab_au

If you're manually upgrading from a previous version because we broke auto-update, it may be necessary to delete your ~/.shepherd/ directory.

We recommended you run Shepherd as a standard user and never as root (super-user).

When run for the first time, Shepherd will install itself in ~/.shepherd/ or /opt/shepherd/. You should symlink /usr/bin/tv_grab_au to the tv_grab_au script in the shepherd directory. In most installations, this is accomplished via:

ln -s ~/.shepherd/tv_grab_au /usr/bin/tv_grab_au

Dependencies

Shepherd has numerous dependencies on 3rd party modules and software. Some of these are mandatory, some are optional depending on whether you wish Shepherd to run with its full suite of plugin modules or not.

If you run Linux and your distribution has packages for Shepherd's dependencies, it is generally better to use them than to install modules through CPAN, as described below. The first subsection below gives distribution-specific instructions; if you follow the instructions for your linux distribution, you do not need to read the rest of this wiki page. If you use a different distribution, or a different operating system, you will need to install the dependencies as described in the sections on XMLTV and the perl dependencies.

Linux Distribution-Specific Dependencies

Debian-Based Distributions

The following command should install the necessary packages:

sudo apt-get install xmltv libxml-simple-perl libjavascript-perl libalgorithm-diff-perl \
                     libgetopt-mixed-perl libcompress-zlib-perl libdata-dumper-simple-perl \
                     libdate-manip-perl liblist-compare-perl libdatetime-format-strptime-perl \
                     libhtml-parser-perl libxml-dom-perl

XMLTV

XMLTV needs to be installed. The latest version can be downloaded from http://files.xmltv.org/
If you are unsure about whether you have XMLTV installed, run the command perldoc XMLTV and see if there is any documentation on your system. If there is, then it is already installed.

XMLTV version 0.5.44 or later is recommended as it supports HDTV flags.

Mandatory Perl modules

The following Perl modules are mandatory for Shepherd to be able to run:

  • Algorithm::Diff
  • Compress::Zlib
  • Cwd
  • Data::Dumper
  • Date::Manip
  • Getopt::Long
  • List::Compare
  • LWP::UserAgent

If these aren't installed on your system, you may be able to install them automtically via CPAN (note: you will probably have to do this while logged in as root or via sudo):

cpan Algorithm::Diff Compress::Zlib Cwd Data::Dumper Date::Manip Getopt::Long List::Compare LWP::UserAgent

(it shouldn't cause any issues to just run this command; if everything is up-to-date, it'll tell you and finish)

Optional Perl modules

Various grabbers and postprocessors require additional Perl/CPAN dependencies. These include:

  • !DateTime::Format::Strptime
  • File::Basename
  • File::Path
  • Javascript
  • HTML::Entities
  • HTML::TokeParser
  • HTML::TreeBuilder
  • IO::File
  • Storable
  • Time::HiRes
  • XML::DOM

To install any missing CPAN modules, you can ask CPAN to install/update/check them all using the following (note: you will probably have to do this while logged in as root or via sudo):

cpan DateTime::Format::Strptime File::Basename File::Path HTML::Entities HTML::TokeParser
cpan HTML::TreeBuilder IO::File Storable Time::HiRes XML::DOM

(it shouldn't cause any issues to just run this command; if everything is up-to-date, it'll tell you and finish)

Optional Javascript modules

Some grabbers parse web pages that have Javascript embedded in them. These grabbers make use of a system-wide Javascript library, typically provided by js and js-devel packages from your Unix/Linux installation. Before you can install the Javascript perl module bindings, you must first have the js modules installed on your system.

If you're running a RedHat? Fedora system, you can verify whether you have these through RPM:

# rpm -q js js-devel
js-1.5-2.fc3
js-devel-1.5-2.fc3

Providing rpm responds with something similar to above, the javascript library files are installed and you can proceed with installing the perl javascript bindings. If rpm indicates the packages are not installed, you will need to install them from a RPM repository. [rpmfind.net] can be useful here:

Once you have installed the javascript library files, you can install the Javascript perl bindings from CPAN:

cpan Javascript