|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
通过2周的课余时间编写
终于将他们搞出来了!
我把这三个应用称为CityMorning Tools
第一个应用:TenCat密码记忆工具。
本应用基于对我前面发的账号密码工具
进行了部分的修改与升级
部分代码:
- #曲速飞跃作
- #请提前在保存此代码的地方创建1.txt
- import easygui as g
- a = open('1.txt')
- b = a.read()
- e = int(b)
- if e == 1:
- d = g.enterbox('查看密码?')
- h = int(d)
- c = open('mimas.txt')
- k = c.read()
- f = int(k)
- if h != f:
- d = g.enterbox('再次输入查看密码?')
- h = int(d)
- c = open('mimas.txt')
- k = c.read()
- f = int(k)
- if h != f:
- exit(0)
- while True:
- choices = g.buttonbox('主页',title = '密码工具',image = 'TenCat.jpg',choices = ('我的账号密码','增加账号密码','设置','退出'))
- if choices == '增加账号密码':
- msg = '增加'
- title = '密码工具'
- table = g.enterbox('平台?')
- name = g.enterbox('账号?')
- message = g.enterbox('密码?')
- mes = message + "I LOVE STUDY 0962135 qusufeiyuezuo"
- with open('pingtai.txt', 'a+') as f:
- f.write(str(table))
- f.write('\r\n')
- with open('zhanghao.txt', 'a+') as f:
- f.write(str(name))
- f.write('\r\n')
- with open('mima.txt', 'a+') as f:
- f.write(str(mes))
- f.write('\r\n')
- elif choices == '我的账号密码':
- a = open('pingtai.txt')
- pt = a.read()
- c = open('zhanghao.txt')
- zh = c.read()
- e = open('mima.txt')
- message = e.read()
- First = message
- Second = "I LOVE STUDY 0962135 qusufeiyuezuo"
- end = ""
- for i in First:
- if i in Second:
- First = First.replace(i, "")
- g.msgbox('平台:' + pt + '账号:' + zh + '密码:' + First )
- elif choices == '设置':
- msg = '设置'
- title = '密码工具'
- choices = ['使用说明','删除账号密码','设置查看密码']
- choices = g.choicebox(msg, title, choices)
- if choices == '使用说明':
- g.msgbox('这个工具用于帮助记不住密码的人。点击增加账号密码可增加,点击我的账号密码即可查询。在设置-设置查看密码 可以设置密码。')
- elif choices == '删除账号密码':
- g.msgbox('在此程序保存的位置找到pingtai.txt,zhanghao.txt,mima.txt,删除对应信息即可。')
- elif choices == '设置查看密码':
- mima = g.enterbox('密码?(数字)')
- with open('mimas.txt', 'w') as f:
- f.write(str(mima))
- with open('1.txt', 'w') as f:
- f.write(str(1))
- elif choices == '退出':
- exit(0)
-
复制代码
请保存:
链接: https://pan.baidu.com/s/1zUOkK_m4hFXA7cXIwaz0ww
提取码: 9dky
第二个应用:DoIt待办事项
这是一个非常非常简单的待办应用
以后会慢慢完善的
部分代码:
- #曲速飞跃作
- import easygui as g
- import random
- a = open('1.txt')
- b = a.read()
- e = int(b)
- if e == 1:
- d = g.enterbox('查看密码?')
- h = int(d)
- c = open('mimas.txt')
- k = c.read()
- f = int(k)
- if h != f:
- d = g.enterbox('再次输入查看密码?')
- h = int(d)
- c = open('mimas.txt')
- k = c.read()
- f = int(k)
- if h != f:
- exit(0)
- while True:
- a = open("doit.txt")
- b = a.read()
- k = str(b)
- se = random.randint(1, 5)
- if se == 1:
- ss = "\n\n\n\n\n书山有路勤为径,学海无涯苦作舟。"
- elif se == 2:
- ss = "\n\n\n\n\n读书破万卷,下笔如有神。"
- elif se == 3:
- ss = "\n\n\n\n\n少壮不努力,老大徒伤悲。"
- elif se == 4:
- ss = "\n\n\n\n\nI love study,study makes me happy!"
- elif se == 5:
- ss = "\n\n\n\n\n三更灯火五更鸡,正是男儿读书时。"
- if k == "":
- num = "任务都完成啦!" + ss
- else:
- num = "今日还有任务呢!加油鸭!" + ss
- c = g.buttonbox(num + "\n\n\n\n\n",title="DoIt",image = "DoIt.jpg",choices=("我的待办","增加待办","设置","退出"))
- if c == "增加待办":
- enter = g.enterbox("待办名称?")
- with open('doit.txt', 'a+') as f:
- f.write(str(enter))
- f.write('\r\n')
- g.msgbox("设置成功!")
- elif c == "我的待办":
- a = open("doit.txt")
- b = a.read()
- c = str(b)
- msg = c
- title = "DoIt"
- choice2 = ["我看到了","标记全部完成"]
- c2 = g.buttonbox(msg,title,choice2)
- if c2 == "我看到了":
- g.msgbox("那还不赶快完成!?")
- else:
- with open('doit.txt', 'w') as f:
- f.write("")
- elif c == "设置":
- msg = "设置"
- title = "DoIt"
- choice3 = ["设置开始密码","更新信息"]
- c3 = g.choicebox(msg,title,choice3)
- if c3 == "设置开始密码":
- mima = g.enterbox('密码?(数字)')
- with open('mimas.txt', 'w') as f:
- f.write(str(mima))
- with open('1.txt', 'w') as f:
- f.write(str(1))
- else:
- g.msgbox("该版本为1.0.0,为初始版本!")
- elif c == "退出":
- exit(0)
复制代码
请保存:
链接: https://pan.baidu.com/s/1fmOyVO7NzARZMcloPmmaNA
提取码: r63v
第三个应用:重头戏 TurtleTomato番茄工作法
一样的,很简陋,以后慢慢补充
部分代码:
- #曲速飞跃作
- import easygui as g
- import random
- import time
- from tkinter import *
- a = open('1.txt')
- b = a.read()
- e = int(b)
- if e == 1:
- d = g.enterbox('查看密码?')
- h = int(d)
- c = open('mimas.txt')
- k = c.read()
- f = int(k)
- if h != f:
- d = g.enterbox('再次输入查看密码?')
- h = int(d)
- c = open('mimas.txt')
- k = c.read()
- f = int(k)
- if h != f:
- exit(0)
- while True:
- se = random.randint(1, 5)
- if se == 1:
- ss = "\n\n\n\n\n书山有路勤为径,学海无涯苦作舟。"
- elif se == 2:
- ss = "\n\n\n\n\n读书破万卷,下笔如有神。"
- elif se == 3:
- ss = "\n\n\n\n\n少壮不努力,老大徒伤悲。"
- elif se == 4:
- ss = "\n\n\n\n\nI love study,study makes me happy!"
- elif se == 5:
- ss = "\n\n\n\n\n三更灯火五更鸡,正是男儿读书时。"
- c1 = g.buttonbox("TurtleTomato 番茄工作法" + ss,title="TurtleTomato",image = "TurtleTomato.jpg",choices= ("开始番茄","番茄统计","历史记录","设置","退出"))
- if c1 == "开始番茄":
- do = g.enterbox("您要专注于?")
- t = g.enterbox("时长?(一般25分钟)")
- tt = int(t)
- ttt = tt * 60
- import pygame
- import sys
- from pygame.locals import *
- pygame.mixer.init()
- pygame.mixer.music.load("chanchanchan.ogg")
- pygame.mixer.music.play()
- for i in range(ttt + 1):
- print(ttt - i)
- time.sleep(1)
- pygame.mixer.music.stop()
- msg = "恭喜你完成专注(" + str(tt) + "分钟)!"
- title = "TurtlrTomato"
- choice = ["完成"]
- c4 = g.buttonbox(msg,title,choice)
- if c4 == "完成":
- import datetime
- nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
- with open('history.txt', 'a+') as f:
- f.write(str(nowTime) + str(do) + str(tt) + "分钟")
- f.write('\r\n')
- with open('time.txt','a+') as f:
- f.write("1")
- msg = "是否休息?"
- title = "TurtleTomato"
- cho = ["是","否"]
- c6 = g.buttonbox(msg,title,cho)
- if c6 == "是":
- pygame.mixer.music.play()
- for i in range(301):
- print(301 - i)
- time.sleep(1)
- pygame.mixer.music.stop()
- g.msgbox("继续干起来!")
- elif c1 == "历史记录":
- a = open("history.txt")
- b = a.read()
- g.msgbox(b)
- elif c1 == "退出":
- exit(0)
- elif c1 == "设置":
- msg = "设置"
- title = "TurtleTomato"
- choice5 = ["设置开始密码","版本信息","番茄工作法"]
- c5 = g.buttonbox(msg,title,choice5)
- if c5 == "设置开始密码":
- mima = g.enterbox('密码?(数字)')
- with open('mimas.txt', 'w') as f:
- f.write(str(mima))
- with open('1.txt', 'w') as f:
- f.write(str(1))
- elif c5 == "版本信息":
- g.msgbox("1.0.0")
- elif c5 == "番茄工作法":
- g.msgbox("番茄工作法是简单易行的时间管理方法.使用番茄工作法,选择一个待完成的任务,将番茄时间设为25分钟,专注工作,中途不允许做任何与该任务无关的事,直到番茄时钟响起,然后进行短暂休息一下(5分钟就行),然后再开始下一个番茄。每4个番茄时段多休息一会儿。番茄工作法极大地提高了工作的效率,还会有意想不到的成就感。")
- elif c1 == "番茄统计":
- a = open('time.txt')
- b = a.read()
- time = len(b)
- g.msgbox("您一共专注了" + str(time) + "次!")
复制代码
请保存:
链接: https://pan.baidu.com/s/1SP5GTobGgG5ViFSz0ajNFA
提取码: j7jb
请多指教!!! |
|