Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 95b449427091cb0cd153a8618e92dbe9 > files > 43

freeguide-0.11-6.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title>FreeGuide : Download Listings From Cron </title>
  <meta http-equiv='Content-Style-Type' content='text/css' />
  <link rel='stylesheet' href='../pub/skins/plain-freeguide/plain1.css' type='text/css' />
  <link rel="icon" href="../pub/skins/plain-freeguide/favicon.gif" type="image/x-icon" />
  <link rel="shortcut icon" href="../pub/skins/plain-freeguide/favicon.gif" type="image/x-icon" />
  <!--HeaderText--><style type='text/css'><!--
  ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
  code.escaped { white-space: nowrap; }
  .vspace { margin-top:1.33em; }
  .indent { margin-left:40px; }
  .outdent { margin-left:40px; text-indent:-40px; }
  a.createlinktext { text-decoration:none; border-bottom:1px dotted gray; }
  a.createlink { text-decoration:none; position:relative; top:-0.5em;
    font-weight:bold; font-size:smaller; border-bottom:none; }
  img { border:0px; }
  .editconflict { color:green; 
  font-style:italic; margin-top:1.33em; margin-bottom:1.33em; }

  table.markup { border:2px dotted #ccf; width:90%; }
  td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
  table.vert td.markup1 { border-bottom:1px solid #ccf; }
  table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; }
  table.markup caption { text-align:left; }
  div.faq p, div.faq pre { margin-left:2em; }
  div.faq p.question { margin:1em 0 0.75em 0; font-weight:bold; }
   
    .frame 
      { border:1px solid #cccccc; padding:4px; background-color:#f9f9f9; }
    .lfloat { float:left; margin-right:0.5em; }
    .rfloat { float:right; margin-left:0.5em; }
a.varlink { text-decoration:none; }

--></style>  <meta name='robots' content='index,follow' />
  <link rel='stylesheet' href='../pub/skins/plain-freeguide/plain2.css' type='text/css' />
</head>
<body>
<!--PageHeaderFmt-->
 <table id='wikihead' cellspacing='0' cellpadding='0' align='center'><tr>
  <td id='homelink'><img src='../pub/skins/plain-freeguide/favicon.gif' /> <a href='http://www.artificialworlds.net/freeguide'>FreeGuide</a></td>
  <td id='location'><span class='pagegroup'><a href='FAQ.html'>FAQ</a> &raquo;</span>
  <h1 class='pagetitle'>Download Listings From Cron</h1></td>
  <td id='wikicmds'><ul><li class='browse'><a accesskey=''  class='selflink' href='DownloadListingsFromCron.html'>View</a>
</li><li class='edit'>
</li><li class='diff'>
</li><li class='print'>
</li></ul>
</td>
 </tr></table> 
<!--/PageHeaderFmt-->
  <table id='wikimid' cellspacing='0' cellpadding='0' align='center'><tr>
<!--PageLeftFmt-->
   <td id='wikileft' valign='top'>
    <p><form action='http://www.artificialworlds.net/freeguide'>
     <input type='hidden' name='n' value='FAQ.DownloadListingsFromCron' />
     <input type='hidden' name='action' value='search' />
     <input type='text' name='q' value=' Search ' class='inputbox searchbox'
      onfocus="if(this.value=' Search ') {this.value=''}" 
      onblur="if(this.value=='') {this.value=' Search '}"
      /><input type='submit' class='inputbutton searchbutton'
      value='Go' /></form></p><br />
<ul><li><a class='wikilink' href='../Main/HomePage.html'>Home Page</a>
</li><li><a class='wikilink' href='../DownloadAndInstall/DownloadAndInstall.html'>Download And Install</a>
</li><li><a class='wikilink' href='../UserGuide/UserGuide.html'>User Guide</a>
</li><li><a class='wikilink' href='FAQ.html'>Help And FAQ</a>
</li><li><a class='wikilink' href='../Developers/Developers.html'>Developers</a>
</li><li><a class='wikilink' href='../Main/Credits.html'>Credits</a>
</li><li><a class='wikilink' href='../Main/Screenshots.html'>Screenshots</a>
</li><li><a class='wikilink' href='../Main/Links.html'>Links</a>
</li><li><a class='wikilink' href='../Main/SiteMap.html'>Site Map</a>
<div class='vspace'></div></li><li><a class='wikilink' href='../Main/ContactUs.html'>Contact Us</a>
</li></ul><div class='vspace'></div>
</td>
<!--/PageLeftFmt-->
    <td id='wikibody' valign='top'>
<!--PageText-->
<div id='wikitext'>
<h1>I run Linux: how can I setup a cron job to have <span class='wikiword'>FreeGuide</span> retrieve listings?</h1>
<p>You'll need to use XMLTV to download the listings, and then put them somewhere so <span class='wikiword'>FreeGuide</span> can import them the next time it starts up.
</p>
<p class='vspace'>Essentially, you'll use the XMLTV grabber to retrieve the listings and redirect to an .xmltv file in the <span class='wikiword'>FreeGuide</span> directory. The next time you start <span class='wikiword'>FreeGuide</span>, the new listings will be read in.
</p>
<div class='vspace'></div><ul><li>First, figure out exactly what the xmltv grabber command is. Under <strong>Options</strong>, <strong>Advanced</strong>, you can highlight the <strong>XMLTV</strong> grabber and see the command that's used. For me, the command is:
</li></ul><div class='vspace'></div><div class='indent'><code class='escaped'>tv_grab_na_dd  --quiet --config-file "%config_file%"</code>
<div class='vspace'></div></div><div class='indent'>The config file is stored in the <span class='wikiword'>FreeGuide</span> working directory under a sub-directory called xmltv-configs. You will need to specify the exact path, the variable in the command above won't work right.
</div><div class='vspace'></div><ul><li>Just to keep the crontab cleaner looking, create a shell script with the command in it:
</li></ul><div class='vspace'></div><div class='indent'><pre class='escaped'>#!/bin/bash
tv_grab_na_dd --quiet --config-file ~/.freeguide/xmltv-configs/na_dd.conf  &gt; ~/.freeguide/list.xmltv</pre>
<div class='vspace'></div></div><div class='indent'>If your .freeguide working directory is *not* in your home directory, then you'll need to replace the ~/ part with the path to the <span class='wikiword'>FreeGuide</span> directory.
<div class='vspace'></div></div><div class='indent'>chmod the file 700 and try running it. The script should download the latest listings and dump them out to an .xmltv file in your .freeguide directory.
<div class='vspace'></div></div><div class='indent'>Go ahead and start <span class='wikiword'>FreeGuide</span>. There should be a short delay as it reads in the downloaded listings.
</div><div class='vspace'></div><ul><li>Assuming the command worked right, then you can create a cron entry for calling the script.
</li></ul><div class='vspace'></div><div class='indent'>If you're unfamiliar with cron, I suggest reviewing the crontab man page via "man 5 crontab".
<div class='vspace'></div></div><div class='indent'>There are 5 fields that define *when* a cronjob is run. To do a cronjob that runs at 5:30 on Sunday, then run 'crontab -e' and put on a single line:
<div class='vspace'></div></div><div class='indent'><code class='escaped'>30 5 * * 0   ~/bin/SHELLSCRIPT</code>
<div class='vspace'></div></div><div class='indent'>Use whatever you called your shell script instead of SHELLSCRIPT.
<div class='vspace'></div></div><div class='indent'>If your cronjob is run as the user, it should work at the correct time. If you end up with an error about command not found or something, you will probably need to specify the exact path to the shell script like this:
<div class='vspace'></div></div><div class='indent'><code class='escaped'>30 5 * * 0 /home/YOUR_USERNAME/bin/SHELLSCRIPT</code>
</div><p class='vspace'>Good luck, and <a class='wikilink' href='../Main/ContactUs.html'>Contact Us</a> if you have problems.
</p>
</div>

    </td>
  </tr></table>
  <!--PageFooterFmt-->
 <table id='wikifoot' cellspacing='0' cellpadding='0' align='center'>
 <tr><td class='passwordlink' colspan='2'>If you would like to help improve this site, please <a class='wikilink' href='../Main/ContactUs.html'>Contact Us</a> and we will give you the password to edit pages.</td></tr>
 <tr>
  <td class='lastmod'>Page last modified on June 04, 2008, at 02:33 AM &nbsp; &nbsp;<a class='pmwikiinfolink' href="../Main/PmWikiInfo.html">PmWiki Info</a></td>
  <td class='footnav'><div  style='text-align: right;' > 
<p> -
 -
 -

() -

</p></div>
</td>
 </tr>
 </table>
<!--/PageFooterFmt-->
</body>
</html>