Skip to main content

plugin_jm_server, a plugin for jmcomic that can be used to view comics in a web browser.

Project description

plugin-jm-server

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

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

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

使用方式

1. pip安装

pip install plugin_jm_server

2. 运行代码

  • HTTP版
from plugin_jm_server import *

# http
server = JmServer(
    'D:/',
    'password',
)
server.run(
    host='0.0.0.0',
    port=80,
)
  • HTTPS版
from plugin_jm_server import *

# https
server = JmServer(
    'D:/',
    'password',
)
server.run(
    host='0.0.0.0',
    port=443,
    ssl_context='adhoc',
)
  • 作为jmcomic的插件
# 配置文件
plugins:
  after_init: 
#  after_album:
    - plugin: jm_server
      kwargs:
        password: ''
# 代码
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. 电脑浏览器访问

2. 手机浏览器访问

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plugin_jm_server-0.1.19.tar.gz (793.6 kB view details)

Uploaded Source

Built Distribution

plugin_jm_server-0.1.19-py3-none-any.whl (804.7 kB view details)

Uploaded Python 3

File details

Details for the file plugin_jm_server-0.1.19.tar.gz.

File metadata

  • Download URL: plugin_jm_server-0.1.19.tar.gz
  • Upload date:
  • Size: 793.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for plugin_jm_server-0.1.19.tar.gz
Algorithm Hash digest
SHA256 8b70944c43daf4d591ca2d4d3bac6bb94267e1907e8c05ef1839529ab36bfc10
MD5 e926dee8a990b3a1ed59c9dd633e9147
BLAKE2b-256 3b311bdb6dfca5adcbc7de39f5cd8780cb8251826da50c300f1f74a338f9713d

See more details on using hashes here.

File details

Details for the file plugin_jm_server-0.1.19-py3-none-any.whl.

File metadata

File hashes

Hashes for plugin_jm_server-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 5b90f7c89af3e7b61fbbb32ea11e979bdedaf7e934bfbeb6171e267276b084a4
MD5 2f869803a997a0c9f46f453eb0bffacb
BLAKE2b-256 13efb3cd1dd958a72be95addb74e9abb915cd6c3b04124ec5b61afc325269479

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page