Giter Club home page Giter Club logo

okarishimasu's Introduction

租借女友

彼女、お借りします
正版地址:https://manga.bilibili.com/detail/mc26446

镜像地址

https://github.wuyanzheshui.workers.dev/Z-fly/Okarishimasu

使用说明

#!/usr/bin/env python3
from os import path, popen, remove
from cv2 import imread, imwrite, IMWRITE_JPEG_QUALITY

while input() != "q":
    for i in range(1, 100):
        if not path.isfile(f"{i:0>2d}.jpg"):
            popen("adb exec-out screencap -p > " + str(i) + ".png").read()
            im = imread(str(i) + ".png")
            imwrite(f"{i:0>2d}.jpg", im[190:1730, 0:1920], [int(IMWRITE_JPEG_QUALITY), 80])
            remove(str(i) + ".png")
            print(f"{i:0>2d}.jpg")
            break
else:
    exit(0)

此脚本用于把漫画资源截图导出到脚本运行目录,并裁剪压缩,对其它漫画同理,更改[190:1730, 0:1920]裁剪参数即可。 运行时按回车键顺序截图,按q回车退出,也可按Ctrl+C快速退出。

使用方法

  1. 安装Python3
    https://www.python.org/downloads/
  2. 命令行执行pip install opencv-python
  3. 安装SDK Platform Tools
    https://developer.android.google.cn/studio/releases/platform-tools.html
    下载解压至$PATH目录
    Linux&Mac OS X:/usr/local/bin/
    Windows :C:\WINDOWS\
  4. 连接安卓手机,手机上打开USB调试,在任意目录执行本脚本

使用举例

新建目录,打开命令行,CD至此目录,打开手机,用数据线连接电脑,手机上打开漫画APP,点击阅读漫画某话的第1页,执行脚本,按下回车键,出现01.jpg,然后翻页,按下回车键,出现02.jpg,依此类推,直到这话翻完。
输入q回车退出,之后可使用压缩命令7z -mx=9 a filename.7z *打包,至此一个流程结束,上传到网站。

okarishimasu's People

Contributors

z-fly avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.