Old changes
This commit is contained in:
3
deportfolio.sh
Normal file
3
deportfolio.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
# Helper for unfucking Adobe's stupid Portfolios
|
||||
# TODO: Currently only merges, can we automatically extract?
|
||||
pdftk $(ls -1v) cat output $1
|
||||
@@ -115,14 +115,15 @@ def do():
|
||||
print("Using destreamer.js at {}".format(path_to_destreamer))
|
||||
call("node --max-http-header-size 32768 {} --skip -k -o {} -i {}".format(path_to_destreamer, downloaded, " ".join(urls)), shell=True)
|
||||
for entry in os.scandir(downloaded):
|
||||
# Normalise names
|
||||
# Put file extension to one side for safekeeping
|
||||
split = entry.name.split('.')
|
||||
extension = split[1]
|
||||
if str(extension) == "mkv":
|
||||
# Normalise names
|
||||
name = split[0].replace(',', '').split('#')[0] # Discard all commas, and unique id doodad
|
||||
head, sep, tail = name.partition(' ') # Discard leading date
|
||||
split2 = tail.split()
|
||||
date = dparser.parse(split2[-1], fuzzy=True) # Parse the date
|
||||
date = dparser.parse(split2[1], fuzzy=True) # Parse the date
|
||||
folder_path = split2[0] + split2[1] # TODO Fragile
|
||||
title = re.search(r'\d+-\d+\s[\d\w\s]*', tail)
|
||||
if re.match:
|
||||
@@ -141,7 +142,7 @@ def do():
|
||||
# Extract audio, process it, add it back to the video
|
||||
video_in = dest
|
||||
processed_audio = os.path.join(processed_audio_dir, filename.split(".")[0] + ".wav")
|
||||
final_output_name = os.path.join(final, filename.split(".")[0] + ".mp4")
|
||||
final_output_name = os.path.join(final, filename.split(".")[0] + ".mkv")
|
||||
do_command("New:")
|
||||
do_command("Import2: Filename={}".format(video_in))
|
||||
time.sleep(5)
|
||||
|
||||
Reference in New Issue
Block a user