jazz-it/dline: A tool that presents important data in the form of a calendar directly within your terminal.
dLine is a multifunctional command line tool that can display important information in the form of a calendar directly in the terminal. It monitors key dates, simplifies event addition via API, and calculates time spans for various event types.
dLine is designed for developers to simplify event management and schedule navigation without leaving the terminal.
- Dynamic view: execution time
dline
Without any parameters, it immediately displays the events scheduled for this month. Previous dates are shaded blue, emphasizing future events. Event types are color-coded for easy identification, and icons provide visual cues. Additionally, you can quickly hide specific categories for a clearer display – more details on this feature later. Activities are neatly organized by week, with a clear division between the first and second half of each month.
It is the default view, so named because it is an automated process that runs in the background, independent of user input.
-
Static view: when you run
dline -m yyyy/mm
enter static view mode. Unlike its more dynamic counterpart, the static view remains static, making it ideal for users who just want a monthly calendar. In this mode, the calendar displays events for the selected month, following the same configuration as the dynamic view. However, it stands out with its headerless design, which omits any additional frills. Notably, past dates are not shaded, ensuring a consistent and uninterrupted view throughout the month. -
Event Calculator View: If you need to quickly calculate the number of days, just enter
dline -w
and the date range you specify. This command saves you the monotony of manual finger counting. dLine simplifies your life by dividing activity into weekdays and weekends and then providing total totals. This kind of arithmetic is effortless for computers to handle, but very time-consuming for us humans, especially when calculating sick days or determining the amount of vacation you can take without working. -
Management: Start file management with simple operations
dline -b
Order. Think of “b” not just as a “base” but as a branching point for the calendar configuration. Involved in full range of CRUD operations to produce and manage multiple calendar data sets. Whether you’re part of an international team or freelance across borders, switching environments is seamless. For those working globally, tracking public holidays in different countries is now just a few keystrokes away. Profile management in dLine is a set of flags that increase your control. runningdline -h
Go explore them. You’ll find options to resolve past deadlines, initiate API imports, force updates, and manage data using edit, delete, view, and clean commands. There is even a way to kill all reminder processes.
On first launch, dLine will prompt you to select your subregion. This allows it to obtain public holidays and school holidays specific to your area.
Usage:
dline -a Add event (interactive mode)
dline -a 2024/04/17 3 "11:30 Lunch with Lucy" Add event directly
dline Show current month calendar
Options:
-a, --add [yyyy/mm/dd] [x] [desc] Add event. No args invokes interactive mode
-b, --base Manage your data, as snapshots of your changes
(file management)
-c, --clean Remove old entries
-d, --delete [GCA|OHA|pattern] Delete imported calendars, or local matching entries.
-e, --export Export calendar to TSV format
-f, --filter [x] [x] ... Toggle visibility of one or more categories
-h, --help Show help
-i, --import [TSV|GCA|OHA] Import events from external sources
-k, --kill Terminate pending reminders
-l, --legend Toggle legend display
-m, --month [yyyy/mm] Show monthly calendar
-o, --open Open data file in terminal editor
-p, --print-details Toggle calendar details
-r, --resolve Interactive dialogue to resolve deadlines
-s, --school [0|1] Set school holidays as work days (0) or holidays (1)
-t, --test [yyyy/mm/dd] Set "today" for testing
-u, --update [GCA|OHA] | [pattern] [yyyy/mm/dd] [x] [desc] Update from APIs or local matching entries
-v, --version Show version
-w, --workdays [start_date] [end_date] Calculate workdays from optional start_date
(default: today) to end_date
-x, --xdg-open Open data file in GUI editor
Event categories [x]:
1: Deadline
2: Work
3: Personal
4: Birthday & Anniversary
5: Public Holiday
6: Vacation
7: Sick Leave
8: School Holiday
- Automated process:
- Dynamic View operates autonomously and continuously monitors your calendar data.
- It requires no explicit user input; hence the name “dynamic”.
- Countdown to deadline:
- The background process will try to find the most relevant deadline.
- It looks into the foreseeable future, spanning up to 6 months or until the end of this year (whichever is further), scanning for unresolved deadlines.
- Additionally, it scans the relevant past, up to 1 month ago, for overdue deadlines.
- Target? Showing you a countdown of the most important recent unresolved events.
- Foreseeable events:
- In addition to deadlines, dynamic views can identify other important events.
- It predicts events that require your attention within a specific time frame (up to 48 hours in advance).
- If such an event exists, it establishes a time trigger for the popup notification.
- These countdowns continue even if you restart your computer, thanks to
at
Order.
- Maintenance and updates:
- Dynamic views handle routine maintenance tasks.
- Cleanup: Remove outdated or irrelevant material.
- Automatic update: Get new calendar events from API.
- You can configure the timing and frequency of these processes via
.dlinerc
document. - It also supports user translation and customized color schemes to ensure a personalized experience.
All in all, Dynamic View is your new default proactive calendar companion that silently manages deadlines, events, and data hygiene.
use dline -f
and enter the category code you want to see or hide (e.g. dline -f 4 6 8
). This feature simplifies your calendar so you can focus on the categories that matter most to you at any given time.
.dlinerc
: System-wide settings such as user translations, color themes, cleaning frequencysettings.json
: Calendar-specific preferences
events_data.txt
: Default data file, but when creating a new calendar, a new file with a prefix will be added. You can switch between existing calendars in the following waysdline -b
>Select
.
Clone the repository as usual and install the following items before running it for the first time:
https://salsa.debian.org/debian/at
https://github.com/jqlang/jq
https://github.com/insanum/gcalcli
https://github.com/junegunn/fzf
https://github.com/pyrho/hack-font-ligature-nerd-font
With the right settings, dLine can integrate with your Google Calendar. By aligning your calendar categories with the dLine system, you can import events directly to access your schedule locally or through Google Calendar, depending on your preference. Important solutions to related issues.
Holiday data is based on Open holiday API
dline -a 2024/07/04 3 Buy milk
- Add event (
yyyy/mm/dd x desc
), Wherex
is the category code,desc
is an arbitrary description with special cases where the description can behh:mm
time format (which will eventually trigger a pop-up scheduled reminder) and can end with any hashtag (e.g.#projectX
) to make it easier to handle events related to a single topic.
- Delete all events marked with
#projectX
.
- Use codes 4 (Birthdays and Anniversaries), 6 (Holidays), and 8 (School Holidays) to toggle the visibility of the event.
- Trigger calendar import from Google Calendar in interactive mode. Read the documentation in the project
gcalcli
First. The same action will be triggered the first time you run it, so you may need to do it again if you need to import a new calendar.
- If you are a student, execute this command to ensure that your school holidays appear as rest days, not working days.
- If you are a parent, please use this directive to treat school holidays in your area as regular working days. It can remind you to always know when your child is out of school.
- Displays a static monthly calendar without triggering any automatic background processes.
dline -w 2024/01/01 2024/12/31
- After adding all calendars to dLine, you can use the above command to evaluate a specific time span. It helps you determine the number of different event categories within a specified time range. This feature has proven particularly useful for freelancers who charge on a workday basis, allowing them to calculate holidays, sick days, weekends, and workdays before providing a quote to a client.
Visualizing your time is crucial to making the most of every moment and achieving your goals effectively. Even small distractions can impact productivity.
Attention, curious developers! We’ve hidden a harmless Easter egg surprise in this project. No backdoor, guaranteed! Find it and earn a spot in our “Hall of Fame.” Happy coding! 🚀
2024-12-14 10:06:57