Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[第 98 期] [自荐] Terminal 应用:番茄工作法 🍅 Tomato Clock #1118

Open
coolcode opened this issue Mar 9, 2020 · 0 comments
Open

Comments

@coolcode
Copy link

coolcode commented Mar 9, 2020

GITHUB: https://github.com/coolcode/tomato-clock

  • Terminal + python3
  • 集成桌面通知 terminal-notifier
  • 集成 mac 语音通知
  • 集成 ubuntu 桌面通知

🍅 Tomato Clock

Python package

Tomato Clock is a simple command line pomodoro app.

Pomodoro 番茄工作法 https://en.wikipedia.org/wiki/Pomodoro_Technique

Installation

Install python from https://www.python.org/

  • Install via pip:
$ pip install tomato-clock
  • Install via source code:
$ git clone https://github.com/coolcode/tomato-clock.git
$ cd tomato-clock
$ chmod +x tomato.py 

How to use

  • if you install via pip

$ tomato         # start a 25 minutes tomato clock + 5 minutes break
$ tomato -t      # start a 25 minutes tomato clock
$ tomato -t <n>  # start a <n> minutes tomato clock
$ tomato -b      # take a 5 minutes break
$ tomato -b <n>  # take a <n> minutes break
$ tomato -h      # help
  • if you install via source code
$ ./tomato.py         # start a 25 minutes tomato clock + 5 minutes break
$ ./tomato.py -t      # start a 25 minutes tomato clock
$ ./tomato.py -t <n>  # start a <n> minutes tomato clock
$ ./tomato.py -b      # take a 5 minutes break
$ ./tomato.py -b <n>  # take a <n> minutes break
$ ./tomato.py -h      # help

Terminal Output

🍅 tomato 25 minutes. Ctrl+C to exit
 🍅🍅---------------------------------------------- [8%] 23:4 ⏰ 

Desktop Notification

  • MacOS
$ brew install terminal-notifier 

terminal-notifier actually is a cross-platform desktop notifier, please refer to ➜ terminal-notifier

terminal-notifier

  • Ubuntu

notify-send

ubuntu-notification

Voice Notification

We use say(text-to-speech) for voice notification

  • MacOS

MacOS already has say. see here or more detail

  • Ubuntu

see this link: say

sudo apt-get install gnustep-gui-runtime

Package & Publish

pip install setuptools wheel twine
rm -rf dist && python setup.py sdist bdist_wheel
twine upload dist/*
@coolcode coolcode changed the title [自荐] Terminal 应用:番茄工作法 [自荐] Terminal 应用:番茄工作法 🍅 Tomato Clock Mar 9, 2020
@ruanyf ruanyf changed the title [自荐] Terminal 应用:番茄工作法 🍅 Tomato Clock [第 98 期] [自荐] Terminal 应用:番茄工作法 🍅 Tomato Clock Mar 10, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant