aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiederick de Vries <diederick@diederickdevries.net>2018-06-13 21:58:17 +0200
committerDiederick de Vries <diederick@diederickdevries.net>2018-06-13 22:18:45 +0200
commitb8815cab9df6cf7afe3ef503a11647adeab71560 (patch)
treef4d9905090a6ec9bb8c4bcca6215a63559ac1139
parentebbe34d20ddd2ed7008f0b3374eba861caca66e7 (diff)
downloadaftercare-b8815cab9df6cf7afe3ef503a11647adeab71560.tar.gz
aftercare-b8815cab9df6cf7afe3ef503a11647adeab71560.tar.bz2
aftercare-b8815cab9df6cf7afe3ef503a11647adeab71560.zip
Update README.md
-rw-r--r--README.md37
-rw-r--r--properties.conf13
2 files changed, 33 insertions, 17 deletions
diff --git a/README.md b/README.md
index 5ec03c3..8a6147c 100644
--- a/README.md
+++ b/README.md
@@ -12,9 +12,8 @@ Naive in the sense that it expects original file names like these:
12 12
13where the series title is everything before the season/episode numbers. The S and E can be lowecase as well, the s can be left out and the E can also be an uppercase or lowercase X. Any dots are replaced with spaces. Any apostrophes in the title are discarded. 13where the series title is everything before the season/episode numbers. The S and E can be lowecase as well, the s can be left out and the E can also be an uppercase or lowercase X. Any dots are replaced with spaces. Any apostrophes in the title are discarded.
14 14
15Review and adapt the lines starting with def, below the import statements to add or remove file types and more importantly, configure which directories, user, group and unix rights should be used. 15Put a file with, name it `property.conf` or something else descriptive, and configure which directories, user, group and unix rights should be used:
16 16
17 basedir A base directory under which the other directories reside, if any.
18 output The directory under which your media renderer expects the media files. 17 output The directory under which your media renderer expects the media files.
19 input The directory where the originals are 18 input The directory where the originals are
20 done The directory where the succesful originals are moved 19 done The directory where the succesful originals are moved
@@ -23,5 +22,35 @@ Review and adapt the lines starting with def, below the import statements to add
23 user The unix user which will own the resulting media files 22 user The unix user which will own the resulting media files
24 group The unix group which will own the resulting media files 23 group The unix group which will own the resulting media files
25 chmod The unix rights (octal notation) which the resulting media files should have 24 chmod The unix rights (octal notation) which the resulting media files should have
26 25
27Trigger this script with inotify(7) or a cron job. Also periodically clean the done and error directories. 26 dry_run Whether Aftercare should do a dry run
27
28 allowed a list of allowed file types
29 nrs a regex matching with how the original filenames state their series and episode number.
30
31Example:
32
33 output = "TV"
34 input = "complete"
35 done = "done"
36 error = "error"
37
38 user = "diederick"
39 group = "video"
40 chmod = "644"
41
42 dry_run = false
43
44 allowed = ['mkv', 'mp4', 'mpg', 'avi']
45 nrs = "[Ss]?[0-9]{1,2}[EeXx][0-9]{1,2}"
46
47You can run the script manually (`sudo` to set the unix user, group and rights):
48
49 $ sudo groovy aftercare.groovy property.conf
50
51but you shouldn't. The two `systemd` files will let you run the script automatically every hour. In `aftercare.service`, adapt the line starting with `ExecStart` to point it to where you install Aftercare. Put both files in `/etc/systemd/system/` and do:
52
53 $ sudo systemctl start aftercare.timer
54 $ sudo systemctl enable aftercare.timer
55
56If your system doesn't use `systemd`, you can trigger Aftercare with inotify(7) or a cron job. Don't forget to periodically clean the `done` and `error` directories.
diff --git a/properties.conf b/properties.conf
deleted file mode 100644
index 51563bf..0000000
--- a/properties.conf
+++ /dev/null
@@ -1,13 +0,0 @@
1output = ""
2input = ""
3done = ""
4error = ""
5
6user = ""
7group = ""
8chmod = ""
9
10dry_run = false
11
12allowed = ['mkv', 'mp4', 'mpg', 'avi']
13nrs = "[Ss]?[0-9]{1,2}[EeXx][0-9]{1,2}"