[Pywikipedia-bugs] [Maniphest] [Updated] T318239: scripts/category.py: Allow pagegenerators intersection with actions other than "add"

2022-09-21 Thread Xqt
Xqt edited projects, added Pywikibot-category.py; removed Pywikibot-Scripts.

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318239: scripts/category.py: Allow pagegenerators intersection with actions other than "add"

2022-09-21 Thread Vladis13
Vladis13 added a comment.


  How to remove pages from a category by generator? The only way is to use the 
`remove.py` script with the `-regex` argument?
  `pwb.py replace -family:wikisource -lang:ru -cat:"OUN-UPA" -regex 
'\[\[Category:Ukraine\]\]\n?' ''`

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318239: scripts/category.py: Allow pagegenerators intersection with actions other than "add"

2022-09-21 Thread Vladis13
Vladis13 added a comment.


  There is also confusion with the name of the argument. 
  The script (by page generator) execute for each page the `remove 
-from:category_name` command. In human terms, this means: remove this page from 
the categoryname category.
  But it turns out that it completely clears the category, removing all pages. 
Then this command should be called as "clear category". 
  But the script already has a `clean` command, which has no description. What 
it does? Is this a duplicate of `remove`?

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318239: scripts/category.py: Allow pagegenerators intersection with actions other than "add"

2022-09-21 Thread Vladis13
Vladis13 added a comment.


  Hm. The `category.py` help at 
https://doc.wikimedia.org/pywikibot/stable/scripts/main.html#module-scripts.category
 also says "This script supports use of pywikibot.pagegenerators arguments."

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318236: scripts/category.py: Enable "-always" option for other actions than clean

2022-09-21 Thread Xqt
Xqt added a comment.


  In T318236#8250626 , 
@Vladis13 wrote:
  
  > How to disable `-always` for other bulk edit commands?
  
  Currently the only way is to simulate the run first using the global 
`-simulate` option. I think this your feature request is very important and 
should be implemented.

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Triaged] T318236: scripts/category.py: Enable "-always" option for other actions than clean

2022-09-21 Thread Xqt
Xqt changed the subtype of this task from "Task" to "Feature Request".
Xqt triaged this task as "Medium" priority.

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Retitled] T318236: scripts/category.py: Enable "-always" option for other actions than clean

2022-09-21 Thread Xqt
Xqt renamed this task from "scripts/category.py: Bug of "-always" argument" to 
"scripts/category.py: Enable "-always" option for other actions than clean".

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Retitled] T318239: scripts/category.py: Allow pagegenerators intersection with actions other than "add"

2022-09-21 Thread Xqt
Xqt renamed this task from "scripts/category.py: Problem with the page 
generator" to "scripts/category.py: Allow pagegenerators intersection with 
actions other than "add"".

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Triaged] T318239: scripts/category.py: Problem with the page generator

2022-09-21 Thread Xqt
Xqt changed the subtype of this task from "Task" to "Feature Request".
Xqt triaged this task as "Low" priority.
Xqt added a comment.


  In T318239#8250713 , 
@Vladis13 wrote:
  
  > All of these scripts are based on `pywikibot.pagegenerators` and 
`pywikibot.bot`, and use common generator arguments.
  > If this script is somehow strange, could you remove the list of generator 
commands from the script's help (`pwb.py category -help`) and from its page 
https://www.mediawiki.org/wiki/Manual:Pywikibot/category.py#Generators_and_filters_available
 ?
  
  I see, the documentation is missleading. I haven't verified whether the 
manual pages on MediaWiki are valid; surely some of them are outdated. The 
reference information for the whole framework documentation is placed at 
https://doc.wikimedia.org/pywikibot/stable/ and the category script description 
can be found here 
 for example. See 
also T312992 .
  
  Calling  `pwb category -help` shows the message //If action is "add", the 
following additional options are supported:// and displays the pagegenerators 
options. That means, these options are only availlable for `add` action. `tidy` 
and `listify` only enables the namespaces filter.
  
  Expanding other actions other than `add` is not trivial because all others 
