Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/foo-dogsquared/lanoma

A rewriting of my LaTeX notes manager in Rust. It also improves upon some things from the original Python version. Currently a work in progress.
https://github.com/foo-dogsquared/lanoma

latex latex-notes-manager rust-lang

Last synced: 5 days ago
JSON representation

A rewriting of my LaTeX notes manager in Rust. It also improves upon some things from the original Python version. Currently a work in progress.

Awesome Lists containing this project

README

        

= Lanoma
:toc:

:program: Lanoma

A basic LaTeX notes manager that aims for self-studying and university classes footnote:[Mainly, the author of this program, https://github.com/foo-dogsquared[@foo-dogsquared].].
It is mainly composed of a command line program where you can easily manage your LaTeX notes.

For now, the notes manager is specifically created for my specific workflow so no there's not much room for general use-cases.

My LaTeX workflow and the program is inspired from https://castel.dev/[Gilles Castel's posts].
Big thanks to him and for sharing his knowledge!

Also since this is my first project made with https://www.rust-lang.org/[Rust], you'll have to excuse my bad codebase for a little bit.
Nonetheless, pull requests for improvements are always welcome!

== Design rationale

* Create a potentially reusable LaTeX notes setup.

* Create a LaTeX-related tool that can easily transfer, move, or integrate with other setups.

* Automate basic LaTeX files management including adding, deleting, and compiling documents.

* Make the program fit nicely with the existing workflow.

* Furthermore, this program is specifically created for my workflow that can work cross-platform. This also leaves little room for other use cases.

== Limitations and non-goals

Now the design rationale is out, let's explicitly lay out the expected limitations and non-goals from the time of creating this project.

* First and foremost, it's a niche tool for a **very** niche use.
Also, with the use of makefiles and shell scripts, you can easily set up a similar (or better) workflow for your LaTeX documents.
Besides, creating a similar tool could've been easier (and better) with shell scripts and makefiles.
I just did to myself because I want to learn Rust.
{program} does have some level of customizability but it is limited.

* This is not made for general use cases.
Though, it is considered especially with the upcoming improvements of the underlying libraries (like creating dynamic helpers with Rhai [from https://github.com/sunng87/handlebars-rust/issues/301]).

* This is not made for organizing the notes or anything.

If you're looking for an alternative for your personal knowledge base, a simple directory tree of notes will do.
I've also made my personal knowledge base with just a folder of https://asciidoctor.org/[Asciidoctor] documents and created a Python script for compiling them all.
I've https://github.com/foo-dogsquared/personal-notes/[open sourced] it just for backup purposes.
You can then search for your files with the `find` command.

I've also met people online that are more content with a simple list of directories and a bunch of documents in a certain format (i.e., https://orgmode.org/[Org Mode], https://jupyter.org/[Jupyter notebooks]).

== Reason this program exists

* It is a learning project with the https://www.rust-lang.org/[Rust language].

* Create an executable that can be easily be sent to others without the hassle of setting up whatsoever.

== Installation

You can simply download the https://github.com/foo-dogsquared/lanoma/releases[provided binaries in the releases page].
If you're using https://doc.rust-lang.org/cargo/[Cargo], you can install the binary with https://doc.rust-lang.org/cargo/commands/cargo-install.html?highlight=install#cargo-install[`cargo install` command].

If there's no available version for your operating system of choice, you can compile one yourself.

First, make sure you have the Rust toolchain (>=`v1.39.0` just to be safe) and the development libraries (e.g., `gcc`, `musl`) for your target system installed.
Then clone the Git repository into your machine and build the executable with `cargo build --release`.
footnote:[You can also build with `make` by using the `build` rule (i.e., `make build`).]

Wait for the compilation and get the binary (named as `lanoma`) in the `target/release/` folder.
You can then move the binary in your `$PATH`.

== Usage

For now (or maybe not), this program is specifically made for my LaTeX workflow.

In order to make use of this application, you need to have the following programs installed already in the system:

* A LaTeX distribution (http://www.tug.org/interest.html#free[here's a list of options, if you haven't installed one])

That's pretty much it.

=== Quick start

To get started with {program}, you need a profile.

You can simply create a profile with the `init` command.

[source, shell]
----
# Initialize the profile in the respective config folder of your operating system
lanoma init

# Initialize the profile in other directories if you don't want to.
# Though, you have to specify the profile at every command.
lanoma init --profile "~/Documents"
----

Once you have initialized a profile, you can now create subjects and notes.
Though in order to add notes, you need to create subjects/folders first.

[source, shell]
----
# Add some subjects
lanoma add subjects "Mathematics" "Science"

# After adding some subjects, you can add some notes
lanoma add notes "Mathematics" "Introduction to Calculus"

# To compile all notes under "Mathematics"
lanoma compile subjects "Mathematics"
----

You can check out more options in the link:docs/manual.adoc[manual].
It also gives the complete details of what you need to know with {program}.

== Features

Here are the features to be implemented whenever possible.

* Hooks scripts using Rust.

I would also like to improve the program on the following areas:

* Data design which is quite messy as of v2.0.0.
There has to be a better way for it without entirely relying with a database.
* Performance to be improved after the core features has been implemented.
For now, it's not a priority.
* Cross-platform compatibility.
As a user of multiple OS (i.e., Windows and Linux), I really like to make this possible to easily use this program.

== Development

The application is still in active development.
Though it is just a side project, contributions are welcome with open arms: refactoring code, improving the documentations, filing an issue, and the like. :)

To set up for development, you just need https://www.rust-lang.org/[Rust] installed.
If you haven't installed it yet, https://www.rust-lang.org/tools/install[be sure to follow the instructions from the official website].

The project has the executable and the library code separated into https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html[workspaces].
The main code is the executable.
The library is located on the `lib/` folder.

The project uses https://github.com/rust-lang/cargo[Cargo] for managing the project.

* To run the binary of the project, execute `cargo run` in the shell.
To add command line arguments, just append two dashes (`--`) after the run command.

* To run the tests of the library crate, call `cargo test --package lanoma-lib --lib`.

* Using the https://github.com/rust-lang/rls[RLS] plugin of your text editor of choice is recommended.
If you're using https://code.visualstudio.com/[Visual Studio Code], it is fully recommended to have it installed.

This project also makes use of the official toolchain of Rust such as https://github.com/rust-lang/rustfmt[rustfmt].
If you haven't installed rustfmt yet, please refer to the link and read the documentation on installing.