Minutaria is a basic educational Python timer used to learn python and software testing libraries.

Related tags

Miscellaneouspython
Overview

minutaria

minutaria is a basic educational Python timer.

The project is educational, it aims to teach myself programming, python programming, python's stdlib, tools (pdb, venv, mypy...) and ecosystem, development best pratices, git and some software testing libraries or frameworks.

minutaria.png

The project is separed in 3 parts:

  • a module as a library
  • a CLI utility
  • a simple ncurses GUI using parts of the module, also usable with CLI
  • a GTK GUI using the full module and so also usable with CLI

Done

  • Use OOP approach
  • Use datetime module
  • Display time ISO 8601 format like as hh:mm:ss.n
  • Use argparse module to build the CLI utility
  • Manage presets and use json module to store them
  • ncurses interface via curses Python standard module with basic start/relaunch/quit command also usable with the lib's CLI
  • Gradually introduce type hints
  • Some fixes with Flake8 and PyLint
  • Minimal documentation
  • Minimal log system
  • Unit tests with unittest and pytest without test run
  • packaging
  • Usable with a GTK GUI and so:
    • reset the timer
    • pause/continue the timer
    • add/use/manage presets
    • play a sound at 00:00:00.0
    • manage alarm volum
    • display an "About" window.

Dependencies

Nothing except Python 3 and modules from the standard library for the lib and the ncurses TUI, currently :

  • datetime, argparse, logging and json for the lib
  • curses, datetime, logging and os for the ncurses interface.

The GTK GUI naturally use GTK and also use cheofusi's just-playback library for playing sound, licensed under the MIT License.

For the GTK GUI, please follow the guide to install it.

For me, in short, on Debian :

  • Create virtual environment if not already done:
    python3 -m venv venv
  • Enter it:
    source venv/bin/activate
  • Execute the following command to install the build dependencies and GTK:
    sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
  • Execute:
    pip3 install pycairo
  • Execute
    pip3 install PyGObject
  • For just-playback:
    pip3 install just_playback
A requirement.txt is inclued in this repository for the three last steps, you can use it with:
pip3 install -r requirements.txt

Use

libminutaria.py is a library module which provides everything to create the timer application. It is testable by beeing launched in a terminal emulator which executes a default 5 seconds timer.

minutaria-cli.py contains a fully usable command line interface to libminutaria. It executes a default timer if launched without argument. Presets created by this way are stored in a JSON file. Use -h/--help arguments for more information.

minutaria-curses.py contains the basic ncurses interface and so shall be launched via command line. It offers a start/pause/continue/relaunch/quit functionality and is fully usable with CLI arguments identically to minutaria-cli.py. This user interface shall only be use on Unix system as the Windows version isn't included in the standard library, the script contains a WINDOWS_CHECK parameter for this purpose. Nervertheless it should be usable with WSL (not tested).

minutaria-gtk.py contains the GTK interface (see the picture) to libminutaria. It offers the same functionalities plus alarm sound (sound configurable) at time up :

  • To add a preset, enter a name and select a duration before pressing the button "Add".
  • To delete a preset, select it from the list of existing preset before pressing the "Delete" button.
  • To rename a preset, select it from the list and enter a new name before pressing the "Rename" button.
  • To set a new duration to a preset, select it from the list and select a duration before pressing the "Set timing" button.
  • To launch a timer, select a duration with the spin button or select an existing preset from the list then press "Start/Pause".
  • To pause, press "Start/Pause" again.
  • "Reset/Stop" is used to stop the alarm, stop the timer and reset it.
  • The volume of the alarm can be managed by the volume button (scale).
  • An "About" dialog is available from the option/menu button.

To use any interface to libminutaria, libminutaria shall be installed. As it is an educational project, do it in a virtual environment :

  • Create virtual environment if not already done:
    python3 -m venv venv
  • Enter it:
    source venv/bin/activate
  • Install/update PyPA’s build:
    python3 -m pip install --upgrade build
  • Build from the source:
    python3 -m build
  • Install the .whl file found in dist/:
    python3 -m pip install dist/libminutaria-1.0-py3-none-any.whl

libminutaria shall also be install the same way to launch tests from the tests directory.

License

minutaria is licensed under the MIT/Expat License. See LICENSE file for details.

For the assets, see the file attribution.rst in the assets/ directory.

Fortnite StW Claimer for Daily Rewards, Research Points and free Llamas.

Fortnite Save the World Daily Reward, Research Points & free Llama Claimer This program allows you to claim Save the World Daily Reward, Research Poin

PRO100KatYT 27 Dec 22, 2022
Vita Specific Patches and Application for Doki Doki Literature Club (Steam Version) using Ren'Py PSVita

