Metadata-Version: 2.1
Name: chaostools
Version: 0.0.4
Summary: They're really some great tools!
Home-page: https://gitee.com/wang-chenfan/chaostools
Author: WCF
Author-email: admin@wcfstudio.cn
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Requires-Dist: bs4
Requires-Dist: beautifulsoup4
Requires-Dist: requests
Requires-Dist: lxml

# Chaostools
They're really some ***great tools***!

超棒的一些工具！

In chaos, order and hope will also be revealed.

混沌中，也会透露出有序与希望。

If you want to add your tools, please contact the author of this library! (E-mail: admin@wcfstudio.cn)

如果你想添加你的工具，请联系这个库的作者！（电子邮箱：admin@wcfstudio.cn)

## Simple Tutorial

1. meanAgree(text,lang='zh-cn')
    -  Example 例子
    ```python
    import chaostools

    # Chinese
    print(chaostools.meanAgree("是的"))
    # True
    print(chaostools.meanAgree("你好"))
    # False
    print(chaostools.meanAgree("123"))
    # False
    print(chaostools.meanAgree("Yes"))
    # False

    # English
    print(chaostools.meanAgree("Yes"))
    # True
    print(chaostools.meanAgree("Hello"))
    # False
    print(chaostools.meanAgree("456"))
    # False
    print(chaostools.meanAgree("是的"))
    # False
    ```
    - Explanation 解释

        This is a function that can determine whether it represents agreement, approval, and permission, supporting both Chinese and English.

        这是一个可以判断是否表示同意、认可、允许的函数，支持中英双语。

        **Note**: The first letter of English should be *capitalized*. *Sentence ending punctuation* (such as . ... ! ?) is not allowed in both Chinese and English.

        **注意**：英文的首字母要*大写*。中英文均不得出现*句末标点*（如。 …… ！ ？）。

2. bdbk(word, id=None, mu_first=False)
    -  Example 例子
    ```python
    import chaostools

    # Basic
    print(chaostools.bdbk("昔阳县"))
    # {'status': 'OK', 'id': '5631351', 'description': '昔阳县，隶属于山西省晋中市，位于晋中市东部、太行山西麓，东与河北省赞皇县、内丘县、井陉县、邢台市接壤，西与寿阳县为邻，南与和顺县毗连，北与平定县相衔。总面积1954平方千米。截至2022年末，昔阳县常住人口186614人。商朝时期，属微。东汉建安末年（219年）为乐平郡，隋大业初年改为乐平县。民国元年（1912年），恢复乐平县，归中路道。1968年，晋中专区改设晋中地区，昔阳县仍属之。截至2021年10月，昔阳县下辖5个镇、5个乡和1个管委会。县政府驻乐平镇育新巷10号。昔阳县地方特产有昔阳小米、杏鲍菇。有大寨、龙岩大峡谷等风景名胜。2023年，昔阳县地区生产总值163.0亿元，比2022年增长5.1%。', 'contents': ['昔阳县', '昔阳县历史沿革', '昔阳县行政区划', '昔阳县地理环境', '昔阳县自然资源', '昔阳县人口', '昔阳县政治', '昔阳县经济', '昔阳县交通运输', '昔阳县社会事业', '昔阳县风景名胜', '昔阳县地方特产', '昔阳县著名人物', '昔阳县荣誉称号', '昔阳县现任领导'], 'contents_len': 15}
    print(chaostools.bdbk("昔阳县")["status"])
    # OK
    print(chaostools.bdbk("昔阳县")["id"])
    # 5631351
    print(chaostools.bdbk("昔阳县")["description"])
    # 昔阳县，隶属于山西省晋中市，位于晋中市东部、太行山西麓，东与河北省赞皇县、内丘县、井陉县、邢台市接壤，西与寿阳县为邻，南与和顺县毗连，北与平定县相衔。总面积1954平方千米。截至2022年末，昔阳县常住人口186614人。商朝时期，属微。东汉建安末年（219年）为乐平郡，隋大业初年改为乐平县。民国元年（1912年），恢复乐平县，归中路道。1968年，晋中专区改设晋中地区，昔阳县仍属之。截至2021年10月，昔阳县下辖5个镇、5个乡和1个管委会。县政府驻乐平镇育新巷10号。昔阳县地方特产有昔阳小米、杏鲍菇。有大寨、龙岩大峡谷等风景名胜。2023年，昔阳县地区生产总值163.0亿元，比2022年增长5.1%。

    # Others
    print(chaostools.bdbk("1450"))
    # {'status': 'MU', 'bdbk_multimeanings': [{'meaning': '中国台湾人对民进党网军的戏称', 'id': '56654602'}, {'meaning': '在爱情里表示“你是我的”', 'id': '63224232'}]}
    print(chaostools.bdbk("1450", id=chaostools.bdbk("1450")["bdbk_multimeanings"][1]["id"]))
    # {'status': 'OK', 'id': '63224232', 'description': '1450，在爱情里表示“你是我的”。', 'contents': ['1450'], 'contents_len': 1}
    print(chaostools.bdbk("1450", mu_first=True))
    # {'status': 'OK', 'id': '56654602', 'description': '1450，网络流行语，中国台湾人对民进党网军的戏称。', 'contents': ['1450', '1450引申含义', '1450社会评价'], 'contents_len': 3}
    ```
    - Explanation 解释

        This is a function used to crawl information from Baidu Baike.

        这是一个用来爬取百度百科信息的函数。

        > Parameter 参数

        - word

            Keyword. 关键词。

        - id=None

            The unique ID of the specified entry. 指定的词条唯一ID。

        - mu_first=False

            When the keyword is a polysemous word, does it default to obtaining the content of the first semantic item. 当关键词是一个多义词时，是否默认获取第一个义项的内容。

        > Return 返回

        - status

            Status value: OK represents successful acquisition, ML represents polysemous words (and there is no ID or default setting for the first item).

            状态值：OK代表获取成功，ML表示多义词（且没有ID和默认第一项的设置）。

        - The rest have literal meanings and do not need to be repeated. 其余的就是字面意思，无需赘述。

        **Note**: The description is only a brief and overview section.

        **注意**：description只是简述、概述部分。

