Could you please look at Talk pages project/replying/prototype testing#Reply tool version 2.0, try it out, and let me know what happens? I want to make sure that the directions work before sharing this link more widely.
User talk:Dvorapa/Flow
Done! Thank you for this notice!
Hey there! :) I saw your name on the contributors list of this page. I had a question, maybe you can help me: I know that by using the -summary parameter we can set up a specific message to appear on all our edit's summaries. Is there a way we can have that "generic message" + the specific change made on each edit? Something like this: Summary: XYZ [XX -> YY].
You have to change script's code of course. Look into the code and search for "message", "summary" or "comment" and change that part of code to your needs. For further help try to ask @Xqt. I love to help, but due to Covid all my free time is gone :/
Thank you for your response! Unfortunately, that's exactly the problem. I have no formal technical background so the code (written by me) is just made following the instructions on that page I mentioned above. And at the moment, it just says ...-summary:Generic message I've written -another parameter:.... I wanted to know how should I change it so I can make that possible. But don't worry at all. Fully understandable and I hope you stay safe during these times. :)
Currently there is no way to modify the default messages. Either you can give your own message with -summary option or auto summary message is used. But you can file a feature request at Phabricator to propose the implementation modifying the generic summary.
I made a proposal to implement the replacements as suggested in https://gerrit.wikimedia.org/r/c/pywikibot/core/+/668344
Oh... There wasn't a way... That's why I couldn't find anything for it. I've spent quite some days going through the whole documentation in regard to setting summaries but I couldn't find anything in combining the 2 methods mentioned above. So now we can use -summary: %(description)s to get the needed results? Or isn't the change implemented yet?
The change is ready to submit to the current master (6.0.0-dev0). It will be part of the stable release 6.0.0 comming soon.
Thank you a lot! :) Given your knowledge on Pywikibots, can I reach to you in the future for anything related to it if I encounter a problem or anything of the sort?
Sure. For bugs or feature requests our bug tracker should be used primarily: Manual:Pywikibot/Development#How to report a bug. But do not hestitiate to contact me via pywikibot IRC channel or via my talk page on any WM project
@Xqt, -summary: %(description)s still doesn't work as a command (the system perceives it as a literal text string). Should I still be waiting or am I doing something wrong?
It works for me as follows:
C:\pwb\GIT\core>pwb replace a b -page:user:xqt/Test -summary:"foo bar baz: %(description)s" -simulate
Retrieving 1 pages from wikipedia:de.
>>> Benutzer:Xqt/Test <<<
@@ -1 +1 @@
- <code>&</code>
+ <code>&bmp;</code>
Do you want to accept these changes? ([y]es, [N]o, [e]dit original, edit
[l]atest, open in [b]rowser, [m]ore context, [a]ll, [q]uit): y
Edit summary: foo bar baz: (-a +b)
SIMULATION: edit action blocked.
1 pages read
1 pages written
0 pages skipped
Execution time: 12 seconds
Read operation time: 10.0 seconds
Write operation time: 12.0 seconds
Script terminated successfully.
C:\pwb\GIT\core>
The change was deployed with 6.0.0. Did you update your bot? What is your Pywikibot version actually?
Retrieving 50 pages from wikiquote:sq. Working on 'Esat Stavileci'
>>> Esat Stavileci <<< @@ -34 +34 @@ - BLABLU + TEST
Edit summary: Smallem: Përmirësime teknike dhe rregullime të gabimeve me referimet: %(description)s Sleeping for 9.1 seconds, 2021-04-13 11:18:41 Page Esat Stavileci saved
This is what I get when I try to use it on a random page on SqQuote which has been changed specifically to include the needed string for testing purposes. As you can see, the command gets included as a literal text string on the summary.
How do I update my bot? How do I check for my current version? I run it through Toolforge and, judging by what I read at this page: Help:Toolforge/Pywikibot when I started dealing with this thing, I'm supposedly always running the latest version automatically, no?
just run
pwb.py version
to check the Pywikibot version
-bash: pwb.py: command not found
What am I doing wrong?
OK try:
python3 pwb.py version
or python3 /data/project/shared/pywikibot/stable/scripts/version.py
I don't know were pwb.py resides and which directory settings are made for your local repository.
With the second command, I get this.
PS: The deprecation warnings seem to be there after most of the commands I type now. They weren't there before.
Ah, the new summary feature only works with -summary
option and not with fixes msg :-(
yet)
And I was thinking that to be honest but then I thought that everything else works nearly just the same between the two methods so that wouldn't be a problem. But I still suspected it and that's why I posted the whole thing that I was using. Turns out it was a good idea.
So, is there any chance to make it work with fixes aswell soon? I need the list of fixes because I have around 40k regexes to make and I don't want to double the list for every wikiproject that I activate my bot on. Using fixes allows me to have 1 single list for every wikiproject.
Also, I don't believe I need to do any kind of updates, do I? I do have the latest version, no? What are those warnings though? Do I need to do anything about those?
No there is no chance to implement it with fixes msg because you can use multiple -fix options in the same run which would duplicate the description. The only way is to enable the -summary option even if msg keys are given. Currently you can remove the msg key from fixes setting.
I'm pushing in unknown territory here but can't you use the "msg" part of the command as an anchor and basically make it work with that? No matter how many fix options you have, the msg part will be the same in all of them, won't it?
If not, I'll try transporting the summary from the fixes to the script itself. I was trying to keep the script pages as small as possible, that's why I asked. :)
No, every fixes option has its own msg
and they will be combines finally. You can omit the msg
from fixes entry and use -summary
instead.
I see. Okay then. That's what I did. It works fine. Should this whole thing be documented in a page though? It's not written anywhere on MediaWiki currently, is it?
What I'm currently using:
At user-fixes.py:
fixes['Smallem2'] = {
'regex': True,
'nocase': True,
'msg': {
'_default':'Smallem: Përmirësime teknike dhe rregullime të gabimeve me referimet: %(description)s',
},
'replacements': [
(r"BLABLU", r"TEST")
]
}
At my script:
#!/bin/bash
source $HOME/.bash_profile
python3 /data/project/shared/pywikibot/stable/scripts/replace.py -log -v -ns:0 -transcludes:Moduli:Citation/CS1 -fix:Smallem2 -family:wikiquote -always
v originále je asi špatně [$url list languages spoken in each country of the world] nemá být v závorce jenom [$url] ?
Nemá, opravil jsem
Celá stránka je nějak divně připravena k překladu
Zkusil jsem opravit, kdyžtak prosím o info, kdyby tam něco bylo ještě špatně
sekce Installation má pár řádků k uvolnění překladu
za odkazem https://meta.wikimedia.org/wiki/Community_Tech/Wikitext_editor_syntax_highlighting je taky nepovolený překlad
a) opraveno, b) lze přeložit v šabloně Template:OnWikimedia
What fonts are included? předposlední sekce není zaháčkována pro překlad
Snad opraveno
Prosím, je ikona $closeicon správně? Mě to přijde jako popelnice. Hezký den
Vypadá, že ano, když si to okénko vyzkouším, opravdu tam je popelnice a dělá přesně to, co píšou.
tak jo
nějak se mi výsledné zobrazení nelíbí
Vypadá to divně, ale je to správně.
Opravil jsem jen anglické uvozovky na české a dopřeložil
v sekci Configuration tabulka klíčů předposlední řádek, prosím umožnit překlad
Hotovo, pozor, Elastic je název softwaru
Celá stránka je nějak divně připravena k překladu
Koukám, nemám ale čas ji opravit. @Shirayuki Do you have some spare time to look into the page and complete it for translation? It looks like someone started to prepare it for translation, but hasn't finished it.