Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dotfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chris Coley
dotfiles
Compare revisions
1fd9642bbd654edad575a27fe81ec3d03b65e00d to 78adbd05312e1c530acd5870df9828d51b52279b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
chris/dotfiles
Select target project
No results found
78adbd05312e1c530acd5870df9828d51b52279b
Select Git revision
Loading items
Swap
Target
chris/dotfiles
Select target project
chris/dotfiles
1 result
1fd9642bbd654edad575a27fe81ec3d03b65e00d
Select Git revision
Loading items
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Remove ' (year)' from new MKV titles
· c146c7f3
Chris Coley
authored
6 years ago
c146c7f3
Add a flag to specify a prefix to prepend to BTS files
· 78adbd05
Chris Coley
authored
6 years ago
78adbd05
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/mkvanalyze
+18
-3
18 additions, 3 deletions
bin/mkvanalyze
with
18 additions
and
3 deletions
bin/mkvanalyze
View file @
78adbd05
...
...
@@ -36,6 +36,10 @@ Options:
-f
This script will attempt to fix any issues it finds.
-b <bts-prefix>
This allows you to specify a prefix to prepend to the names of "Behind the
Scenes" files.
-d
When fixing video dimension issues, preserve the display dimensions.
...
...
@@ -53,11 +57,15 @@ EOF
flag_f
=
0
flag_d
=
0
flag_p
=
0
while
getopts
'fdph'
flag
;
do
bts_prefix
=
''
while
getopts
'fb:dph'
flag
;
do
case
"
${
flag
}
"
in
f
)
flag_f
=
1
;;
b
)
bts_prefix
=
"
$OPTARG
"
;;
d
)
flag_d
=
1
;;
...
...
@@ -113,6 +121,13 @@ while IFS= read -rd '' file <&3; do
if
[[
$flag_f
-eq
1
]]
;
then
new_title
=
"
$(
basename
"
$file
"
)
"
# get the filename
new_title
=
"
${
new_title
%.*
}
"
# remove the extension
new_title
=
"
${
new_title
/% ([0-9][0-9][0-9][0-9])/
}
"
# remove the year
# If this file is a 'Behind The Scenes' file add the prefix
if
[[
-n
$bts_prefix
&&
"
$(
dirname
"
$file
"
)
"
=
~
[
Bb]ehind
\
[
Tt]he
\
[
Ss]cenes
$
]]
;
then
new_title
=
"
$bts_prefix$new_title
"
fi
echo
-n
"Enter a title, or s to skip [
$new_title
]: "
read
-e
user_title
new_title
=
"
${
user_title
:-
$new_title
}
"
...
...
This diff is collapsed.
Click to expand it.