|
|
|
# distribusi-go
|
|
|
|
|
|
|
|
> This is still very experimental, please take a backup of your archives if you
|
|
|
|
> are running it on files you care about. It hasn't been tested on large
|
|
|
|
> archives. There are probably some pretty bad bugs lurking in there. It may
|
|
|
|
> still thrash files. Please [report issues] as you find them :100: Thanks for
|
|
|
|
> testing!
|
|
|
|
|
|
|
|
A [Go] implementation of [distribusi].
|
|
|
|
|
|
|
|
If you're migrating from the Python version or have experience using it, here are the differences in `distribusi-go`:
|
|
|
|
|
|
|
|
- It's simpler to install on your computer, just download the binary, `chmod
|
|
|
|
+x` and run it :100:
|
|
|
|
|
|
|
|
- There is no need to install [Pillow] for handling images, that is now
|
|
|
|
built-in. The only external dependency is [exiftool] for image captions from
|
|
|
|
embedded metadata. If you don't have `exiftool` installed, then it gracefully
|
|
|
|
skips that feature. So, you don't need to install anything else to run
|
|
|
|
`distribusi` now :pray:
|
|
|
|
|
|
|
|
- The command-line interface is quite different. There are less optional flags
|
|
|
|
and more defaults. I shuffled a number of things around according to my
|
|
|
|
preferences (open to changes, please [open a ticket]). For example, I always
|
|
|
|
like my images to be thumbnail'd. There's a handy web server built-in now,
|
|
|
|
just run with `-s` :metal:
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
```
|
|
|
|
curl https://git.vvvvvvaria.org/decentral1se/distribusi-go/raw/branch/main/distribusi -o distribusi
|
|
|
|
chmod +x distribusi
|
|
|
|
./distribusi
|
|
|
|
```
|
|
|
|
|
|
|
|
## Quick start
|
|
|
|
|
|
|
|
Run `distribusi-go` on `<path>` and serve it locally for viewing:
|
|
|
|
|
|
|
|
```
|
|
|
|
./distribusi -p <path> -s
|
|
|
|
```
|
|
|
|
|
|
|
|
If you want to ignore certain paths, you can use `-i/--ignore`:
|
|
|
|
|
|
|
|
```
|
|
|
|
./distribusi -p <path> -s -i '*.gif, *.md, mydir'
|
|
|
|
```
|
|
|
|
|
|
|
|
It supports a list of patterns in a comma separated list, wildcards work, more [here].
|
|
|
|
|
|
|
|
If you run into issues, run with `-d/--debug` to see what is happening under the hood.
|
|
|
|
|
|
|
|
:v:
|
|
|
|
|
|
|
|
## Hacking
|
|
|
|
|
|
|
|
You'll need [Go] >= 1.11 installed. Run `go build .` to build a new `./distribusi` executable.
|
|
|
|
|
|
|
|
If you wanna learn Go, I've got [this book], feel free to take a loan of it :grinning:
|
|
|
|
|
|
|
|
[Go]: https://go.dev
|
|
|
|
[distribusi]: https://git.vvvvvvaria.org/varia/distribusi
|
|
|
|
[Pillow]: https://pillow.readthedocs.io/en/stable/installation.html#external-libraries
|
|
|
|
[exiftool]: https://exiftool.org/
|
|
|
|
[report issues]: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/new/choose
|
|
|
|
[open a ticket]: https://git.vvvvvvaria.org/decentral1se/distribusi-go/issues/new/choose
|
|
|
|
[here]: https://pkg.go.dev/path/filepath#Match
|
|
|
|
[this book]: https://www.gopl.io/
|
|
|
|
|
|
|
|
## Acknowledgements
|
|
|
|
|
|
|
|
[`AUTHORS.md`](./AUTHORS.md)
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
![](https://www.gnu.org/graphics/gplv3-or-later.png)
|
|
|
|
|
|
|
|
[`LICENSE`](./LICENSE)
|