Scripted_configuration.md.json 8.0 KB

1234567891011121314151617
  1. {
  2. "cc9a9b14f0ea35fefd0ef2b3c29dad0363075ef9ea873af01e60a0aac7b168f0": {
  3. "original": "# Scripted configuration\n\nManticore configuration supports shebang syntax, allowing the configuration to be written in a programming language and interpreted at loading. This enables dynamic settings, such as generating tables by querying a database table, modifying settings based on external factors, or including external files containing table and source declarations.\n\nThe configuration file is parsed by the declared interpreter, and the output is used as the actual configuration. This occurs each time the configuration is read, not only at searchd startup.\n\nNote: This feature is not available on the Windows platform.\n\nIn the following example, PHP is used to create multiple tables with different names and to scan a specific folder for files containing extra table declarations:\n\nCODE_BLOCK_0\n<!-- proofread -->\n\n",
  4. "translations": {
  5. "chinese": "# \u811a\u672c\u5316\u914d\u7f6e\n\nManticore \u914d\u7f6e\u652f\u6301 shebang \u8bed\u6cd5\uff0c\u5141\u8bb8\u4f7f\u7528\u7f16\u7a0b\u8bed\u8a00\u7f16\u5199\u914d\u7f6e\u5e76\u5728\u52a0\u8f7d\u65f6\u8fdb\u884c\u89e3\u91ca\u3002\u8fd9\u4f7f\u5f97\u52a8\u6001\u8bbe\u7f6e\u6210\u4e3a\u53ef\u80fd\uff0c\u4f8b\u5982\u901a\u8fc7\u67e5\u8be2\u6570\u636e\u5e93\u8868\u751f\u6210\u8868\uff0c\u6839\u636e\u5916\u90e8\u56e0\u7d20\u4fee\u6539\u8bbe\u7f6e\uff0c\u6216\u5305\u542b\u5305\u542b\u8868\u548c\u6e90\u58f0\u660e\u7684\u5916\u90e8\u6587\u4ef6\u3002\n\n\u914d\u7f6e\u6587\u4ef6\u7531\u58f0\u660e\u7684\u89e3\u91ca\u5668\u89e3\u6790\uff0c\u8f93\u51fa\u4f5c\u4e3a\u5b9e\u9645\u914d\u7f6e\u4f7f\u7528\u3002\u6b64\u8fc7\u7a0b\u53d1\u751f\u5728\u6bcf\u6b21\u8bfb\u53d6\u914d\u7f6e\u65f6\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5728 searchd \u542f\u52a8\u65f6\u3002\n\n\u6ce8\u610f\uff1a\u6b64\u529f\u80fd\u5728 Windows \u5e73\u53f0\u4e0d\u53ef\u7528\u3002\n\n\u5728\u4ee5\u4e0b\u793a\u4f8b\u4e2d\uff0c\u4f7f\u7528 PHP \u521b\u5efa\u591a\u4e2a\u4e0d\u540c\u540d\u79f0\u7684\u8868\uff0c\u5e76\u626b\u63cf\u7279\u5b9a\u6587\u4ef6\u5939\u4ee5\u67e5\u627e\u5305\u542b\u989d\u5916\u8868\u58f0\u660e\u7684\u6587\u4ef6\uff1a\n\nCODE_BLOCK_0\n<!-- proofread -->",
  6. "russian": "# \u0421\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\n\n\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Manticore \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0435\u0431\u0430\u043d\u0433\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u042d\u0442\u043e \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u043f\u0443\u0442\u0451\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432.\n\n\u0424\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c, \u0438 \u0432\u044b\u0432\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 searchd.\n\n\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Windows.\n\n\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f PHP \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0438 \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446:\n\nCODE_BLOCK_0\n<!-- proofread -->"
  7. },
  8. "is_code_or_comment": false,
  9. "model": "openai:gpt-4.1-mini",
  10. "updated_at": 1766339770
  11. },
  12. "__meta": {
  13. "source_text": "# Scripted configuration\n\nManticore configuration supports shebang syntax, allowing the configuration to be written in a programming language and interpreted at loading. This enables dynamic settings, such as generating tables by querying a database table, modifying settings based on external factors, or including external files containing table and source declarations.\n\nThe configuration file is parsed by the declared interpreter, and the output is used as the actual configuration. This occurs each time the configuration is read, not only at searchd startup.\n\nNote: This feature is not available on the Windows platform.\n\nIn the following example, PHP is used to create multiple tables with different names and to scan a specific folder for files containing extra table declarations:\n\n```php\n#!/usr/bin/php\n...\n<?php for ($i=1; $i<=6; $i++) { ?>\ntable test_<?=$i?> {\n type = rt\n path = /var/lib/manticore/data/test_<?=$i?>\n rt_field = subject\n ...\n }\n <?php } ?>\n ...\n\n <?php\n $confd_folder='/etc/manticore.conf.d/';\n $files = scandir($confd_folder);\n foreach($files as $file)\n {\n if(($file == '.') || ($file =='..'))\n {} else {\n $fp = new SplFileInfo($confd_folder.$file);\n if('conf' == $fp->getExtension()){\n include ($confd_folder.$file);\n }\n }\n }\n ?>\n```\n<!-- proofread -->\n\n",
  14. "updated_at": 1768530797,
  15. "source_md5": "edfafe19daec7926fce9f7c40ba8088d"
  16. }
  17. }