Skip to content

RanWurmbrand/diary-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diary Tool

A command-line interface (CLI) tool designed to help interns and professionals track their progress, reflect on accomplishments, and organize their work in an easy-to-use Excel diary. This tool simplifies the creation, management, and updating of your work diary, including an option to sync with Google Drive.

Features

  • Easy Diary Creation: Quickly set up new Excel work diaries with pre-defined headers and sections for intern details and relevant links.
  • Effortless Entry Addition: Add new daily or weekly entries including date, effort type, description, links, status, impact, and additional notes.
  • Automatic Reorganization: Reorganize your diary entries by date, grouping them by week for better readability and review.
  • Google Drive Synchronization: Seamlessly copy your diary files to Google Drive, ensuring your progress is backed up and accessible from anywhere.
  • Customizable Paths: Define default local paths for your files and easily specify Google Drive sync locations.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

  • Python 3.x
  • pip (Python package installer)

Installation

  1. Fork the repository: You'll want to fork this repository, whether you plan to contribute back to the project or simply want to make your own private modifications. This creates a copy of the project under your GitHub account.

  2. Clone your forked repository:

    git clone https://github.com/your_username/DiaryTool.git
    cd DiaryTool

    (Replace your_username with your actual GitHub username.)

  3. Install dependencies:

    First, create a requirements.txt file if you don't have one (it should include typer, openpyxl, python-dotenv):

    pip freeze > requirements.txt

    Then, install them:

    pip install -r requirements.txt

Configuration

Before you start using the Diary Tool, you need to set up your environment variables.

.env File Setup

The Diary Tool uses a .env file to manage paths for local file storage and Google Drive synchronization.

  1. Create a .env file: In the root directory of the project, create a file named .env.

  2. Refer to .example_env: You'll find a file named .example_env in the project directory. Use this as a template for your .env file.

    Your .env file should look something like this:

    GOOGLE_DRIVE_PATH="/run/user/1000/gvfs/google-drive:host=gmail.com/[email protected]/My Drive/Diary_Sync_Folder"
    DEFAULT_LOCAL_PATH="/home/your_user/Documents/MyDiaries"
    
    • GOOGLE_DRIVE_PATH: This is crucial for Google Drive sync. Follow the steps in the "Google Drive Synchronization" section to get the correct path. If this is not set, Google Drive synchronization will be skipped.
    • DEFAULT_LOCAL_PATH: This defines the default folder where your new diary files will be saved. It's highly recommended to define this.

Google Drive Synchronization (Linux Fedora Gnome)

The Google Drive synchronization feature has been tested primarily on Linux Fedora Gnome. Testing on other platforms would be greatly appreciated!

To set up Google Drive sync:

  1. Open Settings: Go to your system's "Settings" application.

  2. Navigate to Online Accounts: In the Settings menu, find and click on "Online Accounts."

  3. Connect Google Account: Add and connect your Google account.

  4. Grant File Permissions: Ensure that you grant permissions for "Files" (or "Drive") when connecting your Google account. This allows your system to access your Google Drive files.

  5. Go to Home: Open your file manager (Nautilus) and navigate to your "Home" directory.

  6. Locate Google Drive: At the bottom of the left sidebar in your file manager, you should see your Google email address. Click on it.

  7. Navigate to Specific Folder: Browse to the specific folder within your Google Drive that you want to sync your diary files into from your PC.

    (You might want to create a dedicated folder for your diaries, e.g., "My Drive/Work Diaries")

  8. Open Console and Copy Path:

    • Right-click within that specific Google Drive folder in your file manager.
    • Select "Open in Terminal" (or similar option).
    • In the terminal, type pwd and press Enter.
    • You will see a path that starts with something like /run/user/.... Copy this entire path. This is your GOOGLE_DRIVE_PATH.

    (Example: /run/user/1000/gvfs/google-drive:host=gmail.com/[email protected]/My Drive/Diary_Sync_Folder)

  9. Update .env: Paste the copied path into the GOOGLE_DRIVE_PATH variable in your .env file (as described in the ".env File Setup" section).

Usage

The Diary Tool is controlled via a shell interface.

To start the Diary Tool shell, run:

python app.py shell

Once inside the shell, you'll see a >>> prompt. You can type commands there.

Commands

Here's a list of available commands and their shortcuts:

Command Shortcut Description
help --help Displays a detailed list of all commands and their usage.
shortcuts --sc Displays a list of command shortcuts.
create-file c Guides you through creating a new Excel diary file.
open-file of Prompts for a file path to open an existing diary file.
open-file <path> of <path> Opens an Excel diary file directly using the provided path.
add-entry ae Adds a new entry to the currently open diary.
reorganize-by-date rbd Reorganizes all entries in the currently open diary by date, adding weekly separators.
quit q Exits the Diary Tool shell.

