144 lines
9.0 KiB
HTML
144 lines
9.0 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>Full-Text RSS Feeds | from fivefilters.org</title>
|
|
<script type="text/javascript" src="niceforms.js"></script>
|
|
<link rel="stylesheet" href="css/niceforms-default.css" type="text/css" media="screen" />
|
|
<script type="text/javascript" src="js/niceforms.js"></script>
|
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
|
<script type="text/javascript">
|
|
var baseUrl = 'http://'+window.location.host+window.location.pathname.replace(/(\/index\.html|\/)$/, '');
|
|
</script>
|
|
</head>
|
|
<body style="background-color: #eee; margin: 0; line-height: 1.4em;">
|
|
<div id="container">
|
|
<h1 style="padding-bottom: 30px;">Create Full-Text Feeds <span style="font-size: .7em; font-weight: normal;">— from <a href="http://fivefilters.org">FiveFilters.org</a></span></h1>
|
|
<form method="get" action="makefulltextfeed.php" id="form" class="niceform">
|
|
<fieldset>
|
|
<legend>Create full-text feed from webpage or feed URL</legend>
|
|
<dl>
|
|
<dt><label for="url">Enter URL:</label></dt>
|
|
<dd><input type="text" id="url" name="url" style="width: 450px" /></dd>
|
|
</dl>
|
|
</fieldset>
|
|
<fieldset>
|
|
<legend>Options</legend>
|
|
<!-- Remove the comments below to include API key field -->
|
|
<!--
|
|
<dl>
|
|
<dt><label for="key">API key:</label></dt>
|
|
<dd><input type="text" id="key" name="key" /></dd>
|
|
</dl>
|
|
-->
|
|
<dl>
|
|
<dt><label for="max">Max items:</label></dt>
|
|
<dd><select name="max" id="max">
|
|
<option value="1">1</option>
|
|
<option value="2">2</option>
|
|
<option value="3">3</option>
|
|
<option value="4">4</option>
|
|
<option value="5" selected="selected">5</option>
|
|
<option value="6">6</option>
|
|
<option value="7">7</option>
|
|
<option value="8">8</option>
|
|
<option value="9">9</option>
|
|
<option value="10">10</option>
|
|
</select></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><label for="links">Links</label></dt>
|
|
<dd><select name="links">
|
|
<option value="preserve" selected="selected">preserve</option>
|
|
<option value="footnotes">add to footnotes</option>
|
|
<option value="remove">remove</option>
|
|
</select></label></dd>
|
|
</dl>
|
|
</fieldset>
|
|
<fieldset class="action" style="background: transparent; border: none; margin-bottom: 20px; padding: 0;">
|
|
<input type="submit" id="sudbmit" name="submit" value="Create Feed" />
|
|
</fieldset>
|
|
</form>
|
|
|
|
<h2>For the site owner</h2>
|
|
|
|
<p>Thanks for downloading and setting this up. If you haven't done so already, <a href="ftr_compatibility_test.php">check server compatibility</a>
|
|
to see if your environment will support this application.</p>
|
|
<p>If everything's okay, feel free to edit this file (index.html) and make any changes you like. If you plan
|
|
to offer this service to others, please keep a download link so users can grab a copy of the code if they
|
|
want it (you can either offer the download yourself, or link to the download page on fivefilters.org).
|
|
That's one requirement of the license.</p>
|
|
<p>Thanks! :)</p>
|
|
|
|
<h2>For everyone else</h2>
|
|
|
|
<h3>About</h3>
|
|
<p>This is a free software project to help people extract content from web pages. It can extract content from a standard HTML page and return a 1-item feed or it can transform an existing feed into a full-text feed. It is being developed as part of the <a href="http://fivefilters.org">Five Filters</a> project to promote independent, non-corporate media.</p>
|
|
|
|
<h3>Bookmarklet</h3>
|
|
<p>To easily transform partial-feeds you encounter (or convert any content on a page into a 1-item feed), drag the link below to your browser's bookmarks toolbar.
|
|
Then whenever you'd like a full-text feed, click the bookmarklet.</p>
|
|
<p>Drag this:
|
|
<script type="text/javascript">
|
|
document.write('<a style="cursor: move;" onclick="alert(\'drag to bookmarks toolbar\'); return false;" href="javascript:location.href=\''+baseUrl+'/makefulltextfeed.php?url=\'+escape(document.location.href);">Full-Text RSS</a>');
|
|
</script>
|
|
|
|
<h3 id="api">API</h3>
|
|
<p>To extract content from a web page or to transform an existing partial feed to full text, pass the URL (<a href="http://meyerweb.com/eric/tools/dencoder/">encoded</a>) in the querystring to the following URL:</p>
|
|
<ul>
|
|
<li style="font-family: monospace;"><script type="text/javascript">document.write(baseUrl);</script>/makefulltextfeed.php?url=<strong>[url]</strong></li>
|
|
</ul>
|
|
<p>If you have an API key, add that to the querystring:</p>
|
|
<ul>
|
|
<li style="font-family: monospace; white-space:nowrap;"><script type="text/javascript">document.write(baseUrl);</script>/makefulltextfeed.php?key=<strong>[key]</strong>&url=<strong>[url]</strong></li>
|
|
<li style="font-family: monospace; white-space:nowrap;"><script type="text/javascript">document.write(baseUrl);</script>/makefulltextfeed.php?key=<strong>[key]</strong>&max=<strong>[number of feed items]</strong>&url=<strong>[url]</strong></li>
|
|
</ul>
|
|
|
|
<p>If you're not hosting this yourself, you do not have to rely on an external API if you don't want to — this is a free software (open source)
|
|
project licensed under the AGPL. You're free to <a href="http://fivefilters.org/content-only/#download">download your own copy</a>.</p>
|
|
|
|
<h3>Source Code and Technologies</h3>
|
|
<p><a href="https://code.launchpad.net/~keyvan/fivefilters/content-only">Source code available on launchpad.net</a>.</p><p>The application uses <a href="http://en.wikipedia.org/wiki/PHP">PHP</a>, <a href="http://www.keyvan.net/2010/08/php-readability/">PHP Readability</a>, <a href="http://simplepie.org/">SimplePie</a>, <a href="http://www.ajaxray.com/blog/2008/03/08/php-universal-feed-generator-supports-rss-10-rss-20-and-atom/">FeedWriter</a>, Humble HTTP Agent, <a href="http://framework.zend.com/manual/en/zend.cache.introduction.html">Zend Cache</a> and <a href="http://hg.gsnedders.com/iri/">IRI</a>. Readability is the magic piece of code that tries to identify and extract the content block from any given web page.</p>
|
|
|
|
<h3>System Requirements</h3>
|
|
|
|
<p>PHP 5.2 or above is required.
|
|
The code has been tested on Windows and Linux using the Apache web server. If you're a Windows user, you can try it on your own machine using <a href="http://www.wampserver.com/en/index.php">WampServer</a>.</p>
|
|
|
|
<h3 id="download">Download and Installation</h3>
|
|
<p>The software can be downloaded free of charge through launchpad.net using a Bazaar client (see below).
|
|
However, for those who'd like a simpler solution, you can also <a href="http://fivefilters.org/content-only/#download">buy a zip package</a> with the
|
|
source code.</p>
|
|
|
|
<h3>Installation with the Bazaar client</h3>
|
|
|
|
<ol style="width: 800px">
|
|
<li>Log in to your host using SSH</li>
|
|
<li>Change to the directory where you want Full-Text RSS installed</li>
|
|
<li>Enter <kbd>bzr export full-text-rss http://bazaar.launchpad.net/~keyvan/fivefilters/content-only/</kbd></li>
|
|
<li>Now enter <kbd>chmod -R 0777 full-text-rss/cache/</kbd></li>
|
|
<li><strong>That's it!</strong> Try accessing the full-text-rss folder through your web browser, you should see the form asking for a URL.</li>
|
|
<li>(Optional) If you'd like to customise the software, rename config-sample.php to config.php and edit the file.</li>
|
|
</ol>
|
|
|
|
<p>If you'd like to create a feed without going through the form first, you can simply pass the URL in the query string to makefulltextfeed.php (see the <a href="#api">API section</a> above).</p>
|
|
|
|
<h3>License</h3>
|
|
<p><a href="http://en.wikipedia.org/wiki/Affero_General_Public_License" style="border-bottom: none;"><img src="images/agplv3.png" alt="AGPL logo" /></a><br />This web application is licensed under the <a href="http://en.wikipedia.org/wiki/Affero_General_Public_License">AGPL version 3</a> — which basically means if you use the code to offer the same or similar service for your users, you are also required to share the code with your users so they can do the same themselves. (<a href="http://www.clipperz.com/users/marco/blog/2008/05/30/freedom_and_privacy_cloud_call_action">More on why this is important.</a>)</p>
|
|
<p>The libraries used by the application are licensed as follows...</p>
|
|
<ul>
|
|
<li>Readability: <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License v2</a></li>
|
|
<li>SimplePie: <a href="http://en.wikipedia.org/wiki/BSD_license">BSD</a></li>
|
|
<li>FeedWriter: <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GPL v2</a></li>
|
|
<li>Humble HTTP Agent: <a href="http://en.wikipedia.org/wiki/Affero_General_Public_License">AGPL v3</a></li>
|
|
<li>Zend Cache: <a href="http://framework.zend.com/license/new-bsd">New BSD</a></li>
|
|
<li>IRI: <a href="http://en.wikipedia.org/wiki/BSD_license">BSD</a></li>
|
|
</ul>
|
|
|
|
<h3 id="donate">Donate</h3>
|
|
<p>To support the development of the Full-Text RSS project, please <a href="http://fivefilters.org/content-only/#donate">donate</a>. All donations greatly appreciated.</p>
|
|
|
|
</div>
|
|
</body>
|
|
</html> |