Skip to content

Commit c857aa1

Browse files
committed
first
0 parents  commit c857aa1

File tree

5 files changed

+385
-0
lines changed

5 files changed

+385
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__/

autodelete.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import sys
2+
from PyQt5.QtWidgets import QApplication, QMainWindow
3+
from autoui import *
4+
5+
6+
class MyWindow(QMainWindow, Ui_MainWin):
7+
def __init__(self, parent=None):
8+
super(MyWindow, self).__init__(parent)
9+
self.setupUi(self)
10+
11+
12+
if __name__ == '__main__':
13+
app = QApplication(sys.argv)
14+
myWin = MyWindow()
15+
myWin.show()
16+
sys.exit(app.exec())

autodelete.ui

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>MainWin</class>
4+
<widget class="QMainWindow" name="MainWin">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>427</width>
10+
<height>175</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>MainWindow</string>
15+
</property>
16+
<widget class="QWidget" name="centralwidget">
17+
<layout class="QGridLayout" name="gridLayout">
18+
<item row="6" column="1" colspan="2">
19+
<widget class="QCheckBox" name="checkBox_4">
20+
<property name="font">
21+
<font>
22+
<pointsize>11</pointsize>
23+
<weight>75</weight>
24+
<bold>true</bold>
25+
</font>
26+
</property>
27+
<property name="text">
28+
<string>视频(视频文件和视频的封面图)</string>
29+
</property>
30+
<property name="checked">
31+
<bool>true</bool>
32+
</property>
33+
</widget>
34+
</item>
35+
<item row="0" column="0">
36+
<widget class="QLabel" name="label">
37+
<property name="font">
38+
<font>
39+
<family>宋体</family>
40+
<pointsize>11</pointsize>
41+
<weight>75</weight>
42+
<bold>true</bold>
43+
</font>
44+
</property>
45+
<property name="text">
46+
<string>请输入微信文件的存储路径:</string>
47+
</property>
48+
<property name="textFormat">
49+
<enum>Qt::AutoText</enum>
50+
</property>
51+
</widget>
52+
</item>
53+
<item row="2" column="1">
54+
<widget class="QLineEdit" name="lineEdit_2">
55+
<property name="text">
56+
<string>2</string>
57+
</property>
58+
</widget>
59+
</item>
60+
<item row="3" column="0">
61+
<widget class="QLabel" name="label_4">
62+
<property name="font">
63+
<font>
64+
<family>宋体</family>
65+
<pointsize>11</pointsize>
66+
<weight>75</weight>
67+
<bold>true</bold>
68+
</font>
69+
</property>
70+
<property name="text">
71+
<string>想要删除的文件类型:</string>
72+
</property>
73+
<property name="textFormat">
74+
<enum>Qt::AutoText</enum>
75+
</property>
76+
</widget>
77+
</item>
78+
<item row="7" column="1">
79+
<widget class="QPushButton" name="pushButton">
80+
<property name="font">
81+
<font>
82+
<pointsize>12</pointsize>
83+
<weight>75</weight>
84+
<bold>true</bold>
85+
</font>
86+
</property>
87+
<property name="text">
88+
<string>确定</string>
89+
</property>
90+
</widget>
91+
</item>
92+
<item row="4" column="1" colspan="2">
93+
<widget class="QCheckBox" name="checkBox_2">
94+
<property name="font">
95+
<font>
96+
<pointsize>11</pointsize>
97+
<weight>75</weight>
98+
<bold>true</bold>
99+
</font>
100+
</property>
101+
<property name="text">
102+
<string>文件(PPT,Word,gif,PDF 等)</string>
103+
</property>
104+
<property name="checked">
105+
<bool>true</bool>
106+
</property>
107+
</widget>
108+
</item>
109+
<item row="0" column="1" colspan="2">
110+
<widget class="QLineEdit" name="lineEdit">
111+
<property name="minimumSize">
112+
<size>
113+
<width>0</width>
114+
<height>0</height>
115+
</size>
116+
</property>
117+
<property name="text">
118+
<string/>
119+
</property>
120+
<property name="placeholderText">
121+
<string>类似C:\Users\xx\Documents\WeChat Files\xx</string>
122+
</property>
123+
</widget>
124+
</item>
125+
<item row="2" column="2">
126+
<widget class="QLabel" name="label_3">
127+
<property name="font">
128+
<font>
129+
<family>宋体</family>
130+
<pointsize>11</pointsize>
131+
<weight>75</weight>
132+
<bold>true</bold>
133+
</font>
134+
</property>
135+
<property name="text">
136+
<string>个月前</string>
137+
</property>
138+
<property name="textFormat">
139+
<enum>Qt::AutoText</enum>
140+
</property>
141+
</widget>
142+
</item>
143+
<item row="3" column="1" colspan="2">
144+
<widget class="QCheckBox" name="checkBox">
145+
<property name="enabled">
146+
<bool>true</bool>
147+
</property>
148+
<property name="font">
149+
<font>
150+
<pointsize>11</pointsize>
151+
<weight>75</weight>
152+
<bold>true</bold>
153+
</font>
154+
</property>
155+
<property name="text">
156+
<string>图片类缓存(来自小程序、公众号等)</string>
157+
</property>
158+
<property name="checked">
159+
<bool>true</bool>
160+
</property>
161+
</widget>
162+
</item>
163+
<item row="5" column="1" colspan="2">
164+
<widget class="QCheckBox" name="checkBox_3">
165+
<property name="minimumSize">
166+
<size>
167+
<width>0</width>
168+
<height>0</height>
169+
</size>
170+
</property>
171+
<property name="font">
172+
<font>
173+
<pointsize>11</pointsize>
174+
<weight>75</weight>
175+
<bold>true</bold>
176+
</font>
177+
</property>
178+
<property name="text">
179+
<string>图片(JPG 等)</string>
180+
</property>
181+
<property name="checked">
182+
<bool>true</bool>
183+
</property>
184+
</widget>
185+
</item>
186+
<item row="2" column="0">
187+
<widget class="QLabel" name="label_2">
188+
<property name="font">
189+
<font>
190+
<family>宋体</family>
191+
<pointsize>11</pointsize>
192+
<weight>75</weight>
193+
<bold>true</bold>
194+
</font>
195+
</property>
196+
<property name="text">
197+
<string>需要删除多久以前的文件:</string>
198+
</property>
199+
<property name="textFormat">
200+
<enum>Qt::AutoText</enum>
201+
</property>
202+
</widget>
203+
</item>
204+
<item row="1" column="1" colspan="2">
205+
<widget class="QLabel" name="label_5">
206+
<property name="text">
207+
<string>微信左下角-&gt;设置-&gt;通用设置-&gt;打开文件夹-&gt;复制路径</string>
208+
</property>
209+
</widget>
210+
</item>
211+
</layout>
212+
</widget>
213+
<widget class="QStatusBar" name="statusbar"/>
214+
</widget>
215+
<resources/>
216+
<connections/>
217+
</ui>

