一个可以自动生成PTGen,MediaInfo,截图,并且生成发布所需内容的脚本

Overview

Differential 差速器

一个可以自动生成PTGen,MediaInfo,截图,并且生成发种所需内容的脚本

为什么叫差速器

差速器是汽车上的一种能使左、右轮胎以不同转速转动的结构。使用同样的动力输入,差速器能够输出不同的转速。就如同这个工具之于PT资源,差速器帮你使用同一份资源,输出不同PT站点需要的发种数据。

差速器能做什么?

当把大部分配置填好时,你可以仅提供资源文件的路径和一个豆瓣链接,差速器会帮你生成发种所需要的影片信息,Mediainfo,截图并上传图床,nfo文件,种子文件,并自动填写发种页面的表单( 感谢树大的脚本

如何安装差速器

Linux

# 安装ffmpeg和mediainfo
sudo apt install ffmpeg mediainfo
pip3 install Differential

Windows

安装下载并安装Python和ffmpeg,然后把ffmpeg放到Path或者你的工作目录,确认在你的工作目录ffmpeg.exe -version有正确输出。

pip.exe install Differential

Mac OS

# 安装ffmpeg
brew install ffmpeg
pip install Differential

如何使用差速器

差速器支持未经过重大修改的NexusPHP站点以及部分支持easy-upload支持的站点。 在使用前,请先使用dft -h查看本工具支持的站点/现有的插件。

请先参考config.ini.example,在Default块填上各个站点/插件通用的参数,比如图床相关的几个参数,然后在各站点/插件名字对应的块填上各自特有的参数,比如截图张数等等。

当配置文件完成后,你可以通过以下命令,一键获取发种所需要的信息。当然你也可以选择通过命令行来传递所有参数。

dft [插件名字] -f [种子文件夹] -u [豆瓣URL]

主要参数介绍:

  • config: 配置文件的位置,默认读取当前文件夹下的config.ini
  • log: log文件的路径
  • folder: 种子文件或文件夹的路径
  • url: 影片的豆瓣链接,事实上,所有PTGen支持的链接这里都支持
  • make_torrent: 是否制种,默认关闭
  • geenrate_nfo: 是否利用mediainfo生成nfo文件,默认关闭
  • screenshot_count: 截图生成的张数,默认为0,即不生成截图
  • image_hosting: 图床的名称,现在支持ptpimg,chevereto,imgurl和SM.MS
  • image_hosting_url: 如果是自建的图床,提供图床链接
  • ptgen_url: PTGen的地址,默认是我自建的PTGen,可能会不稳定
  • announce_url: 制种时的announce地址

NexusPHP

相比基础参数,NexusPHP插件特有的参数有:

  • upload_url: 发种页面的地址
  • encoder_log: 压制log的地址,如果提供的话会在介绍的mediainfo部分附上压制log
  • easy_upload: 默认开启,关闭的话会直接在命令行输出主/副标题,描述和mediainfo
  • trim_description: 默认关闭,开启的话会省略掉上传链接的描述部分,以避免链接过长浏览器无法打开的问题

其他插件

为保护站点信息,请到plugins文件夹查看或者dft [插件名称] -h查看支持的参数

TODO

  • [] 更好的出错管理
  • 识别已经生成过的截图,不重复截图
You might also like...
Comments
  • Bump pillow from 9.0.0 to 9.0.1

    Bump pillow from 9.0.0 to 9.0.1

    Bumps pillow from 9.0.0 to 9.0.1.

    Release notes

    Sourced from pillow's releases.

    9.0.1

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html

    Changes

    • In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010 [@​radarhere, @​hugovk]
    • Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009 [radarhere]
    Changelog

    Sourced from pillow's changelog.

    9.0.1 (2022-02-03)

    • In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010 [radarhere, hugovk]

    • Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009 [radarhere]

    Commits
    • 6deac9e 9.0.1 version bump
    • c04d812 Update CHANGES.rst [ci skip]
    • 4fabec3 Added release notes for 9.0.1
    • 02affaa Added delay after opening image with xdg-open
    • ca0b585 Updated formatting
    • 427221e In show_file, use os.remove to remove temporary images
    • c930be0 Restrict builtins within lambdas for ImageMath.eval
    • 75b69dd Dont need to pin for GHA
    • cd938a7 Autolink CWE numbers with sphinx-issues
    • 2e9c461 Add CVE IDs
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pillow from 8.3.2 to 9.0.0

    Bump pillow from 8.3.2 to 9.0.0

    Bumps pillow from 8.3.2 to 9.0.0.

    Release notes

    Sourced from pillow's releases.

    9.0.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.0.0 (2022-01-02)

    • Restrict builtins for ImageMath.eval(). CVE-2022-22817 #5923 [radarhere]

    • Ensure JpegImagePlugin stops at the end of a truncated file #5921 [radarhere]

    • Fixed ImagePath.Path array handling. CVE-2022-22815, CVE-2022-22816 #5920 [radarhere]

    • Remove consecutive duplicate tiles that only differ by their offset #5919 [radarhere]

    • Improved I;16 operations on big endian #5901 [radarhere]

    • Limit quantized palette to number of colors #5879 [radarhere]

    • Fixed palette index for zeroed color in FASTOCTREE quantize #5869 [radarhere]

    • When saving RGBA to GIF, make use of first transparent palette entry #5859 [radarhere]

    • Pass SAMPLEFORMAT to libtiff #5848 [radarhere]

    • Added rounding when converting P and PA #5824 [radarhere]

    • Improved putdata() documentation and data handling #5910 [radarhere]

    • Exclude carriage return in PDF regex to help prevent ReDoS #5912 [hugovk]

    • Fixed freeing pointer in ImageDraw.Outline.transform #5909 [radarhere]

    • Added ImageShow support for xdg-open #5897 [m-shinder, radarhere]

    • Support 16-bit grayscale ImageQt conversion #5856 [cmbruns, radarhere]

    • Convert subsequent GIF frames to RGB or RGBA #5857 [radarhere]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • NameError: name 'main_file' is not defined

    NameError: name 'main_file' is not defined

    2022-05-04 15:19:43.543 | WARNING | differential.utils.mediainfo:get_resolution:183 - 无法获取到视频的分辨率 2022-05-04 15:19:43.544 | ERROR | main::8 - An error has been caught in function '', process 'MainProcess' (933041), thread 'MainThread' (140306609316480): Traceback (most recent call last):

    File "/home/lei/.pyenv/versions/3.9.10/bin/dft", line 8, in sys.exit(main()) │ │ └ <function main at 0x7f9baca2bc10> │ └ └ <module 'sys' (built-in)> File "/home/lei/.pyenv/versions/3.9.10/lib/python3.9/site-packages/differential/main.py", line 24, in main REGISTERED_PLUGINSplugin.upload() │ │ └ {'generate_nfo': False, 'make_torrent': True, 'screenshot_count': 0, 'optimize_screenshot': 'true', 'image_hosting': <ImageHo... │ └ 'NexusPHP' └ {'nexusphp': <class 'differential.plugins.nexusphp.NexusPHP'>, 'nexus': <class 'differential.plugins.nexusphp.NexusPHP'>, 'ne... File "/home/lei/.pyenv/versions/3.9.10/lib/python3.9/site-packages/differential/plugins/base.py", line 1079, in upload self._prepare() │ └ <function Base._prepare at 0x7f9bab4a6ee0> └ <differential.plugins.nexusphp.NexusPHP object at 0x7f9bab411be0> File "/home/lei/.pyenv/versions/3.9.10/lib/python3.9/site-packages/differential/plugins/base.py", line 796, in _prepare self._screenshots = self._get_screenshots() │ │ │ └ <function Base._get_screenshots at 0x7f9bab4a6e50> │ │ └ <differential.plugins.nexusphp.NexusPHP object at 0x7f9bab411be0> │ └ [] └ <differential.plugins.nexusphp.NexusPHP object at 0x7f9bab411be0> File "/home/lei/.pyenv/versions/3.9.10/lib/python3.9/site-packages/differential/plugins/base.py", line 765, in _get_screenshots temp_dir = self._make_screenshots() │ └ <function Base._make_screenshots at 0x7f9bab4a6dc0> └ <differential.plugins.nexusphp.NexusPHP object at 0x7f9bab411be0> File "/home/lei/.pyenv/versions/3.9.10/lib/python3.9/site-packages/differential/plugins/base.py", line 719, in _make_screenshots duration = get_duration(self._mediainfo) │ │ └ <pymediainfo.MediaInfo object at 0x7f9bad5c4f70> │ └ <differential.plugins.nexusphp.NexusPHP object at 0x7f9bab411be0> └ <function get_duration at 0x7f9babeedee0> File "/home/lei/.pyenv/versions/3.9.10/lib/python3.9/site-packages/differential/utils/mediainfo.py", line 174, in get_duration logger.error(f"未找到视频Track,请检查{main_file}是否为支持的文件") │ └ <function Logger.error at 0x7f9bacb09550> └ <loguru.logger handlers=[(id=0, level=10, sink=), (id=1, level=5, sink='test.log')]>

    NameError: name 'main_file' is not defined

    bug 
    opened by LeiShi1313 0
Releases(0.6.2)
Owner
Lei Shi
咸鱼一个
Lei Shi
Empresas do Brasil (CNPJs)

Biblioteca em Python que coleta informações cadastrais de empresas do Brasil (CNPJ) obtidas de fontes oficiais (Receita Federal) e exporta para um formato legível por humanos (CSV ou JSON).

BR-API: Democratizando dados do Brasil. 8 Aug 17, 2022
Scripts to integrate DFIR-IRIS, MISP and TimeSketch

Scripts to integrate DFIR-IRIS, MISP and TimeSketch

Koen Van Impe 20 Dec 16, 2022
A simple armature retargeting tool for Blender

Simple-Retarget-Tool-Blender A simple armature retargeting tool for Blender Update V2: Set Rest Pose to easily apply rest pose. Preset Import/Export.

Fahad Hasan Pathik 74 Jan 04, 2023
Fused multiply-add (with a single rounding) for Python.

pyfma Fused multiply-add for Python. Fused multiply-add computes (x*y) + z with a single rounding. Useful for dot products, matrix multiplications, po

Nico Schlömer 18 Nov 08, 2022
Frappe app for authentication, can be used with FrappeVue-AdminLTE

Frappeauth App Frappe app for authentication, can be used with FrappeVue-AdminLTE

Anthony C. Emmanuel 9 Apr 13, 2022
Reproduction repository for the MDX 2021 Hybrid Demucs model

Submission This is the submission for MDX 2021 Track A, for Track B go to the track_b branch. Submission Summary Submission ID: 151378 Submitter: defo

Alexandre Défossez 62 Dec 18, 2022
Generate a wordlist to fuzz amounts or any other numerical values.

Generate a wordlist to fuzz amounts or any other numerical values. Based on Common Security Issues in Financially-Oriented Web Applications.

Ivan Šincek 3 Oct 14, 2022
Build your own Etherscan with web3.py

Build your own Etherscan with web3.py Video Tutorial: Run it pip3 install -r requirements.txt export FLASK_APP=app export FLASK_ENV=development flask

35 Jan 02, 2023
Flask html response minifier

Flask-HTMLmin Minify flask text/html mime type responses. Just add MINIFY_HTML = True to your deployment config to minify HTML and text responses of y

Hamid Feizabadi 85 Dec 07, 2022
In this project, we are going to display the battery notification and the time left for the battery to drain out using the battery capacity value.

In this project, we are going to display the battery notification and the time left for the battery to drain out using the battery capacity value.

Ritoban Biswas 1 Dec 20, 2021
Module 2's katas from Launch X's python introduction course.

Module2Katas Module 2's katas from Launch X's python introduction course. Virtual environment creation process (on Windows): Create a folder in any de

Javier Méndez 1 Feb 10, 2022
LinkScope allows you to perform online investigations by representing information as discrete pieces of data, called Entities.

LinkScope Client Description This is the repository for the LinkScope Client Online Investigation software. LinkScope allows you to perform online inv

108 Jan 04, 2023
Extrator de dados do jupiterweb

Extrator de dados do jupiterweb O programa é composto de dois arquivos: Um constando apenas de classes complementares que representam as unidades e as

Bruno Aricó 2 Nov 28, 2022
A small C compiler written in Python for learning purposes

A small C compiler written in Python. Generates x64 Intel-format assembly, which is then assembled and linked by nasm and ld.

Scattered Thoughts 3 Oct 22, 2021
An evolutionary multi-agent platform based on mesa and NEAT

An evolutionary multi-agent platform based on mesa and NEAT

Valerio1988 6 Dec 04, 2022
Hera is a Python framework for constructing and submitting Argo Workflows.

Hera is an Argo Workflows Python SDK. Hera aims to make workflow construction and submission easy and accessible to everyone! Hera abstracts away workflow setup details while still maintaining a cons

argoproj-labs 241 Jan 02, 2023
CPLib is the abbreviation of Competitive Programming Library.

CPLib CPLib is the abbreviation of Competitive Programming Library. It aims to be a general template and optimization library for competitive programm

12 Oct 16, 2021
Convert Roman numerals to modern numerals and vice-versa

Roman Numeral Conversion Utilities This is a utility module for converting from and to Roman numerals. It supports numbers upto 3,999,999, using the v

Fictive Kin 1 Dec 17, 2021
Headless - Wrapper around Ghidra's analyzeHeadless script

Wrapper around Ghidra's analyzeHeadless script, could be helpful to some? Don't tell me anything is wrong with it, it works on my machine.

8 Oct 29, 2022
This synchronizes my appearances with my calendar

Josh's Schedule Synchronizer Here's the "problem:" I use a Google Sheets spreadsheet to maintain all my public appearances.

Developer Advocacy 2 Oct 18, 2021