Update README
This commit is contained in:
parent
8ec75a31a2
commit
1aae11541e
39
README.md
39
README.md
|
@ -1,20 +1,19 @@
|
|||
# FileBazaar
|
||||
|
||||
[![npm release](https://img.shields.io/npm/v/filebazaar.svg)](https://www.npmjs.com/package/filebazaar)
|
||||
[![MIT license](https://img.shields.io/github/license/shesek/filebazaar.svg)](https://github.com/shesek/filebazaar/blob/master/LICENSE)
|
||||
[![MIT license](https://img.shields.io/github/license/elementsproject/filebazaar.svg)](https://github.com/elementsproject/filebazaar/blob/master/LICENSE)
|
||||
|
||||
Sell digital files with Lightning!
|
||||
Sell digital files with Bitcoin & Lightning.
|
||||
|
||||
- Simple setup and minimal configuration, just put a bunch of files in a directory and run the server.
|
||||
- Simple setup and minimal configuration, just put some files in a directory and start the server.
|
||||
|
||||
- Lightweight web browsing interface, works without JavaScript.
|
||||
|
||||
- Generates previews for images, videos, audio, pdf and text documents.
|
||||
|
||||
<img src="https://i.imgur.com/Tdwcuhm.png" width="23%" title="FileBazaar screenshot - directory index"></img>
|
||||
<img src="https://i.imgur.com/6SFNRiq.png" width="23%" title="FileBazaar screenshot - file preview"></img>
|
||||
<img src="https://i.imgur.com/MDRaie2.png" width="23%" title="FileBazaar screenshot - checkout"></img>
|
||||
<img src="https://i.imgur.com/yjwjfT8.png" width="23%" title="FileBazaar screenshot - download"></img>
|
||||
Powered by :zap: [Lightning Charge](https://github.com/ElementsProject/lightning-charge).
|
||||
|
||||
![FileBazaar demo](https://i.imgur.com/UhQD0Tg.gif)
|
||||
|
||||
## Quickstart
|
||||
|
||||
|
@ -22,10 +21,10 @@ Setup [Lightning Charge](https://github.com/ElementsProject/lightning-charge), t
|
|||
|
||||
```bash
|
||||
# Install dependencies for EXIF extraction and preview generation
|
||||
$ apt-get install exiftool ffmpeg graphicsmagick unoconv
|
||||
$ apt install exiftool ffmpeg graphicsmagick unoconv
|
||||
|
||||
# node-canvas dependencies, see https://github.com/Automattic/node-canvas#installation
|
||||
$ apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
|
||||
# Install dependencies for node-canvas (see https://github.com/Automattic/node-canvas#installation)
|
||||
$ apt install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
|
||||
|
||||
# Install filebazaar
|
||||
$ npm install -g filebazaar
|
||||
|
@ -33,10 +32,10 @@ $ npm install -g filebazaar
|
|||
# Prepare a directory with the files you wish to sell and cd to it
|
||||
$ mkdir ~/ForSale && cd ~/ForSale
|
||||
|
||||
# Initialize the `_filebazaar.yaml` config file (generates a random `token_secret`)
|
||||
# Initialize the `_filebazaar.yaml` config file
|
||||
$ filebazaar init
|
||||
|
||||
# Edit the config file (`charge_token` is the only required option)
|
||||
# Edit the config file (`charge_token` is required, `token_secret` is auto-generated)
|
||||
$ edit _filebazaar.yaml
|
||||
|
||||
# Start filebazaar!
|
||||
|
@ -46,8 +45,8 @@ $ filebazaar
|
|||
## Configuration
|
||||
|
||||
FileBazaar's configuration options can be managed using the `_filebazaar.yaml` file or via environment variables.
|
||||
All config options are optional and have sane defaults, except for `charge_token` and `token_secret` which are required.
|
||||
See [`lib/config.js`](https://github.com/shesek/filebazaar/blob/master/lib/config.js) for more details.
|
||||
All config options are optional and have sane defaults except for `charge_token` and `token_secret`, which are required.
|
||||
See [`lib/config.js`](https://github.com/elementsproject/filebazaar/blob/master/src/lib/config.js) for more details.
|
||||
|
||||
Below is an example `_filebazaar.yaml` file:
|
||||
|
||||
|
@ -125,15 +124,21 @@ files:
|
|||
|
||||
## CLI
|
||||
|
||||
You can use `$ filebazaar init [directory]` to initialize a new `_filebazaar.yaml` config file. A random `token_secret` will be added for you. If no `[directory]` is specified, the file will be created in the working directory.
|
||||
#### Initializing `_filebazaar.yaml`
|
||||
|
||||
To start FileBazaar, run `$ filebazaar [path]`. You can either specify the path to the files directory or to the `_filebazaar.yaml` file. If none is specified, defaults to the working directory.
|
||||
You can use `$ filebazaar init [directory]` to initialize a new `_filebazaar.yaml` config file.
|
||||
A random `token_secret` will be added for you. If no `[directory]` is specified, the file will be created in the working directory.
|
||||
|
||||
#### Running FileBazaar
|
||||
|
||||
To start FileBazaar, run `$ filebazaar [path]`. You can either specify the path to the files directory or to the `_filebazaar.yaml` file.
|
||||
If no `[path]` is specified, defaults to the working directory.
|
||||
|
||||
## File Preview
|
||||
|
||||
FileBazaar can currently generate previews for the following file types:
|
||||
|
||||
- Images: a preview image will be generated by pixelating the left-half and adding watermark text using [node-canvas](https://github.com/Automattic/node-canvas) and [graphicsmagick](http://www.graphicsmagick.org) (see [example image](https://i.imgur.com/OmrUysL.png)).
|
||||
- Images: a preview image will be generated by pixelating the left half of the image and adding watermark text using [node-canvas](https://github.com/Automattic/node-canvas) and [graphicsmagick](http://www.graphicsmagick.org) (see [example image](https://i.imgur.com/OmrUysL.png)).
|
||||
|
||||
- Videos & audio: a preview will be generated by slicing off the first 30 seconds using [ffmpeg](http://ffmpeg.org).
|
||||
|
||||
|
|
Loading…
Reference in New Issue