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.

Library for RadiaCode-101

RadiaCode Библиотека для работы с дозиметром RadiaCode-101, находится в разработке - API не стабилен и возможны изменения. Пример использования (backe

Maxim Andreev 56 Nov 29, 2022
Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything.

Retrying Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

Ray Holder 1.9k Dec 29, 2022
Button paginator using discord_components

Button Paginator With discord-components Button paginator using discord_components Welcome! It's a paginator for discord-componets! Thanks to the orig

Decave 7 Feb 12, 2022
Library support get vocabulary from MEM

Features: Support scraping the courses in MEM to take the vocabulary Translate the words to your own language Get the IPA for the English course Insta

Joseph Quang 4 Aug 13, 2022
In this project , I play with the YouTube data API and extract trending videos in Nigeria on a particular day

YouTubeTrendingVideosAnalysis In this project , I played with the YouTube data API and extracted trending videos in Nigeria on a particular day. This

1 Jan 11, 2022
☘️ Projet Voltaire Solver in Python3

☘️ Projet Voltaire Solver in Python3

Bidouffe 8 Dec 02, 2022
Script to produce `.tex` files of example GAP sessions

Introduction The main file GapToTex.py in this directory is used to produce .tex files of example GAP sessions. Instructions Run python GapToTex.py [G

Friedrich Rober 2 Oct 06, 2022
This is the Halloween edition of my Flask Greeting App - HAPPY HALLOWEEEN EVERYONE! :)

HalloweenGreetingApp HAPPY HALLOWEEN EVERYONE! :) This is the Halloween Edition of my Flask Greeting App! Please note, this application is mean to be

Mariya 2 Feb 04, 2022
Convert long numbers into a human-readable format in Python

Convert long numbers into a human-readable format in Python

Alex Zaitsev 73 Dec 28, 2022
Coderslab Workshop Projects

Workshop Coderslab workshop projects that include: Guessing Game Lotto simulator Guessing Game vol.2 Guessing Game vol.3 Dice 2001 Game Technologies P

Szymon Połczyński 1 Nov 06, 2021
Nuclei - Burp Extension allows to run nuclei scanner directly from burp and transforms json results into the issues

Nuclei - Burp Extension Simple extension that allows to run nuclei scanner directly from burp and transforms json results into the issues. Installatio

106 Dec 22, 2022
Installer, package manager, build wrapper and version manager for Piccolo

Piccl Installer, package manager, build wrapper and version manager for Piccolo

1 Dec 19, 2021
A person does not exist image bot

A person does not exist image bot

Fayas Noushad 3 Dec 12, 2021
The mock Pokemon Environment I built in 2019 to study Reinforcement Learning + Pokemon

ghetto-pokemon-rl-environment ##NOT MAINTAINED! Fork and maintain yourself. Environment I made back in 2019 to use Pokemon to practice reinforcement l

2 Dec 09, 2021
Strong Typing in Python with Decorators

typy Strong Typing in Python with Decorators Description This light-weight library provides decorators that can be used to implement strongly-typed be

Ekin 0 Feb 06, 2022
GitHub Actions Version Updater Updates All GitHub Action Versions in a Repository and Creates a Pull Request with the Changes.

GitHub Actions Version Updater GitHub Actions Version Updater is GitHub Action that is used to update other GitHub Actions in a Repository and create

Maksudul Haque 42 Dec 22, 2022
This repo contains scripts that add functionality to xbar.

xbar-custom-plugins This repo contains scripts that add functionality to xbar. Usage You have to add scripts to xbar plugin folder. If you don't find

osman uygar 1 Jan 10, 2022
A maubot plugin to invite users to Matrix rooms according to LDAP groups

LDAP Inviter Bot This is a maubot plugin that invites users to Matrix rooms according to their membership in LDAP groups.

David Mehren 14 Dec 09, 2022
DSG - Source code for Digital Scholarship Grant project.

DSG Source code for Dr. Stephanie Tsang's Digital Scholarship Grant project. Work performed by Mr. Wang Minghao while as her Research Assistant. The s

1 Jan 04, 2022
A Red Team tool for exfiltrating sensitive data from Jira tickets.

Jir-thief This Module will connect to Jira's API using an access token, export to a word .doc, and download the Jira issues that the target has access

Antonio Piazza 82 Dec 12, 2022