How averageandyyy/journal works
Project type and purpose
• This is a command-line journal application written in C.
• It lets a user write new entries, read existing ones, and update entries via flags (-w, ‑r, ‑u).
• Entries are stored under a file-system tree of the form: entries/<year>/<month>/<filename>.
File structure
• Top-level Makefile: build script.
• Source files:
• journal.c – main CLI entry point, flag dispatch
• getinput.c/.h – one module for raw line-based input
• getnstr.c/.h – module for bounded-string input (n characters)
• subfiles.c/.h – utilities for directory traversal and file enumeration
• output.c/.h – routines for printing file contents to the terminal
• entries/… – default data directory (created on demand)
• Other sample directories (folder/, new_folder/) and raw text files illustrate file-tree usage.
README insights
• Flags and behavior are clearly documented.
• Default directory is entries/.
• File path pattern: year/month/file.txt.
Detail
• Error-handling path if the directory doesn’t exist (subfiles creates it).
• Flags and their code paths distinctly.