2018-01-20 08:47:45 +00:00
|
|
|
# burrow ![status](https://img.shields.io/badge/status-working-green.svg?style=flat-square) ![license](https://img.shields.io/badge/license-GPL3-blue.svg?style=flat-square) ![bash](https://img.shields.io/badge/Bash-4%2B-lightgrey.svg?style=flat-square)
|
2018-01-20 05:58:11 +00:00
|
|
|
|
2018-01-20 21:36:24 +00:00
|
|
|
**burrow** is a helper for building and managing a gopher hole.
|
2018-01-20 05:58:11 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
### Requirements
|
2018-02-25 15:52:07 +00:00
|
|
|
* bash 4+ (OSX: `brew install bash`)
|
|
|
|
* GNU sed (OSX: `brew install gnu-sed --with-default-names`)
|
|
|
|
* GNU getopt (OSX: `brew install gnu-getopt --with-default-names`)
|
2018-01-20 05:58:11 +00:00
|
|
|
|
|
|
|
### Install
|
|
|
|
|
2018-01-20 20:26:33 +00:00
|
|
|
`sudo make install`
|
|
|
|
|
|
|
|
_Note: On systems without admin access the binary can be run directly from the
|
|
|
|
git repo, but will lack `man` support and command completion._
|
2018-01-20 05:58:11 +00:00
|
|
|
|
|
|
|
### Uninstall
|
|
|
|
|
2018-01-20 20:26:33 +00:00
|
|
|
`sudo make uninstall`
|
2018-01-20 05:58:11 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```bash
|
2018-01-20 20:26:33 +00:00
|
|
|
burrow phlog # create new phlog post
|
2018-03-03 17:03:27 +00:00
|
|
|
burrow recipe # add or update a recipe to box
|
|
|
|
burrow topic # add or update a topic file
|
2018-01-20 20:26:33 +00:00
|
|
|
burrow create-config # generate a default config file
|
|
|
|
burrow update-git # pull latest git repo for gopher dir, if exists
|
2018-01-20 05:58:11 +00:00
|
|
|
```
|
|
|
|
|
2018-03-04 01:59:58 +00:00
|
|
|
- `create-config` will auto-generate a configuration file at
|
|
|
|
`$HOME/.config/burrow/config`. It will be populated by the default parameters
|
|
|
|
listed below and provide an easy way to customize your configuration. At a
|
|
|
|
minimum you should update your `config_dir_gopher` to point to the folder on
|
|
|
|
your local computer where your gopher hole resides.
|
|
|
|
|
|
|
|
- `phlog` will prompt for the title of a new post, then open it in your default
|
2018-01-20 20:26:33 +00:00
|
|
|
`$EDITOR`. By default it will provide you a template, but you can override this
|
|
|
|
by including a `.template` file in your phlog directory.
|
|
|
|
|
|
|
|
- `recipe` will prompt for the name of your recipe, then open it in your default
|
|
|
|
`$EDITOR`. By default it will provide you a template, but you can override this
|
|
|
|
by including a `.template` file in your recipe box directory.
|
|
|
|
|
2018-03-03 17:03:27 +00:00
|
|
|
- `topic` will prompt for the name of the topic, then open it in your default
|
|
|
|
`$EDITOR`. By default it will provide you a template, but you can override this
|
|
|
|
by including a `.template` file in your topics directory.
|
|
|
|
|
2018-03-04 01:59:58 +00:00
|
|
|
- `update-git` will silently attempt to update a git repository at the location
|
|
|
|
of your gopher hole. It is appropriate for use by a cron job.
|
2018-01-20 20:26:33 +00:00
|
|
|
|
2018-01-20 21:44:28 +00:00
|
|
|
_`man burrow` or `burrow -h` for more information._
|
2018-01-20 07:29:59 +00:00
|
|
|
|
2018-01-20 05:58:11 +00:00
|
|
|
## Config
|
|
|
|
|
2018-01-20 22:30:01 +00:00
|
|
|
The following locations are available for configuration:
|
2018-01-20 05:58:11 +00:00
|
|
|
|
2018-01-20 08:18:22 +00:00
|
|
|
1) `$HOME/.config/burrow/config`
|
|
|
|
2) `$HOME/.config/burrow`
|
|
|
|
3) `$HOME/.burrow`
|
2018-01-20 05:58:11 +00:00
|
|
|
|
2018-01-20 20:26:33 +00:00
|
|
|
These files are processed in the order listed. Variables defined in multiple
|
|
|
|
locations will use the last assigned value.
|
|
|
|
|
|
|
|
The following options are available (defaults shown):
|
2018-01-20 05:58:11 +00:00
|
|
|
|
|
|
|
```bash
|
2018-02-24 01:50:54 +00:00
|
|
|
config_dir_gopher="$HOME/gopher" # local path to gopher site
|
2018-03-04 01:59:58 +00:00
|
|
|
config_gopher_server="sdf.org" # server of gopher host
|
|
|
|
config_gopher_port="70" # port of gopher host
|
|
|
|
config_gopher_root="/users/username/" # path on gopher host to gopher site
|
|
|
|
|
2018-02-24 01:50:54 +00:00
|
|
|
config_dir_phlog="phlog" # relative path to phlog
|
2018-03-04 01:59:58 +00:00
|
|
|
config_phlog_gophermap=true # phlogs use gophermap format by default
|
|
|
|
config_phlog_usedate=true # use a date-stamp on phlog posts
|
|
|
|
|
2018-02-24 01:50:54 +00:00
|
|
|
config_dir_recipebox="recipebox" # relative path to recipe box
|
2018-03-04 01:59:58 +00:00
|
|
|
config_recipebox_gophermap=false # recipes use plain text by default
|
|
|
|
config_recipebox_usedate=false # do not use a date-stamp on recipe filenames
|
|
|
|
|
2018-03-03 17:03:27 +00:00
|
|
|
config_dir_topics="topics" # relative path to topics directory
|
2018-03-04 01:59:58 +00:00
|
|
|
config_topics_gophermap=true # topic notes use gophermap format by default
|
|
|
|
config_topics_usedate=false # do not use a date-stamp on topic filenames
|
|
|
|
|
2018-02-24 01:50:54 +00:00
|
|
|
config_git_commit=false # automatically commit changes if git repo
|
|
|
|
config_git_push=false # automatically push changes if git repo
|
2018-03-04 01:59:58 +00:00
|
|
|
|
2018-03-04 01:22:28 +00:00
|
|
|
config_autofold=false # automatically break lines at specific width
|
|
|
|
config_foldwidth=66 # width of line used for autofold
|
2018-03-04 01:59:58 +00:00
|
|
|
config_autoindent=true # automatically reformat gophermaps with leading spaces
|
|
|
|
# and parse links at the end of file
|
2018-01-20 05:58:11 +00:00
|
|
|
```
|
|
|
|
|
2018-01-20 20:26:33 +00:00
|
|
|
_Note: This file is a valid Bash script and will be sourced upon load._
|
|
|
|
|
2018-01-20 05:58:11 +00:00
|
|
|
## Contributing
|
2018-01-20 20:26:33 +00:00
|
|
|
Pull requests are welcome. For major changes, please open an issue first to
|
|
|
|
discuss what you would like to change.
|
2018-01-20 05:58:11 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
[GPL3](LICENSE)
|