autoui.py

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Form implementation generated from reading ui file 'autodelete.ui'
4+
#
5+
# Created by: PyQt5 UI code generator 5.13.0
6+
#
7+
# WARNING! All changes made in this file will be lost!
8+
9+
10+
from PyQt5 import QtCore, QtGui, QtWidgets
11+
12+
13+
class Ui_MainWin(object):
14+
def setupUi(self, MainWin):
15+
MainWin.setObjectName("MainWin")
16+
MainWin.resize(427, 175)
17+
self.centralwidget = QtWidgets.QWidget(MainWin)
18+
self.centralwidget.setObjectName("centralwidget")
19+
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
20+
self.gridLayout.setObjectName("gridLayout")
21+
self.checkBox_4 = QtWidgets.QCheckBox(self.centralwidget)
22+
font = QtGui.QFont()
23+
font.setPointSize(11)
24+
font.setBold(True)
25+
font.setWeight(75)
26+
self.checkBox_4.setFont(font)
27+
self.checkBox_4.setChecked(True)
28+
self.checkBox_4.setObjectName("checkBox_4")
29+
self.gridLayout.addWidget(self.checkBox_4, 6, 1, 1, 2)
30+
self.label = QtWidgets.QLabel(self.centralwidget)
31+
font = QtGui.QFont()
32+
font.setFamily("宋体")
33+
font.setPointSize(11)
34+
font.setBold(True)
35+
font.setWeight(75)
36+
self.label.setFont(font)
37+
self.label.setTextFormat(QtCore.Qt.AutoText)
38+
self.label.setObjectName("label")
39+
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
40+
self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget)
41+
self.lineEdit_2.setObjectName("lineEdit_2")
42+
self.gridLayout.addWidget(self.lineEdit_2, 2, 1, 1, 1)
43+
self.label_4 = QtWidgets.QLabel(self.centralwidget)
44+
font = QtGui.QFont()
45+
font.setFamily("宋体")
46+
font.setPointSize(11)
47+
font.setBold(True)
48+
font.setWeight(75)
49+
self.label_4.setFont(font)
50+
self.label_4.setTextFormat(QtCore.Qt.AutoText)
51+
self.label_4.setObjectName("label_4")
52+
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
53+
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
54+
font = QtGui.QFont()
55+
font.setPointSize(12)
56+
font.setBold(True)
57+
font.setWeight(75)
58+
self.pushButton.setFont(font)
59+
self.pushButton.setObjectName("pushButton")
60+
self.gridLayout.addWidget(self.pushButton, 7, 1, 1, 1)
61+
self.checkBox_2 = QtWidgets.QCheckBox(self.centralwidget)
62+
font = QtGui.QFont()
63+
font.setPointSize(11)
64+
font.setBold(True)
65+
font.setWeight(75)
66+
self.checkBox_2.setFont(font)
67+
self.checkBox_2.setChecked(True)
68+
self.checkBox_2.setObjectName("checkBox_2")
69+
self.gridLayout.addWidget(self.checkBox_2, 4, 1, 1, 2)
70+
self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
71+
self.lineEdit.setMinimumSize(QtCore.QSize(0, 0))
72+
self.lineEdit.setText("")
73+
self.lineEdit.setObjectName("lineEdit")
74+
self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 2)
75+
self.label_3 = QtWidgets.QLabel(self.centralwidget)
76+
font = QtGui.QFont()
77+
font.setFamily("宋体")
78+
font.setPointSize(11)
79+
font.setBold(True)
80+
font.setWeight(75)
81+
self.label_3.setFont(font)
82+
self.label_3.setTextFormat(QtCore.Qt.AutoText)
83+
self.label_3.setObjectName("label_3")
84+
self.gridLayout.addWidget(self.label_3, 2, 2, 1, 1)
85+
self.checkBox = QtWidgets.QCheckBox(self.centralwidget)
86+
self.checkBox.setEnabled(True)
87+
font = QtGui.QFont()
88+
font.setPointSize(11)
89+
font.setBold(True)
90+
font.setWeight(75)
91+
self.checkBox.setFont(font)
92+
self.checkBox.setChecked(True)
93+
self.checkBox.setObjectName("checkBox")
94+
self.gridLayout.addWidget(self.checkBox, 3, 1, 1, 2)
95+
self.checkBox_3 = QtWidgets.QCheckBox(self.centralwidget)
96+
self.checkBox_3.setMinimumSize(QtCore.QSize(0, 0))
97+
font = QtGui.QFont()
98+
font.setPointSize(11)
99+
font.setBold(True)
100+
font.setWeight(75)
101+
self.checkBox_3.setFont(font)
102+
self.checkBox_3.setChecked(True)
103+
self.checkBox_3.setObjectName("checkBox_3")
104+
self.gridLayout.addWidget(self.checkBox_3, 5, 1, 1, 2)
105+
self.label_2 = QtWidgets.QLabel(self.centralwidget)
106+
font = QtGui.QFont()
107+
font.setFamily("宋体")
108+
font.setPointSize(11)
109+
font.setBold(True)
110+
font.setWeight(75)
111+
self.label_2.setFont(font)
112+
self.label_2.setTextFormat(QtCore.Qt.AutoText)
113+
self.label_2.setObjectName("label_2")
114+
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
115+
self.label_5 = QtWidgets.QLabel(self.centralwidget)
116+
self.label_5.setObjectName("label_5")
117+
self.gridLayout.addWidget(self.label_5, 1, 1, 1, 2)
118+
MainWin.setCentralWidget(self.centralwidget)
119+
self.statusbar = QtWidgets.QStatusBar(MainWin)
120+
self.statusbar.setObjectName("statusbar")
121+
MainWin.setStatusBar(self.statusbar)
122+
123+
self.retranslateUi(MainWin)
124+
QtCore.QMetaObject.connectSlotsByName(MainWin)
125+
126+
def retranslateUi(self, MainWin):
127+
_translate = QtCore.QCoreApplication.translate
128+
MainWin.setWindowTitle(_translate("MainWin", "微信客户端数据自动删除工具"))
129+
self.checkBox_4.setText(_translate("MainWin", "视频(视频文件和视频的封面图)"))
130+
self.label.setText(_translate("MainWin", "请输入微信文件的存储路径:"))
131+
self.lineEdit_2.setText(_translate("MainWin", "2"))
132+
self.label_4.setText(_translate("MainWin", "想要删除的文件类型:"))
133+
self.pushButton.setText(_translate("MainWin", "确定"))
134+
self.checkBox_2.setText(_translate("MainWin", "文件(PPT,Word,gif,PDF 等)"))
135+
self.lineEdit.setPlaceholderText(_translate("MainWin", "类似C:\\Users\\xx\\Documents\\WeChat Files\\xx"))
136+
self.label_3.setText(_translate("MainWin", "个月前"))
137+
self.checkBox.setText(_translate("MainWin", "图片类缓存(来自小程序、公众号等)"))
138+
self.checkBox_3.setText(_translate("MainWin", "图片(JPG 等)"))
139+
self.label_2.setText(_translate("MainWin", "需要删除多久以前的文件:"))
140+
self.label_5.setText(_translate("MainWin", "微信左下角->设置->通用设置->打开文件夹->复制路径"))

readme.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AutoDeleteFileOnPCWechat
2+
3+
自动删除 PC 端微信从所有聊天中自动下载的大量文件、视频、图片等内容,解放你的空间。
4+
5+
可设置需要删除的文件的距离时间,默认 2 个月。
6+
7+
8+
9+
下载两年时间,微信一个软件就占用多达 33.5 G 存储空间。其中大部分都是与自己无关的各大群聊中的文件、视频、图片等内容,且很久以前的文件仍旧存在电脑中。
10+
11+
![](https://markdown-pic-blackboxo.oss-cn-shanghai.aliyuncs.com/20200213142805.png)

0 commit comments

Comments
 (0)