Permalink
Browse files

initial push to GitHub

  • Loading branch information...
0 parents commit 383481edf7f912331559f967d8022eaea847d0df James Fee committed Nov 21, 2012
Showing 551 changed files with 85,660 additions and 0 deletions.
@@ -0,0 +1,7 @@
+Sam Ruby <rubys@intertwingly.net>
+
+This codebase represents a radical refactoring of Planet 2.0, which lists
+the following authors:
+
+Scott James Remnant <scott@netsplit.com>
+Jeff Waugh <jdub@perkypants.org>
84 LICENCE
@@ -0,0 +1,84 @@
+Planet is released under the same licence as Python, here it is:
+
+
+A. HISTORY OF THE SOFTWARE
+==========================
+
+Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI) in the Netherlands as a successor of a language called ABC. Guido is Python's principal author, although it includes many contributions from others. The last version released from CWI was Python 1.2. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI) in Reston, Virginia where he released several versions of the software. Python 1.6 was the last of the versions released by CNRI. In 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. Python 2.0 was the first and only release from BeOpen.com.
+
+Following the release of Python 1.6, and after Guido van Rossum left CNRI to work with commercial software developers, it became clear that the ability to use Python with software available under the GNU Public License (GPL) was very desirable. CNRI and the Free Software Foundation (FSF) interacted to develop enabling wording changes to the Python license. Python 1.6.1 is essentially the same as Python 1.6, with a few minor bug fixes, and with a different license that enables later versions to be GPL-compatible. Python 2.1 is a derivative work of Python 1.6.1, as well as of Python 2.0.
+
+After Python 2.0 was released by BeOpen.com, Guido van Rossum and the other PythonLabs developers joined Digital Creations. All intellectual property added from this point on, starting with Python 2.1 and its alpha and beta releases, is owned by the Python Software Foundation (PSF), a non-profit modeled after the Apache Software Foundation. See http://www.python.org/psf/ for more information about the PSF.
+
+Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible.
+
+B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
+===============================================================
+
+PSF LICENSE AGREEMENT
+---------------------
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 2.1.1 software in source or binary form and its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 2.1.1 alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001 Python Software Foundation; All Rights Reserved" are retained in Python 2.1.1 alone or in any derivative version prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on or incorporates Python 2.1.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 2.1.1.
+
+4. PSF is making Python 2.1.1 available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.1.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 2.1.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.1.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python 2.1.1, Licensee agrees to be bound by the terms and conditions of this License Agreement.
+
+BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0
+----------------------------------------------
+
+BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
+
+1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software").
+
+2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee.
+
+3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+5. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
+
+6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page.
+
+7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement.
+
+CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT
+-------------------------------------------------
+
+1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: http://hdl.handle.net/1895.22/1013".
+
+3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1.
+
+4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
+
+7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
+
+8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement.
+
+ ACCEPT
+
+CWI PERMISSIONS STATEMENT AND DISCLAIMER
+----------------------------------------
+
+Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved.
+
+Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 README
@@ -0,0 +1,20 @@
+Planet
+------
+
+Planet is a flexible feed aggregator. It downloads news feeds published by
+web sites and aggregates their content together into a single combined feed,
+latest news first. This version of Planet is named Venus as it is the
+second major version. The first version is still in wide use and is
+also actively being maintained.
+
+It uses Mark Pilgrim's Universal Feed Parser to read from CDF, RDF, RSS and
+Atom feeds; Leonard Richardson's Beautiful Soup to correct markup issues;
+and either Tomas Styblo's templating engine or Daniel Viellard's implementation
+of XSLT to output static files in any format you can dream up.
+
+To get started, check out the documentation in the docs directory. If you have
+any questions or comments, please don't hesitate to use the planet mailing list:
+
+ http://lists.planetplanet.org/mailman/listinfo/devel
+
+Keywords: feed, blog, aggregator, RSS, RDF, Atom, OPML, Python
41 THANKS
@@ -0,0 +1,41 @@
+DeWitt Clinton - Mac OSX
+Mary Gardiner - PythonPath
+Elias Torres - FOAF OnlineAccounts
+Jacques Distler - Template patches
+Michael Koziarski - HTTP Auth fix
+Brian Ewins - Win32 / Portalocker
+Joe Gregorio - python versioning for filters, verbose tests, spider_threads
+Harry Fuecks - Pipe characters in file names, filter bug
+Eric van der Vlist - Filters to add language, category information
+Chris Dolan - mkdir cache; default template_dirs; fix xsltproc
+David Sifry - rss 2.0 xslt template based on http://atom.geekhood.net/
+Morten Frederiksen - Support WordPress LinkManager OPML
+Harry Fuecks - default item date to feed date
+Antonio Cavedoni - Django templates
+Morten Frederiksen - expungeCache
+Lenny Domnitser - Coral CDN support for URLs with non-standard ports
+Amit Chakradeo - Allow read-only files to be overwritten
+Matt Brubeck - fix new_channel
+Aristotle Pagaltzis - ensure byline_author filter doesn't drop foreign markup
+
+This codebase represents a radical refactoring of Planet 2.0, which lists
+the following contributors:
+
+Patches and Bug Fixes
+---------------------
+
+Chris Dolan - fixes, exclude filtering, duplicate culling
+David Edmondson - filtering
+Lucas Nussbaum - locale configuration
+David Pashley - cache code profiling and recursion fixing
+Gediminas Paulauskas - days per page
+
+
+Spycyroll Maintainers
+---------------------
+
+Vattekkat Satheesh Babu
+Richard Jones
+Garth Kidd
+Eliot Landrum
+Bryan Richard
7 TODO
@@ -0,0 +1,7 @@
+TODO
+====
+
+ * Allow display normalisation to specified timezone
+
+ Some Planet admins would like their feed to be displayed in the local
+ timezone, instead of UTC.
@@ -0,0 +1,141 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import cgi
+import cgitb
+cgitb.enable()
+
+from urllib import unquote
+import sys, os
+
+# Modify this to point to where you usually run planet.
+BASE_DIR = '..'
+
+# Modify this to point to your venus installation dir, relative to planet dir above.
+VENUS_INSTALL = "venus"
+
+# Config file, relative to planet dir above
+CONFIG_FILE = "config/live"
+
+# Admin page URL, relative to this script's URL
+ADMIN_URL = "admin.html"
+
+
+# chdir to planet dir - config may be relative from there
+os.chdir(os.path.abspath(BASE_DIR))
+
+# Add venus to path.
+sys.path.append(VENUS_INSTALL)
+
+# Add shell dir to path - auto detection does not work
+sys.path.append(os.path.join(VENUS_INSTALL, "planet", "shell"))
+
+# import necessary planet items
+from planet import config
+from planet.spider import filename
+
+
+# Load config
+config.load(CONFIG_FILE)
+
+# parse query parameters
+form = cgi.FieldStorage()
+
+
+# Start HTML output at once
+print "Content-Type: text/html;charset=utf-8" # HTML is following
+print # blank line, end of headers
+
+
+print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
+print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv"><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>Admin results</title></head><body>'
+print '<div>'
+
+# Cache and blacklist dirs
+
+cache = config.cache_directory()
+blacklist = config.cache_blacklist_directory()
+
+# Must have command parameter
+if not "command" in form:
+ print "<p>Unknown command</p>"
+
+elif form['command'].value == "blacklist":
+
+
+ # Create the blacklist dir if it does not exist
+ if not os.path.exists(blacklist):
+ os.mkdir(blacklist)
+ print "<p>Created directory %s</p>" % blacklist
+
+ # find list of urls, in the form bl[n]=url
+
+ for key in form.keys():
+
+ if not key.startswith("bl"): continue
+
+ url = unquote(form[key].value)
+
+ # find corresponding files
+ cache_file = filename(cache, url)
+ blacklist_file = filename(blacklist, url)
+
+ # move to blacklist if found
+ if os.path.exists(cache_file):
+
+ os.rename(cache_file, blacklist_file)
+
+ print "<p>Blacklisted <a href='%s'>%s</a></p>" % (url, url)
+
+ else:
+
+ print "<p>Unknown file: %s</p>" % cache_file
+
+ print """
+<p>Note that blacklisting does not automatically
+refresh the planet. You will need to either wait for
+a scheduled planet run, or refresh manually from the admin interface.</p>
+"""
+
+
+elif form['command'].value == "run":
+
+ # run spider and refresh
+
+ from planet import spider, splice
+ try:
+ spider.spiderPlanet(only_if_new=False)
+ print "<p>Successfully ran spider</p>"
+ except Exception, e:
+ print e
+
+ doc = splice.splice()
+ splice.apply(doc.toxml('utf-8'))
+
+elif form['command'].value == "refresh":
+
+ # only refresh
+
+ from planet import splice
+
+ doc = splice.splice()
+ splice.apply(doc.toxml('utf-8'))
+
+ print "<p>Successfully refreshed</p>"
+
+elif form['command'].value == "expunge":
+
+ # only expunge
+ from planet import expunge
+ expunge.expungeCache()
+
+ print "<p>Successfully expunged</p>"
+
+
+
+
+print "<p><strong><a href='" + ADMIN_URL + "'>Return</a> to admin interface</strong></p>"
+
+
+
+print "</body></html>"
Oops, something went wrong.

0 comments on commit 383481e

Please sign in to comment.