[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
## ๐ About The Project
A TUI (Terminal User Interface) for [`dnote`](https://www.getdnote.com/).
![Demo](./.github/static/demo.gif)
(back to top)
### ๐๏ธ Built With
- [`rust`](https://www.rust-lang.org/)
- [`ratatui`](https://github.com/ratatui-org/ratatui)
(back to top)
## ๐ Getting Started
This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.
### ๐ ๏ธ Prerequisites
1. Install rust: https://www.rust-lang.org/
2. Install dnote: https://github.com/dnote/dnote#installation
### ๐ฅ Installing
#### Direct download
You can download the `tar.xz` file matching your operating system from the
[releases page](https://github.com/deepanchal/dnote-tui/releases), extract it and execute the `dnote-tui`
binary.
#### Cargo
```bash
cargo install dnote-tui
```
If you wish to install from the main branch directly, use
```bash
cargo install --git https://github.com/deepanchal/dnote-tui
```
Once it's installed, simply run
```bash
dnote-tui
```
I will offer additional installation methods once the project reaches a more stable state.
### ๐ Running project locally
1. Clone the repo.
```bash
git clone https://github.com/deepanchal/dnote-tui.git
```
2. cd into repo.
```bash
cd dnote-tui
```
3. Run tui
```sh
cargo run
```
### ๐ณ Try with Docker
Get started with dnote-tui quickly using Docker! This setup comes with pre-loaded test data so you can dive right into exploring the TUI features.
1. Clone the repository and navigate to the project directory
```bash
git clone https://github.com/deepanchal/dnote-tui.git
cd dnote-tui
```
2. To build the Docker image and run the dnote-tui container using Docker Compose, execute the following command:
```bash
docker compose run --rm dnote-tui
```
Or if you prefer to use Docker directly without Docker Compose, you can follow these steps:
```bash
# Build the docker image
docker build --build-arg RUST_VERSION=1.76.0 --build-arg DNOTE_VERSION=0.15.1 -t dnote-tui .
# Run the docker container
docker run --rm -it dnote-tui
```
(back to top)
## ๐ Usage
### ๐ Run
```sh
cargo run
```
### ๐๏ธ Build
```sh
cargo build
```
### ๐งช Run Tests
```sh
cargo test
```
(back to top)
## ๐ฏ Roadmap
- [x] Show basic TUI with three sections (Books, Pages, & Content)
- [x] Create a dnote client
- [x] Parse output from dnote cli to structs used by dnote client
- [x] Add methods to perform write operations with dnote cli in dnote client
- [ ] Features
- [x] Read Operations
- [x] Read books from dnote cli into tui
- [x] Read pages from dnote cli into tui
- [x] Read pages content from dnote cli into tui
- [x] Show truncated pages content beside page id in pages section
- [ ] Write Operations
- [x] Create a new book with page [#19](https://github.com/deepanchal/dnote-tui/issues/19)
- [x] Edit a page's content [#37](https://github.com/deepanchal/dnote-tui/issues/37)
- [x] Add new page to a book [#49](https://github.com/deepanchal/dnote-tui/issues/49)
- [ ] Move page to another book [#60](https://github.com/deepanchal/dnote-tui/issues/60)
- [x] Delete a book's page [#51](https://github.com/deepanchal/dnote-tui/issues/51)
- [x] Delete a book and all its pages [#52](https://github.com/deepanchal/dnote-tui/issues/52)
- [x] Rename book with popup input field [#59](https://github.com/deepanchal/dnote-tui/issues/59)
- [ ] Search and Navigation
- [ ] Find note within a book [#61](https://github.com/deepanchal/dnote-tui/issues/61)
- [ ] Global note search [#47](https://github.com/deepanchal/dnote-tui/issues/47)
- [ ] Make page content scrollable [#54](https://github.com/deepanchal/dnote-tui/issues/54)
- [ ] Misc (Nice to have)
- [ ] Allow note syncing with dnote server [#50](https://github.com/deepanchal/dnote-tui/issues/50)
- [x] Parse keybindings for active mode from current config file and show on footer [#64](https://github.com/deepanchal/dnote-tui/issues/64)
- [ ] Add ASCII art in header pane [#57](https://github.com/deepanchal/dnote-tui/issues/57)
- [ ] Show command log pane to show user what commands are being run just like lazygit [#63](https://github.com/deepanchal/dnote-tui/issues/63)
- [ ] Render note's markdown content with glow and make it toggleable [#53](https://github.com/deepanchal/dnote-tui/issues/53)
See the [open issues](https://github.com/deepanchal/dnote-tui/issues) for a full list of proposed features (and known issues).
(back to top)
## ๐ค Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feat/amazing-feature`)
3. Commit your Changes (`git commit -m 'feat: add some amazing-feature'`)
4. Push to the Branch (`git push origin feat/amazing-feature`)
5. Open a Pull Request
(back to top)
## ๐ License
Distributed under the MIT License. See [`LICENSE`](LICENSE) for more information.
(back to top)
[contributors-shield]: https://img.shields.io/github/contributors/deepanchal/dnote-tui.svg?style=for-the-badge
[contributors-url]: https://github.com/deepanchal/dnote-tui/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/deepanchal/dnote-tui.svg?style=for-the-badge
[forks-url]: https://github.com/deepanchal/dnote-tui/network/members
[stars-shield]: https://img.shields.io/github/stars/deepanchal/dnote-tui.svg?style=for-the-badge
[stars-url]: https://github.com/deepanchal/dnote-tui/stargazers
[issues-shield]: https://img.shields.io/github/issues/deepanchal/dnote-tui.svg?style=for-the-badge
[issues-url]: https://github.com/deepanchal/dnote-tui/issues
[license-shield]: https://img.shields.io/github/license/deepanchal/dnote-tui.svg?style=for-the-badge
[license-url]: https://github.com/deepanchal/dnote-tui/blob/main/LICENSE