[pywikibot] Re: How to add a category to a page

2024-01-15 Thread Bináris
Thank you! :-) ezt írta (időpont: 2024. jan. 15., H, 9:23): > textlib.replaceCategoryLinks() with add_only=True should do the job. > > Best > > xqt > > > Von meinem iPhone gesendet > > Am 04.01.2024 um 13:49 schrieb John : > >  > I use a combination of getCategoryLinks() and then

[pywikibot] Re: How to add a category to a page

2024-01-15 Thread info
textlib.replaceCategoryLinks() with add_only=True should do the job.BestxqtVon meinem iPhone gesendetAm 04.01.2024 um 13:49 schrieb John :I use a combination of getCategoryLinks() and then replaceCategoryLinks() it updates them in place, or adds them where needed.On Thu, Jan 4, 2024 at 2:58 AM

[pywikibot] Re: How to add a category to a page

2024-01-04 Thread John
I use a combination of getCategoryLinks() and then replaceCategoryLinks() it updates them in place, or adds them where needed. On Thu, Jan 4, 2024 at 2:58 AM wrote: > Hi, > > to add a category to several pages, category script can be used. For > implementing a function or method, its treat

[pywikibot] Re: How to add a category to a page

2024-01-03 Thread info
Hi,to add a category to several pages, category script can be used. For implementing a function or method, its treat method can be used as templet:https://doc.wikimedia.org/pywikibot/master/_modules/scripts/category.html#CategoryAddBotYou can also use textlib for manipulating templates.Bestxqt Von

[pywikibot] Re: How to add a category to a page

2024-01-03 Thread Bináris
Thank you! At the end,I wrote to the end. We must care if there is already a \n ath end or not. Ethan N. ezt írta (időpont: 2024. jan. 3., Sze, 18:47): > Bináris, > A nice function for this does not currently exist for Page class. See > https://phabricator.wikimedia.org/T325420. > > I am

[pywikibot] Re: How to add a category to a page

2024-01-03 Thread Ethan N.
Bináris, A nice function for this does not currently exist for Page class. See https://phabricator.wikimedia.org/T325420. I am working on this one so it is in progress. Hopefully this weekend I will finish the initial version of the changes and start the review process. There are several