-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog_autopy.html
382 lines (365 loc) · 16.8 KB
/
blog_autopy.html
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>博客详情页</title>
<link rel="icon" href="https://cdn.jsdelivr.net/gh/exef-star/hanta@main/img/hanta.jpg" sizes="16x16">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/exef-star/hanta@main/css/common.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/exef-star/hanta@main/css/blog_detail.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/exef-star/hanta@main/css/button.css">
<link rel="stylesheet" href="css/jsstyle.css">
<link rel="stylesheet" href="css/comment.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
<style>
body{
transition: 0.5s;
background-image:url('5268d877a2a04864b36b4961ab793f4f.jpg');
background-color:#cccccc;
background-repeat:no-repeat;
background-position:center;
background-attachment:fixed;
background-size: cover;
}
</style>
<style>
ul{
background-color: white;
color: #000000;
width: 150px;
display: none;
background:rgba(222, 221, 221, 0);
/* 让当前的ul参照浏览器的边缘进行定位 */
position: absolute;
padding: 10px;
box-shadow: 0px 0px 5px black;
border-radius: 10px;
}
li{
list-style: none;
line-height: 40px;
}
li:hover{
color: white;
background-color: block;
}
a:link {
color: #000000
}
</style>
</head>
<body>
<theme-button value="light" id="btn" size="1" style="width: 120px;height: 120px;position: absolute;top: 10px;right: 10px;background-color: rgba(255, 255, 255, 0)"></theme-button>
<script>
document.body.style.backgroundImage = "#424242";
btn.addEventListener("change", e => {
if (e.detail === 'light') {
document.body.style.background = "url(5268d877a2a04864b36b4961ab793f4f.jpg) no-repeat";//通过js控制改变行内样式
document.body.style.backgroundSize = "cover";
}
else {
document.body.style.background = "url(bc4504cc20134baba18dd1a3d247f302.jpg) no-repeat";//通过js控制改变行内样式
document.body.style.backgroundSize = "cover";
}
});
</script>
<script src="https://cdn.jsdelivr.net/gh/exef-star/hanta@main/js/script.js"></script>
<!-- 导航栏 -->
<div class="nav">
<img src="https://cdn.jsdelivr.net/gh/exef-star/hanta@main/img/hanta.jpg" alt="">
<span>可执行程序的博客</span>
<!-- 空白元素 实现占位 -->
<div class="spacer"></div>
<a href="index.html">主页</a>
<a href="blog_edit.html">写博客</a>
<a href="blog_login.html">注销</a>
</div>
<!-- 这里的.container作为页面的版心 -->
<div class="container">
<!-- 左侧个人信息 -->
<div class="left">
<!-- 表示整个用户的信息区域 -->
<div class="card">
<img src="https://cdn.jsdelivr.net/gh/exef-star/hanta@main/img/hanta.jpg" alt="">
<h3>可执行程序</h3>
<p>一个广东仔,不会说白话😭</p>
<p>有时在学校开挂</p>
<p>喜欢看FO的视频</p>
<hr>
<!-- Element to contain animated typing -->
<span id="element"></span>
<!-- Load library from the CDN -->
<script src="https://unpkg.com/[email protected]/dist/typed.umd.js"></script>
<!-- Setup and start animation! -->
<script>
var typed = new Typed('#element', {
strings: ['勤学如春起之苗,不见其增日有所长;辍学如磨刀之石,不见其损日有所亏。——陶渊明'],
typeSpeed: 60,
});
</script>
<a href="#">Gitee地址</a>
<div class="counter">
<span>文章</span>
<span>分类</span>
</div>
<div class="counter">
<span>2</span>
<span>1</span>
</div>
</div>
</div>
<!-- 右侧内容详情 -->
<div class="right">
<!-- 使用这个 div 来包裹整个博客的内容详情 -->
<div class="blog-content">
<!-- 博客标题 -->
<h3>🏡Auto-py-to-exe小白教程</h3>
<!-- 博客的时间 -->
<div class="date">2024-01-25 09:27:00</div>
<!-- 正文 -->
<p>在Python中,如果你想要吧程序分享给别人</p>
<p>而且别人的电脑上没有安装Python解释器</p>
<p>那么,把他转成exe文件就是最好的办法</p>
<p>exe文件在Windows系统下可以直接运行</p>
<p>那要怎么转exe呢</p>
<p>答案是:</p>
<p><b>加万能的扩展!!!</b></p>
<p>这里就推荐一下auto-py-to-exe</p>
<p>他是一个基于pyinstaller的可视化交互界面</p>
<p>只需要上传文件并选择图标</p>
<p>专属于你的exe就做好了</p>
<p>那就看看怎么使用auto-py-to-exe吧!</p>
<p>首先前提条件是你的电脑里安装了python3以上版本</p>
<p>然后打开cmd,输入以下指令:</p>
<hr>
<pre>
pip install auto-py-to-exe
</pre>
<hr>
<p>等插件安装完成后,输入以下指令:</p>
<hr>
<pre>
auto-py-to-exe
</pre>
<hr>
<p>如果看到这个界面,恭喜你,你成功进入了auto-py-to-exe的可视化界面!</p>
<img src="img/pytoexe.png" width="955" height="1024">
<p>这里我来给大家讲一下auto-py-to-exe的功能</p>
<img src="img/pytoexe1.png" width="955" height="1024">
<p>点击Browse选择.py源文件</p>
<img src="img/pytoexe3.png" width="937" height="708">
<p>这里如果你不知道怎么选择的话,可以按照这个方案来</p>
<img src="img/pytoexe2.png" width="955" height="1024">
<p>选完之后,就点击最底下的CONVERT .PY TO .EXE开始封装</p>
<img src="img/3e3da4c4-c2fd-413d-9331-5763840e7bca.png" width="1008" height="1683">
<p>等到封装完,就可以点击OPEN OUTPUT FOLDER查看程序,一般打开的是output文件夹</p>
<p>可以在文件资源管理器吧output文件夹固定在侧边栏方便查看程序</p>
<img src="img/folder.png" width="820" height="433">
<p>点击刚才与你.py文件同名的文件夹,打开并点击与你.py文件并且封装好的exe文件</p>
<p>这样我们的Python文件就封装好了!</p>
<img src="img/calculator.png" width="820" height="433">
<hr>
<p align="right">——by 可执行程序</p>
<!-- <button class="pl_button">评论</button> -->
<div class="commentAll">
<!--评论文本区域 begin-->
<div class="reviewArea clearfix">
<textarea class="content comment-input" placeholder="请注意自己的言行举止ο(=•ω<=)ρ⌒☆…" onkeyup="keyUP(this)"></textarea>
<a href="javascript:;" class="plBtn">发送评论</a>
</div>
<!--评论文本区域 end-->
<!--评论区域 begin-->
<div class="comment-show">
<div class="comment-show-con clearfix">
<div class="comment-show-con-img pull-left"><img src="images/header-img-comment_03.png" alt=""></div>
<div class="comment-show-con-list pull-left clearfix">
<div class="pl-text clearfix">
<a href="#" class="comment-size-name">作者</a>
<span class="my-pl-con"> 快来评论区聊天吧(づ ̄3 ̄)づ╭❤~</span>
</div>
<div class="date-dz">
<span class="date-dz-left pull-left comment-time">2020-3-9 11:11:39</span>
<div class="date-dz-right pull-right comment-pl-block">
<a href="javascript:;" class="date-dz-z pull-left">
<i class="date-dz-z-click-red"></i>赞 (<i class="z-num">6</i>)</a>
</div>
</div>
<div class="hf-list-con"></div>
</div>
</div>
</div>
<!--评论区域 end-->
</div>
<script type="text/javascript" src="js/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="js/jquery.flexText.js"></script>
<script type="text/javascript" src="js/pl_file.js"></script>
</div>
</div>
</div>
<p align="center">Copyright © 2022-2024 hanta blog</p>
<ul id="caidan1">
<li onclick="location.href='index.html'"><i class="fa fa-angle-double-right"></i></i>返回</li>
<li onclick="location.href='blog_login.html'"><i class="fa fa-sign-out"></i>注销</li>
<li onclick="location.href='https://github.com/exef-star/hanta'"><i class="fa fa-github"></i>Github仓库</li>
<li onclick="location.href='https://www.baidu.com'"><i class="fa fa-paw"></i>百度一下</li>
<li onclick="location.href='#QQ:2667174454'"><i class="fa fa-qq"></i><i class="fa fa-at"></i>:2667174454</li>
</ul>
<script>
/* 当前页面的显示区域是文档document */
/* 当右键点击文档的时候 会弹出右键菜单 同时需要执行一些行为 */
document.oncontextmenu = function(e){
document.getElementById("caidan1").style.display = "block";
document.getElementById("caidan1").style.left = e.clientX + "px";
document.getElementById("caidan1").style.top = e.clientY + "px";
return false;//返回一个错误的指使,禁止菜单弹出
}
//鼠标左键单击
document.onclick = function(){
// alert("fuck");
document.getElementById("caidan1").style.display="none";
}
</script>
<script>
(function () {
var a_idx = 0;
window.onclick = function (event) {
var a = new Array("😂", "😘", "😍", "😊", "😁", "😭", "😜", "😝", "😄",
"😡", "😀", "😥", "🙃", "😋", "👍", "👌", "😱");
var heart = document.createElement("b"); //创建b元素
heart.onselectstart = new Function('event.returnValue=false'); //防止拖动
document.body.appendChild(heart).innerHTML = a[a_idx]; //将b元素添加到页面上
a_idx = (a_idx + 1) % a.length;
heart.style.cssText = "position: fixed;left:-100%;"; //给p元素设置样式
var f = 16, // 字体大小
x = event.clientX - f / 2, // 横坐标
y = event.clientY - f, // 纵坐标
c = randomColor(), // 随机颜色
a = 1, // 透明度
s = 1.2; // 放大缩小
var timer = setInterval(function () { //添加定时器
if (a <= 0) {
document.body.removeChild(heart);
clearInterval(timer);
} else {
heart.style.cssText = "font-size:16px;cursor: default;position: fixed;color:" +
c + ";left:" + x + "px;top:" + y + "px;opacity:" + a + ";transform:scale(" +
s + ");";
y--;
a -= 0.016;
s += 0.002;
}
}, 15)
}
// 随机颜色
function randomColor() {
return "rgb(" + (~~(Math.random() * 255)) + "," + (~~(Math.random() * 255)) + "," + (~~(Math
.random() * 255)) + ")";
}
}());
!
function() {
function n(n, e, t) {
return n.getAttribute(e) || t
}
function e(n) {
return document.getElementsByTagName(n)
}
function t() {
var t = e("script"),
o = t.length,
i = t[o - 1];
return {
l: o,
z: n(i, "zIndex", -1),
o: n(i, "opacity", .5),
c: n(i, "color", "0,0,0"),
n: n(i, "count", 99)
}
}
function o() {
a = m.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
c = m.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
}
function i() {
r.clearRect(0, 0, a, c);
var n, e, t, o, m, l;
s.forEach(function(i, x) {
for (i.x += i.xa, i.y += i.ya, i.xa *= i.x > a || i.x < 0 ? -1 : 1, i.ya *= i.y > c || i.y < 0 ? -1 : 1, r.fillRect(i.x - .5, i.y - .5, 1, 1), e = x + 1; e < u.length; e++) n = u[e],
null !== n.x && null !== n.y && (o = i.x - n.x, m = i.y - n.y, l = o * o + m * m, l < n.max && (n === y && l >= n.max / 2 && (i.x -= .03 * o, i.y -= .03 * m), t = (n.max - l) / n.max, r.beginPath(), r.lineWidth = t / 2, r.strokeStyle = "rgba(" + d.c + "," + (t + .2) + ")", r.moveTo(i.x, i.y), r.lineTo(n.x, n.y), r.stroke()))
}),
x(i)
}
var a, c, u, m = document.createElement("canvas"),
d = t(),
l = "c_n" + d.l,
r = m.getContext("2d"),
x = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
function(n) {
window.setTimeout(n, 1e3 / 45)
},
w = Math.random,
y = {
x: null,
y: null,
max: 2e4
};
m.id = l,
m.style.cssText = "position:fixed;top:0;left:0;z-index:" + d.z + ";opacity:" + d.o,
e("body")[0].appendChild(m),
o(),
window.onresize = o,
window.onmousemove = function(n) {
n = n || window.event,
y.x = n.clientX,
y.y = n.clientY
},
window.onmouseout = function() {
y.x = null,
y.y = null
};
for (var s = [], f = 0; d.n > f; f++) {
var h = w() * a,
g = w() * c,
v = 2 * w() - 1,
p = 2 * w() - 1;
s.push({
x: h,
y: g,
xa: v,
ya: p,
max: 6e3
})
}
u = s.concat([y]),
setTimeout(function() {
i()
},
100)
} ();
</script>
<!-- 创建canvas元素 -->
<canvas class="snow" width="100%" height="100%" style="position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none;"></canvas>
<!-- 引入插件 -->
<script src="https://player.xfyun.club/js/snows/js/jquery.min.js"></script>
<script src="https://player.xfyun.club/js/snows/js/jquery.let_it_snow.js"></script>
<script src="https://player.xfyun.club/js/snows/js/modernizr.js"></script>
<script>
// 如果你需要更改网页的背景颜色,请把下面的注释删了
// $('body').css('background-color', '#000') // 将网页背景改成黑色
$('body').css('overflow-x', 'hidden').css('margin', '0').css('padding', '0') // 防止出现左右滚动条,并清除内外边距
$(document).ready( function() {
$('canvas.snow').let_it_snow({
speed: 0, // 该参数用于控制雪花飘落的速度。数值越高速度越快。数值设置在0-5之间。默认值为0。
interaction: true, // 该参数用于设置用户与雪花之间的交互。如果设置为true,那么鼠标和雪花之间将形成一种互斥作用,从而生成一种用户与雪花的交互动作。默认值为true。
size: 2, // 该参数用于设置雪花的平均大小。数值越高雪花越大。数值设置在0-10之间。默认值为2。
count: 200, // 该参数用于设置统一时间在屏幕中的雪花的数量。默认值为200。
opacity: 0, // 该参数用于设置雪花的平均透明度。设置为1,雪花完全不透明。数值设置在0.0到1.0之间。默认值为0。
color: '#ffffff', // 该参数用于设置雪花的颜色。
windPower: 0, // 该参数用于设置风吹的方向。如果你想风吹向右边,设置为正数。如果想风吹向其它方向,设置为负数。数值越大(正数)/数值越小(负数),风吹动的越厉害。默认值为0。
image: false // 你可以使用一张雪花图片来代替默认的圆形雪花。该参数是图片的URL,设置为false表示使用默认的圆形图像。默认值为false。
})
})
</script>
</body>
</html>