Last modified: 2014-09-18 09:42:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56569, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54569 - Retrieve / edit the section
Retrieve / edit the section
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
compat-(1.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-24 22:34 UTC by Kunal Mehta (Legoktm)
Modified: 2014-09-18 09:42 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-09-24 22:34: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\)
Comment 1 Kunal Mehta (Legoktm) 2013-09-24 22:34:43 UTC
It is a useful one. Was looking for it recently.
Any plans for this?
Comment 2 Kunal Mehta (Legoktm) 2013-09-24 22:34:45 UTC
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
Comment 3 Kunal Mehta (Legoktm) 2013-09-24 22:34:47 UTC
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.
Comment 4 Kunal Mehta (Legoktm) 2013-09-24 22:34:49 UTC
Housekeeper's note: the patch applies cleanly to r10035 \(with some fuzz\).
Comment 5 Kunal Mehta (Legoktm) 2013-09-24 22:34:51 UTC
Great and important contribution, I support the fast acceptation\! This feature has long been missing from Pywiki.
Comment 6 Ricordisamoa 2014-03-26 18:33:24 UTC
The Page constructor already accepts a section within the title. But I think we're still lacking a good single-section-editing feature.
Comment 7 John Mark Vandenberg 2014-09-18 09:42:40 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links