Squid url redirector

Check-in [c27c7eb208]
anonymous

Check-in [c27c7eb208]

Overview
Comment:added sorting by site
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: c27c7eb208e19da83eb8ba749f9bfd6c18905390b32afb13435371fdd1851270
User & Date: c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 on 2010-03-22 15:32:52.000
Other Links: branch diff | manifest | tags
Context
2010-03-25
15:56
fixed dump restoration (NULL fields) check-in: b16bc5d76f user: c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 tags: master, trunk
2010-03-22
15:32
added sorting by site check-in: c27c7eb208 user: c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 tags: master, trunk
2010-03-18
15:55
* instead of fuzzy logic with merging many tags splitted some functionality from mark() which only works now with single tag, for many tags there is a set() function; * added option to drop site table. check-in: 7224844efa user: c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 tags: master, trunk
Changes
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# wrapper around database
class tagDB:
	__slots__ = frozenset(['_prepared', '_dump_stmt', '_db'])

	def __init__(self):
		self._prepared = set()
		self._db = False
		self._dump_stmt = self._curs().prepare("select untrip(site), tag, regexp from urls natural join site natural join tag")

	def _curs(self):
		if not self._db:
			config.section('database')
			self._db = postgresql.open(
				'pq://{}:{}@{}/{}'.format(
					config['user'],







|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# wrapper around database
class tagDB:
	__slots__ = frozenset(['_prepared', '_dump_stmt', '_db'])

	def __init__(self):
		self._prepared = set()
		self._db = False
		self._dump_stmt = self._curs().prepare("select untrip(site), tag, regexp from urls natural join site natural join tag order by site, tag")

	def _curs(self):
		if not self._db:
			config.section('database')
			self._db = postgresql.open(
				'pq://{}:{}@{}/{}'.format(
					config['user'],