0

我刚刚在 Windows 10 上的 Docker 上安装了mediawiki。从这里可以看出

Parsoid(PHP 版本)原生捆绑在 MediaWiki 1.35 中。

这里提到了 在此处输入图像描述

另外,从 这里在此处输入图像描述

因此,我尝试了

docker run --name my_mediawiki -d -t -i -v /f/zim:/zim mediawiki:latest sh
docker exec my_mediawiki echo 'Foo' | php bin/parse.php
docker exec my_mediawiki echo "foo bar\nThis is a [[link]]" | node parse --trace peg

但它返回一个错误

Microsoft Windows [Version 10.0.19042.928]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Akira>docker run --name my_mediawiki -d -t -i -v /f/zim:/zim mediawiki:latest sh
40c4cd1aaddbe8d00bae291e95fc0326b61e2f4441a2327fd066848e1096f5a3

C:\Users\Akira>docker exec my_mediawiki echo 'Foo' | php bin/parse.php
'php' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Akira>docker exec my_mediawiki echo "foo bar\nThis is a [[link]]" | node parse --trace peg
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'C:\Users\Akira\parse'
←[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:725:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m    at internal/main/run_main_module.js:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}
write /dev/stdout: The pipe is being closed.

您能否详细说明如何将简单的 wikitext 转换foo为 html?

4

0 回答 0