Re: Folksonomy Plugin
Michael Guntsche <mike-Z92qn3yYq0hWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
On Apr 15, 2006, at 15:45, Michael Guntsche wrote: > Hello everyone, > > I put up the version I am currently using at http://mike.it- > loops.com/dump/folksonomy.py.txt I haven't added any functionality > just fixed the problems in the table creation, well at least I hope > I did. Ok, attached you'll find the minimal patch to get the original plug- in up and running. I also sent it to Tim so a fixed version should appear soon. Kind regards, Michael
folksonomy.patch
(application/octet-stream, 968 B)
--- folksonomy_py.txt 2005-11-01 04:51:01.000000000 +0100
+++ folksonomy.py 2006-04-15 15:37:31.000000000 +0200
@@ -397,12 +401,16 @@
taglist.sort()
for y in range( 0, len(taglist) ):
- for x in range( y, len(taglist) ):
- for i in range(0,y):
- folksonomytable[i].append([])
+
+ for i in range(0,y): # create empty columns
+ folksonomytable.append('EMPTY')
+
+ for x in range( y, len(taglist) ):
+ folksonomytable.append([]) # create new column
+
if x == y:
- folksonomytable.append( [ entrymap[ taglist[x] ][:] ] )
+ folksonomytable[x].append( entrymap[ taglist[x] ] )
else:
xentries = entrymap[taglist[x]]
yentries = entrymap[taglist[y]]
@@ -412,11 +420,7 @@
if entry in yentries:
xyentries.append( entry )
- if y == 0:
- folksonomytable.append([xyentries])
- else:
- folksonomytable[x].append(xyentries)
-
+ folksonomytable[x].append(xyentries)
return folksonomytable