summary refs log tree commit diff stats
path: root/split_album.py
diff options
context:
space:
mode:
authorakspecs <akspecs@gmail.com>2021-11-06 22:07:52 -0700
committerakspecs <akspecs@gmail.com>2021-11-06 22:19:03 -0700
commit3b4f3d3d918908831b29783a619d7132f41fedbc (patch)
treeb5d2bb431324a4ca8e34a713cd9c41447e0782c0 /split_album.py
parent89c4a068a991a3a4072bd0b93e23eb5f6a39366a (diff)
downloadsplit-album-3b4f3d3d918908831b29783a619d7132f41fedbc.tar.gz
split_album.py: change input_file to input_txt_file
input_file is more ambiguous than input_txt_file, especially when
certain functions take two files as inputs, e.g. input_txt_file and
multimedia_file are two unambigious file inputs, as opposed to
input_file and multimedia_file
Diffstat (limited to 'split_album.py')
-rw-r--r--split_album.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/split_album.py b/split_album.py
index a2ca0ab..141b4f6 100644
--- a/split_album.py
+++ b/split_album.py
@@ -74,7 +74,7 @@ def iterate_clip(input_list, multimedia_file):
         )
 
 
-def parse_input(input_file, multimedia_file):
+def parse_input(input_txt_file, multimedia_file):
     """
     parse a text input file containing timestamps and song titles
     return a list of lists.
@@ -89,7 +89,7 @@ def parse_input(input_file, multimedia_file):
     07:02  Chernikovskaya Hata - Владимирский централ
     ---- end file ----
     """
-    with open(input_file) as open_file:
+    with open(input_txt_file) as open_file:
         timestamp_title = [
             [item.strip() for item in line.split('  ')] for line in open_file
         ]
@@ -124,8 +124,9 @@ def main():
     )
     args = arg_parser.parse_args()
     album = args.multimedia_file
+    txt = args.input_txt
     title_range = parse_input(
-        input_file=args.input_txt,
+        input_txt_file=txt,
         multimedia_file=album
     )
     iterate_clip(title_range, album)