From philip.colmer at linaro.org Mon Jan 12 05:49:27 2015 From: philip.colmer at linaro.org (Philip Colmer) Date: Mon, 12 Jan 2015 10:49:27 +0000 Subject: [Moin-user] Programmatic creating/editing of pages Message-ID: I've written a script that, every night, checks that the organisational pages are built from data taken from our LDAP directory. The code to do the page bit looks like this: ... try: editor = PageEditor(request, 'Internal/meet-the-team/{0}'.format(pnNormalised)) try: text = editor.normalizeText(personMainBody.getvalue()) try: editor.saveText(text, 0) ... It works fine except for two areas that I'd like to overcome if the Moin API permits it: 1. I'd prefer NOT to have page history for these pages. It takes up disc space and isn't really necessary. 2. I'd prefer NOT to have changes to these pages show up in the RecentChanges list. The reason for this request is because part of the update process requires me to update the photos for each person. Since I can't (easily) do a file comparison to see if the photo has changed, I replace all of the photos anyway just to be on the safe side. That is 200 file updates every night which then swamps the RecentChanges list. The bit of code that does the photo is: if (person.photo != ''): AttachFile.add_attachment(request, 'Internal/meet-the-team/{0}'.format(pnNormalised), "profile.jpg", person.photo, overwrite=1) Does the API support either of options to reduce noise/files? Regards Philip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tw at waldmann-edv.de Mon Jan 12 08:40:08 2015 From: tw at waldmann-edv.de (Thomas Waldmann) Date: Mon, 12 Jan 2015 14:40:08 +0100 Subject: [Moin-user] Programmatic creating/editing of pages In-Reply-To: References: Message-ID: <54B3CEB8.1080003@waldmann-edv.de> > 1. I'd prefer NOT to have page history for these pages. It takes up disc > space and isn't really necessary. IIRC there is a parameter of PageEditor (or the save call) where you can switch off revisioning. > 2. I'd prefer NOT to have changes to these pages show up in the > RecentChanges list. The reason for this request is because part of the > update process requires me to update the photos for each person. Since I > can't (easily) do a file comparison to see if the photo has changed, I > replace all of the photos anyway just to be on the safe side. I don't think you can do this easily using the existing API. From paul at boddie.org.uk Mon Jan 12 12:06:26 2015 From: paul at boddie.org.uk (Paul Boddie) Date: Mon, 12 Jan 2015 18:06:26 +0100 Subject: [Moin-user] Programmatic creating/editing of pages In-Reply-To: References: Message-ID: <201501121806.26760.paul@boddie.org.uk> On Monday 12. January 2015 11.49.27 Philip Colmer wrote: > I've written a script that, every night, checks that the organisational > pages are built from data taken from our LDAP directory. > > The code to do the page bit looks like this: > > ... > try: > editor = PageEditor(request, > 'Internal/meet-the-team/{0}'.format(pnNormalised)) > try: > text = editor.normalizeText(personMainBody.getvalue()) > try: > editor.saveText(text, 0) > ... > > It works fine except for two areas that I'd like to overcome if the Moin > API permits it: > > 1. I'd prefer NOT to have page history for these pages. It takes up disc > space and isn't really necessary. I do wonder whether edits that don't change pages actually produce new revisions. I'm fairly sure that when I've imported pages using the page package functionality, it hasn't updated unchanged pages, but maybe that's something that the page package stuff does. > 2. I'd prefer NOT to have changes to these pages show up in the > RecentChanges list. The reason for this request is because part of the > update process requires me to update the photos for each person. Since I > can't (easily) do a file comparison to see if the photo has changed, I > replace all of the photos anyway just to be on the safe side. That is 200 > file updates every night which then swamps the RecentChanges list. Once upon a time, I thought that the "trivial edit" feature suppressed RecentChanges entries, but I don't remember now what the actual effect of that is. > The bit of code that does the photo is: > > if (person.photo != ''): if person.photo: ;-) > AttachFile.add_attachment(request, > 'Internal/meet-the-team/{0}'.format(pnNormalised), "profile.jpg", > person.photo, overwrite=1) > > Does the API support either of options to reduce noise/files? Are there any opportunities to make checksums of the images and to detect changes that way, perhaps incorporating checksums into filenames so that the old checksum is handy? This is just a quick suggestion that may get people thinking about better ones. ;-) I suppose the worst case scenario here is history rewriting, which might not be supported by the API. I only ever recall doing operations via the API to append to the edit log and to add page revisions. Paul From jason.morgan at aveillant.com Mon Jan 12 13:10:25 2015 From: jason.morgan at aveillant.com (jason.morgan at aveillant.com) Date: Mon, 12 Jan 2015 18:10:25 +0000 Subject: [Moin-user] Programmatic creating/editing of pages In-Reply-To: <54B3CEB8.1080003@waldmann-edv.de> References: <54B3CEB8.1080003@waldmann-edv.de> Message-ID: If I want to create a dynamic page in the wiki, I just use a macro which links the page to externally generated data. e.g. We have a dynamic list of machines, updated each time DHCP runs. The DHCP server updates a database, the macro queries that database. You could do the same with your pictures, just store then in a database as blobs. The wiki page says just (as wiki text) -------- {{{#!wiki comment/dashed Latest Data from DHCP /usr/local/share/moin/data/plugin/macro/QueryDB.py Data is collected by avldns0 and put into a MySQL Database, MACLookup }}} '''Last Query : <>''' <> --------- The QueryDB and Now functions generate HTML From: Thomas Waldmann To: moin-user at lists.sourceforge.net, Date: 12/01/2015 15:05 Subject: Re: [Moin-user] Programmatic creating/editing of pages > 1. I'd prefer NOT to have page history for these pages. It takes up disc > space and isn't really necessary. IIRC there is a parameter of PageEditor (or the save call) where you can switch off revisioning. > 2. I'd prefer NOT to have changes to these pages show up in the > RecentChanges list. The reason for this request is because part of the > update process requires me to update the photos for each person. Since I > can't (easily) do a file comparison to see if the photo has changed, I > replace all of the photos anyway just to be on the safe side. I don't think you can do this easily using the existing API. ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. vanity: www.gigenet.com _______________________________________________ Moin-user mailing list Moin-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.tadel at mcgill.ca Fri Jan 16 18:03:23 2015 From: francois.tadel at mcgill.ca (=?UTF-8?B?RnJhbsOnb2lzIFRhZGVs?=) Date: Fri, 16 Jan 2015 18:03:23 -0500 Subject: [Moin-user] "Insert/Edit image" button disabled Message-ID: <54B998BB.4010700@mcgill.ca> Hello, I just updated MoinMoin to 1.9.8 after a very long time without updates. The button "Insert/Edit image" in the GUI editor is now permanently disabled. Is there a way to get it working the way it was before (specifying the image file name in attachment)? It is very time-consuming to go back and forth between the GUI and text editors for long pages with lots of images. Thanks for your help, Francois From tw at waldmann-edv.de Sat Jan 17 13:15:08 2015 From: tw at waldmann-edv.de (Thomas Waldmann) Date: Sat, 17 Jan 2015 19:15:08 +0100 Subject: [Moin-user] "Insert/Edit image" button disabled In-Reply-To: <54B998BB.4010700@mcgill.ca> References: <54B998BB.4010700@mcgill.ca> Message-ID: <54BAA6AC.6090708@waldmann-edv.de> > I just updated MoinMoin to 1.9.8 after a very long time without updates. > The button "Insert/Edit image" in the GUI editor is now permanently > disabled. So, it worked before? If you can find out at which (moin and FCKeditor) release it stopped working, that might be helpful. > Is there a way to get it working the way it was before (specifying the > image file name in attachment)? Well, needs some javascript developer who likes to dive into FCKEditor and plugins (== not me, sorry). From tw at waldmann-edv.de Sat Jan 17 13:28:01 2015 From: tw at waldmann-edv.de (Thomas Waldmann) Date: Sat, 17 Jan 2015 19:28:01 +0100 Subject: [Moin-user] Mentors wanted for GSOC 2015 Message-ID: <54BAA9B1.2030004@waldmann-edv.de> Hi, MoinMoin project might file an application as mentoring organisation for GSOC 2015 (either directly or as a suborg of Python Software Foundation). https://moinmo.in/GoogleSoc2015 Until February 2nd we need to know who will be available as mentor. Please see the wiki page to see the current amount of mentors. Minimum we need is 1 admin (I can do that), 1 backup admin (missing yet), >= 2 mentors (missing yet). The amount of student project grants we get from google depends on many factors (in the past, these were usually 3 .. 6 student projects per summer), but one is of course mentoring capacity. The amount of student projects we can (and would) take depends primarily on availability of primary mentors. For quality mentoring, there usually should be 1 mentor per student. In some cases 1 mentor for 2 students can also work (e.g. if mentor has more time, students are predicted to need not that much mentoring, the 2 projects are somehow similar, etc.). So, if you have good experience with some of the following things, think about whether you could help with mentoring a student (as primary mentor) or hanging out with us on #moin-dev as a helper - helping now and then on some topics (but not being a primary mentor for a student). * moin2 codebase (if you have long term moin 1.x coding experience, that might also work, if you can take up the differences quickly) * python * javascript / jquery * css / bootstrap * html5 * mercurial / bitbucket * testing / py.test * code review (and maybe other stuff I just forgot right now) If this sounds interesting and you like to help the project and student developers who are maybe new to the project, add your name to the mentors list on the wikipage linked above. We usually do mentoring on IRC collaboratively - whoever is online and can answer a question will just do so (no matter whether he is primary mentor for that student or not). You of course should have some time to spend on mentoring, so you should not be super-busy with lots of other stuff. Students are expected to work full-time on their project, a mentor is expected to have at least some hours per week free to spend for mentoring (reviewing code, communicating with the student). Cheers, Thomas From francois.tadel at mcgill.ca Mon Jan 19 08:54:58 2015 From: francois.tadel at mcgill.ca (Francois Jean Tadel, Mr) Date: Mon, 19 Jan 2015 13:54:58 +0000 Subject: [Moin-user] "Insert/Edit image" button disabled In-Reply-To: <54BAA6AC.6090708@waldmann-edv.de> References: <54B998BB.4010700@mcgill.ca>,<54BAA6AC.6090708@waldmann-edv.de> Message-ID: <6CBF722E55EFC64BB821ED4EFDADCAFE37AE9C4A@EXMBX2010-7.campus.MCGILL.CA> Hello, I don't know what versions were working. It was probably in 2008 or 2009... Can you just tell me if this is supposed to work or not? If this limitation is local to my installation but it works everywhere else, I can spend some time working on it. If it hasn't been working anywhere for many years, I might not be able to fix it myself... Thanks, Francois ________________________________________ From: Thomas Waldmann [tw at waldmann-edv.de] > If you can find out at which (moin and FCKeditor) release it stopped > working, that might be helpful. From tw at waldmann-edv.de Thu Jan 22 15:57:09 2015 From: tw at waldmann-edv.de (Thomas Waldmann) Date: Thu, 22 Jan 2015 21:57:09 +0100 Subject: [Moin-user] "Insert/Edit image" button disabled In-Reply-To: <6CBF722E55EFC64BB821ED4EFDADCAFE37AE9C4A@EXMBX2010-7.campus.MCGILL.CA> References: <54B998BB.4010700@mcgill.ca>, <54BAA6AC.6090708@waldmann-edv.de> <6CBF722E55EFC64BB821ED4EFDADCAFE37AE9C4A@EXMBX2010-7.campus.MCGILL.CA> Message-ID: <54C16425.7000402@waldmann-edv.de> > I don't know what versions were working. It was probably in 2008 or 2009... OK, pity. > Can you just tell me if this is supposed to work or not? I don't use the gui editor. In theory all offered is supposed to work, but the problem is that not many developers care for the js parts of our code. So it might just need the right person to fix it. > If this limitation is local to my installation but it works everywhere else, I can spend some time working on it. You can just try if it happens on https://moinmo.in/ - if it works there, it is a local problem of your installation. > If it hasn't been working anywhere for many years, I might not be able to fix it myself... If you know js and/or FCKeditor, your chances are better than mine. From francois.tadel at mcgill.ca Thu Jan 22 17:57:38 2015 From: francois.tadel at mcgill.ca (=?windows-1252?Q?Fran=E7ois_Tadel?=) Date: Thu, 22 Jan 2015 17:57:38 -0500 Subject: [Moin-user] "Insert/Edit image" button disabled In-Reply-To: <54C16425.7000402@waldmann-edv.de> References: <54B998BB.4010700@mcgill.ca>, <54BAA6AC.6090708@waldmann-edv.de> <6CBF722E55EFC64BB821ED4EFDADCAFE37AE9C4A@EXMBX2010-7.campus.MCGILL.CA> <54C16425.7000402@waldmann-edv.de> Message-ID: <54C18062.6030504@mcgill.ca> It does not work on moinmo.in either: Edit a page, switch to GUI, the "Insert image" button is always disabled... On 22/01/2015 3:57 PM, Thomas Waldmann wrote: > You can just try if it happens onhttps://moinmo.in/ - if it works > there, it is a local problem of your installation. -- Fran?ois Tadel, MSc MEG / McConnell Brain Imaging Center / MNI / McGill University 3801 rue University, Montreal, QC H3A2B4, Canada