forked from TheGreat00Q/JAV-Scraper-and-Rename-local-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ini_create.py
67 lines (66 loc) · 4.5 KB
/
ini_create.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# -*- coding:utf-8 -*-
import os, configparser, traceback
try:
print('>>正在重写ini...')
config_settings = configparser.RawConfigParser()
config_settings.add_section("收集nfo")
config_settings.set("收集nfo", "是否跳过已存在nfo的文件夹?", "否")
config_settings.set("收集nfo", "是否收集nfo?", "是")
config_settings.set("收集nfo", "是否收集javlibrary上的影评?", "是")
config_settings.set("收集nfo", "nfo中title的格式", "车牌+空格+标题")
config_settings.add_section("重命名影片")
config_settings.set("重命名影片", "是否重命名影片?", "是")
config_settings.set("重命名影片", "重命名影片的格式", "车牌+空格+标题")
config_settings.add_section("修改文件夹")
config_settings.set("修改文件夹", "是否重命名或创建独立文件夹?", "是")
config_settings.set("修改文件夹", "新文件夹的格式", "【+全部女优+】+车牌")
config_settings.add_section("归类影片")
config_settings.set("归类影片", "是否归类影片?", "否")
config_settings.set("归类影片", "针对文件还是文件夹?", "文件夹")
config_settings.set("归类影片", "归类的根目录", "所选文件夹")
config_settings.set("归类影片", "归类的标准", "首个女优")
config_settings.add_section("下载封面")
config_settings.set("下载封面", "是否下载封面海报?", "是")
config_settings.set("下载封面", "DVD封面的格式", "视频+-fanart.jpg")
config_settings.set("下载封面", "海报的格式", "视频+-poster.jpg")
config_settings.add_section("kodi专用")
config_settings.set("kodi专用", "是否收集女优头像", "否")
config_settings.add_section("emby专用")
config_settings.set("emby专用", "网址", "http://localhost:8096/")
config_settings.set("emby专用", "API ID", "2060b39380c84f1896286cfbbb9f2d17")
config_settings.add_section("代理")
config_settings.set("代理", "是否使用代理?", "否")
config_settings.set("代理", "代理IP及端口", "127.0.0.1:1080")
config_settings.add_section("百度翻译API")
config_settings.set("百度翻译API", "是否需要日语简介?", "是")
config_settings.set("百度翻译API", "是否翻译为中文?", "否")
config_settings.set("百度翻译API", "APP ID", "")
config_settings.set("百度翻译API", "密钥", "")
config_settings.add_section("百度人体分析")
config_settings.set("百度人体分析", "是否需要准确定位人脸的poster?", "否")
config_settings.set("百度人体分析", "AppID", "")
config_settings.set("百度人体分析", "API Key", "")
config_settings.set("百度人体分析", "Secret Key", "")
config_settings.add_section("其他设置")
config_settings.set("其他设置", "简繁中文?", "简")
config_settings.set("其他设置", "javlibrary网址", "http://www.r40z.com/")
config_settings.set("其他设置", "javbus网址", "https://www.buscdn.work/")
config_settings.set("其他设置", "素人车牌(若有新车牌请自行添加)", "LUXU、MIUM、GANA、NTK、ARA、DCV、MAAN、HOI、NAMA、SWEET、SIRO、SCUTE、CUTE、SQB、JKZ、URF、SIMM")
config_settings.set("其他设置", "扫描文件类型", "mp4、mkv、avi、wmv、iso、rmvb、MP4")
config_settings.set("其他设置", "重命名中的标题长度(50~150)", "50")
config_settings.add_section("原影片文件的性质")
config_settings.set("原影片文件的性质", "是否中字即文件名包含", "-c、-C、_C、中字")
config_settings.set("原影片文件的性质", "是否中字的表现形式", "中字-")
config_settings.set("原影片文件的性质", "是否xx即文件名包含", "流出")
config_settings.set("原影片文件的性质", "是否xx的表现形式", "无码流出")
config_settings.set("原影片文件的性质", "有码", "有码")
config_settings.set("原影片文件的性质", "无码", "无码")
config_settings.set("原影片文件的性质", "素人", "素人")
config_settings.set("原影片文件的性质", "FC2", "FC2")
config_settings.write(open('ini的设置会影响所有exe的操作结果.ini', "w", encoding='utf-8-sig'))
print('写入ini文件成功!')
os.system('pause')
except:
print(traceback.format_exc())
print('\n创建ini失败,解决上述问题后,重新打开exe创建ini!')
os.system('pause')