Doki-Doki-Literature-Club-Vita Vita Specific Patches and Application for Doki Doki Literature Club (Steam Version) using Ren'Py PSVita Contains: Modif

Jaylon Gowie 25 Dec 30, 2022
NYCU(NCTU)-差勤-助教

NCTU-TA-fill 填寫 差勤-助教時數 有沒有覺得在差勤系統填助教時數有點浪費生命? 今天有個懶鬼浪費好多時間幫大家寫了code 只要填好的必要的資料,就可以讓電腦自動幫你完成差勤助教的時數填寫喔! https://pt-attendance.nctu.edu.tw/verify/userL

14 Dec 21, 2021
Python code for YouTube videos.

#This is a open source project. Python 3 These files are mainly intended to accompany my series of YouTube tutorial videos here, https://www.youtube.c

Joe James 1.3k Dec 26, 2022
Web interface for browsing, search and filtering recent arxiv submissions

Web interface for browsing, search and filtering recent arxiv submissions

Andrej 4.8k Jan 08, 2023
Monochrome's API, implemented with Deta Base and Deta Drive.

Monochrome Monochrome's API, implemented with Deta Base and Deta Drive. Create a free account on Deta to test this out! Most users will prefer the Mon

Monochrome 5 Sep 22, 2022
Template for pre-commit hooks

Pre-commit hook template This repo is a template for a pre-commit hook. Try it out by running: pre-commit try-repo https://github.com/stefsmeets/pre-c

Stef Smeets 1 Dec 09, 2021
Neptune client library - integrate your Python scripts with Neptune

Lightweight experiment tracking tool for AI/ML individuals and teams. Fits any workflow. Neptune is a lightweight experiment logging/tracking tool tha

neptune.ai 353 Jan 04, 2023
Zues Auto Claimer Leaked By bazooka#0001

Zues Auto Claimer Leaked By bazooka#0001 put proxies in prox.txt put ssid in sid.txt put all users you want to target in user.txt for the login just t

1 Jan 15, 2022
Yakuake session management

yman is a python script used for saving/restoring yakuake sessions (currently running commands, working directories, environment variables, tab titles)

Szymon Borecki 6 Jun 25, 2022
A compilation of useful scripts to automate common tasks

Scripts-To-Automate-This A compilation of useful scripts for common tasks Name What it does Type Add file extensions Adds ".png" to a list of file nam

0 Nov 05, 2021
tool to automate exploitation of android degubg bridge vulnerability

DISCLAIMER DISCLAIMER: ANY MALICIOUS USE OF THE CONTENTS FROM THIS ARTICLE WILL NOT HOLD THE AUTHOR RESPONSIBLE HE CONTENTS ARE SOLELY FOR EDUCATIONAL

6 Feb 12, 2022
A Python simple Dice Simulator just for fun

Dice Simulator 🎲 A Simple Python Dice Simulator 🧩 🎮 💭 Description: That program make your RPG session more easy and simple. Roll the dice never be

Lauro Brant 17 May 14, 2022
This simple script generates a backup of a given Python and R environment

Python Environment Backup It’s always good to maintain your Python and R Anaconda environment packages properly listed and well-kept in case you have

Andrew Laganaro 1 Jul 13, 2022
Pyhexdmp - Python hex dump module

Pyhexdmp - Python hex dump module

25 Oct 23, 2022
To lazy to read your homework ? Get it done with LOL

LOL To lazy to read your homework ? Get it done with LOL Needs python 3.x L:::::::::L OO:::::::::OO L:::::::::L L:::::::

KorryKatti 4 Dec 08, 2022
Sample microservices application demo

Development mode docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d or export COMPOSE_FILE='docker-compose.yml:docker-compose.dev.ym

Konstantinos Bairaktaris 1 Nov 14, 2021
🍞 Create dynamic spreadsheets with arbitrary layouts using Python

🍞 tartine What this is Installation Usage example Fetching some data Getting started Adding a header Linking more cells Cell formatting API reference

Max Halford 11 Apr 16, 2022
This is the old code for bitcoin risk metric, the whole purpose form it is to help you DCA your investment according to bitcoin risk.

About The Project This is the old code for bitcoin risk metric, the whole purpose form it is to help you DCA your investment according to bitcoin risk

BitcoinRaven 2 Aug 03, 2022
Find Transposon Element insertions using long reads (nanopore), by alignment directly. (minimap2)

find_te_ins find_te_ins is designed to find Transposon Element (TE) insertions using long reads (nanopore), by alignment directly. (minimap2) Install

Ming Wang 1 Feb 09, 2022