Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxuanyi-zxy committed Jan 3, 2023
1 parent 5e32ed9 commit ead5d97
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 23 deletions.
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2023 zhouxuanyi-zxy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2023 zhouxuanyi-zxy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
46 changes: 46 additions & 0 deletions Old-Driver-Tools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Old-Driver-Tools Python Edition
# Author: zhouxuanyi-zxy
# Licence: MIT Licence
# Version: v0.1b
# Language: Python
# 2023.1.3-v0.1b

import base64
import os
try:
import pyperclip # 复制到剪切板
except ModuleNotFoundError: # 如果没有此包,则使用国内pip源安装
os.system("pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyperclip")
os.system("python Old_Driver_Tools.py") # 自动重启程序
exit()
# 导入结束,程序开始
base64_decode_encode = "" # base64模式判断
utf_8_decode_encode = "" # UTF-8模式判断
user_input = "" # 用户输入
def base64_de_en(): # base64编/解码具体实现
global user_input,base64_decode_encode
user_input = input("")
user_input = bytes(user_input,encoding="utf-8") # 转换为bytes类型
try:
if base64_decode_encode == "encode": # 编码
base64_out = base64.b64encode(user_input) # 编码
elif base64_decode_encode == "decode": # 解码
base64_out = base64.b64decode(user_input) # 解码
pyperclip.copy(str(base64_out)[2:-1:])
print(str(base64_out)[2:-1:])
except:
print("Error!")

def utf_8_de_en(): # UTF-8编/解码(别用,用了就废)
global utf_8_decode_encode
utf_8_user_input = input()
if utf_8_decode_encode == "encode":
utf_8_out = utf_8_user_input.encode("utf-8")
elif utf_8_decode_encode == "decode":
utf_8_user_input = bytes(input())
# utf_8_decode_swap = user_input.encode("utf-8")
# utf_8_decode_swap = bytes(utf_8_decode_swap.decode("utf-8"))
utf_8_decode_swap = utf_8_user_input.encode().decode("utf-8")
utf_8_out = utf_8_decode_swap.encode("utf-8").decode()
print(utf_8_out)
base64_de_en()
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# Old_Driver_Tools
一个没啥用的编/解码小工具
# 编/解码小工具

### 一个没事情的时候做的无聊的小工具

#### 它可以

- 1、帮助你可以在QQ群发一些东西
> 防止你被无缘无故封了
- 2、~~我不到啊~~

#### 它支持

- 1、结果自动加入剪切板
> 十分人性,速度更快,并且**绝对不会**读取你的剪切板
- 2、~~极简界面~~
> 没有UI,极致简陋
总结:本项目技术力低下,代码稀碎,但是还会优化

0 comments on commit ead5d97

Please sign in to comment.