Skip to main content

Python Http File Server: Added file upload function to `http.server`

Project description

DesktopTools

桌面端小工具

进度和计划

进度和计划 可在查看: 此处

同时计划中包含了需求原型, 以及最一开始的代码实现原型, 有兴趣可以查看😄

功能介绍

工作时长统计

  • 工作时长
  • 按键记录
  • 疲惫提醒-强制锁屏😄

粘贴板操作

  • 时间转换
  • 表格数据格式化
  • dict json 格式化
  • TODO
  • 无限粘贴板
  • 自定义kv存储

工作时长统计原理

检测鼠标以及键盘移动/输入,判断正在工作中. macOS因隐私权限问题,需要额外设置,具体详参此处

实现

编程语言

Python(不会卡的太死lol)

所用库/包

  • PyQt5: 实现简单界面(不想用其它包,卡的比较死^_^.....弃用,因为其授权协议问题,虽然我的是MIT不要紧,但是用了它我的协议就被升级...虽然PySide6也会升级本项目授权,但比PyQt5要好.)
  • PySide6: 实现简单界面(不想用其它包,卡的不死^_^, 有MIT的实现方式欢迎改造)
  • pynput: 监控鼠标键盘
  • sqlalchemy: 数据库ORM,手拼字符累了,试试新东西
  • yapf: 代码格式化

使用

PyPi

# 源码
git clone git@github.com:IanVzs/Halahayawa.git DesktopTools
cd DesktopTools/
make build
DesktopTools

# pypi
pip install DesktopTools[ui]
# 可选 -i https://pypi.tuna.tsinghua.edu.cn/simple
DesktopTools

源码

git clone git@github.com:IanVzs/Halahayawa.git DesktopTools
cd DesktopTools/
mkdir env
python3 -m venv ./env
source ~/env/bin/activate
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
make run # or python test.py

可根据实际情况进行适当调整

  • -i https://pypi.tuna.tsinghua.edu.cn/simple是使用国内pip清华源, 如果有timeout的情况可自行搜索其他源来使用,或者不使用国内源pip install -r requirements.txt

可执行程序

下载地址

releases的Assets中, 目前只上传了windowsx64版本。

windows打包

--icon经测必须使用绝对路径.

pyinstaller --specpath=executable_files --distpath=executable_files --hidden-import=pynput.keyboard._xorg --hidden-import=pynput.mouse._xorg --hidden-import=sqlalchemy.sql.default_comparator --hidden-import=sqlalchemy.ext.baked --icon="C:\\Users\\USERNAME\\Desktop\\Halahayawa\\harry_potter.ico" -w -D --clean halahayawa.py
# cp harry_potter.ico executable_files/halahayawa 复制harry_potter.ico到程序目录

linux打包

pyinstaller --specpath=executable_files --distpath=executable_files --hidden-import=pynput.keyboard._xorg --hidden-import=pynput.mouse._xorg --hidden-import=sqlalchemy.sql.default_comparator -w -D --clean halahayawa.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

desktoptools-0.0.1.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

desktoptools-0.0.1-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

Details for the file desktoptools-0.0.1.tar.gz.

File metadata

  • Download URL: desktoptools-0.0.1.tar.gz
  • Upload date:
  • Size: 50.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.7.16 Linux/5.15.0-1034-azure

File hashes

Hashes for desktoptools-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dd16af8785c5153b99a3388bb623cd8cd8c388bef24081c2be905059629460c1
MD5 c8d14829d8ce92dbe9e7490cc91b9c2f
BLAKE2b-256 62f55720092b19ac1014ebaeba343507fc6e259dd8501cafdff007e06c56fdd1

See more details on using hashes here.

File details

Details for the file desktoptools-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: desktoptools-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 55.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.7.16 Linux/5.15.0-1034-azure

File hashes

Hashes for desktoptools-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0236fc123be529eaddcab58e5a51cd47dfe47f368279901882ec57602a7c9d83
MD5 e55482aeee1bf989f58d4e60f2bb398d
BLAKE2b-256 3411a51e604edbd0163ae2cb2a92e68d01c076c72e8fb42439aeb20ebc845d90

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page