need a category already to work on, which means that there must be always an 
intersection with pagegenerators then. Anyway your suggestion is very usefull 
and should be implemented I think.

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318239: scripts/category.py: Problem with the page generator

2022-09-21 Thread Vladis13
Vladis13 added a comment.


  All of these scripts are based on `pywikibot.pagegenerators` and 
`pywikibot.bot`, and use common generator arguments.
  If this script is somehow strange, could you remove the list of generator 
commands from the script's help (`pwb.py category -help`) and from its page 
https://www.mediawiki.org/wiki/Manual:Pywikibot/category.py#Generators_and_filters_available
 ?

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318239: scripts/category.py: Problem with the page generator

2022-09-21 Thread Xqt
Xqt added a comment.


  `-cat` i not a valid option for category script with `remove` action:
  
D:\pwb\GIT\core>pwb.py -simulate category remove -site:wikisource:ru 
-cat:"ОУН-УПА" -cat:"Украина" -intersect -from:"Украина"
ERROR: Unknown parameters "-cat:ОУН-УПА", "-cat:Украина", "-intersect".
Use -help for further information.

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318236: scripts/category.py: Bug of "-always" argument

2022-09-21 Thread Vladis13
Vladis13 added a comment.


  How to disable `-always` for other bulk edit commands?

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Updated] T318236: scripts/category.py: Bug of "-always" argument

2022-09-21 Thread Vladis13
Vladis13 added a comment.


  I use the `remove` command, examples are given here T318239 
.

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T318236: scripts/category.py: Bug of "-always" argument

2022-09-21 Thread Xqt
Xqt added a comment.


  Be aware: `-always` option is defined for `clean` action only. What is the 
command line you have used?

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Edited] T318239: scripts/category.py: Problem with the page generator

2022-09-21 Thread Vladis13
Vladis13 updated the task description.

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Edited] T318239: scripts/category.py: Problem with the page generator

2022-09-21 Thread Vladis13
Vladis13 updated the task description.

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Created] T318239: scripts/category.py: Problem with the page generator

2022-09-21 Thread Vladis13
Vladis13 created this task.
Vladis13 added projects: Pywikibot, Pywikibot-Scripts.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  I want to remove a category from the intersection list of two other 
categories using the `-intersect` argument. (To remove duplicate pages in a 
supercategory.)
  
  If I run the `listpages` list with `-intersect` everything is correct, there 
are only 12 pages.
  `pwb.py listpages -family:wikisource -lang:ru -cat:"ОУН-УПА" -cat:"Украина" 
-intersect`
  
  But when I run the same with the `category` script, the script starts 
emptying the entire global category "Украина". But it should have been only 
from those 12 pages.
  `pwb.py category -family:wikisource -lang:ru -cat:"ОУН-УПА" -cat:"Украина" 
-intersect remove -from:"Украина"`.
  
  Note: The problem is more serious, because a bug was found with the `-always` 
parameter T318236 , so the bot 
empties the global category without question.

TASK DETAIL
  https://phabricator.wikimedia.org/T318239

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Updated] T318236: scripts/category.py: Bug of "-always" argument

2022-09-21 Thread Vladis13
Vladis13 edited projects, added Pywikibot-category.py; removed 
Pywikibot-Scripts.

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Chicocvenancio, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Created] T318236: scripts/category.py: Bug of "-always" argument

2022-09-21 Thread Vladis13
Vladis13 created this task.
Vladis13 added projects: Pywikibot-Scripts, Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  I'm running the `category.py` script without the `-always` argument, so the 
bot should show the diff and ask if it needs to be edited. But the bot doesn't 
this, `always` don't disable, bot making wrong edits.
  
  There seems to be an error at line #1530:
  
elif option == 'always':
  options[option] = True
  
  Here T291757#7378248  
`always` has been set to `always=True` as default, so it is always True.
  
  Perhaps this error remained in other scripts.

TASK DETAIL
  https://phabricator.wikimedia.org/T318236

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vladis13
Cc: Aklapper, pywikibot-bugs-list, Vladis13, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org