Various bot scripts
git clone ...
pip install -r requirements.txt
Various bot scripts
License: MIT License
When parsing zh:Template:上海铁路车站RDT/金山园区站:
<noinclude>{{BS-map
| title = 金山园区站站线布置图
| map = </noinclude>
CONTg\CONTg\~~[[金山铁路]][[上海南站]]方向
...
CONTf\CONTf\~~[[金山铁路]][[金卫西站]]方向
<noinclude>}}
{{Rdt intro|[[金山园区站]]}}
[[Category:上海市铁路车站|RDT]]
</noinclude>
{{BS-map|...}}
is not included in ifilter_templates
.
It would be nice if it were possible for redirects not used outside the User namespace on any WMF wikis and not contained in any of the exception categories to be automatically tagged for speedy deletion under criterion G6. Currently I manually filter the complete list every few months using BBEdit, a Quarry query and PetScan queries.
There are now redirects that contain single tildes. They are not being replaced because of [^\\~\n]+?
in the regular expressions.
If only the date is searched for, the search might pick up a date in an edit summary due to use of the old upload page which puts the entire file description wikitext into the edit summary.
Valid percent-encoding such as %C3%9C
generates valid file names, as do HTML entities such as Ü
and Ü
. Except for space/zero-width characters like
(as per MOS), these should be converted to Unicode if they form part of valid BSicon names (and replaced as usual if in the redirects list). (Alternately this could be done for just Ü and the Cyrillic Т.)
Replacement script should replace {{BSicon quote|«oldname»}}
with {{bsq|«newname»|alt=«oldname»}}
and replace normally any numbered parameters of {{BS-o}}
if there is no txt=
parameter.
See this edit. CONTr
should have been changed to CONTgq
.
There are several redirects in use at w:en:Template:RTD expansion map. They should have been replaced by May 23, but it appears that no redirects are currently being replaced. As I mentioned in a comment on #28, this may be due to the length of the redirect list, which could be split into two pages based on page ID (to avoid diagrams being edited multiple times after a page move) such that the lists are to be used for redirect replacement on different days.
Alternately, unused redirects (defined as "unused outside the User: namespace on all WMF wikis") could have their own list, and those could be sorted out of the replacement list. I have been using this Quarry query manually and using BBEdit to successively filter the complete list of redirects, but it would be nice if your bot could generate the list by itself.
(It would also help to filter out redirects which should never be replaced from the wikitext lists, and maybe the list of exceptions could be kept in some other list. None of this is really necessary, since I only mass-nominate pages for deletion once every few months. However, the bot could itself tag pages with CSD G6, since it has been suggested that I do not need to go through the regular deletion process to uncontroversially delete redirects.)
The {{!}}
magic word causes parsing issues for mwparserfromhell (#186). This can cause truncated or missing template parameters, which can prevent BSicon replacement.
Galleries omit "File:". This seems to stop BSicons from being replaced; "BSicon $1.svg" should be replaced. Almost all usage in galleries is in bot-generated user pages.
If \1
or \3
from ROUTEMAP_BSICON
match ^
or $
, it can cause bad replacements. (example)
I tried loading all the redirects into CommonsDelinker's replacement page a while ago. It didn't work on a lot of pages (and also caused the replacement list to exceed the MediaWiki parser's transclusion limit), so I suppose the solution is to replace regular file syntax using the script as well.
(Reported by Johnuniq at meta:User talk:Magic links bot#Suppressing link)
The global usage of a file is available through Extension:GlobalUsage.
globalusage
was implemented in Pywikibot.
Main–Lahn Railway has some icons which haven't been replaced, probably because they are at the end of their row with a hidden comment to the right and the regex doesn't recognize it.
BSicons should be replaced in the předchozí typ
, předchozí stan
, následující stan
and následující typ
parameters of cs:Template:Železniční trať. There is also typ
, which has l
inserted after ex
or at the start of the string. I don't think they wrote it very well (it should ideally insert l
before the first match of [bcdhoknpstvw3A-Z]
) but it's not really worth fixing.
Template:Macclesfield, Bollington and Marple Railway RDT is not being edited by the bot, probably because of {{Routemap<includeonly>|inline=1</includeonly>
(I suspect the title is being read as Routemap<includeonly>
). Not really a big deal and can be solved without changing the script by moving the opening includeonly tag to after the equals sign.
This also occurs on this diagram and maybe a few others.
Could the current English Wikipedia settings be used as default if there isn't a config found? It would let me focus more on translating the edit summary instead of copying and pasting the same list of templates.
If a redirect has content that links to a category (or its talk page), that redirect will be returned by the backlinks API.
The correct solution is to use the redirects API instead; however, that is not available in pywikibot.
Reported by Czar at https://en.wikipedia.org/w/index.php?diff=1063192194
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.