diff --git a/tools/README.md b/tools/README.md index dd9e474..05ee262 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,42 +1,41 @@ -# Boz-MW command line tools +# boz-mw command line tools -This is a directory for command line tools that uses the boz-mw framework. Actually this is more a proof-of-concept. +This is a directory for command line tools that uses the boz-mw framework. Actually there are not too much tools. ## Configuration Copy the `config-example.php` to `config.php` and fill it with your bot credentials. ## replace.php -This is another `replace.py` version. +This is a script to sobstitute text in the wikitext from an API query. -To transform in *farfallese* the whole Italian Wikipedia: +e.g. to transform in *farfallese* the whole Italian Wikipedia: ```bash -./replace.php --wiki=itwiki --generator=allpages --plain \ +./replace.php --wiki=itwiki --generator=allpages \ a afa \ e efe \ i ifi \ o ofo \ u ufu ``` -To replace a simple template parameter in top of the page, e.g. from `{{Sito web|commerciale = Sì}}` to `{{Sito web|lucro = Sì}}`: +e.g. to replace a simple template parameter in top of the page, e.g. from `{{Sito web|commerciale = Sì}}` to `{{Sito web|lucro = Sì}}`: ```bash ./replace.php \ - --wiki=itwiki \ + --wiki=itwiki \ --generator=transcludedin \ --titles=Template:Sito_web \ - --first-section \ - --limit=1 \ + --rvsection=0 \ --regex \ '/\|commerciale(.*=.*)(Sì|No|sì|no)(.*)/' \ '|lucro$1$2$3' ``` Other options: ```bash ./replace.php --help ```