Skip to content

Commit

Permalink
[#34] Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
llaumgui committed Sep 4, 2020
1 parent 55639de commit fd47cec
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 69 deletions.
22 changes: 0 additions & 22 deletions docs/_layouts/default.html

This file was deleted.

62 changes: 62 additions & 0 deletions docs/_layouts/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<header class="navbar navbar-expand-md navbar-custom" id="top">
<div class="container">
<a class="navbar-brand" href="{{ '/' | relative_url }}">{{ site.name }}</a>

<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<nav class="navbar-collapse collapse" role="navigation" id="navbarSupportedContent">
<ul class="navbar-nav">
{% assign sorted_pages = site.pages | sort: "order" %}
{% for p in sorted_pages %}
{% assign is_homepage = false %}
{% if p.homepage == true or p.isHome == true %}
{% assign is_homepage = true %}
{% endif %}

{% assign show_in_menu = true %}
{% if p.show_in_menu != nil and p.show_in_menu == false %}
{% assign show_in_menu = false %}
{% elsif p.hide != nil and p.hide == true %}
{% assign show_in_menu = false %}
{% endif %}

{% if is_homepage != true and show_in_menu == true and p.title %}
<li class="nav-item {% if page.title == p.title %}active{% endif %}">
<a
class="nav-link"
href="{{ p.url | relative_url }}"
>
{{ p.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
<ul class="navbar-nav ml-auto">
{% for p in site.links.header %}
<li class="nav-item {% if page.title == p.title %}active{% endif %}">
<a
class="nav-link"
href="{{ p.url }}"
>
{% include fa-icon.html icon=p.icon brand=p.brand %}
{{ p.title }}
</a>
</li>
{% endfor %}
</ul>
</nav>
</div>
</header>
39 changes: 36 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ order: 2

## Configuration file

You can use [the example configuration file](https://github.com/llaumgui/seedboxsync/blob/master/config/seedboxsync.yml.example). This file can be located in:
You can use [the example configuration file](https://github.com/llaumgui/seedboxsync/blob/master/config/seedboxsync.yml.example). This example file can be located in:

* /usr/local/config/ (pip install)
* ~/.local/config/ (pip install in user privileges)
Expand Down Expand Up @@ -109,9 +109,9 @@ seedbox:
exclude_syncing: .*missing$|^\..*\.sw
```

### Configuration in you NAS
### Configuration about your NAS

Your NAS configuration is in local and parts:
Your NAS configuration is in local and pid sections:

```yml
#
Expand Down Expand Up @@ -141,3 +141,36 @@ pid:
download_path: ~/.config/seedboxsync/lock/download.pid
```

### Configuration of a ping service

Ping service is called by `--ping` argument.

Currently only [Healthchecks](https://github.com/healthchecks/healthchecks) ping service is supported.

#### Healthchecks

Add a healthchecks by sync command.

```yml
#
# Healthchecks ping service
#
healthchecks:
### sync-seedbox part
sync_seedbox:
## Enable or disable service
enabled: true
## Ping URL
ping_url: https://hc-ping.com/ca5e1159-9acf-410c-9202-f76a7bb856e0
### sync-blackhole part
sync_blackhole:
## Enable or disable service
enabled: true
## Ping URL
ping_url: https://hc-ping.com/ca5e1159-9acf-410c-9202-f76a7bb856e0
```
33 changes: 0 additions & 33 deletions docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,3 @@ seedboxsync --help

make test
```

### Releasing to PyPi

Before releasing to PyPi, you must configure your login credentials:

**~/.pypirc**:

```conf
[pypi]
username = YOUR_USERNAME
password = YOUR_PASSWORD
```

Then use the included helper function via the `Makefile`:

```bash
make dist

make dist-upload
```

## Deployments

### Docker

Included is a basic `Dockerfile` for building and distributing `SeedboxSync`,
and can be built with the included `make` helper:

```bash
make docker

docker run -it seedboxsync --help
```
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ description: Script for sync operations between your NAS and your seedbox.

Provides synchronization functions between your NAS and your seedbox:

* Syncs a local black hole (ie: a NAS folder) with the black hole of your seedbox.
* Syncs a local blackhole (ie: a NAS folder) with the blackhole of your seedbox.
* Downloads files from your seedbox to your NAS. Stores the list of downloaded files in a sqlite database, to prevent to download a second time.
* Also provides queries to know last torrents, last downloads, etc.
26 changes: 16 additions & 10 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ seedboxsync
## Use in command line

```bash
usage: seedboxsync [-h] [-d] [-q] [-v] {clean-in-progress,list-downloaded,list-in-progress,list-uploaded,sync-blackhole,sync-seedbox} ...
usage: seedboxsync [-h] [-d] [-q] [-v]
{clean-in-progress,list-downloaded,ld,list-in-progress,lip,list-uploaded,lu,sync-blackhole,sb,sync-seedbox,ss}
...

Script for sync operations between your NAS and your seedbox

Expand All @@ -25,13 +27,17 @@ optional arguments:
-v, --version show program's version number and exit
sub-commands:
{clean-in-progress,list-downloaded,list-in-progress,list-uploaded,sync-blackhole,sync-seedbox}
clean-in-progress clean the list of files currently in download from seedbox
list-downloaded list of lasts files downloaded from seedbox
list-in-progress list of files currently in download from seedbox
list-uploaded list of lasts torrents uploaded from blackhole
sync-blackhole sync torrent from blackhole to seedbox
sync-seedbox sync file from seedbox
{clean-in-progress,list-downloaded,ld,list-in-progress,lip,list-uploaded,lu,sync-blackhole,sb,sync-seedbox,ss}
clean-in-progress clean the list of files currently in download from
seedbox
list-downloaded (ld)
list of lasts files downloaded from seedbox
list-in-progress (lip)
list of files currently in download from seedbox
list-uploaded (lu) list of lasts torrents uploaded from blackhole
sync-blackhole (sb)
sync torrent from blackhole to seedbox
sync-seedbox (ss) sync file from seedbox
Usage: seedboxsync sync-blackhole --dry-run
```
Expand All @@ -40,8 +46,8 @@ Usage: seedboxsync sync-blackhole --dry-run
```bash
# Sync blackhole every 2mn
*/2 * * * * root seedboxsync sync-blackhole
*/2 * * * * root seedboxsync -q sync-blackhole --ping
# Download torrents finished every 15mn
*/15 * * * * root seedboxsync sync-seedbox
*/15 * * * * root seedboxsync -q sync-seedbox --ping
```

0 comments on commit fd47cec

Please sign in to comment.