log/README.md

56 lines
2.3 KiB
Markdown
Raw Normal View History

# log
log is a minimalistic command line note manager.
2024-02-18 00:41:59 +01:00
# Preview
2024-02-18 22:46:43 +01:00
![](https://r2.e-z.host/3c62bb3a-a8a9-43f6-afd6-553646f51dc4/lzwqimtg.png)
2024-05-22 12:10:23 +02:00
# Usage
2024-05-22 12:23:51 +02:00
```sh
2024-10-12 17:15:44 +02:00
Usage: log [-l] [-i] [-v] [-h]
log [-I|-Q|-R|-S] [filename]
log is a minimalistic command line note manager written in C.
2024-05-22 12:10:23 +02:00
Options:
-l Lists the notes in the directory in a tree format.
-i Prints the directory where the notes are stored.
-v Prints the version of the program.
-h Show the help message.
-I [filename] Creates a new note with the name specified in the filename.
-Q [filename] Searches for the note with specified name and prints its path to the stdout.
-R [filename] Removes the note specified in the filename.
-S [filename] Prints the content of the note specified in the filename.
```
2024-05-22 12:23:51 +02:00
# Features
- Uses EDITOR environment variable to open notes
- Respect XDG variables
- Search notes by name with interactive prompt
- Add, remove, and list notes
- Customizable
- Supports org, txt, markdown and html format
- Generate boilerplate for notes for different formats
# Dependencies
None
# Building
2024-05-22 12:10:23 +02:00
You will need to run these with elevated privilages.
```
2024-02-18 00:41:59 +01:00
$ make
# make install
2024-02-18 00:41:59 +01:00
```
2024-02-20 11:12:57 +01:00
2024-05-22 12:10:23 +02:00
# Notes
log will use the editor defined in the `EDITOR` environment variable to open notes. If `EDITOR` is not defined, you will need to define it in your shell configuration file.
2024-02-18 00:41:59 +01:00
Default file extension is `.md` and it can be changed in `config.h` file as you like. Once you change the extension, you need to recompile the program to apply the changes and the new notes will have different boilerplates. However, all commands will not work for old notes with the previous extension.
When adding note, you can add a slash to indicate a subdirectory. For example, `log -I maths/ch1` will create a note called `ch1` in `maths` folder. **Note**: You can't create a note in a non-existing folder. You need to create the folder first manually.
2024-02-18 00:41:59 +01:00
Unlike pass, you don't need to use `log init` to initialise the store, it is automatically created once you use any command. The store is either in HOME or XDG_CONFIG_HOME if it is defined.
2024-02-18 00:41:59 +01:00
2024-02-18 22:46:43 +01:00
# Contributions
Contributions are welcomed, feel free to open a pull request.
# License
This project is licensed under the GNU Public License v3.0. See [LICENSE](https://github.com/night0721/log/blob/master/LICENSE) for more information.