Skip to content

TermNotes v.1.0.4

Latest
Compare
Choose a tag to compare
@felipealfonsog felipealfonsog released this 30 Jul 04:22
· 55 commits to main since this release
8ba9b05

Implemented Changes and Features:

Create Files: Added createFiles() function to create the term_notes file in ~/.config if it doesn't exist.

Move Binary: Implemented moveBinaryToDestination() to move the term-notes binary to /usr/local/bin/ on Linux or /usr/local/bin/ on macOS.

Add Note: Implemented addNote() function for adding a new note, storing its content in notes.txt, and providing options to edit it using nano, vim, or neovim.

Edit Note: Added editNote() function for editing an existing note, displaying a list of available notes, and choosing an editor (nano, vim, or neovim) to edit the selected note's content.

Delete Note: Implemented deleteNote() function to delete an existing note, showing a list of notes, and selecting one to delete.

Delete All Notes: Added deleteAllNotes() function to delete all existing notes from notes.txt.

Show Note: Implemented showNote() function for displaying the content of a specific note, requesting the note's ID, and showing its content if found.

Show All Notes: Added showAllNotes() function to display the content of all existing notes in notes.txt.

Menus: Created showNotesMenu() and mainMenu() functions to display the available options for managing notes and the main menu, respectively.

Additional Settings: Set appropriate permissions to make the generated binary executable (chmod).

Changes Made for macOS and Linux Separation
To achieve compatibility with both macOS and Linux, the original term_notes.c file has been split into two separate files: term_notes_macos.c and term_notes_linux.c. This separation was necessary to address platform-specific system calls, dependencies, and path handling.

term_notes_mac.c The term_notes_macos.c file includes code that is specific to macOS. This version of the utility uses platform-specific libraries and functions for path handling, file management, and other system calls to ensure seamless execution on macOS.

term_notes_linux.c The term_notes_linux.c file contains code tailored to work on Linux systems. Similar to the macOS version, this file uses Linux-specific libraries and functions for path handling, file management, and other system interactions.