Last modified: 2014-09-18 09:42:40 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/patches/521/ Reported by: lankier Created on: 2011-07-15 10:11:55 Subject: Retrieve / edit the section Original description: This patch adds new parameter 'section' to Page.get & Page.put. \(See also feature requests https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3104703&group\_id=93107 \) Examples: add a new section: page.put\('New section text', comment='New section header', section='new'\) edit the top section: text = page.get\(section=0\) page.put\(text+'\n\n==New section==\nNew text', section=0\)
It is a useful one. Was looking for it recently. Any plans for this?
Have you ever thought about adding a little bit more than just your articles? I mean, what you say is important and everything. Nevertheless think of if you added some great visuals or video clips to give your posts more, "pop"\! Your content is excellent but with images and clips, this site could definitely be one of the very best in its niche. Good blog\! cheap north face http://mfvfhwmjxm.yep.com
Is referring to sections by ID a good idea? Isn't it worth the extra query to get the section ID first? \(by calling action=render\). We currently 'support' sections by having a Page object with title "page title\#section", and I think this is the sensible way to work with sections.
Housekeeper's note: the patch applies cleanly to r10035 \(with some fuzz\).
Great and important contribution, I support the fast acceptation\! This feature has long been missing from Pywiki.
The Page constructor already accepts a section within the title. But I think we're still lacking a good single-section-editing feature.
(In reply to Ricordisamoa from comment #6) > The Page constructor already accepts a section within the title. But I think > we're still lacking a good single-section-editing feature. Isnt that the section _name_. This patch needs a section number. I'm guessing that we dont have any functionality to convert between the two except using textlib on the full page text, which defeats the point of the patch. I think this would be useful (in core too), if only to get the first/top section of the page.