Pascal Bauermeister
<pascal DOT bauermeister AT gmail DOT com>
Extensions I wrote for MoinMoin
ParserMarket/UmlSequence to produce UML sequence diagrams (using umlgraph)
ActionMarket/PdfAction to get a page in pdf format
Published soon: ProcessorMarket/gen, making MoinMoin a templating engine (yes, really!!!)
- It is currently up and running somewhere, but I want to write some doc ... if you insist!!!
ProcessorMarket/IndentTable.py
- I want to completely rewite it some day !
Some contribution to AlexandreDuretLutz's ProcessorMarket/dot.py:
- Macros: Include/Set/Get
MoinMoin URLs for image maps
- Can force image rebuild thanks to special attachment: delete.me.to.regenerate.
Rules-based ACL
In addition to per-page ACLs and default ACLs (acl_rights_*), here is how one can implement ACLs based on the page name, in order to defines "Wiki zones". This will replace usual ACLs (sorry but you cannot override the rules below). It allows us to create extranet zones, where 3rd parties can freely access pages which path starts as specified. Add to wikiconfig.py:
ACL_ZONES = ( # Group # Page starts with (or ends with, if "*any") ("*", "*Template"), # any valid user may see any tmpl ("AcmeGroup", "Acme"), ("AcmeGroup", "Utilities"), ("AcmeGroup", "HelpOnProducts"), ("BildoonGroup", "BuSab2005Project"), ("BildoonGroup", "BuSab2006Project"), ("BildoonGroup", "News"), ("CinderellaGroup", "CinderellaProject"), ("GuestGroup", "Engineering"), ("GuestGroup", "News"), ("GuestGroup", "*Project"), ) from MoinMoin.security import Permissions class SecurityPolicy(Permissions): def may_do(self, pagename, op): from MoinMoin.security import Permissions from MoinMoin.Page import Page req = self.request user_name = req.user.name may = Page(req, pagename).getACL(req).may(req, user_name, op) res = may # default perm # additional right, given on page name vs group if req.user.valid: for group, prefix in Config.ACL_ZONES: if res: break gok = group=="*" or req.dicts.has_member (group, user_name) if not gok: continue if prefix.startswith ("*"): res = pagename.endswith (prefix[1:]) else: res = pagename.startswith (prefix) return res def edit (self, pname, **kw): return self.may_do (pname, 'edit') def write (self, pname, **kw): return self.may_do (pname, 'write') def read (self, pname, **kw): return self.may_do (pname, 'read') def revert(self, pname, **kw): return self.may_do (pname, 'revert') def admin (self, pname, **kw): return self.may_do (pname, 'admin') def delete(self, pname, **kw): return self.may_do (pname, 'delete')
Messages to me
You can drop some feedback here:
I like your new Processor!!
I've been trying to get Html2Moin-MoinConverter to convert an M$ Word document and it kept on choking on lists inside table, which M$ Word seems to do quite often. The other thing that M$ Word does is put paragraphs inside tables. Can IndentTable handle this?
-- CraigJohnson 2004-07-29 15:32:21
Yes, I think it does. In fact, if given the '+' option, the processor can put in a cell just anything MoinMoin can produce (except tables!). Lists work, paragraphs too (by inserting empty lines) like this:
A1 B1 ||C1+D1 A2 B2 C2: Bullets: \ * bulletted item 1\ * bulletted item 2\ More text\ \ New paragraph,\ end of cell D2 A3 a. (B3) numbered content \ a. numbered item C3
-- PascalBauermeister 2004-07-29
Comment on IndentTable for moin1.3 release 2004.11.21 by StigIversen:
Better replace cStringIO with StringIO, else unicode error can occur in format function. IndentTable-moin1.3.diff
Servus Pascal, I have a oneliner for SearchInPagesAndSort. If attachments are included on a page, they have to be expanded to point to that other page. this is what i did (right before store info, around line 600)
# expand attachments line = re.sub(r'attachment:(.*?)\s','[attachment:'+page_name+r'/\1 \1]',line)
-- GerhardBrandt 2024-12-22
Comment on PdfAction for moin1.5.8 release 2008.02.05 by Nihad Perva:
Hi,
i just installed htmldoc and your plugin ActionMarket/PdfAction and it works great but attached .png graphics are not converted into the pdf. any suggestions?
Hi Nihad, please have a look there: ActionMarket/PdfAction#head-74a28903f898b7767fb0f8a623f7f2de56202fe2 -- PascalBauermeister 2008-02-06 19:08:47
I'm sorry i didn't read the whole project page, but now i know what the problem is. I'm using NTLM-Auth against Active Directory and your plugin can not handle that authentication. Is it possible to integrate the standard authentication from auth.py?
-- PhilippHoefflin 2008-03-03 12:19:19 - Comment on ActionMarket/PdfAction
I had a little Problem with missing Table Borders with CreatePdfDocument.py (2.2.0). The Problem was, that my Tables looked like
<table style="width: 90%"> instead of just <table>. My quick and dirty fix was to add an extra regex:
html = re.compile(r'<table>').sub(u'<table border="1" cellpadding="5">', html) # that's what I added: html = re.compile(r'<table ').sub(u'<table border="1" cellpadding="5" ', html)
I guess there's a better way to do that but I don't know any python. Greetings, Philipp.