Crates.io | tui-journal |
lib.rs | tui-journal |
version | |
source | src |
created_at | 2023-05-15 20:57:05.998478 |
updated_at | 2024-12-08 16:36:48.842493 |
description | Tui app allows writing and managing journals/notes from within the terminal With different local back-ends |
homepage | |
repository | https://github.com/ammarabouzor/tui-journal |
max_upload_size | |
id | 865395 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
TUI-Journal is a terminal-based application written in Rust that allows you to write and manage your journal/notes from within the comfort of your terminal. It provides a simple and efficient interface for creating and organizing your thoughts, ideas, and reflections. TUI-Journal supports two different local back-ends: a plain text back-end in JSON format and a database back-end using SQLite.
Edit journals content with external text editor from within the app.
Filter & Search functionalities.
Add mouse support
Preview mode for journals supporting Mark Down highlighting and word wrapping.
Improve app input and rending cycle using app events to support real concurrency within the app.
Customize themes and keybindings.
Grab the most recent pre-built binaries for your platform from the Releases page, or utilize the available package managers.
On Arch Linux, you can install TUI-Journal by using pacman:
pacman -S tui-journal
TUI-Journal is available for Alpine Edge. It can be installed via apk after enabling the testing repository.
apk add tui-journal
On FreeBSD, you can install TUI-Journal by using pkg:
pkg install -y tui-journal
On NetBSD a pre-compiled binary built with default features is available from the official repositories. To install it, simply run:
pkgin install tui-journal
TUI-Journal is available on the Nix package manager. You can install it using the following commands:
# On NixOS:
nix-env -iA nixos.tui-journal
# On Non NixOS:
nix-env -iA nixpkgs.tui-journal
For more information, visit the TUI-Journal package page on Nix.
For macOS and Linux users, TUI-Journal can be installed via Homebrew using a direct installation method:
brew install AmmarAbouZor/homebrew-tui-journal/tui-journal
Ensure you have Rust installed on your system.
The minimum required Rust version is 1.75.0
Make sure the OpenSSL development package is installed on your system.
sudo apt install -y libssl-dev
sudo dnf install openssl-devel
To install TUI-Journal with default features (SQLite and JSON), you can use cargo
to install directly from crates.io:
cargo install tui-journal --locked
To use the current nightly version, you can install it directly from the GitHub repository
cargo install --git https://github.com/ammarabouzor/tui-journal
You can choose to install TUI-Journal with specific features enabled or disabled by customizing the cargo installation command. To install TUI-Journal with only the JSON back-end feature, use the following command:
cargo install tui-journal --locked --no-default-features --features json
To install TUI-Journal with only the SQLite back-end feature, use the following command:
cargo install tui-journal --locked --no-default-features --features sqlite
Once installed, you can run TUI-Journal by typing tjournal
in your terminal:
$ tjournal
To view the available arguments and commands, you can use the --help
or -h
flag:
$ tjournal --help
Usage: tjournal [OPTIONS] [COMMAND]
Commands:
print-config Print the current settings including the paths for the backend files [aliases: pc]
import-journals Import journals from the given transfer JSON file to the current back-end file [aliases: imj]
assign-priority Assign priority for all the entires with empty priority field [aliases: ap]
help Print this message or the help of the given subcommand(s)
Options:
-j, --json-file-path <FILE PATH> Sets the entries Json file path and starts using it
-s, --sqlite-file-path <FILE PATH> Sets the entries sqlite file path and starts using it
-b, --backend-type <BACKEND_TYPE> Sets the backend type and starts using it [possible values: json, sqlite]
-w, --write-config write the current settings to config file (this will rewrite the whole config file)
-c, --config <FLIE PAHT> Specifies the path for the configuration file
(default path: <config-dir>/tui-journal/config.toml)
-v, --verbose... Increases logging verbosity each use for up to 3 times
-l, --log <FILE PATH> Specifies a file to use for logging
(default file: <cache_dir>/tui-journal/tui-journal.log)
-h, --help Print help
-V, --version Print version
The configuration for TUI-Journal can be found in the config.toml
file located in the configuration folder within the TUI-Journal directory.
Here is a sample of the settings in the config.toml
file:
backend_type = "Sqlite" # Available options: Json, Sqlite. Default value: Sqlite.
default_journal_priority = 3 # Sets the suggested priority while creating a new journal
scroll_per_page = 5 # Sets how many journals will be scrolled when using page up/down commands
sync_os_clipboard = false # Syncs editor clipboard actions with operating system clipboard
history_limit = 10 # Sets the maximum changes limit for the undo & redo stacks. Use 0 to disable it.
colored_tags = true # Sets if automatically coloring for tags is enabled.
# Sets the visibility option for the datum of journals. Available options:
# - `show`: Render datum in journals list.
# - `hide`: Hide datum without providing an extra empty line for journal without `priority` value.
# - `empty_line`: Hide datum providing an extra empty line for journal without `priority` value.
datum_visibility = "show"
# Sets the directory where the application persists its state between sessions.
# Default are "~/<HOME>/.local/state/tui-journal/" on Linux and "C:\Users\Alice\AppData\Roaming\tui-journal\" on Windows
app_state_dir = "<STATE_DIRECTORY>/tui-journal/"
[export]
default_path = "<Absolute_path_to_export_directory>" # Optional default path to export multiple journals or a single journal's content. Falls back to the current directory if not specified.
show_confirmation = true # Show confirmation after successful export.
scroll_per_page = 5 # Sets how many journals will be scrolled using Page-Up and Page-Down command
[external_editor]
# Set the external terminal editor to use from within the app.
# If the value isn't set the app will try to retrieve the editor from git global configurations then It'll try with the environment variables VISUAL, EDITOR then it'll fallback to vi.
command = "nvim"
# Enabling this save the journal content automatically after closing the external editor
auto_save = false
# Note: external_editor can still be configured in one line to set the command. In that case, the default values for the other fields will be used
# external_editor = "nvim"
[json_backend]
file_path = "<Documents-folder>/tui-journal/entries.json"
[sqlite_backend]
file_path = "<Documents-folder>/tui-journal/entries.db"
For detailed information about the TUI Journal app, including usage guide, keymaps, and configuration details, please refer to the Wiki.
TUI-Journal would not have been possible without the following open-source crates:
tui-rs and its revival ratatui: TUI-Journal utilizes the tui-rs
and ratatui
crates, which provide a framework for building terminal user interfaces in Rust. They offer a wide range of components and utilities to create interactive and responsive TUI applications.
tui-texteditor: TUI-Journal leverages the tui-texteditor
crate, which offers a text editor widget specifically designed for terminal-based applications. It provides functionalities such as text manipulation, cursor movement, and scrolling within the TUI environment.
sqlx: TUI-Journal benefits from the sqlx
crate, which is a Rust library for interacting with databases. It enables seamless integration with SQLite, allowing TUI-Journal to store journal entries and notes in a reliable and efficient manner.
These crates have greatly contributed to the development of TUI-Journal, and the project extends its gratitude to the maintainers and contributors of these fantastic open-source libraries.
As the author of TUI-Journal and being new to the open-source community, I would greatly appreciate any contributions from experienced developers. Your contributions can help enhance the functionality, usability, and overall quality of TUI-Journal.
If you have any ideas, bug reports, or feature requests, please don't hesitate to open an issue on the TUI-Journal. Your feedback and input are invaluable in improving the application.
If you would like to contribute code, documentation, or any other form of assistance, I am open to collaboration. Please reach out through the GitHub repository and let's discuss how you can contribute to TUI-Journal.
Thank you for considering contributing to TUI-Journal. Your support is highly appreciated!