Useful AI chat skills: Difference between revisions
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== 请 AI 写得更通俗易懂 == | == 请 AI 写得更通俗易懂 == | ||
* 我不太会用,举例子教教我吧 | * 我不太会用,举例子教教我吧 | ||
* 请教我一些初级的 emacs 配置方法 | |||
* 以下 mediawiki semantic 相关的拓展,请简单、易懂地讲讲它们的用途和使用场景是什么?主要解决了什么问题?并举一个简单、好懂的例子 | |||
* 请教我学会 mediawiki 的 page forms extension | |||
* 举一个完整的例子,教会我使用 semantic mediawiki,一步一步写得简单易懂点 | |||
* 我在学习 semantic mediawiki 的用法。请结合您的理解,帮我翻译成简单、易懂的中文,不要求一字一句对应 | |||
== 请 AI 输出格式 == | == 请 AI 输出格式 == | ||
Line 17: | Line 22: | ||
== 先沟通样例 == | == 先沟通样例 == | ||
* 先翻译三个我看您是否理解了我的需求 | * 先翻译三个我看您是否理解了我的需求 | ||
* 常见的 arch linux pacman 快捷使用 alias 你有什么建议的?如 alias pu='sudo pacman -Syu' 类似的 | |||
== 给定模板 == | == 给定模板 == | ||
Line 28: | Line 34: | ||
3. 当我见到是“节”,我希望把该标题处理成 wikitext 中的四级标题 | 3. 当我见到是“节”,我希望把该标题处理成 wikitext 中的四级标题 | ||
请帮我写一个 Emacs 函数处理这件事情 | 请帮我写一个 Emacs 函数处理这件事情 | ||
</pre> | |||
<pre> | |||
帮我写一个 Emacs 函数,执行以下步骤: | |||
1. 执行 convert-legal-headers-to-wikitext 函数 | |||
2. 用 flush-lines 删除空白行。这个步骤我手动操作时一般用 replace-regexp 正则 ^$ 匹配。我需要处理的空白行很标准,几乎全部能用正则 ^$ 成功匹配 | |||
3. 正则替换行尾(不可见的 $) 为换行,实现段落间加一个空行,Emacs 正则中一般是replace-regexp $ -> ^J | |||
4. 在buffer 顶端添加以下内容: | |||
{{#css: | |||
.tocnumber { display: none; } | |||
}} | |||
</pre> | |||
<pre> | |||
我刚刚在 Virtualbox 里安装好了 archlinux,请教教我怎么使用它,比如安装 Virtualbox 增强功能、换源、查找软件、安装软件、卸载软件等 | |||
</pre> | |||
== 给定语境 == | |||
<pre> | |||
用 git 安装 mediawiki 时,看手册中的意思,只有 master 版本需要更新 submodule。只有 1.25 以下版本需要 composer 更新额外的 library。我怎么感觉和实际不太相符? | |||
Update the Git submodules | |||
The branches and tags have a bunch of Git submodules in them, for commonly-used extensions and skins and for the vendor/ directory. The master branch does not have these. To update the submodules, run: | |||
cd mediawiki | |||
git submodule update --init --recursive | |||
Fetch external libraries | |||
MediaWiki uses Composer to manage external PHP libraries, all of which end up in the vendor/ directory in your MediaWiki directory. | |||
To install these needed libraries, you have a choice: | |||
Download and install the composer PHAR, optionally rename the composer.phar file as instructed for your OS, and then run composer update --no-dev from your MediaWiki directory. This is the recommended approach. | |||
If the default PHP CLI version does not match the web server's PHP version, specify it with e.g. php7.4 composer.phar update --no-dev. | |||
Or, if you don't want to use Composer or if you want to use the exact same set of vendor libraries as used on the WMF production cluster, you can instead create a vendor/ directory inside the core folder of your MediaWiki installation: | |||
git clone https://gerrit.wikimedia.org/r/mediawiki/vendor.git | |||
Note that if any of your extensions have their own Composer requirements, then you cannot use this option. | |||
Prior to MediaWiki 1.25, external libraries were kept in the core repository, and no package manager was required. | |||
</pre> | </pre> |