Xqt added a comment.
> I just noticed that replace.py script of pywikibot can't replace your
pattern with null.
No it works with empty pattern like this but I guess there is somethin wrong
with the generator. For example tr the following command
pwb -simulate replace -family:wiktionary -lang:ckb -transcludes:wikipedia
-regex "{{wikipedia}}\n?" ""
This works as expected:
Retrieving 50 pages from wiktionary:ckb.
>>> ئانیشک <<<
@@ -2 +1,0 @@
- {{wikipedia}}
I also copied your command and I got
D:\pwb\GIT\core>pwb.py replace -family:wiktionary -lang:ckb
-file:"countries.txt" -regex "{{wikipedia}}\n?" ""
The summary message for the command line replacements will be something
like: بۆت: لەجێدانانی خۆگەڕی دەق (-{{wikipedia}}\n? +)
Press Enter to use this automatic message, or enter a description of the
changes your bot will make:
Execution time:
Script terminated successfully.
But having a wrong generator option it fails as described:
D:\pwb\GIT\core>pwb -simulate replace -family:wiktionary -lang:ckb
-wrong_option:wikipedia -regex "{{wikipedia}}\n?" ""
ERROR: Incomplete command line pattern replacement pair.
Do you have an invalid character in your generator option?
TASK DETAIL
https://phabricator.wikimedia.org/T364689
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Aram, mevo, 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 -- [email protected]
To unsubscribe send an email to [email protected]