rodo/README.md

142 lines
4.1 KiB
Markdown
Raw Normal View History

2018-03-12 14:00:41 +00:00
# rodo
A minimal todo list program for people who live on the command line.
2019-07-11 02:21:54 +00:00
2019-03-02 15:49:45 +00:00
# Screenshot
![](screenshot.png)
2019-04-30 01:35:44 +00:00
# Table of Contents
- [rodo](#rodo)
- [Screenshot](#screenshot)
- [Table of Contents](#table-of-contents)
2019-06-04 02:01:34 +00:00
- [TL;DR](#tldr)
- [Platforms](#platforms)
- [Requirements](#requirements)
2019-06-04 02:01:34 +00:00
- [Downloading Racket](#downloading-racket)
- [Downloading the rodo source code](#downloading-the-rodo-source-code)
- [Setup](#setup)
- [Setting up a $PATH](#setting-up-a-path)
- [Adding rodo to your $PATH](#adding-rodo-to-your-path)
- [List of commands](#list-of-commands)
- [Usage examples](#usage-examples)
- [Configuring rodo](#configuring-rodo)
- [Todos](#todos)
2019-04-30 01:35:44 +00:00
2019-03-13 03:29:01 +00:00
# TL;DR
2019-03-23 19:29:06 +00:00
1. Make sure [Racket](https://racket-lang.org/) is installed
2. `git clone https://github.com/m455/rodo` into a directory of your choice
2019-04-12 13:23:46 +00:00
3. `cd` into the `rodo` directory
4. Choose one of the options below for running rodo:
* To use rodo using the Racket interpreter run: `racket rodo.rkt`
* To use rodo as an single-file executable follow the two steps below:
1. Run `raco exe rodo.rkt` to compile rodo into a single-file executable.
2. Run `./rodo`.
5. (optional) Create a wrapper in your `$PATH` directory to run rodo from anywhere:
2019-03-23 19:29:06 +00:00
```
#!/usr/bin/env bash
racket ~/path/to/rodo.rkt "$@"
```
2019-03-13 03:29:01 +00:00
# Platforms
2018-05-20 02:03:00 +00:00
Below is a list of platforms that rodo can run on.
2019-02-14 20:09:47 +00:00
* GNU/Linux
* Windows Subsystem for Linux
2019-04-30 01:35:44 +00:00
* macOS (Untested)
2018-09-08 01:01:00 +00:00
# Requirements
The following items must be installed before you can use rodo:
2018-09-08 01:01:00 +00:00
* Racket: [https://racket-lang.org/](https://racket-lang.org/)
* rodo's source code: [https://github.com/m455/rodo](https://github.com/m455/rodo)
2019-04-30 01:35:44 +00:00
## Downloading Racket
2018-09-08 01:01:00 +00:00
1. run `sudo apt install racket` on the command line
2019-04-30 01:35:44 +00:00
## Downloading the rodo source code
1. run `git clone https://github.com/m455/rodo`
# Setup
2018-09-08 01:01:00 +00:00
For convenience, rodo can be added to your `$PATH`. This section will guide
you through setting up a `$PATH` and adding rodo to your `$PATH`.
2019-04-30 01:35:44 +00:00
## Setting up a $PATH
2018-10-20 01:36:52 +00:00
A `$PATH` is a directory in which you can place executable files or scripts.
After placing executable files or scripts in your `$PATH` directory, you can run
these files or scripts from any directory on your machine.
Tip: If you have set up a `$PATH` already, then skip to the next step, [Adding rodo to your $PATH](https://github.com/m455/rodo#adding-rodo-to-your-path).
2019-01-31 14:46:14 +00:00
1. Create a directory for your `$PATH` by running `mkdir ~/bin/`
2. Add your newly-created `~/bin/` directory to your `$PATH` by running `echo "export PATH=~/bin:\$PATH" >> .bashrc`
2019-01-31 14:46:14 +00:00
2019-04-30 01:35:44 +00:00
## Adding rodo to your $PATH
2019-01-31 14:46:14 +00:00
1. Create a file in your `~/bin/` directory with the following contents in it:
```
#!/usr/bin/env bash
racket ~/path/to/rodo.rkt "$@"
```
For example: If you downloaded the project to your `~/downloads/` folder you would change the line
2019-02-14 20:01:33 +00:00
`racket ~/path/to/rodo.rkt "$@"` to `racket ~/downloads/rodo/rodo.rkt "$@"`.
2018-09-08 01:01:00 +00:00
2. Save the file
3. Make the file executable by running `chmod u+x ~/bin/name-of-your-file`
2018-11-12 02:56:10 +00:00
2019-04-30 01:35:44 +00:00
# List of commands
This section lists and describes rodo's commands.
2018-04-10 00:27:01 +00:00
2019-04-30 01:35:44 +00:00
* `-h` or `--help` displays the help message
* `init` creates a list file (See the `config.rkt` file for the default location of this file)
* `ls` displays your list
* `add` adds an item to your list
* `rm` removes an item from your list
2018-04-13 06:14:51 +00:00
2019-04-30 00:31:36 +00:00
# Usage examples
2018-04-10 00:27:01 +00:00
The examples below assume that you have [added rodo to your $PATH](https://github.com/m455/rodo#adding-rodo-to-your-path).
2019-03-13 03:43:15 +00:00
`rodo -h`
`rodo --help`
`rodo init`
2018-04-13 06:14:51 +00:00
`rodo ls`
2018-09-08 04:30:28 +00:00
`rodo add "this is an item"`
2018-09-08 04:30:28 +00:00
`rodo add this is an item without quotation marks`
2018-09-08 04:30:28 +00:00
`rodo rm 1` (This removes the first item from your list)
Note: You may have to run `rodo ls` to see which number corresponds to which item in your list.
2019-03-13 03:43:15 +00:00
# Configuring rodo
**Caution: Changing the `config.rkt` file should be done at your own risk as it may break rodo's functionality**
Right now, the configurations can be found in the `config.rkt file`. Settings,
such as the program name, directory, and the filename of the todo list file can
be changed.
2018-10-10 19:05:54 +00:00
# Todos
2019-09-20 17:18:02 +00:00
When I have time, I plan on adding the following features to rodo:
- Colour
- Encrypted list files