-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ca8d1b2
Showing
50 changed files
with
3,448 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
py YTMVG.py -a "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
python3 YTMVG.py -a "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: "🐛 Bug Report" | ||
description: Create a new ticket for a bug. | ||
title: "🐛 [Bug] — <Title>" | ||
labels: ["bug"] | ||
|
||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: "Description" | ||
description: Please enter an explicit description of your issue. | ||
placeholder: Short and explicit description of your incident... | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reprod | ||
attributes: | ||
label: "Reproduction steps" | ||
description: Please enter an explicit description of your issue. | ||
placeholder: How did it happened? | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: screenshot | ||
attributes: | ||
label: "Screenshots" | ||
description: If applicable, add screenshots to help explain your problem. | ||
value: | | ||
![Description](Image_URL.png) | ||
render: bash | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: "Logs" | ||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. | ||
render: bash | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: os | ||
attributes: | ||
label: "Used OS" | ||
multiple: true | ||
options: | ||
- Windows | ||
- Linux | ||
- MacOS | ||
validations: | ||
required: true | ||
- type: markdown | ||
attributes: | ||
value: | | ||
--- | ||
- type: checkboxes | ||
attributes: | ||
label: Is there an existing report for this? | ||
description: Please search to see if this type of report already exists, and update program version if outdated. | ||
options: | ||
- label: My issue isn't a duplicate, and I use the latest version. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "💡 Feature Request" | ||
description: Create a new ticket for a new feature request | ||
title: "💡 [Feature] — <Title>" | ||
labels: ["question"] | ||
|
||
body: | ||
- type: textarea | ||
id: summary | ||
attributes: | ||
label: "Summary" | ||
description: Provide a brief explanation of the feature. | ||
placeholder: Describe your feature request in a few lines. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reference_issues | ||
attributes: | ||
label: "Reference Issues" | ||
description: Common issues. | ||
placeholder: "#Issues IDs" | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: basic_example | ||
attributes: | ||
label: "Basic Example" | ||
description: Indicate here some basic examples of your feature. | ||
placeholder: A few specific words about your feature request. | ||
validations: | ||
required: false | ||
- type: markdown | ||
attributes: | ||
value: | | ||
--- | ||
- type: checkboxes | ||
attributes: | ||
label: Is there an existing ticket for this? | ||
description: Please search to see if an issue already exists and/or is was not implemented in a recent version. | ||
options: | ||
- label: I have searched the existing issues and checked the recent builds/commits. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"Media": { | ||
"Image": { | ||
"Path": "", | ||
"Thumbnail": { | ||
"Generate": true, | ||
"Resize": false, | ||
"Background": { | ||
"Color": { | ||
"Type": "Wet" | ||
}, | ||
"Properties": { | ||
"Brightness": "40.00%", | ||
"Saturation": "100.00%" | ||
} | ||
} | ||
} | ||
}, | ||
"Audio": { | ||
"Path": "", | ||
"Bitrate": "255k" | ||
}, | ||
"Video": { | ||
"Generate": true, | ||
"Maximum_Resolution": "1080p" | ||
}, | ||
"Description": { | ||
"Generate": true | ||
} | ||
}, | ||
"Settings": { | ||
"Preset": null, | ||
"Directory": { | ||
"Initial": { | ||
"Audio": "~/Music", | ||
"Image": "~/Pictures" | ||
}, | ||
"Open": true, | ||
"Output": "./Videos" | ||
}, | ||
"Logs": { | ||
"Verbosity": 1, | ||
"Information": true, | ||
"Sound": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Resolution = "720p" | ||
Audio Bitrate = "128k" | ||
Resize Thumbnail = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Resolution = "1080p" | ||
Audio Bitrate = "224k" | ||
Resize Thumbnail = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Resolution = "2160p" | ||
Audio Bitrate = "257k" | ||
Resize Thumbnail = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
__YT = fg.white + "You" + bg.red + "Tube" + bg.rs + Styles.Reset | ||
|
||
Parser = ArgumentParser( | ||
prog = __name__ + ".py", | ||
description = __doc__.split("\n")[0].replace("YouTube", __YT), | ||
add_help = 0, | ||
allow_abbrev = 0, | ||
formatter_class = \ | ||
lambda prog, size = 750: \ | ||
HelpFormatter( | ||
prog, width = size, | ||
max_help_position = size | ||
) | ||
) | ||
|
||
#-=-=-=-# | ||
|
||
Resolutions = ( | ||
4320, 2160, | ||
1440, 1080, 720, | ||
480, 360, 240, 144 | ||
) | ||
|
||
Colors_Dict = { | ||
"1": 1, "Wet": 1, | ||
"2": 2, "Dry": 2 | ||
} | ||
|
||
#-=-=-=-# | ||
|
||
Required = Parser.add_argument_group("Required arguments") | ||
Background = Parser.add_argument_group("Background color arguments") | ||
Optional = Parser.add_argument_group("Optional arguments") | ||
Switch = Parser.add_argument_group("Switch arguments") | ||
|
||
#-=-=-=-# | ||
# Required | ||
|
||
Required.add_argument( | ||
"-a", "--audio", type = str, required = 1, | ||
default = Config["Media"]["Audio"]["Path"], | ||
metavar = '"str"', help = "Audio file path. {0}Accepts MP3/FLAC/OGG".format(Styles.OK) | ||
) | ||
|
||
Required.add_argument( | ||
"-i", "--image", type = str, | ||
default = Config["Media"]["Image"]["Path"], | ||
metavar = '"str"', | ||
help = '{1}Static{2} image file path. {0}If none, tries to get an embedded front cover art from "-a"{2}'.format( | ||
Styles.Info, Styles.Error, Styles.Reset | ||
) | ||
) | ||
|
||
#-=-=-=-# | ||
# Background | ||
|
||
Background.add_argument( | ||
"-c", "--color", type = str, | ||
choices = Colors_Dict.keys(), | ||
default = Config["Media"]["Image"]["Thumbnail"]["Background"]["Color"]["Type"], | ||
metavar = "[1, 2]", | ||
help = "Index of the element of the image color clusters list" | ||
) | ||
|
||
Background.add_argument( | ||
"-bgb", "--brightness", type = str, | ||
default = Config["Media"]["Image"]["Thumbnail"]["Background"]["Properties"]["Brightness"], | ||
metavar = "[range(25, 75)]%", | ||
help = "Thumbnail background color brightness, in {0}%%".format(Styles.Warning) | ||
) | ||
|
||
Background.add_argument( | ||
"-bgs", "--saturation", type = str, | ||
default = Config["Media"]["Image"]["Thumbnail"]["Background"]["Properties"]["Saturation"], | ||
metavar = "[range(100, 250)]%", | ||
help = "Thumbnail background color saturation, in {0}%%".format(Styles.Warning) | ||
) | ||
|
||
#-=-=-=-# | ||
# Optional | ||
|
||
Optional.add_argument( | ||
"-r", "--resolution", type = str, | ||
choices = [str(Resolution) + "p" for Resolution in Resolutions], | ||
default = Config["Media"]["Video"]["Maximum_Resolution"], | ||
metavar = "[int]p", | ||
help = "Maximum video resolution" | ||
) | ||
|
||
Optional.add_argument( | ||
"-ab", "--audio-bitrate", type = str, | ||
default = str(Config["Media"]["Audio"]["Bitrate"]), | ||
metavar = "[range(96, 257)]k", | ||
help = "{0}Video audio bitrate{4}, in {2}kb/s{4}. If {2}> 256{4}, the {3}experimental{4} lossless {1}FLAC{4} codec is used".format( | ||
Styles.Info, Styles.Meta_Info_2, Styles.Warning, Styles.Error, Styles.Reset | ||
) | ||
) | ||
|
||
Optional.add_argument( | ||
"-d", "--directory", type = str, | ||
default = Config["Settings"]["Directory"]["Output"], | ||
metavar = '"str"', | ||
help = "Moves the directory with generated files to provided location" | ||
) | ||
|
||
Optional.add_argument( | ||
"-p", "--preset", type = str, default = Config["Settings"]["Preset"], | ||
metavar = '["{0}", ...]'.format('", "'.join([ | ||
".".join(File.split(".")[:-1]).lower() | ||
for File in os.listdir("Data/Presets")[:2] | ||
])), | ||
help = 'Preset name in {0}Data/Presets{2} directory. {1}Bypasses already set command flags{2}'.format( | ||
Styles.OK, Styles.Error, | ||
Styles.Reset | ||
) | ||
) | ||
|
||
Optional.add_argument( | ||
"-v", "--verbosity", type = int, | ||
choices = (-1, 0, 1, 2), | ||
default = Config["Settings"]["Logs"]["Verbosity"], | ||
metavar = "[-1, 0, 1, 2]", | ||
help = "Verbosity level. {0}-1{2} for {1}none{2}, {0}0{2} for {1}basic FFmpeg stats{2}, {0}1{2} for {1}everything{2}, {0}2{2} for {1}extended logs{2}".format( | ||
Styles.Info, Styles.Meta_Info_2, | ||
Styles.Reset | ||
) | ||
) | ||
|
||
#-=-=-=-# | ||
# Switch | ||
|
||
Switch.add_argument( | ||
"-rt", "--resize-thumbnail", action = ArgParseBool(not Config["Media"]["Image"]["Thumbnail"]["Resize"]), | ||
help = "Resizes thumbnail to {0}1280x720{1} if one of cover's dimensions exceeds {0}1280{1}".format( | ||
Styles.Info, Styles.Reset | ||
) | ||
) | ||
|
||
Switch.add_argument( | ||
"-nv", "--no-video", action = ArgParseBool(not Config["Media"]["Video"]["Generate"]), | ||
help = "Doesn't generate the video file" | ||
) | ||
|
||
Switch.add_argument( | ||
"-nt", "--no-thumbnail", action = ArgParseBool(not Config["Media"]["Image"]["Thumbnail"]["Generate"]), | ||
help = "Doesn't generate the thumbnail image" | ||
) | ||
|
||
Switch.add_argument( | ||
"-nd", "--no-description", action = ArgParseBool(not Config["Media"]["Description"]["Generate"]), | ||
help = "Doesn't generate the description file" | ||
) | ||
|
||
Switch.add_argument( | ||
"-nb", "--no-bell", action = ArgParseBool(not Config["Settings"]["Logs"]["Sound"]), | ||
help = 'Doesn\'t print the {0}"BEL"{1} character at ending'.format(Styles.Meta_Info_2, Styles.Reset) | ||
) | ||
|
||
Switch.add_argument( | ||
"-nod", "--no-open-directory", | ||
action = ArgParseBool(not Config["Settings"]["Directory"]["Open"]), | ||
help = "Doesn't open directory after creating file" | ||
) | ||
|
||
Switch.add_argument( | ||
"-cst", "--color-sorting-test", | ||
action = "store_true", | ||
help = SUPPRESS | ||
) | ||
|
||
Switch.add_argument("-h", "--help", action = "help", help = "Shows this message") | ||
|
||
#-=-=-=-# | ||
|
||
for Argument in Parser._actions: | ||
if not Argument.help.endswith((SUPPRESS, "!")): | ||
Argument.help += Styles.Reset + "." | ||
|
||
args = Parser.parse_args() |
Oops, something went wrong.