From 832eb757ef7f81abf1e431ce16f368c10dd57962 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 4 Jan 2011 17:10:17 +0000 Subject: [PATCH] Added docstrings, __{version,revision,etc}__ boilerplates. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@315 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Makefile | 13 ++++++++++++- Robots/bkmk_rforking.py | 11 ++++++++--- Robots/bkmk_rforking_sub.py | 11 ++++++++--- Robots/bkmk_rsimple.py | 12 +++++++++--- Robots/bkmk_rsimple_tos.py | 12 +++++++++--- Storage/bkmk_stflad.py | 14 ++++++++++---- Storage/bkmk_stjson.py | 11 ++++++++--- Storage/bkmk_stpickle.py | 11 ++++++++--- Writers/bkmk_wflad.py | 11 ++++++++--- Writers/bkmk_wflad_err.py | 11 ++++++++--- Writers/bkmk_whtml.py | 12 +++++++++--- Writers/bkmk_wtxt.py | 11 ++++++++--- bkmk-add | 10 ++++++++++ bkmk-add.py | 11 ++++++++--- bkmk-chk | 13 +++++++++++++ bkmk-publish | 10 ++++++++++ bkmk-rsync | 10 ++++++++++ bkmk-sort | 10 ++++++++++ bkmk2db | 10 ++++++++++ bkmk2db.py | 11 ++++++++--- bkmk_objects.py | 12 +++++++++--- bkmk_parser.py | 11 ++++++++--- check_dups.py | 12 +++++++++--- check_title.py | 12 +++++++++--- check_url.py | 11 ++++++++--- check_urls.py | 11 ++++++++--- convert_st.py | 11 ++++++++--- db2bkmk.py | 11 ++++++++--- mk-distr | 17 +++++++---------- parse_html/__init__.py | 12 +++++++++--- parse_html/beautifulsoup.py | 12 +++++++++--- parse_html/etreetidy.py | 12 +++++++++--- parse_html/html5.py | 12 +++++++++--- parse_html/htmlparser.py | 12 +++++++++--- parse_html/lxml.py | 12 +++++++++--- parse_html/util.py | 12 +++++++++--- robots.py | 11 +++++++++-- set-real_title.py | 11 ++++++++--- set-title-list.py | 11 ++++++++--- sort_db.py | 11 ++++++++--- storage.py | 11 +++++++++-- writers.py | 11 +++++++++-- 42 files changed, 372 insertions(+), 111 deletions(-) diff --git a/Makefile b/Makefile index 373e6b1..e1c3067 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,15 @@ -VERSION=4.3.1 +# +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] +# __date__ = "$Date$"[7:-2] +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" +# + +VERSION=4.4.0 EXAMPLE_SHELL=bkmk-add bkmk-add.py bkmk-chk bkmk-publish bkmk-rsync \ bkmk-sort bkmk2db check_title.py check_url.py hotexplode.pl \ diff --git a/Robots/bkmk_rforking.py b/Robots/bkmk_rforking.py index 594359f..843a0d2 100644 --- a/Robots/bkmk_rforking.py +++ b/Robots/bkmk_rforking.py @@ -1,9 +1,14 @@ -""" - Forking robot +"""Forking robot - Written by Broytman. Copyright (C) 2000-2010 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" try: import cPickle diff --git a/Robots/bkmk_rforking_sub.py b/Robots/bkmk_rforking_sub.py index 63464fc..36338f4 100755 --- a/Robots/bkmk_rforking_sub.py +++ b/Robots/bkmk_rforking_sub.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Check URL - subprocess for the forking robot +"""Check URL - subprocess for the forking robot - Written by Broytman. Copyright (C) 1999-2010 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1999-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys, os diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 7de6318..8bfa429 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -1,9 +1,15 @@ -""" - Simple, strightforward robot +"""Simple, strightforward robot - Written by Oleg Broytman. Copyright (C) 2000-2011 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" + import sys, os import time, urllib from base64 import b64encode diff --git a/Robots/bkmk_rsimple_tos.py b/Robots/bkmk_rsimple_tos.py index ad42f09..25fa88f 100644 --- a/Robots/bkmk_rsimple_tos.py +++ b/Robots/bkmk_rsimple_tos.py @@ -1,9 +1,15 @@ -""" - Simple robot with socket's timeout +"""Simple robot with socket's timeout - Written by Broytman. Copyright (C) 2000-2011 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" + import socket socket.setdefaulttimeout(900) diff --git a/Storage/bkmk_stflad.py b/Storage/bkmk_stflad.py index 9bd8751..86c42b3 100644 --- a/Storage/bkmk_stflad.py +++ b/Storage/bkmk_stflad.py @@ -1,10 +1,16 @@ -""" - Bookmarks storage module - FLAD (Flat ASCII Database) - special version for compatibility with old (version 1) bkmk2db +"""Bookmarks storage module - FLAD (Flat ASCII Database) + +Special version for compatibility with old (version 1) bkmk2db. - Written by Broytman. Copyright (C) 2000-2010 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" import string from m_lib.flad import fladm diff --git a/Storage/bkmk_stjson.py b/Storage/bkmk_stjson.py index 077f89c..437ca6d 100644 --- a/Storage/bkmk_stjson.py +++ b/Storage/bkmk_stjson.py @@ -1,9 +1,14 @@ -""" - Bookmarks storage manager - json. +"""Bookmarks storage manager - json - Written by Broytman, Jul 2010. Copyright (C) 2010 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2010, 2011 PhiloSoft Design" +__license__ = "GNU GPL" try: import json diff --git a/Storage/bkmk_stpickle.py b/Storage/bkmk_stpickle.py index ae351b3..702cea5 100644 --- a/Storage/bkmk_stpickle.py +++ b/Storage/bkmk_stpickle.py @@ -1,9 +1,14 @@ -""" - Bookmarks storage manager - pickle; certainly the most simple and elegant :) +"""Bookmarks storage manager - pickle; certainly the most simple and elegant :) - Written by Broytman, Feb 2000 - Mar 2000. Copyright (C) 2000 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" try: import cPickle diff --git a/Writers/bkmk_wflad.py b/Writers/bkmk_wflad.py index 0a94fd8..d5cb7e0 100644 --- a/Writers/bkmk_wflad.py +++ b/Writers/bkmk_wflad.py @@ -1,9 +1,14 @@ -""" - Dump bookmarks db to a more readable FLat Ascii Database +"""Dump bookmarks db to a more readable FLat Ascii Database - Written by Broytman. Copyright (C) 2000-2010 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" import time from bkmk_objects import Writer diff --git a/Writers/bkmk_wflad_err.py b/Writers/bkmk_wflad_err.py index 4fb127f..b7b2977 100644 --- a/Writers/bkmk_wflad_err.py +++ b/Writers/bkmk_wflad_err.py @@ -1,9 +1,14 @@ -""" - Dump bookmarks db to a more readable FLAD after check_urls +"""Dump bookmarks db to a more readable FLAD after check_urls - Written by Broytman, Oct 2000 - Aug 2004. Copyright (C) 2000-2004 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" import time from bkmk_wflad import writer_flad diff --git a/Writers/bkmk_whtml.py b/Writers/bkmk_whtml.py index b4c4dab..00591b0 100644 --- a/Writers/bkmk_whtml.py +++ b/Writers/bkmk_whtml.py @@ -1,9 +1,15 @@ -""" - Convert a bkmk database back to bookmarks.html +"""Convert a bkmk database back to bookmarks.html - Written by Broytman. Copyright (C) 2000-2010 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" + from bkmk_objects import Writer, BKMK_FORMAT, quote_title diff --git a/Writers/bkmk_wtxt.py b/Writers/bkmk_wtxt.py index 57818d3..628d9b2 100644 --- a/Writers/bkmk_wtxt.py +++ b/Writers/bkmk_wtxt.py @@ -1,9 +1,14 @@ -""" - Dump a bkmk database to a text file +"""Dump a bkmk database to a text file - Written by Broytman. Copyright (C) 2000-2003 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" ind_s = " "*4 diff --git a/bkmk-add b/bkmk-add index 4b4568b..3a50ef2 100755 --- a/bkmk-add +++ b/bkmk-add @@ -1,4 +1,14 @@ #! /bin/sh +# Add a bookmark directly to the DB +# +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] +# __date__ = "$Date$"[7:-2] +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" PATH=$HOME/lib/bookmarks_db:$PATH diff --git a/bkmk-add.py b/bkmk-add.py index 7e7b415..03cf5c3 100755 --- a/bkmk-add.py +++ b/bkmk-add.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Add a bookmark to the database. +"""Add a bookmark to the database - Written by Broytman. Copyright (C) 2002-2007 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2002-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys, os, time from bkmk_objects import Bookmark diff --git a/bkmk-chk b/bkmk-chk index 7d757f1..8f9ddea 100755 --- a/bkmk-chk +++ b/bkmk-chk @@ -1,4 +1,17 @@ #! /bin/sh +# Check bookmarks +# +# Convert bookmarks to DB, check URLS from the DB and convert DB +# to different formats and back to bookmarks. +# +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] +# __date__ = "$Date$"[7:-2] +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" PATH="$HOME/lib/bookmarks_db:$PATH" diff --git a/bkmk-publish b/bkmk-publish index e7a6bf8..de128af 100755 --- a/bkmk-publish +++ b/bkmk-publish @@ -1,4 +1,14 @@ #! /bin/sh +# Publish bookmarks using hotexplode.pl +# +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] +# __date__ = "$Date$"[7:-2] +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" umask 077 PATH=$HOME/lib/bookmarks_db:$PATH diff --git a/bkmk-rsync b/bkmk-rsync index cc7034d..5b4b7a9 100755 --- a/bkmk-rsync +++ b/bkmk-rsync @@ -1,4 +1,14 @@ #! /bin/sh +# Synchronize bookmarks with remote workstations +# +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] +# __date__ = "$Date$"[7:-2] +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" PATH=$HOME/lib/bookmarks_db:$PATH umask 077 diff --git a/bkmk-sort b/bkmk-sort index e24f8a9..f72e75f 100755 --- a/bkmk-sort +++ b/bkmk-sort @@ -1,4 +1,14 @@ #! /bin/sh +# Sort bookmarks +# +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] +# __date__ = "$Date$"[7:-2] +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" PATH=$HOME/lib/bookmarks_db:$PATH diff --git a/bkmk2db b/bkmk2db index c796e96..54a243d 100755 --- a/bkmk2db +++ b/bkmk2db @@ -1,4 +1,14 @@ #! /bin/sh +# Convert bookmarks to DB +# +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] +# __date__ = "$Date$"[7:-2] +# __author__ = "Oleg Broytman " +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" PATH="$HOME/lib/bookmarks_db:$PATH" diff --git a/bkmk2db.py b/bkmk2db.py index 946dfbd..37308a2 100755 --- a/bkmk2db.py +++ b/bkmk2db.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Convert Netscape Navigator's or Mozilla's bookmarks.html to a database +"""Convert Netscape Navigator's or Mozilla's bookmarks.html to a database - Written by Broytman. Copyright (C) 1997-2003 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys, os from getopt import getopt diff --git a/bkmk_objects.py b/bkmk_objects.py index 17d0509..d15c38e 100644 --- a/bkmk_objects.py +++ b/bkmk_objects.py @@ -1,9 +1,15 @@ -""" - Objects to represent bookmarks.html structure +"""Objects to represent bookmarks.html structure - Written by Oleg Broytman. Copyright (C) 2000-2010 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" + import os, cgi BKMK_FORMAT = os.environ.get("BKMK_FORMAT", "MOZILLA") diff --git a/bkmk_parser.py b/bkmk_parser.py index 3f2182c..2ec412c 100644 --- a/bkmk_parser.py +++ b/bkmk_parser.py @@ -1,9 +1,14 @@ -""" - Parser for Netscape Navigator's and Mozilla's bookmarks.html +"""Parser for Netscape Navigator's and Mozilla's bookmarks.html - Written by Broytman. Copyright (C) 1997-2008 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys, os from m_lib.net.www.html import HTMLParser diff --git a/check_dups.py b/check_dups.py index 5397122..113e69b 100755 --- a/check_dups.py +++ b/check_dups.py @@ -1,10 +1,16 @@ #! /usr/bin/env python -""" - Check duplicate URLs in the bookmarks database +"""Check duplicate URLs in the bookmarks database - Written by Broytman. Copyright (C) 2000-2007 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" + import sys diff --git a/check_title.py b/check_title.py index f0baedf..25d1e51 100755 --- a/check_title.py +++ b/check_title.py @@ -1,10 +1,16 @@ #! /usr/bin/env python -""" - Check and show URLs in the bookmarks database where name <> real title +"""Check and show URLs in the bookmarks database where name != real title - Written by Broytman. Copyright (C) 2002-2010 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2002-2011 PhiloSoft Design" +__license__ = "GNU GPL" + import sys from bkmk_objects import make_linear, quote_title, unquote_title diff --git a/check_url.py b/check_url.py index b0a6869..8744acf 100755 --- a/check_url.py +++ b/check_url.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Robot interface - check one URL +"""Robot interface - check one URL - Written by Broytman. Copyright (C) 2010 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2010, 2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys import httplib diff --git a/check_urls.py b/check_urls.py index f75cb16..3054580 100755 --- a/check_urls.py +++ b/check_urls.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Robot interface - check URLs from bookmarks database +"""Robot interface - check URLs from bookmarks database - Written by Broytman. Copyright (C) 2000-2010 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys, os diff --git a/convert_st.py b/convert_st.py index 15bc7aa..c0ea8cb 100755 --- a/convert_st.py +++ b/convert_st.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Convert a bkmk database to a different storage. +"""Convert a bkmk database to a different storage. - Written by Broytman, Apr 2000 - Aug 2002. Copyright (C) 2000-2002 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys diff --git a/db2bkmk.py b/db2bkmk.py index eaca29f..fb19863 100755 --- a/db2bkmk.py +++ b/db2bkmk.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Convert a bkmk database back to bookmarks.html (or other format defined by writer) +"""Convert a bkmk database back to bookmarks.html (or other format defined by writer) - Written by Broytman, Mar 2000 - Aug 2002. Copyright (C) 2000-2002 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys diff --git a/mk-distr b/mk-distr index c540483..79048ad 100755 --- a/mk-distr +++ b/mk-distr @@ -1,17 +1,14 @@ #! /bin/sh -# Mk-distr script. +# Helper script called from Makefile # -# This file is a part of Bookmarks Database and Internet robot. -# Author: Oleg Broytman . -# Copyright: (C) 2004-2011 PhiloSoft Design. -# License: GPL. - - -# __version__ = \ -# __revision__ = "$Id$" +# This file is a part of Bookmarks database and Internet robot. +# +# __version__ = "$Revision$"[11:-2] +# __revision__ = "$Id$"[5:-2] # __date__ = "$Date$"[7:-2] # __author__ = "Oleg Broytman " -# __copyright__ = "Copyright (C) 2004-2011 PhiloSoft Design" +# __copyright__ = "Copyright (C) 2001-2010 PhiloSoft Design" +# __license__ = "GNU GPL" error() { diff --git a/parse_html/__init__.py b/parse_html/__init__.py index c67f2e7..95ab357 100644 --- a/parse_html/__init__.py +++ b/parse_html/__init__.py @@ -1,9 +1,15 @@ -""" - HTML Parsers wrapper +"""HTML Parsers - Written by Broytman. Copyright (C) 1997-2011 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design" +__license__ = "GNU GPL" + import codecs universal_charset = "utf-8" diff --git a/parse_html/beautifulsoup.py b/parse_html/beautifulsoup.py index 86b8c1b..ec5542a 100644 --- a/parse_html/beautifulsoup.py +++ b/parse_html/beautifulsoup.py @@ -1,9 +1,15 @@ -""" - HTML Parser using BeautifulSoup +"""HTML Parser using BeautifulSoup - Written by Broytman. Copyright (C) 2007-2011 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2007-2011 PhiloSoft Design" +__license__ = "GNU GPL" + import re from sgmllib import SGMLParser, SGMLParseError from BeautifulSoup import BeautifulSoup, CData diff --git a/parse_html/etreetidy.py b/parse_html/etreetidy.py index d55aa57..5d89700 100644 --- a/parse_html/etreetidy.py +++ b/parse_html/etreetidy.py @@ -1,9 +1,15 @@ -""" - HTML Parser using ElementTree+TidyLib. +"""HTML Parser using ElementTree+TidyLib. - Written by Broytman. Copyright (C) 2010, 2011 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2010, 2011 PhiloSoft Design" +__license__ = "GNU GPL" + from elementtidy import TidyHTMLTreeBuilder from .util import HTMLParser diff --git a/parse_html/html5.py b/parse_html/html5.py index 52bd576..08fb6b1 100644 --- a/parse_html/html5.py +++ b/parse_html/html5.py @@ -1,9 +1,15 @@ -""" - HTML Parser using html5. +"""HTML Parser using html5 - Written by Broytman. Copyright (C) 2010, 2011 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2010, 2011 PhiloSoft Design" +__license__ = "GNU GPL" + from html5lib import HTMLParser as HTML5Parser from .util import HTMLParser diff --git a/parse_html/htmlparser.py b/parse_html/htmlparser.py index 5f885b2..0932873 100644 --- a/parse_html/htmlparser.py +++ b/parse_html/htmlparser.py @@ -1,9 +1,15 @@ -""" - HTML Parser +"""HTML Parser using Pythons' HTMLParser - Written by Broytman. Copyright (C) 1997-2011 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design" +__license__ = "GNU GPL" + from HTMLParser import HTMLParseError from m_lib.net.www.html import HTMLParser as _HTMLParser diff --git a/parse_html/lxml.py b/parse_html/lxml.py index f399397..30d43a4 100644 --- a/parse_html/lxml.py +++ b/parse_html/lxml.py @@ -1,9 +1,15 @@ -""" - HTML Parser using lxml.html. +"""HTML Parser using lxml.html - Written by Broytman. Copyright (C) 2010, 2011 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2010, 2011 PhiloSoft Design" +__license__ = "GNU GPL" + from lxml.html import parse from .util import HTMLParser diff --git a/parse_html/util.py b/parse_html/util.py index 79890dd..12bab4c 100644 --- a/parse_html/util.py +++ b/parse_html/util.py @@ -1,9 +1,15 @@ -""" - HTML parsers utilities +"""HTML parsers utilities - Written by Broytman. Copyright (C) 2010 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2010, 2011 PhiloSoft Design" +__license__ = "GNU GPL" + from HTMLParser import HTMLParser class HTMLParser(HTMLParser): diff --git a/robots.py b/robots.py index c979f93..4aa7372 100644 --- a/robots.py +++ b/robots.py @@ -1,7 +1,14 @@ -""" - Thin wrapper for module Robots. Provides "default" robot +"""Thin wrapper for module Robots. Provides "default" robot + +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design" +__license__ = "GNU GPL" from os import environ robot_name = environ.get("BKMK_ROBOT", "forking") diff --git a/set-real_title.py b/set-real_title.py index 2926b5a..621d929 100755 --- a/set-real_title.py +++ b/set-real_title.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Run through the bookmarks database and set name to real title +"""Run through the bookmarks database and set name to real title - Written by Broytman, Jul 2002 - May 2003. Copyright (C) 2002-2003 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2002-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys diff --git a/set-title-list.py b/set-title-list.py index b5fb1ea..bd54059 100755 --- a/set-title-list.py +++ b/set-title-list.py @@ -1,10 +1,15 @@ #! /usr/bin/env python -""" - Run through the bookmarks database and set names to titles from an external file +"""Run through the bookmarks database and set names to titles from an external file - Written by Broytman. Copyright (C) 2003-2007 PhiloSoft Design. +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2003-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys diff --git a/sort_db.py b/sort_db.py index ed22fda..014fcae 100755 --- a/sort_db.py +++ b/sort_db.py @@ -1,6 +1,5 @@ #! /usr/bin/env python -""" - Sort bookmarks DB according to a rule: +"""Sort bookmarks DB according to a rule: -a - by AddDate -v - by LastVisit -m - by LastModified @@ -9,9 +8,15 @@ default is -m -r - reverse the sort order - Written by Broytman, Apr 2000. Copyright (C) 2000 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys diff --git a/storage.py b/storage.py index 0924301..5d309bf 100644 --- a/storage.py +++ b/storage.py @@ -1,7 +1,14 @@ -""" - Thin wrapper for module Storage. Provides "default" storage +"""Thin wrapper for module Storage. Provides "default" storage + +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design" +__license__ = "GNU GPL" from os import environ storage_name = environ.get("BKMK_STORAGE", "pickle") diff --git a/writers.py b/writers.py index 00849ea..46fb08a 100644 --- a/writers.py +++ b/writers.py @@ -1,7 +1,14 @@ -""" - Thin wrapper for module Writers. Provides "default" writer +"""Thin wrapper for module Writers. Provides "default" writer + +This file is a part of Bookmarks database and Internet robot. """ +__version__ = "$Revision$"[11:-2] +__revision__ = "$Id$"[5:-2] +__date__ = "$Date$"[7:-2] +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design" +__license__ = "GNU GPL" from os import environ writer_name = environ.get("BKMK_WRITER", "html") -- 2.39.5