https://github.com/lajule/tl
Create time logs from terminal
https://github.com/lajule/tl
bash command-line-tool
Last synced: 5 months ago
JSON representation
Create time logs from terminal
- Host: GitHub
- URL: https://github.com/lajule/tl
- Owner: Lajule
- Created: 2024-04-08T14:21:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-18T13:05:35.000Z (over 1 year ago)
- Last Synced: 2025-02-18T14:22:47.250Z (over 1 year ago)
- Topics: bash, command-line-tool
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tl
This shell script provides a simple command-line utility to log and convert time data between different units such as seconds, minutes, hours, days, and weeks. It is designed to help track time spent on tasks by logging them and allowing for conversions between different time units for ease of understanding and reporting.
## Features
* Log time data with a custom label.
* Convert time into seconds, minutes, hours, days, or weeks.
* Reset the time log.
* Output the accumulated time data in a human-readable format.
## Requirements
- Bash
- `bc` (for basic calculations)
## Installation
1. Clone this repository or download the script directly.
2. Ensure the script is executable:
```sh
chmod +x tl
```
## Usage
Run the script with the following syntax:
```sh
./tl [options] [label]
```
Options:
* -s: Silent mode. No output is printed.
* -r: Reset the time log by removing the data file.
* -S: Output time in seconds.
* -m: Output time in minutes.
* -h: Output time in hours.
* -d: Output time in days.
* -w: Output time in weeks.
* -H: Output time in a human-readable format (default).
Labels are used to log time for different tasks. Each label should consist of alphanumeric characters only. Non-alphanumeric labels will result in an error.
The script stores its data in a file named ~/.tl by default. You can change the data file by setting the TLFILE environment variable to your preferred file path.