[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-11-05 Thread Shreyasminocha
Shreyasminocha added a comment. @Xqt Thank you so much for your patience with me.TASK DETAILhttps://phabricator.wikimedia.org/T200399EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: ShreyasminochaCc: gerritbot, D3r1ck01, Liuxinyu970226, revi, jayvdb, JAnD,

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-11-04 Thread gerritbot
gerritbot added a comment. Change 470627 merged by jenkins-bot: [pywikibot/core@master] [IMPR] Strip disambiguation parens from articles https://gerrit.wikimedia.org/r/470627TASK DETAILhttps://phabricator.wikimedia.org/T200399EMAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-10-31 Thread Framawiki
Framawiki added a comment. Ok, although preferring the index option I chose the regex version for its simplicity. We can always create a task for change later on to have a cleaner code, even if it already seems very good to me. Patch is ready for review.TASK

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-10-31 Thread gerritbot
gerritbot added a comment. Change 470627 had a related patch set uploaded (by Shreyasminocha; owner: Shreyasminocha): [pywikibot/core@master] Strip disambiguation parens from articles https://gerrit.wikimedia.org/r/470627TASK DETAILhttps://phabricator.wikimedia.org/T200399EMAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-10-31 Thread Xqt
Xqt added a comment. Since all of you recommend doing it the index way Oh, I am fine with regex which might be less complex than index search implementation here.TASK DETAILhttps://phabricator.wikimedia.org/T200399EMAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-10-31 Thread Shreyasminocha
Shreyasminocha added a comment. @Framawiki Would it suffice if I handle only: 1. Georgia (Country) 2. Georgia (Something) (Country) // here it would remove both with the index approach? The following will break stuff: 3. Georgia ((Country)) 4. Georgia (Country 5. Georgia Country) Are any of

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-10-30 Thread Shreyasminocha
Shreyasminocha added a comment. @Xyt To clarify, I haven't implemented the second approach. We have two options—the regex-based approach I illustrated or an index-based approach (looping over the characters in the string, looking for an open parenthesis and trimming everything after that or a more

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-10-30 Thread Xqt
Xqt added a comment. @D3r1ck01 @Xqt and others: Do you prefer a regex or an index approach here ? The second looks cleaner to me. Sorry, I don’t have it. Could you show me the different approach? What about implementing this as a param like withoutDisambiguation in page.title() method? That

[Pywikipedia-bugs] [Maniphest] [Commented On] T200399: Make Pywikibot remove disambiguation bracket in labels to created new items for articles in Wikidata

2018-10-30 Thread D3r1ck01
D3r1ck01 added a comment. @Framawiki, if it's per this, https://gerrit.wikimedia.org/r/c/pywikibot/core/+/470627, then I'll say regex solutions become really confusing if they're trying to solve a complex problem hence making it difficult for one to understand a code base if we have many of them.