Export to Sheets

Example Workflow

  1. Start the shell:

    python app.py shell
  2. Create a new diary file:

    >>> create-file
    please enter the file name (e.g., my_file.xlsx) Please refrain from using special characters (e.g '/' ,'\\') etc.. my_diary
    file_name = 'my_diary.xlsx'
    please enter the target dir default [/home/your_user/Documents/MyDiaries]:
    Do you want to create the file 'my_diary.xlsx at /home/your_user/Documents/MyDiaries'? [y/N]: y
    creating file ' /home/your_user/Documents/MyDiaries/my_diary.xlsx...
    please enter your name: John Doe
    please enter your team name: Development Team
    please enter your manager name: Jane Smith
    do you want to add relevent links? (e.g, jira/github etc..) [y/N]: y
    ---
    Please enter the Row Title (e.g., GitHub): Jira
    For each subsequent link, ensure it is relevant only to this specific title.
    ---
    After entering a link, choose one of the following options:
      * f - To continue entering links for a new column.
      * s - To stop entering links and exit.
    ---
    https://jira.example.com/browse/PROJECT
    s
    file create successfully
    Do you want to copy '/home/your_user/Documents/MyDiaries/my_diary.xlsx' to Google Drive now? [y/N]: y
    Attempting to copy 'my_diary.xlsx' to Google Drive...
    Source: /home/your_user/Documents/MyDiaries/my_diary.xlsx
    Destination: /run/user/1000/gvfs/google-drive:host=gmail.com/[email protected]/My Drive/Diary_Sync_Folder/my_diary.xlsx
    Successfully copied 'my_diary.xlsx' to Google Drive.
    
  3. Add a new entry:

    >>> add-entry
    do you wish writing to '/home/your_user/Documents/MyDiaries/my_diary.xlsx'? [y/N]: y
    please provide the following details, if you want to leave them blank just press enter
    please provide the entery date in the following formate mm dd (e.g: Jun 9): Jul 20
    please provide the effort type 0 - easy , 1- medium ,2-hard: 1
    please provide description of your task / achivment: Implemented new feature X
    For links, you can enter:
      - Just URL: https://github.com/myrepo
      - Custom name and URL: MyRepo https://github.com/myrepo; your custome name will be the placeholder
    please provide link of your task / achivment: Feature X Repo https://github.com/your_user/feature_x
    please provide the status of your task (not started / in progress/ finished): finished
    please share short impact or out-come of this task/ achviment: Improved user experience
    please add additional notes if any: Met with team for review.
    Entry added successfully!
    Reorganizing entries by date...
    File reorganized successfully!
    Do you want to copy '/home/your_user/Documents/MyDiaries/my_diary.xlsx' to Google Drive now? [y/N]: y
    Attempting to copy 'my_diary.xlsx' to Google Drive...
    Source: /home/your_user/Documents/MyDiaries/my_diary.xlsx
    Destination: /run/user/1000/gvfs/google-drive:host=gmail.com/[email protected]/My Drive/Diary_Sync_Folder/my_diary.xlsx
    Successfully copied 'my_diary.xlsx' to Google Drive.
    

Contributing

This is an open-source project, and contributions are welcome!

How to Contribute

If you'd like to propose changes to be included in the main project:

  1. Fork the repository.
  2. Clone your forked repository: git clone https://github.com/your_username/DiaryTool.git (Replace your_username with your actual GitHub username.)
  3. Create your feature branch: git checkout -b feature/AmazingFeature
  4. Commit your changes: git commit -m 'Add some AmazingFeature'
  5. Push to the branch: git push origin feature/AmazingFeature
  6. Open a Pull Request.

Testing on Other Platforms

The Diary Tool has currently only been tested on Linux Fedora Gnome. We highly encourage and appreciate contributions that involve testing and adapting the tool for other operating systems (e.g., Ubuntu, Windows, macOS).

If you test the tool on a different platform:

  • Report any issues: If you encounter bugs or unexpected behavior, please open an issue on the GitHub repository.
  • Document your setup: Describe your operating system, desktop environment (if applicable), and any specific configurations that were necessary.
  • Suggest improvements: If you find ways to make the tool more compatible or user-friendly on other platforms, please submit a pull request with your changes or suggestions.

Your contributions in testing and expanding compatibility are invaluable!

Contact

If you have any questions, feel free to open an issue on the GitHub repository or contect me directly at [email protected].

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages