Home

Awesome

dLine

<img align="left" src="https://i.imgur.com/WbhVnb5.png" height="130" alt="Logo"> dLine is a simple and powerful command-line tool that brings your calendar directly to your terminal. You can track important dates, add events quickly using APIs, calculate timespans, and manage multiple calendars—all without leaving your terminal.

Designed for developers, dLine makes managing your schedule smooth and efficient.

Features

Features

On the first launch, dLine will ask for your region to fetch relevant holidays. Don't worry — you can change this later if needed.

Introduction on YouTube:

Introduction to dLine

Screenshots

Dynamic View Dynamic View

Static View Static View

Event Calculator View Event Calculator View

Admin File & Data Management

Documentation

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

Default View:

  1. Automated Processes:
  1. Countdown to Deadlines:
  1. Foreseeable Events:
  1. Maintenance and Updates:
  1. Automatic Updates: Fetching fresh calendar events from APIs.

In summary, the Dynamic View is your new default, proactive calendar companion, silently managing deadlines, events, and data hygiene.

Categories Filtration:

Use dline -f and input the category codes you wish to view or hide (e.g. dline -f 4 6 8). This feature simplifies your calendar, allowing you to focus on the categories that matter most to you at any given time.

Config Files:

Data File:

Installation

Required Dependencies:

Before the first run, make sure you have:

https://salsa.debian.org/debian/at
https://github.com/jqlang/jq

Optional Dependencies (recommended):

https://github.com/insanum/gcalcli
https://github.com/junegunn/fzf
https://github.com/pyrho/hack-font-ligature-nerd-font

With the right setup, dLine could integrate with your Google Calendar. By aligning your calendar categories with dLine's system, you can import events directly, making your schedule accessible locally or via Google Calendar, according to your preference. Important resolution of a relevant issue.

Credits:

Holiday data based on OpenHolidays API

Minimum Requirements:

Bash Version: dLine requires Bash 4.0 or newer. Older versions (e.g., Bash 3.x on macOS) will not work correctly due to unsupported features like associative arrays.

Holiday Data and Google Calendar Integration:

If OpenHolidaysAPI doesn't support your country, you can still integrate holidays by:

  1. Creating a separate Google Calendar for public holidays in your region.

  2. Running dline --import GCA to sync it with dLine.

  3. Assigning the imported events to the “Public Holiday” category during the setup prompt.

This process works for School Holidays and other custom calendars too!

Filtering Events with fzf

When using dline -b, select "View" and choose a dataset. If fzf is installed, it will be triggered, allowing you to filter entries interactively. For example, you can filter all meetings in June this year labeled with #projectX easily using this feature.

Usage/Examples

dline -a 2024/07/04 3 Buy milk
dline -d "#projectX"
dline -f 4 6 8
dline -i GCA
dline -s 1
dline -s 0
dline -m 2024/10
dline -w 2024/01/01 2024/12/31

Appendix

Managing time effectively is key to productivity. dLine simplifies scheduling, so you can focus on what matters most.

Easter Egg Alert

Attention devs! There's a hidden Easter Egg in this project. If you find it, let us know and get featured in our "Hall of Fame". Happy coding! 🚀

Hall of Fame

James Cuzella (@trinitronx)