Skip to content

Commit 7f79196

Browse files
authored
Merge pull request #56 from reactorcoremeltdown/master
Added command on sync documentation
2 parents e5493dd + e38cafb commit 7f79196

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

docs/extensions/commandonsync.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Run a Command on Sync
3+
---
4+
5+
Run a predefined external command upon sync completion.
6+
7+
- [Extension Source](https://github.com/gpodder/gpodder/blob/master/share/gpodder/extensions/command_on_sync.py)
8+
9+
10+
| setting | value | description | version |
11+
|--------------------|------------|---------------------------------------------|-------------------|
12+
| command | string | command to execute (passed to the shell) | git master branch |
13+
14+
Introduction
15+
-----------
16+
17+
One might want to run an external program when all podcast episodes get synchronized to external database (refresh a player's database or enqueue the episode, download episode statistics, run other device-related program like Last.FM scrobbler, etc.). This extension makes it possible to execute any command.
18+
19+
Usage
20+
-----
21+
22+
1. In the Extensions tab under Preferences, check "Run a Command on Sync" (in the "Post Sync" section).
23+
2. In the Advanced Configuration (**Edit Configuration** button), define the `extensions.command_on_sync.command`
24+
entry to the command you want to run.
25+
26+
If the command is a bit long, write a wrapper script. You can also directly edit
27+
`$GPODDER_HOME/Settings.json` to refine your command.
28+
29+
Example Commands
30+
--------------
31+
32+
### Linux
33+
34+
```
35+
zenity --info --width=600 --text="All episodes synchronised"
36+
```
37+
38+
displays all variables in a dialog window (requires zenity).
39+
40+
### Scrobble playback log file to Last.FM (requires rb-scrobbler)
41+
42+
```
43+
rb-scrobbler -f $SCROBBLER_LOG_FILE -n delete-on-success
44+
```
45+
46+
You can obtain rb-scrobbler on [Github](https://github.com/jeselnik/rb-scrobbler).

0 commit comments

Comments
 (0)