diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 0000000..7ecd6e3 --- /dev/null +++ b/tools/README.md @@ -0,0 +1,35 @@ +# Boz-MW command line tools + +## replace.php + +This is another `replace.py` version. + +To transform in *farfallese* a whole wiki: + +```bash +./replace.php --generator=allpages --plain \ + a afa \ + e efe \ + i ifi \ + o ofo \ + u ufu +``` + +To replace a template parameter, e.g. from `|commerciale = Sì` to `|lucro = Sì`: + +```bash +./replace.php \ + --generator=transcludedin \ + --titles=Template:Sito_web \ + --first-section \ + --limit=1 \ + --regex \ + '/\|commerciale(.*=.*)(Sì|No|sì|no)(.*)/' \ + '|lucro$1$2$3' +``` + +Other options: + +```bash +./replace.php --help +``` diff --git a/tools/TOOLS.md b/tools/TOOLS.md deleted file mode 100644 index 043abf1..0000000 --- a/tools/TOOLS.md +++ /dev/null @@ -1,29 +0,0 @@ -# Boz-MW command line tools - -## replace.php - -This is another `replace.py` version. - -To transform in *farfallese* a whole wiki: - - ./replace.php --generator=allpages --plain \ - a afa \ - e efe \ - i ifi \ - o ofo \ - u ufu - -To replace a template parameter, e.g. from `|commerciale = Sì` to `|lucro = Sì`: - - ./replace.php \ - --generator=transcludedin \ - --titles=Template:Sito_web \ - --first-section \ - --limit=1 \ - --regex \ - '/\|commerciale(.*=.*)(Sì|No|sì|no)(.*)/' \ - '|lucro$1$2$3' - -Other options: - - ./replace.php --help