aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiederick de Vries <diederick@diederickdevries.net>2019-04-15 07:27:56 +0200
committerDiederick de Vries <diederick@diederickdevries.net>2019-04-15 07:27:56 +0200
commite68af60360705c17d645546946daeaca9655bce4 (patch)
treef37ee7b8c8dd5f39fba3223459b553b0d1bccee0
parent7f688ac5466ff1d38b487a436bd629e572093ef2 (diff)
downloadaftercare-e68af60360705c17d645546946daeaca9655bce4.tar.gz
aftercare-e68af60360705c17d645546946daeaca9655bce4.tar.bz2
aftercare-e68af60360705c17d645546946daeaca9655bce4.zip
chore: consistenly use capitalization in log messages
-rw-r--r--aftercare.groovy16
1 files changed, 8 insertions, 8 deletions
diff --git a/aftercare.groovy b/aftercare.groovy
index 44da5de..21db104 100644
--- a/aftercare.groovy
+++ b/aftercare.groovy
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2016-2018 Diederick de Vries <diederick@diederickdevries.net> 2 * Copyright (C) 2016-2019 Diederick de Vries <diederick@diederickdevries.net>
3 * 3 *
4 * Aftercare 4 * Aftercare
5 * 5 *
@@ -81,7 +81,7 @@ class Aftercare {
81 allowed.contains(file.name.substring(file.name.lastIndexOf('.') + 1)) 81 allowed.contains(file.name.substring(file.name.lastIndexOf('.') + 1))
82 } 82 }
83 83
84 log.info "found $files.size files of allowed types $allowed in $input" 84 log.info "Found $files.size files of allowed types $allowed in $input"
85 85
86 if (files.isEmpty()) { 86 if (files.isEmpty()) {
87 System.exit(0) 87 System.exit(0)
@@ -102,7 +102,7 @@ class Aftercare {
102 ] 102 ]
103 } 103 }
104 104
105 log.debug "found $episodes.size episodes" 105 log.debug "Found $episodes.size episodes"
106 106
107 episodes.each { episode -> 107 episodes.each { episode ->
108 def targetdir = new File("$output/$episode.series/Season $episode.season") 108 def targetdir = new File("$output/$episode.series/Season $episode.season")
@@ -114,9 +114,9 @@ class Aftercare {
114 } 114 }
115 115
116 try { 116 try {
117 log.debug "copying $episode.original" 117 log.debug "Copying $episode.original"
118 if (!dry_run) { println (['cp', episode.original, targetfile].execute().text) } 118 if (!dry_run) { println (['cp', episode.original, targetfile].execute().text) }
119 log.debug "copied $episode.original to $targetfile" 119 log.debug "Copied $episode.original to $targetfile"
120 if (!dry_run) { 120 if (!dry_run) {
121 println (['chown', "$user:$group", targetfile].execute().text) 121 println (['chown', "$user:$group", targetfile].execute().text)
122 println (['chmod', "$chmod", targetfile].execute().text) 122 println (['chmod', "$chmod", targetfile].execute().text)
@@ -124,17 +124,17 @@ class Aftercare {
124 } catch (Exception e) { 124 } catch (Exception e) {
125 def folder = new File(episode.path) 125 def folder = new File(episode.path)
126 if (!dry_run) { Files.move(Paths.get(episode.path), Paths.get("$error/$folder.name")) } 126 if (!dry_run) { Files.move(Paths.get(episode.path), Paths.get("$error/$folder.name")) }
127 log.warn "moved $episode.path to error folder: " + e.getMessage() 127 log.warn "Moved $episode.path to error folder: " + e.getMessage()
128 } 128 }
129 } 129 }
130 130
131 log.debug "moving contents of $input to $done" 131 log.debug "Moving contents of $input to $done"
132 if (!dry_run) { 132 if (!dry_run) {
133 completed.eachFile (ANY) { folder -> 133 completed.eachFile (ANY) { folder ->
134 Files.move(Paths.get(folder.getCanonicalPath()), Paths.get("$done/$folder.name")) 134 Files.move(Paths.get(folder.getCanonicalPath()), Paths.get("$done/$folder.name"))
135 } 135 }
136 } 136 }
137 log.info "finished" 137 log.info "Finished"
138 } 138 }
139 139
140 private String capitalize(String s) { 140 private String capitalize(String s) {