2022-08-05 05:09:47 +00:00
|
|
|
# Gemwriter
|
|
|
|
|
|
|
|
A little command-line helper for publishing [Gemini] sites or "capsules".
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
Options:
|
|
|
|
|
2022-08-09 04:13:37 +00:00
|
|
|
config [lang] Generate a config directory
|
2022-08-05 05:09:47 +00:00
|
|
|
page [capsule] [title] Add a new page with the given title
|
|
|
|
post [capsule] [title] Add a new gemlog post with the given title
|
|
|
|
index Generate an index page and feed of posts
|
|
|
|
publish Index and copy posts remotely using scp
|
|
|
|
help Show this help message
|
|
|
|
version Print version info
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
- Linux or Unix-based OS
|
|
|
|
- [Lua] 5.4 (other versions >= 5.1 will probably be fine but are untested)
|
|
|
|
- [scp] or [rsync], to transfer files remotely
|
|
|
|
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
2022-08-07 00:14:10 +00:00
|
|
|
- Install Lua (including development libraries and headers) and [luastatic].
|
2022-08-05 05:09:47 +00:00
|
|
|
|
|
|
|
- Clone this repository and change into the directory. Run:
|
|
|
|
|
|
|
|
```
|
2022-08-07 00:14:10 +00:00
|
|
|
luastatic gemwriter.lua env.lua util.lua lang/*.lua \
|
|
|
|
/usr/lib/[arch]/liblua[5.x].a -I/usr/include/lua[5.x] -static \
|
|
|
|
-o gemwriter
|
2022-08-05 05:09:47 +00:00
|
|
|
```
|
|
|
|
|
2022-08-07 00:14:10 +00:00
|
|
|
Replace `[arch]` with the OS architecture, e.g. `x86_64-linux-gnu`, and
|
|
|
|
`[5.x]` with the Lua version. The paths to `liblua.a` and the development
|
|
|
|
headers (i.e. `/usr/include/lua[5.x]/lua.h`) may need to be adjusted for
|
|
|
|
your distribution.
|
2022-08-05 05:09:47 +00:00
|
|
|
|
|
|
|
- Move the `gemwriter` executable to a location in your `$PATH`.
|
|
|
|
|
|
|
|
|
|
|
|
## Quick start
|
|
|
|
|
|
|
|
1. Generate a new config: `gemwriter config`
|
|
|
|
|
|
|
|
2. Edit `~/.config/gemwriter/config.toml` with the correct details about your
|
|
|
|
capsule and gemlog.
|
|
|
|
|
|
|
|
3. Create a new gemlog post: `gemwriter post "Hello World!"`
|
|
|
|
|
|
|
|
4. Publish your capsule: `gemwriter publish`
|
|
|
|
|
|
|
|
|
2022-08-07 00:14:10 +00:00
|
|
|
## Credits
|
|
|
|
|
|
|
|
Special thanks to the following contributors:
|
|
|
|
|
|
|
|
- [lucidiot](https://tilde.town/~lucidiot/) — French translation
|
2022-08-09 04:13:37 +00:00
|
|
|
- [wsinatra](http://lambdacreate.com/) — Esperanto translation
|
2022-08-07 00:14:10 +00:00
|
|
|
|
|
|
|
|
2022-08-05 05:09:47 +00:00
|
|
|
## License
|
|
|
|
|
|
|
|
BSD-3-Clause
|
|
|
|
|
|
|
|
|
|
|
|
[Gemini]: https://gemini.circumlunar.space/
|
|
|
|
[Lua]: https://www.lua.org/
|
|
|
|
[scp]: https://www.openssh.com/
|
|
|
|
[rsync]: https://rsync.samba.org/
|
|
|
|
[luastatic]: https://github.com/ers35/luastatic
|