5 releases
| 0.1.4 | Jan 4, 2026 |
|---|---|
| 0.1.3 | Oct 4, 2025 |
| 0.1.2 | Jun 17, 2025 |
| 0.1.1 | Jun 8, 2025 |
| 0.1.0 | Jun 8, 2025 |
#2070 in Database interfaces
35KB
753 lines
RustyDiary 📝
RustyDiary is a Rust utility that helps you merge dated Markdown files into a single chronological log. It's perfect for combining daily notes, journal entries, or any date-stamped Markdown files.
Features
- 📅 Automatically detects and merges files with date-based names (YYYY-MM-DD.md)
- ⬇️ Sorts entries in reverse chronological order (newest first)
- 🔄 Preserves existing content in the output file
- ⚙️ Configurable separators between entries
- 🛡️ Robust error handling and validation
Installation
-
Ensure you have Rust installed on your system. If not, install it from rustup.rs.
-
Clone this repository:
git clone [your-repository-url]
cd rusty-diary
- Build the project:
cargo build --release
The compiled binary will be available in target/release/rusty-diary.
Usage
Basic usage (current directory):
rusty-diary -h
A markdown diary with SQLite persistence
USAGE:
rusty_diary [FLAGS] [OPTIONS] [directory]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose Verbosity level
OPTIONS:
--date-pattern <date-pattern> Custom date pattern for files
--db <db> Database file path
ARGS:
<directory> Directory containing markdown files
Specify a different directory:
rusty-diary /path/to/your/files
File Naming Convention
Files should follow the pattern: YYYY-MM-DD.md
Examples:
2024-01-01.md2024-12-31.md
Configuration
The default configuration can be modified by creating a custom Config instance:
let config = Config {
directory: PathBuf::from("your/path"),
date_pattern: String::from(r"^\d{4}-\d{2}-\d{2}(\.md)?$"),
output_filename: String::from("writing-log.md"),
separator: String::from("\n---\n"),
};
Development
Prerequisites
- Rust (latest stable version)
- Cargo (comes with Rust)
Dependencies
regex: For pattern
Future ideas
- Feed the chronological data to a LLM to generate summaries or insights.
- Add support for different date formats.
Dependencies
~47MB
~756K SLoC