Devember 2022 | Obsidian Notes to Excel Template to PDF then Send via Email

Work Log Tool

TLDR; In Python, write an application that extracts text from files in a specific folder in an Obsidian Vault, transfers it to a spreadsheet, exports that to a PDF, then emails it to a specific address.

Brief About Me:

I’ve been an off and on hobby programmer for a while but, I still consider myself a beginner as I’ve never applied myself 100%. I’d like to utilize Devember 2022 to improve my programming skills to eventually transition to software development as a career.

The Problem:

When starting and finishing a work task, I log the start time, the customer, and the end time. I do this for each task, for each day of the week I work. I log this information in Apple Notes on my iPhone as I don’t always have my laptop open and ready/computer is not always an option. Prior to the end of the work week, I will transfer this information to a spreadsheet template drafted by my accounting department, then I will email it back to them in a pdf format. Some of you may be asking why don’t I just input this information directly into the spreadsheet. Reason: I strongly dislike the spreadsheet editing experience on a mobile device. This function can take a total of around 50 minutes per week depending on how many customers I’ve done work for.

The Solution:

Why commit just 50 minutes per week doing that task when I can commit from now to the end of January automating it? :slight_smile:

I heard @Wendell mention the markdown editor Obsidian during an episode of the Self Hosted podcast. I pretty much only listen to the L1Techs podcast so I would not have tried Obsidian if not for that. Since then, I’ve switched entirely over to Obsidian with the sync feature. It’s rather great! :+1: Switching to Obsidian allows me to access the data locally which is a huge plus.

Project Requirements

  • Must be written in Python.
  • Must be configurable in a config file.
    • Perhaps TOML.
  • Must have a user interface.
    • I’ve been experimenting with CustomTkinter recently so why not? :slight_smile:
  • Must extract task date, task start time, task end time, task type, and task description from an Obsidian file.
  • Must insert the parsed data into a spreadsheet.
  • Must convert the spreadsheet into a PDF format.
  • Must email the output PDF to a specific email address.

Things I expect to learn during this project:

  • How to extract information in uniform formats.
  • Introductory UI design.
  • Various packages of the Python ecosystem.
  • How to send emails using Python.
  • Maybe learn to use github. I haven’t decided.

This is my first Devember. I expect to benefit from it greatly. I know ahead of time that I will not be able to commit a full hour every day but, I am happy to participate regardless.

I look forward to the next several weeks! Have fun, everyone!

1 Like

I’m entirely new to using GitHub but, have decided to make one anyways as Devember 2022 should prove to be a good opportunity to learn. There’s not much in the repository currently but, I will add things as I go along.

Sunday, 11DEC2022 Update!

I’ve made the initial commit of main.py and a basic README.md.
Currently, it’s just a basic UI with some empty callback functions.
You can view it on GitHub.

I’ll undoubtedly be able to commit at least 1 hour per day on Saturdays and Sundays for coding but, during the work week my time commitment will likely fall short of the 1 hour per day goal. I still intend to meet the daily time commitment whenever possible. It was a successful first day of my Devember2022 challenge. I’ll make another post here once I have a substantial update to provide.

Saturday, 17DEC2022 Update!

It’s been difficult to code uninterrupted for 1 hour each day of the week. I’ve managed to get a brief 10 to 15 minutes in per day since my last update. This morning I managed to code for about 2 hours though so that’s a big win in my book. It was a beneficial experience of learning about the PEP 8 style guide as well as some functions that come packaged with Python.

Still learning how to properly use GitHub so please forgive me for any improper usage. I’ve added a dev branch to push code I’m still working on but, that’s not quite ready for an end user.

So far, I’ve added a dataclass for storing individual task data as well as a class called “TaskMaster” for accessing the task files, parsing their data, and storing them in dataclass objects.

As a side project I see other programmers do, I managed to quickly put together a downloads folder organizer using toml as a method of configuring the program. I want to use toml for my main project so I figure I’d try it out with something much smaller first. I posted this side project on my Github profile too. This was just a side project but, I’ve been using it with the Windows task scheduler and it’s proven to be quite useful with how much stuff I download for my irl job so I’ll likely be continuing to improve this.

I will likely be able to put more time into the main project today while my children are napping. Thanks for reading!

Second update for 17DEC2022!

I’ve successfully implemented the parsing functions. The program can now read my notes how I write them. I plan to make the parsing functions capable of handling errors as I make progress but, for now I am glad one of the core components of my program is functioning as I intended it to. I’ve pushed this to the dev branch on my GitHub for those that would like to view the code.

The next function I need to implement is inserting the data into a spreadsheet without altering the existing elements on the spreadsheet. I’ve never done any work with spreadsheets in Python before so here goes nothing.

This will be my last update for today.

Thanks for reading!

I haven’t had as many opportunities to work on this as I’d like. Holiday family time and traveling has taking priority but, I plan on getting back to this or pivoting my Devember project to another area.