.. .. image:: https://readthedocs.org/projects/acore-conf/badge/?version=latest
:target: https://acore-conf.readthedocs.io/en/latest/
:alt: Documentation Status
.. image:: https://github.com/MacHu-GWU/acore_conf-project/workflows/CI/badge.svg
:target: https://github.com/MacHu-GWU/acore_conf-project/actions?query=workflow:CI
.. image:: https://codecov.io/gh/MacHu-GWU/acore_conf-project/branch/main/graph/badge.svg
:target: https://codecov.io/gh/MacHu-GWU/acore_conf-project
.. image:: https://img.shields.io/pypi/v/acore-conf.svg
:target: https://pypi.python.org/pypi/acore-conf
.. image:: https://img.shields.io/pypi/l/acore-conf.svg
:target: https://pypi.python.org/pypi/acore-conf
.. image:: https://img.shields.io/pypi/pyversions/acore-conf.svg
:target: https://pypi.python.org/pypi/acore-conf
.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social
:target: https://github.com/MacHu-GWU/acore_conf-project/blob/main/release-history.rst
.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
:target: https://github.com/MacHu-GWU/acore_conf-project
------
.. .. image:: https://img.shields.io/badge/Link-Document-blue.svg
:target: https://acore-conf.readthedocs.io/en/latest/
.. .. image:: https://img.shields.io/badge/Link-API-blue.svg
:target: https://acore-conf.readthedocs.io/en/latest/py-modindex.html
.. image:: https://img.shields.io/badge/Link-Install-blue.svg
:target: `install`_
.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
:target: https://github.com/MacHu-GWU/acore_conf-project
.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
:target: https://github.com/MacHu-GWU/acore_conf-project/issues
.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
:target: https://github.com/MacHu-GWU/acore_conf-project/issues
.. image:: https://img.shields.io/badge/Link-Download-blue.svg
:target: https://pypi.org/pypi/acore-conf#files
Welcome to ``acore_conf`` Documentation
==============================================================================
.. image:: https://acore-conf.readthedocs.io/en/latest/_static/acore_conf-logo.png
:target: https://acore-conf.readthedocs.io/en/latest/
**背景**
`AzerothCore <https://www.azerothcore.org/>`_ (acore) 是一个开源的魔兽世界模拟器, 其代码质量以及文档是目前 (2023 年) 我看来所有的开源魔兽世界模拟器中最好的. 它有一个 ``.conf`` 配置文件格式用于定义服务器的各种配置. 这个格式不是 acore 独有的, 而是所有的魔兽世界模拟器, 包括各个不同的资料片几乎都用的这个格式.
**Links**
- `How configuration files are composed <https://www.azerothcore.org/wiki/how-to-work-with-conf-files>`_: AzerothCore 官方对 config file 格式的解释.
- `authserver.conf <https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/apps/authserver/authserver.conf.dist>`_: AzerothCore 官方 GitHub 源码中的初始 ``authserver.conf`` 文件.
- `worldserver.conf <https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/apps/worldserver/worldserver.conf.dist>`_: AzerothCore 官方 GitHub 源码中的初始 ``worldserver.conf`` 文件.
**关于本项目**
本项目是一个简单的 Python 工具, 用于管理, 修改 ``.conf`` 文件. 使得开发者可以用业内比较通用的 JSON 格式对 ``.conf`` 进行修改.
**用法**
.. code-block:: python
from acore_conf.api import apply_changes
apply_changes(
"/path/to/authserver.conf.dist",
"/path/to/authserver.conf",
data={"worldserver": {"DataDir": "/home/azeroth-server/data"}},
)
**更多 API 详细文档请参考下面的链接**
- `acore_conf.api.update_config_content <https://acore-conf.readthedocs.io/en/latest/acore_conf/impl.html#acore_conf.impl.update_config_content>`_
- `acore_conf.api.apply_changes <https://acore-conf.readthedocs.io/en/latest/acore_conf/impl.html#acore_conf.impl.apply_changes>`_
.. _install:
Install
------------------------------------------------------------------------------
``acore_conf`` is released on PyPI, so all you need is to:
.. code-block:: console
$ pip install acore-conf
To upgrade to latest version:
.. code-block:: console
$ pip install --upgrade acore-conf
Raw data
{
"_id": null,
"home_page": "https://github.com/MacHu-GWU/acore_conf-project",
"name": "acore-conf",
"maintainer": "Sanhe Hu",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "husanhe@gmail.com",
"keywords": null,
"author": "Sanhe Hu",
"author_email": "husanhe@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/88/7b/fa79a5535b6c845686ee708692c26f67cd06df3af2fe15a0e185bba167cf/acore_conf-0.1.2.tar.gz",
"platform": "Windows",
"description": "\n.. .. image:: https://readthedocs.org/projects/acore-conf/badge/?version=latest\n :target: https://acore-conf.readthedocs.io/en/latest/\n :alt: Documentation Status\n\n.. image:: https://github.com/MacHu-GWU/acore_conf-project/workflows/CI/badge.svg\n :target: https://github.com/MacHu-GWU/acore_conf-project/actions?query=workflow:CI\n\n.. image:: https://codecov.io/gh/MacHu-GWU/acore_conf-project/branch/main/graph/badge.svg\n :target: https://codecov.io/gh/MacHu-GWU/acore_conf-project\n\n.. image:: https://img.shields.io/pypi/v/acore-conf.svg\n :target: https://pypi.python.org/pypi/acore-conf\n\n.. image:: https://img.shields.io/pypi/l/acore-conf.svg\n :target: https://pypi.python.org/pypi/acore-conf\n\n.. image:: https://img.shields.io/pypi/pyversions/acore-conf.svg\n :target: https://pypi.python.org/pypi/acore-conf\n\n.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social\n :target: https://github.com/MacHu-GWU/acore_conf-project/blob/main/release-history.rst\n\n.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social\n :target: https://github.com/MacHu-GWU/acore_conf-project\n\n------\n\n.. .. image:: https://img.shields.io/badge/Link-Document-blue.svg\n :target: https://acore-conf.readthedocs.io/en/latest/\n\n.. .. image:: https://img.shields.io/badge/Link-API-blue.svg\n :target: https://acore-conf.readthedocs.io/en/latest/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Install-blue.svg\n :target: `install`_\n\n.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg\n :target: https://github.com/MacHu-GWU/acore_conf-project\n\n.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg\n :target: https://github.com/MacHu-GWU/acore_conf-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg\n :target: https://github.com/MacHu-GWU/acore_conf-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Download-blue.svg\n :target: https://pypi.org/pypi/acore-conf#files\n\n\nWelcome to ``acore_conf`` Documentation\n==============================================================================\n.. image:: https://acore-conf.readthedocs.io/en/latest/_static/acore_conf-logo.png\n :target: https://acore-conf.readthedocs.io/en/latest/\n\n**\u80cc\u666f**\n\n`AzerothCore <https://www.azerothcore.org/>`_ (acore) \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u9b54\u517d\u4e16\u754c\u6a21\u62df\u5668, \u5176\u4ee3\u7801\u8d28\u91cf\u4ee5\u53ca\u6587\u6863\u662f\u76ee\u524d (2023 \u5e74) \u6211\u770b\u6765\u6240\u6709\u7684\u5f00\u6e90\u9b54\u517d\u4e16\u754c\u6a21\u62df\u5668\u4e2d\u6700\u597d\u7684. \u5b83\u6709\u4e00\u4e2a ``.conf`` \u914d\u7f6e\u6587\u4ef6\u683c\u5f0f\u7528\u4e8e\u5b9a\u4e49\u670d\u52a1\u5668\u7684\u5404\u79cd\u914d\u7f6e. \u8fd9\u4e2a\u683c\u5f0f\u4e0d\u662f acore \u72ec\u6709\u7684, \u800c\u662f\u6240\u6709\u7684\u9b54\u517d\u4e16\u754c\u6a21\u62df\u5668, \u5305\u62ec\u5404\u4e2a\u4e0d\u540c\u7684\u8d44\u6599\u7247\u51e0\u4e4e\u90fd\u7528\u7684\u8fd9\u4e2a\u683c\u5f0f.\n\n**Links**\n\n- `How configuration files are composed <https://www.azerothcore.org/wiki/how-to-work-with-conf-files>`_: AzerothCore \u5b98\u65b9\u5bf9 config file \u683c\u5f0f\u7684\u89e3\u91ca.\n- `authserver.conf <https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/apps/authserver/authserver.conf.dist>`_: AzerothCore \u5b98\u65b9 GitHub \u6e90\u7801\u4e2d\u7684\u521d\u59cb ``authserver.conf`` \u6587\u4ef6.\n- `worldserver.conf <https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/apps/worldserver/worldserver.conf.dist>`_: AzerothCore \u5b98\u65b9 GitHub \u6e90\u7801\u4e2d\u7684\u521d\u59cb ``worldserver.conf`` \u6587\u4ef6.\n\n**\u5173\u4e8e\u672c\u9879\u76ee**\n\n\u672c\u9879\u76ee\u662f\u4e00\u4e2a\u7b80\u5355\u7684 Python \u5de5\u5177, \u7528\u4e8e\u7ba1\u7406, \u4fee\u6539 ``.conf`` \u6587\u4ef6. \u4f7f\u5f97\u5f00\u53d1\u8005\u53ef\u4ee5\u7528\u4e1a\u5185\u6bd4\u8f83\u901a\u7528\u7684 JSON \u683c\u5f0f\u5bf9 ``.conf`` \u8fdb\u884c\u4fee\u6539.\n\n**\u7528\u6cd5**\n\n.. code-block:: python\n\n from acore_conf.api import apply_changes\n\n apply_changes(\n \"/path/to/authserver.conf.dist\",\n \"/path/to/authserver.conf\",\n data={\"worldserver\": {\"DataDir\": \"/home/azeroth-server/data\"}},\n )\n\n**\u66f4\u591a API \u8be6\u7ec6\u6587\u6863\u8bf7\u53c2\u8003\u4e0b\u9762\u7684\u94fe\u63a5**\n\n- `acore_conf.api.update_config_content <https://acore-conf.readthedocs.io/en/latest/acore_conf/impl.html#acore_conf.impl.update_config_content>`_\n- `acore_conf.api.apply_changes <https://acore-conf.readthedocs.io/en/latest/acore_conf/impl.html#acore_conf.impl.apply_changes>`_\n\n\n.. _install:\n\nInstall\n------------------------------------------------------------------------------\n\n``acore_conf`` is released on PyPI, so all you need is to:\n\n.. code-block:: console\n\n $ pip install acore-conf\n\nTo upgrade to latest version:\n\n.. code-block:: console\n\n $ pip install --upgrade acore-conf\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Azerothcore WOW *.conf file management.",
"version": "0.1.2",
"project_urls": {
"Download": "https://pypi.python.org/pypi/acore_conf/0.1.2#downloads",
"Homepage": "https://github.com/MacHu-GWU/acore_conf-project"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d2fd21657503d2c3fc792416a6f9eccfff470413dfda1eb6a47d28fa7cbf7cc7",
"md5": "9a907f04ecb515d7f107b43188fe91d6",
"sha256": "1366026e921468758ede649ba3cba15452e93901d75447aad4effd373ebb22a7"
},
"downloads": -1,
"filename": "acore_conf-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9a907f04ecb515d7f107b43188fe91d6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9532,
"upload_time": "2024-06-14T17:51:36",
"upload_time_iso_8601": "2024-06-14T17:51:36.776289Z",
"url": "https://files.pythonhosted.org/packages/d2/fd/21657503d2c3fc792416a6f9eccfff470413dfda1eb6a47d28fa7cbf7cc7/acore_conf-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "887bfa79a5535b6c845686ee708692c26f67cd06df3af2fe15a0e185bba167cf",
"md5": "820a4f8f9d17e1c199820fe916c08075",
"sha256": "024e686fdd960325c7cfb65319080c24e9d5f9e6aa9d2408bf40427bb3eb0dde"
},
"downloads": -1,
"filename": "acore_conf-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "820a4f8f9d17e1c199820fe916c08075",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12808,
"upload_time": "2024-06-14T17:51:38",
"upload_time_iso_8601": "2024-06-14T17:51:38.360468Z",
"url": "https://files.pythonhosted.org/packages/88/7b/fa79a5535b6c845686ee708692c26f67cd06df3af2fe15a0e185bba167cf/acore_conf-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-14 17:51:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MacHu-GWU",
"github_project": "acore_conf-project",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"lcname": "acore-conf"
}