dLine - a productivity tool

I made a script as a simple productivity tool that presents important data in the form of a calendar. It monitors critical dates, simplifies event addition via APIs, and calculates timespans for various event types. It’s a project that I’ve found personally fun to use and quite useful, so I’m sharing it in the hopes that it might be of use to others as well. It’s an early stage and your feedback and contributions on GitHub are most welcome.

Designed for developers, dLine streamlines event management and schedule navigation without requiring you to leave the terminal. The script utilizes the OpenHolidaysAPI and provides an easy access to localized holidays specific for your region (in case you live in Europe).

Short intro on YouTube: https://www.youtube.com/shorts/aZMAY2oSTks

Introduction to dLine

Usage/Examples

dline -a 2024/07/04 2 Refactor myFunction
  • Adding a new event (yyyy/mm/dd x desc), where x is the category code, desc is an arbitrary description with a special case where the description may start with hh:mm time format (which will eventually trigger a scheduled reminder as a popup) and may end with any hashtag (e.g. #projectX) for easier event handling related to a single topic.
dline -d "#projectX"
  • Deleting all events tagged with #projectX.
dline -f 4 6 8
  • Toggling visibility of events with codes 4 (Birthday & Anniversary), 6 (Vacation) and 8 (School Holiday).
dline -i GCA
  • Triggers an import of calendar(s) from Google Calendar in interractive mode. Read the docs from the project gcalcli first. The same operation will be triggered during the very first run, so you may want to run it again if you need to import a new calendar.
dline -s 1
  • In case you’re a student, run this to make sure your School Holidays are shown as days off, not as work days.
dline -s 0
  • If you’re a parent, use this command to view School Holidays in your region as regular work days. It serves as a reminder to stay informed about when your kids will be off from school.

:hatching_chick: Easter Egg Alert! :hatching_chick:

Dear fellow devs, speaking of the xz drama that shook the Linux community quite recently… Yeah, the one where someone tried to sneak in a backdoor. :scream:

Well, fear not! We’ve got your back. Introducing our harmless Easter Egg — a digital wink to keep things light. No backdoors here, just a playful challenge.

Your Mission:

  1. Inspect the Code: Dive into the repo like a code detective.
  2. Search High and Low: Look for anything quirky. Comments, function names, variable spells — anything out of the ordinary.
  3. When You Spot It: Celebrate! You’ve cracked the code (literally) and found my appropriate Easter Egg, right after Easter.

And guess what? The first sleuth to find it gets a virtual high-five and a spot in our “Hall of Fame”. :raised_hands:

Remember, it’s all in good fun. No secret societies or secret handshakes required. Happy hunting, code warriors and have fun! :rocket:

7 Likes

The inclusion of Zeller’s congruence isnt exactly dramatic/unexpected, but still neat to see.

1 Like

Cool app! Impressively programmed in bash no less! :clap: :raised_hands:

I’m hoping eventually the OpenHolidaysAPI will support US / EN as a supported country. Then it would be more useful for me, although maybe another country has enough similarity in holidays. :thinking:

I found it! :wink: Also found and fixed a few typos. One was a variable name for the --school flag from getopts, so it might matter. I couldn’t fully test because I ran into another issue (I’ll add that to GitHub later) :person_shrugging:

EDIT:

I found and fixed a few more things (bugs :bug:)

2 Likes

Thank you! :wink: I still use it on daily basis and find it quite handy. I hope OpenHolidaysAPI will support US/EN as well, but since it’s open source, maybe you may even consider to contribute.

Great! Thanks for your contribution and I’ll add you to the “Hall of Fame”. :clap: :smiley:

Perfect! I’ll dive into it by the end of the weekend. :+1:

1 Like

Actually, you don’t even need OpenHolidaysAPI for unsupported countries. I just remembered I had this in mind as an additional feature on my list a year ago.

You may want to experiment with creating a new Google Calendar, just for public holidays that are valid for your country, then you may want to run dline --import GCA. When dline prompts you to “Select a corresponding category”, just enter a number next to “Public Holiday” to label all those entries properly with dline.

The same procedure could be applied for school holidays, etc.

1 Like