From 2005a at usenet.alexanderweb.de Sun Apr 3 01:16:17 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Sun Apr 3 01:16:17 2005 Subject: [Moin-devel] Re: Where to send patches? References: <66d0a6e1050329135760f95238@mail.gmail.com> Message-ID: <1gdsjtne41irl.dlg@usenet.alexanderweb.de> On Tue, 29 Mar 2005 16:57:09 -0500, Nicholas Bastin wrote: > I've added a patch to my installation to support a #title directive in > each wiki page (thus allowing each page to have a 'pretty' title, > regardless of the actual page name). Where do I submit patches back > to? See http://moinmoin.wikiwikiweb.de/MoinMoinPatch - you will notice that patches re the #title PI already exist. Kind regards, Alexander From nick.bastin at gmail.com Sun Apr 3 11:50:42 2005 From: nick.bastin at gmail.com (Nicholas Bastin) Date: Sun Apr 3 11:50:42 2005 Subject: [Moin-devel] Re: Where to send patches? In-Reply-To: <1gdsjtne41irl.dlg@usenet.alexanderweb.de> References: <66d0a6e1050329135760f95238@mail.gmail.com> <1gdsjtne41irl.dlg@usenet.alexanderweb.de> Message-ID: <66d0a6e105040311504ff99e62@mail.gmail.com> On Apr 3, 2005 5:15 AM, Alexander Schremmer <2005a at usenet.alexanderweb.de> wrote: > On Tue, 29 Mar 2005 16:57:09 -0500, Nicholas Bastin wrote: > > > I've added a patch to my installation to support a #title directive in > > each wiki page (thus allowing each page to have a 'pretty' title, > > regardless of the actual page name). Where do I submit patches back > > to? > > See http://moinmoin.wikiwikiweb.de/MoinMoinPatch - you will notice that > patches re the #title PI already exist. Is there any sort of organized and official patch acceptance/refusal policy? Some of these patches have been on that page for quite some time, with no indication of whether they will ever be rolled into the standard distribution or not. -- Nick From 2005a at usenet.alexanderweb.de Mon Apr 4 00:58:06 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Mon Apr 4 00:58:06 2005 Subject: [Moin-devel] Re: Re: Where to send patches? References: <66d0a6e1050329135760f95238@mail.gmail.com> <1gdsjtne41irl.dlg@usenet.alexanderweb.de> <66d0a6e105040311504ff99e62@mail.gmail.com> Message-ID: On Sun, 3 Apr 2005 14:50:25 -0400, Nicholas Bastin wrote: > On Apr 3, 2005 5:15 AM, Alexander Schremmer > <2005a at usenet.alexanderweb.de> wrote: >> On Tue, 29 Mar 2005 16:57:09 -0500, Nicholas Bastin wrote: >> >>> I've added a patch to my installation to support a #title directive in >>> each wiki page (thus allowing each page to have a 'pretty' title, >>> regardless of the actual page name). Where do I submit patches back >>> to? >> >> See http://moinmoin.wikiwikiweb.de/MoinMoinPatch - you will notice that >> patches re the #title PI already exist. > > Is there any sort of organized and official patch acceptance/refusal > policy? Some of these patches have been on that page for quite some > time, with no indication of whether they will ever be rolled into the > standard distribution or not. we include every patch if we are sure that it's quality is good enough. And, if it is a larger one, we/the submitter can maintain it. But in this case, we do not include it because changing the title like this has some side effects that might confuse the user. E.g. the TOC does not show the updated title, you cannot search via the title search for it etc. pp. Kind regards Alexander From leonardo at riseup.net Tue Apr 5 08:13:10 2005 From: leonardo at riseup.net (leonardo) Date: Tue Apr 5 08:13:10 2005 Subject: [Moin-devel] Translate to pt Message-ID: <42529CE1.9070507@riseup.net> Seen that the translation for 'pt' is slow, I am beginning it translate the first 387 messages of the system. Best regards, --Leonardo Gregianin From tw at waldmann-edv.de Wed Apr 6 04:19:31 2005 From: tw at waldmann-edv.de (Thomas Waldmann) Date: Wed Apr 6 04:19:31 2005 Subject: [Moin-devel] Translate to pt In-Reply-To: <42529CE1.9070507@riseup.net> References: <42529CE1.9070507@riseup.net> Message-ID: <4253BD62.6080803@waldmann-edv.de> > Seen that the translation for 'pt' is slow, I am beginning it translate > the first 387 messages of the system. Please use the MoinMaster wiki for that to avoid double work. http://moinmaster.wikiwikiweb.de/MoinI18n See the MoinMoin wiki for more infos. From dk at trick.ca Wed Apr 6 07:56:53 2005 From: dk at trick.ca (Dmytri Kleiner) Date: Wed Apr 6 07:56:53 2005 Subject: [Moin-devel] Excluding System Pages from Search Results Message-ID: <20050406145551.GA15757@trick.ca> Just wondering if anybody had any tips regarding excluding system pages (especialy those in other languages) from search results. ---- Dmytri Kleiner dk at trick.ca From matt.lorimer at usu.edu Thu Apr 7 12:47:13 2005 From: matt.lorimer at usu.edu (Matt Lorimer) Date: Thu Apr 7 12:47:13 2005 Subject: [Moin-devel] Creation of new wiki instances..... Message-ID: <42558E24.2030402@usu.edu> After getting confused by the documentation on how to create a new wiki 3 or 4 times, I set out to write better documentation. Then it dawned on me that it wouldn't be too hard to write a script to do it. I threw together a little script, and here it is. I am not sure if you want to use it or not, but I thought I would make it available to you. Matt Lorimer Systems Administrator USU NCS - Banner Project 4410 Old Main Hill SER 324 Logan, UT 84321 435.797.8950 matt.lorimer at usu.edu -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: newwiki.sh URL: From eduardo.isatto at gmail.com Thu Apr 7 18:51:34 2005 From: eduardo.isatto at gmail.com (Eduardo Luis Isatto) Date: Thu Apr 7 18:51:34 2005 Subject: [Moin-devel] Translation of system messages to pt-Br Message-ID: <2f23534505040718516740d78e@mail.gmail.com> Hi! I'm a teacher of Civil Engineering Federal University of Rio Grande do Sul, in Brazil. I've been using MoinMoin since last November, to store some contents of my classes. The version of Moin Moin I've been using is (still) 1.2.3, in a linux box, so I decided to upgrade to 1.3.4. However, after some months of use I've discovered that the language is an important issue in this kind of collaborative tool, and unfortunatelly the system pages in portuguese are not present in 1.3.4. So, I've translated the system pages to pt-BR using kbabel, and did a fine grain polishing using vimdiff. After all, the pt-BR.po compiled Ok. But when I tried to install in an 1.3.3 instalation (in my notebook), I received an error message soon after changing the language preferences to Brazilian Portuguese in UserPreferences page. Putting all together, I'm in a mess. Could someone give me some hint about of what is going wrong? Thanks in advance. Eduardo Isatto From martin.gignac at mpbn.ericsson.ca Fri Apr 8 05:40:57 2005 From: martin.gignac at mpbn.ericsson.ca (Martin Gignac) Date: Fri Apr 8 05:40:57 2005 Subject: [Moin-devel] Is it true file upload functionality will be removed from 1.4? Message-ID: <20050408122911.M90880@mpbn.ericsson.ca> Hello, While browsing the 'HelpOnConfiguration/FileAttachments' Wiki page on my MoinMoin installation (I was reading the page for clues on how to set up a Twisted web server instance to directly serve my file attachments), I noticed a disclaimer that stated that "Note that we plan to remove that option in 1.4. Because of that and the security problems noted below, we do not recommend that option.". Is this actually true? Do you *really* plan to remove file attachment support in version 1.4? Although I can certainly understand the rationale behind not enabling file upload in a *public* wiki server, I find that this option is absolutely wonderful for a personal or Intranet wiki! I use MoinMoin at work and I think it's very convenient to be able to upload documents such as PDFs, Visio network diagrams, etc. so that they can quickly and easily be shared and referenced amongst work colleagues. I would hate to see this useful option be pulled out of the Wiki. As far as I know this behavior is *not* activated in the default wikiconfig.py file. Is that not good security enough? You could always remove the option from the wikiconfig.py file and simply mention it on the HelpOnConfiguration page. Anyway, hopefully you'll reconsider this stance as I think it would be sad to lose this great feature, seeing as how it can serve such a useful purpose on private sites. Regards, -Martin -- "Les relations sont s?rement le miroir dans lequel on se d?couvre soi-m?me." -- Jiddu Krishnamurti From eduardo.isatto at gmail.com Fri Apr 8 08:09:42 2005 From: eduardo.isatto at gmail.com (Eduardo Luis Isatto) Date: Fri Apr 8 08:09:42 2005 Subject: [Moin-devel] Re: Translation of system messages to pt-Br In-Reply-To: <2f23534505040718516740d78e@mail.gmail.com> References: <2f23534505040718516740d78e@mail.gmail.com> Message-ID: <2f23534505040808091f3c2c49@mail.gmail.com> Hello, I changed the name of pt-BR.po to pt.po and compiled again. Now, everything is running smoothly! Is there detail in the code that stops languages with xx-xx iso format to be properly handled by MoinMoin? Possible bug? How could I send the POT file to be included in the next version of MoinMoin? Regards, Eduardo Isatto On Apr 7, 2005 10:51 PM, Eduardo Luis Isatto wrote: > Hi! > > I'm a teacher of Civil Engineering Federal University of Rio Grande do > Sul, in Brazil. I've been using MoinMoin since last November, to store > some contents of my classes. > > The version of Moin Moin I've been using is (still) 1.2.3, in a linux > box, so I decided to upgrade to 1.3.4. However, after some months of > use I've discovered that the language is an important issue in this > kind of collaborative tool, and unfortunatelly the system pages in > portuguese are not present in 1.3.4. > > So, I've translated the system pages to pt-BR using kbabel, and did a > fine grain polishing using vimdiff. After all, the pt-BR.po compiled > Ok. But when I tried to install in an 1.3.3 instalation (in my > notebook), I received an error message soon after changing the > language preferences to Brazilian Portuguese in UserPreferences page. > > Putting all together, I'm in a mess. Could someone give me some hint > about of what is going wrong? > > Thanks in advance. > > Eduardo Isatto > From 2005a at usenet.alexanderweb.de Sat Apr 9 04:41:41 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Sat Apr 9 04:41:41 2005 Subject: [Moin-devel] Re: Is it true file upload functionality will be removed from 1.4? References: <20050408122911.M90880@mpbn.ericsson.ca> Message-ID: <16exj2qd4869q.dlg@usenet.alexanderweb.de> On Fri, 8 Apr 2005 08:40:23 -0400, Martin Gignac wrote: > Do you *really* plan to remove file attachment support in version 1.4? No, I moved the hint to the appropriate section. The possibility of direct servement of data will be removed. 1.4 will have a different handling of data, but this will rather broaden the usage of non-wiki data. > Anyway, hopefully you'll reconsider this stance as I think it would be sad to > lose this great feature, seeing as how it can serve such a useful purpose on > private sites. And IMHO even on public ones. Think of images you want to attach (legally) or other things. Kind regards, Alexandeer From 2005a at usenet.alexanderweb.de Sat Apr 9 04:43:22 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Sat Apr 9 04:43:22 2005 Subject: [Moin-devel] Re: Translation of system messages to pt-Br References: <2f23534505040718516740d78e@mail.gmail.com> <2f23534505040808091f3c2c49@mail.gmail.com> Message-ID: <1eopfwe7i24qr.dlg@usenet.alexanderweb.de> On Fri, 8 Apr 2005 12:09:13 -0300, Eduardo Luis Isatto wrote: > Is there detail in the code that stops > languages with xx-xx iso format to be properly handled by MoinMoin? Either you did not update meta.py or requested just pt. I think it does not fallback in that case. > How could I send the POT file to be included in the next version of MoinMoin? Please read http://moinmoin.wikiwikiweb.de/MoinDev/Translation It is explained there. If you have questions left, ask here :-) Kind regards, Alexander From martin.gignac at mpbn.ericsson.ca Sat Apr 9 07:22:30 2005 From: martin.gignac at mpbn.ericsson.ca (Martin Gignac) Date: Sat Apr 9 07:22:30 2005 Subject: [Moin-devel] Re: Is it true file upload functionality will be removed from 1.4? In-Reply-To: <16exj2qd4869q.dlg@usenet.alexanderweb.de> References: <20050408122911.M90880@mpbn.ericsson.ca> <16exj2qd4869q.dlg@usenet.alexanderweb.de> Message-ID: <20050409141431.M15050@mpbn.ericsson.ca> > > Do you *really* plan to remove file attachment support in version 1.4? > > No, I moved the hint to the appropriate section. The possibility of direct > servement of data will be removed. I'm happy to hear that. However, I've noticed that if (under Twisted at least) I try to serve very large files (one of the files I was trying to serve was about 52MB) using the "non-direct" way (using CGI GETs), then the wiki (or Twisted) slows down to a crawl and hogs all of the CPU. In the end, I just end up having to kill the process. However, when I serve large files directly (with a normal GET), then it is Twisted alone that does the file serving and there is no CPU problem whatsoever. The funny thing is, when I initially upload the 52MB file I don't get any problems from MoinMoin. So if you get rid of the direct attachment serving option, won't you prevent "big" attachments from being served on private or personal sites? Or is the CPU "hogging" I'm experiencing on CGI GETs just due to a misconfiguration on my part? Regards, -Martin From 2005a at usenet.alexanderweb.de Sat Apr 9 07:28:03 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Sat Apr 9 07:28:03 2005 Subject: [Moin-devel] Re: Re: Is it true file upload functionality will be removed from 1.4? References: <20050408122911.M90880@mpbn.ericsson.ca> <16exj2qd4869q.dlg@usenet.alexanderweb.de> <20050409141431.M15050@mpbn.ericsson.ca> Message-ID: <1mvkujx8w2zre.dlg@usenet.alexanderweb.de> On Sat, 9 Apr 2005 10:22:02 -0400, Martin Gignac wrote: > So if you get rid of the direct attachment > serving option, won't you prevent "big" attachments from being served on private > or personal sites? No, as your described behaviour is not expected. > Or is the CPU "hogging" I'm experiencing on CGI GETs just due > to a misconfiguration on my part? It should not happen. Which OS are you using? Mac OS X is known to have such problems. We can still tweak the code by using sendfile. Try to use the Standalone server version and check if it behaves better. (Should be very easy to setup) Kind regards, Alexander From martin.gignac at mpbn.ericsson.ca Sat Apr 9 20:37:55 2005 From: martin.gignac at mpbn.ericsson.ca (Martin Gignac) Date: Sat Apr 9 20:37:55 2005 Subject: [Moin-devel] Re: Re: Is it true file upload functionality will be removed from 1.4? In-Reply-To: <1mvkujx8w2zre.dlg@usenet.alexanderweb.de> References: <20050408122911.M90880@mpbn.ericsson.ca> <16exj2qd4869q.dlg@usenet.alexanderweb.de> <20050409141431.M15050@mpbn.ericsson.ca> <1mvkujx8w2zre.dlg@usenet.alexanderweb.de> Message-ID: <20050410032841.M66950@mpbn.ericsson.ca> > Try to use the Standalone server version and check if it behaves better. > (Should be very easy to setup) Hi Alexander, I've did some more tests with large files, MoinMoin and Twisted 1.3.0, and found that the larger the file is, the longer the CPU "hogging" lasts. It eventually dies down and the file ends up being downloaded, but in the case of very large files (> 100MB), I wasn't patient enough to wait for it... ;) I took your advice and ran the wiki using the exact same wikiconfig.py file, but in standalone mode. This time, even a 123MB file got downloaded quickly and easily without any problems! So my problems *does* seem to be limited to when I use MoinMoin with Twisted. I orginally thought that using Twisted instead of the standalonne mode would give me some performance gains, but if it comes at this price, I may decide to switch! I had another question while we are on the subject of CGI GETs. If I use direct file serving, I can use the mechanism of the 'HTTP 304 Not Modified' response returned by the web server (Apache, Twisted Web, etc.) so that I avoid downloading images in a wiki page which I already have in my browser cache. Now my question is: do I get the same advantage if I use CGI GETs instead of direct attachment serving, or do I end up downloading the images on a wiki page *every* time I view the page with my web browser? Regards, -Martin From 2005a at usenet.alexanderweb.de Sun Apr 10 05:12:05 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Sun Apr 10 05:12:05 2005 Subject: [Moin-devel] Re: Re: Re: Is it true file upload functionality will be removed from 1.4? References: <20050408122911.M90880@mpbn.ericsson.ca> <16exj2qd4869q.dlg@usenet.alexanderweb.de> <20050409141431.M15050@mpbn.ericsson.ca> <1mvkujx8w2zre.dlg@usenet.alexanderweb.de> <20050410032841.M66950@mpbn.ericsson.ca> Message-ID: On Sat, 9 Apr 2005 23:37:07 -0400, Martin Gignac wrote: > I've did some more tests with large files, MoinMoin and Twisted 1.3.0, and found > that the larger the file is, the longer the CPU "hogging" lasts. It eventually > dies down and the file ends up being downloaded, but in the case of very large > files (> 100MB), I wasn't patient enough to wait for it... ;) the problem could be reproduced on Linux. So it seems to be a bug in the code. > So my problems *does* seem to be limited to when I use MoinMoin with Twisted. Standalone should be faster anyway. > I had another question while we are on the subject of CGI GETs. If I use direct > file serving, I can use the mechanism of the 'HTTP 304 Not Modified' response > returned by the web server (Apache, Twisted Web, etc.) so that I avoid > downloading images in a wiki page which I already have in my browser cache. if your browser if RFC compliant, it will request the image everytime again (independent from the current method of MoinMoin invocation - CGI/Twisted/etc.). We could send some cache-control headers to mitigate this issue. Sending 304 would need request parsing logic in the code. Enhancing the code by that amount is not planned because 1.4 will handle downloads differently in any case. Kind regards, Alexander PS.: Just for the record, Martin is using Twisted 1.3 on Python 2.4.1 on Windows 2000 From martin.gignac at mpbn.ericsson.ca Mon Apr 11 08:36:18 2005 From: martin.gignac at mpbn.ericsson.ca (Martin Gignac) Date: Mon Apr 11 08:36:18 2005 Subject: [Moin-devel] Re: Re: Re: Is it true file upload functionality will be removed from 1.4? In-Reply-To: References: <20050408122911.M90880@mpbn.ericsson.ca> <16exj2qd4869q.dlg@usenet.alexanderweb.de> <20050409141431.M15050@mpbn.ericsson.ca> <1mvkujx8w2zre.dlg@usenet.alexanderweb.de> <20050410032841.M66950@mpbn.ericsson.ca> Message-ID: <20050411153539.M17324@mpbn.ericsson.ca> > Standalone should be faster anyway. Is that right? OK then, I'll use it instead. It's just that on the 'HelpOnInstalling' page the Twisted option was listed in the 'High performance public wiki' section (whereas standalone was not), which lead me to believe Twisted was faster than standalone. > if your browser if RFC compliant, it will request the image everytime again > (independent from the current method of MoinMoin invocation - > CGI/Twisted/etc.). We could send some cache-control headers to mitigate > this issue. Sending 304 would need request parsing logic in the code. That was one of the advantage is saw though with using the direct download option, especially on a slow dial-up link. Because Apache and Twisted both return HTTP 304 if the version in the browser's cache is not older than what is the wiki site, the user can save some bandwidth when downloading a page with lots of images. Regards, -Martin From wcosseme at vub.ac.be Wed Apr 13 10:10:36 2005 From: wcosseme at vub.ac.be (Wim Cossement) Date: Wed Apr 13 10:10:36 2005 Subject: [Moin-devel] Importing data after upgrade from userless version??? Message-ID: <425D528A.9040607@vub.ac.be> Hi, We were using a old Moinmoin version that had no users (or was configured that way?), but recently Gentoo's emerge update has installed the latest one, wich I configured and works, but I'd like to know how to put the old data in it, preferably without a user (if possible). Some other guy installed ir so I realy dont know what version it is, but maybe someone could tell me where to look. If you need more info, just shoot! Thanks, Wimmy From 2005a at usenet.alexanderweb.de Wed Apr 13 12:48:04 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Wed Apr 13 12:48:04 2005 Subject: [Moin-devel] Re: Importing data after upgrade from userless version??? References: <425D528A.9040607@vub.ac.be> Message-ID: <144xrbu5l7ifv.dlg@usenet.alexanderweb.de> On Wed, 13 Apr 2005 19:10:34 +0200, Wim Cossement wrote: > We were using a old Moinmoin version that had no users (or was > configured that way?), but recently Gentoo's emerge update has installed > the latest one, wich I configured and works, but I'd like to know how to > put the old data in it, preferably without a user (if possible). > > Some other guy installed ir so I realy dont know what version it is, but > maybe someone could tell me where to look. Maybe http://moinmaster.wikiwikiweb.de/HelpOnUpdating?action=recall&rev=44 helps. In any case, I would simply try to use the 1.2-to-1.3 migration scripts (assume that you have 1.2 and follow the migration docs). Don't forget to tell us if it worked as the one who maintained MoinMoin back then has retired from the project a few years ago. Kind regards, Alexander From gregwh at gmail.com Sun Apr 17 05:55:41 2005 From: gregwh at gmail.com (greg) Date: Sun Apr 17 05:55:41 2005 Subject: [Moin-devel] new to theme modifying and need help Message-ID: I've been using the sincor4moin theme I got from the ThemeMarket and I want to make what seems like a very small modificaiton. Right now there is a panel in the left side bar. It has the "Edit", "Get Info", and the More Actions pull down. I want to add a "Attachments (#)" where # is the number of attachments. It looks like this panel is formed in Theme.editbar. Just working by example, I added. add(link(request, quotedname + '?action=AttachFile', _('Attachments', formatted=False))) So far, so good. I have "Attachments" text in the sidebar. Now how do I get the number of attachments? I thought I could use a method of the page objects to get a list of attachments or something similar, but couldn't find anything promising. Looking around the source code, II found text like "%s(attach_count)s" that looks promising but I haven't figured out quite how to use it. Do I pass this to a function that decodes it or does it go in the return of editbar and get decoded downstream? Any help is appreciated. Thanks for MoinMoin. So far it looks great -- clean with hidden and exensible power. Well it's python. Thanks, Greg BTW, in case it's not the convention for themes, the context for the snippet above is: _ = self.request.getText link = wikiutil.link_tag links = [] add = links.append items = '\n'.join(['
  • %s
  • ' % item for item in links if item != ''] html = u'
      \n%s\n
    \n' % items return html From jim at clarkster.co.uk Mon Apr 18 15:24:38 2005 From: jim at clarkster.co.uk (Jim Clark) Date: Mon Apr 18 15:24:38 2005 Subject: [Moin-devel] dependencies[] for macros Message-ID: <4264337D.3090005@clarkster.co.uk> Hi there, I'm wondering about the dependencies[] section that moinmoin macros include to declare how they should be cached. I understand that Dependencies = ["time"] means that a macro will not be cached, but I see that StatsChart.py uses Dependencies = ["time24:00"]. Two questions: * presumably ["time24:00"] means refresh once per day, but I couldn't find anywhere in the codebase that uses this - is this part of the cache system magic? * if so, I'd like to update http://moinmoin.wikiwikiweb.de/macro/FeedParser, and part of this would be to include some caching for parsed rss feeds. Is it possible to say that a macro should be recalculated (say) every two hours? Thanks, Jim From gregwh at gmail.com Mon Apr 18 21:28:47 2005 From: gregwh at gmail.com (greg) Date: Mon Apr 18 21:28:47 2005 Subject: [Moin-devel] Re: new to theme modifying and need help In-Reply-To: References: Message-ID: OK. I came up with a solution using what was in action.AttachFile. Not sure it's the best but it works. pagename = d['page_name'] # is this right? attach_dir = getAttachDir(request, pagename) files = [] if os.path.isdir(attach_dir): files = os.listdir(attach_dir) add(link(request, quotedname + '?action=AttachFile', _('Attachments', formatted=False) + " (%i)" % len(files))) I also learned something new about python string interpolation. Doh. On 4/17/05, greg wrote: > I've been using the sincor4moin theme I got from the ThemeMarket and I > want to make what seems like a very small modificaiton. Right now > there is a panel in the left side bar. It has the "Edit", "Get Info", > and the More Actions pull down. I want to add a "Attachments (#)" > where # is the number of attachments. > > It looks like this panel is formed in Theme.editbar. Just working by > example, I added. > > add(link(request, quotedname + '?action=AttachFile', > _('Attachments', formatted=False))) > > So far, so good. I have "Attachments" text in the sidebar. Now how > do I get the number of attachments? I thought I could use a method of > the page objects to get a list of attachments or something similar, > but couldn't find anything promising. Looking around the source code, > II found text like "%s(attach_count)s" that looks promising but I > haven't figured out quite how to use it. Do I pass this to a function > that decodes it or does it go in the return of editbar and get decoded > downstream? > > Any help is appreciated. Thanks for MoinMoin. So far it looks great > -- clean with hidden and exensible power. Well it's python. > > Thanks, > Greg > > BTW, in case it's not the convention for themes, the context for the > snippet above is: > > _ = self.request.getText > link = wikiutil.link_tag > links = [] > add = links.append > items = '\n'.join(['
  • %s
  • ' % item for item in links if item != ''] > html = u'
      \n%s\n
    \n' % items > return html > From jim at clarkster.co.uk Wed Apr 20 06:16:42 2005 From: jim at clarkster.co.uk (=?iso-8859-1?Q?Jim_Clark?=) Date: Wed Apr 20 06:16:42 2005 Subject: [Moin-devel] =?iso-8859-1?Q?Re:_[Moin-devel]_dependencies[]_for_macros?= Message-ID: <29935408$1114002073426652997375b9.10311293@config6.schlund.de> Just an update on my caching question - I think I've found the answer, but would be curious if there are alternative/better methods. 1. In the macro header, use the line Dependencies = ["time"] This forces a recalculation with each call of the macro. 2. Inside the macro call do this: from MoinMoin import caching, wikiutil cache = caching.CacheEntry(self.macro.request, 'RSS', wikiutil.quoteWikinameFS(self.args['url'])) # if cached entry is from within the last hour, use it. if (time.time() - cache.mtime() < 3600): return cache.content() #else, do feed parsing, generate HTML ... cache.update(html) Cheers, Jim From cv at weatherpredict.com Thu Apr 21 09:44:00 2005 From: cv at weatherpredict.com (Chris Vandersip) Date: Thu Apr 21 09:44:00 2005 Subject: [Moin-devel] MoinMoin Feature Request: Retain Archive of Unique Diffs Message-ID: <4267D832.4030907@weatherpredict.com> I've searched high and low for a solution to this without success, so here's my proposal: BACKGROUND ---------- Here at the office we've started using the RSS feature in RecentChanges to track changes to our MoinMoin 1.3.4 wiki site via Firefox/Sage and Thunderbird RSS. It's a great feature, but it appears to be lacking an important capability that limits the feature's effectiveness--- ISSUE ----- The RecentChanges page only lists the last change for a particular page and does not retain previous changes to that page within the RecentChanges timeline. The ugly side effect of this for RSS feeds is that if you decide to not use the "unique=1" option, you'll get notification of each change, but the link will be the same in every article. So, let's say you haven't read your wiki rss in a few days and you see 8 articles indicating 8 changes to a particular page. When you click on the link within the articles, instead of getting a diff page for each change, every diff page shows only the latest diff. REQUEST ------- Create a configurable parameter for maintaining an archive of past diffs available for individual pages (just as you can view a Revision History listing in Get Info) and for each diff to be available in the RecentChanges timeline, so that links in the RSS articles will be unique and point to specific diffs. Additionally, if this was a tunable parameter, one could set a limit on the length of the diff archiving, e.g. diff_archive_length = 7 #for either days or number of diffs Thanks, Chris From cv at weatherpredict.com Thu Apr 21 10:08:46 2005 From: cv at weatherpredict.com (Chris Vandersip) Date: Thu Apr 21 10:08:46 2005 Subject: [Moin-devel] FOLLOWUP to MoinMoin Feature Request: Retain Archive of Unique Diffs In-Reply-To: <4267D832.4030907@weatherpredict.com> References: <4267D832.4030907@weatherpredict.com> Message-ID: <4267DDF4.4020607@weatherpredict.com> Chris Vandersip wrote: > REQUEST > ------- > Create a configurable parameter for maintaining an archive of past diffs > available for individual pages (just as you can view a Revision History > listing in Get Info) and for each diff to be available in the > RecentChanges timeline, so that links in the RSS articles will be unique > and point to specific diffs. > > Additionally, if this was a tunable parameter, one could set a limit on > the length of the diff archiving, e.g. > > diff_archive_length = 7 #for either days or number of diffs Of course, after I sent the above, I discovered that MoinMoin *does* retain an archive already, and the archive can be traversed in the Diff column of Get Info/Revision History of any page. One can display all the diffs for a page by appending the "&rev2=" and "&rev1=" filters to the ?action=diff command in the URL. ex. http://www.mydomain.com/wpwiki/FrontPage?action=diff&rev2=59&rev1=54 ================ So, armed with this new knowledge, I modify the request: Forget about creating a configurable parameter and just incorporate the &rev-style filtering into the RecentChanges/RSS feature to allow for unique past diffs to be read. Looking at the XML page that displays when you press the RSS button on Recent Changes, it looks like the code that creates this page could be modified to include the &rev filters to the URL links in feed articles. Chris From cv at weatherpredict.com Thu Apr 21 10:22:05 2005 From: cv at weatherpredict.com (Chris Vandersip) Date: Thu Apr 21 10:22:05 2005 Subject: [Moin-devel] MoinMoin Feature Request: RSS for individual pages Message-ID: <4267E116.2060503@weatherpredict.com> Slap me if I'm clueless on this, but... ISSUE ----- The RSS feature is available for the main RecentChanges page but, AFAICT, it is not available for individual pages/sections within the site. For this, users must use the "subscription" feature, which functions but is more difficult for the average user to set up and maintain. REQUEST ------- Permit users to track changes to specific pages of a Wiki site via RSS. This might require a "RecentChanges" timeline for each page, or you could make it an option in the drop-down "More Actions" menu, so that the interested viewer could select the option and have a RecentChanges page created on demand. Thanks, Chris From 2005a at usenet.alexanderweb.de Thu Apr 21 13:21:59 2005 From: 2005a at usenet.alexanderweb.de (Alexander Schremmer) Date: Thu Apr 21 13:21:59 2005 Subject: [Moin-devel] dependencies[] for macros References: <29935408$1114002073426652997375b9.10311293@config6.schlund.de> Message-ID: On Wed, 20 Apr 2005 15:14:01 +0200, Jim Clark wrote: > Just an update on my caching question - I think I've found the answer, > but would be curious if there are alternative/better methods. No, there are not. The dependency system currently just differentiates two cases: cachable or not. In Moin 1.4, there might be a better persistency layer. Your solution is perfectly suitable to do it like you want. Kind regards, Alexander From pxjgvg5ju at otn.net Mon Apr 25 23:23:37 2005 From: pxjgvg5ju at otn.net (Cheryll ) Date: Mon Apr 25 23:23:37 2005 Subject: [Moin-devel] crater AL1AS, P1NNACLE SYSTEM, APPLE, C0REL, NER0, AD00BE FROM $20 EACH courage protocol Message-ID: <%CUSTOM_A0[20-22]pxjgvg5ju@otn.net> barbital dependent indolent edwardine exhale insofar reason edge plumbate debonair cabin -------------- next part -------------- An HTML attachment was scrubbed... URL: