plugin-jm-server


Nameplugin-jm-server JSON
Version 0.1.23 PyPI version JSON
download
home_pagehttps://github.com/hect0x7/plugin-jm-server
Summaryplugin_jm_server, a plugin for jmcomic that can be used to view comics in a web browser.
upload_time2024-06-02 07:53:26
maintainerNone
docs_urlNone
authorhect0x7
requires_python>=3.7
licenseNone
keywords python jmcomic 18comic 禁漫天堂 nsfw
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # plugin-jm-server

想法起源:https://github.com/hect0x7/JMComic-Crawler-Python/issues/192

基于原项目:https://github.com/AiCorein/Flask-Files-Server

为了方便修改,将原项目中的文件复制到本项目中,然后进行修改



# 使用方式



## 1. pip安装

```shell
pip install plugin_jm_server
```



## 2. 运行代码

* **HTTP版**

```python
from plugin_jm_server import *

# http
server = JmServer(
    'D:/',
    'password',
)
server.run(
    host='0.0.0.0',
    port=80,
)
```

* **HTTPS版**

```python
from plugin_jm_server import *

# https
server = JmServer(
    'D:/',
    'password',
)
server.run(
    host='0.0.0.0',
    port=443,
    ssl_context='adhoc',
)
```

* 作为jmcomic的插件

```yml
# 配置文件
plugins:
  after_init: 
#  after_album:
    - plugin: jm_server
      kwargs:
        password: ''

```

```python
# 代码
from jmcomic import *

op = create_option('op.yml')
op.download_album(123)
# 运行到这里,虽然主线程代码执行完毕,但程序不会退出,因为服务器线程还没有结束。
# 控制台会输出提示信息如下(atexit时输出的):
# “主线程执行完毕,但插件jm_server的服务器线程仍运行中,可按下ctrl+c结束程序”
# 此时需要你主动按下ctrl+c终止程序。

# python 3.12 特别注意:需要插入下面这行代码,服务器才能继续处理请求
op.wait_all_plugins_finish()
```


# 效果图(文件浏览、整章看图)

## 1. 电脑浏览器访问
![](images/3.png)
![](images/4.png)
![](images/5.png)

## 2. 手机浏览器访问
![](images/1.jpeg)
![](images/2.jpeg)
![](images/7.jpeg)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hect0x7/plugin-jm-server",
    "name": "plugin-jm-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "python, jmcomic, 18comic, \u7981\u6f2b\u5929\u5802, NSFW",
    "author": "hect0x7",
    "author_email": "93357912+hect0x7@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/a1/a4/8e05ff55b1fd094631f2bca57249bac33357d2363d2bb48c498df89bd59a/plugin_jm_server-0.1.23.tar.gz",
    "platform": null,
    "description": "# plugin-jm-server\n\n\u60f3\u6cd5\u8d77\u6e90\uff1ahttps://github.com/hect0x7/JMComic-Crawler-Python/issues/192\n\n\u57fa\u4e8e\u539f\u9879\u76ee\uff1ahttps://github.com/AiCorein/Flask-Files-Server\n\n\u4e3a\u4e86\u65b9\u4fbf\u4fee\u6539\uff0c\u5c06\u539f\u9879\u76ee\u4e2d\u7684\u6587\u4ef6\u590d\u5236\u5230\u672c\u9879\u76ee\u4e2d\uff0c\u7136\u540e\u8fdb\u884c\u4fee\u6539\n\n\n\n# \u4f7f\u7528\u65b9\u5f0f\n\n\n\n## 1. pip\u5b89\u88c5\n\n```shell\npip install plugin_jm_server\n```\n\n\n\n## 2. \u8fd0\u884c\u4ee3\u7801\n\n* **HTTP\u7248**\n\n```python\nfrom plugin_jm_server import *\n\n# http\nserver = JmServer(\n    'D:/',\n    'password',\n)\nserver.run(\n    host='0.0.0.0',\n    port=80,\n)\n```\n\n* **HTTPS\u7248**\n\n```python\nfrom plugin_jm_server import *\n\n# https\nserver = JmServer(\n    'D:/',\n    'password',\n)\nserver.run(\n    host='0.0.0.0',\n    port=443,\n    ssl_context='adhoc',\n)\n```\n\n* \u4f5c\u4e3ajmcomic\u7684\u63d2\u4ef6\n\n```yml\n# \u914d\u7f6e\u6587\u4ef6\nplugins:\n  after_init: \n#  after_album:\n    - plugin: jm_server\n      kwargs:\n        password: ''\n\n```\n\n```python\n# \u4ee3\u7801\nfrom jmcomic import *\n\nop = create_option('op.yml')\nop.download_album(123)\n# \u8fd0\u884c\u5230\u8fd9\u91cc\uff0c\u867d\u7136\u4e3b\u7ebf\u7a0b\u4ee3\u7801\u6267\u884c\u5b8c\u6bd5\uff0c\u4f46\u7a0b\u5e8f\u4e0d\u4f1a\u9000\u51fa\uff0c\u56e0\u4e3a\u670d\u52a1\u5668\u7ebf\u7a0b\u8fd8\u6ca1\u6709\u7ed3\u675f\u3002\n# \u63a7\u5236\u53f0\u4f1a\u8f93\u51fa\u63d0\u793a\u4fe1\u606f\u5982\u4e0b\uff08atexit\u65f6\u8f93\u51fa\u7684\uff09\uff1a\n# \u201c\u4e3b\u7ebf\u7a0b\u6267\u884c\u5b8c\u6bd5\uff0c\u4f46\u63d2\u4ef6jm_server\u7684\u670d\u52a1\u5668\u7ebf\u7a0b\u4ecd\u8fd0\u884c\u4e2d\uff0c\u53ef\u6309\u4e0bctrl+c\u7ed3\u675f\u7a0b\u5e8f\u201d\n# \u6b64\u65f6\u9700\u8981\u4f60\u4e3b\u52a8\u6309\u4e0bctrl+c\u7ec8\u6b62\u7a0b\u5e8f\u3002\n\n# python 3.12 \u7279\u522b\u6ce8\u610f\uff1a\u9700\u8981\u63d2\u5165\u4e0b\u9762\u8fd9\u884c\u4ee3\u7801\uff0c\u670d\u52a1\u5668\u624d\u80fd\u7ee7\u7eed\u5904\u7406\u8bf7\u6c42\nop.wait_all_plugins_finish()\n```\n\n\n# \u6548\u679c\u56fe\uff08\u6587\u4ef6\u6d4f\u89c8\u3001\u6574\u7ae0\u770b\u56fe\uff09\n\n## 1. \u7535\u8111\u6d4f\u89c8\u5668\u8bbf\u95ee\n![](images/3.png)\n![](images/4.png)\n![](images/5.png)\n\n## 2. \u624b\u673a\u6d4f\u89c8\u5668\u8bbf\u95ee\n![](images/1.jpeg)\n![](images/2.jpeg)\n![](images/7.jpeg)\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "plugin_jm_server, a plugin for jmcomic that can be used to view comics in a web browser.",
    "version": "0.1.23",
    "project_urls": {
        "Homepage": "https://github.com/hect0x7/plugin-jm-server"
    },
    "split_keywords": [
        "python",
        " jmcomic",
        " 18comic",
        " \u7981\u6f2b\u5929\u5802",
        " nsfw"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3a11aa8eaeed5f6dfeeba16a6d8252d0f8e2bd455a391f3e1424af5eab37cfe",
                "md5": "751d9d00e4b99d573f8a4e906b24e273",
                "sha256": "bf14abae50d4344262086107c46266ef3dd473f67fa6c7923a355f95ea547b00"
            },
            "downloads": -1,
            "filename": "plugin_jm_server-0.1.23-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "751d9d00e4b99d573f8a4e906b24e273",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 805399,
            "upload_time": "2024-06-02T07:53:24",
            "upload_time_iso_8601": "2024-06-02T07:53:24.888109Z",
            "url": "https://files.pythonhosted.org/packages/e3/a1/1aa8eaeed5f6dfeeba16a6d8252d0f8e2bd455a391f3e1424af5eab37cfe/plugin_jm_server-0.1.23-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1a48e05ff55b1fd094631f2bca57249bac33357d2363d2bb48c498df89bd59a",
                "md5": "de38b06b80d4872361638ab74fa31a51",
                "sha256": "da31b0a4c70458fbe49b9927319d53e661cd408eabe19e47712417ad01f1aa12"
            },
            "downloads": -1,
            "filename": "plugin_jm_server-0.1.23.tar.gz",
            "has_sig": false,
            "md5_digest": "de38b06b80d4872361638ab74fa31a51",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 794255,
            "upload_time": "2024-06-02T07:53:26",
            "upload_time_iso_8601": "2024-06-02T07:53:26.797147Z",
            "url": "https://files.pythonhosted.org/packages/a1/a4/8e05ff55b1fd094631f2bca57249bac33357d2363d2bb48c498df89bd59a/plugin_jm_server-0.1.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-02 07:53:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hect0x7",
    "github_project": "plugin-jm-server",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "plugin-jm-server"
}
        
Elapsed time: 0.56778s