From fc0583a4436e930bf8b8f9657ea555a28db0dcc6 Mon Sep 17 00:00:00 2001 From: dziegler Date: Fri, 12 Jun 2009 17:27:55 -0700 Subject: [PATCH] some documentation --- README | 17 +++++++++++++++++ excerpt_extractor.py | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/README b/README index e69de29..771f9e6 100644 --- a/README +++ b/README @@ -0,0 +1,17 @@ +This is a simple script to automatically extract excerpts from articles. It +requires BeautifulSoup. + +Usage: +from excerpt_extractor import get_summary +url = "http://someurl.com/goes/here" +(title,description) = get_summary(url) + +========================================== + +Some examples, discussion, and comparison with the Facebook article extractor +are at http://blog.davidziegler.net/post/122176962/a-python-script-to-automatically-extract-excerpts-from + +copyright: Copyright 2009 by David Ziegler +license: MIT License +website: http://github.com/dziegler/excerpt_extractor/tree/master + diff --git a/excerpt_extractor.py b/excerpt_extractor.py index 23490aa..cb8e355 100644 --- a/excerpt_extractor.py +++ b/excerpt_extractor.py @@ -1,3 +1,21 @@ +""" +This is a simple script to automatically extract excerpts from articles. It +requires BeautifulSoup. + +Usage: +from excerpt_extractor import get_summary +url = "http://someurl.com/goes/here" +(title,description) = get_summary(url) + +========================================== + +Some examples, discussion, and comparison with the Facebook article extractor +are at http://blog.davidziegler.net/post/122176962/a-python-script-to-automatically-extract-excerpts-from + +copyright: Copyright 2009 by David Ziegler +license: MIT License +website: http://github.com/dziegler/excerpt_extractor/tree/master +""" from BeautifulSoup import * import urllib2 import cookielib