karaoke-lyrics-processor 0.4.1__py3-none-any.whl → 0.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1 @@
1
1
  from .karaoke_lyrics_processor import KaraokeLyricsProcessor
2
-
@@ -1,7 +1,12 @@
1
1
  #!/usr/bin/env python
2
2
  import argparse
3
3
  import logging
4
- import pkg_resources
4
+
5
+ try:
6
+ from importlib.metadata import version
7
+ except ImportError:
8
+ # Fallback for Python < 3.8
9
+ from importlib_metadata import version
5
10
  from karaoke_lyrics_processor import KaraokeLyricsProcessor
6
11
 
7
12
 
@@ -17,7 +22,7 @@ def main():
17
22
  formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=50),
18
23
  )
19
24
 
20
- package_version = pkg_resources.get_distribution("karaoke-lyrics-processor").version
25
+ package_version = version("karaoke-lyrics-processor")
21
26
  parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {package_version}")
22
27
  parser.add_argument("-d", "--debug", action="store_true", help="Enable debug mode, setting log level to DEBUG.")
23
28
  parser.add_argument("-o", "--output", type=str, help="Optional: Specify the output filename for the processed lyrics.")
@@ -5,6 +5,7 @@ import docx2txt
5
5
  from striprtf.striprtf import rtf_to_text
6
6
  import os
7
7
  import codecs
8
+ import textract # Add textract import
8
9
 
9
10
 
10
11
  class KaraokeLyricsProcessor:
@@ -60,15 +61,20 @@ class KaraokeLyricsProcessor:
60
61
  def read_txt_file(self):
61
62
  with codecs.open(self.input_filename, "r", encoding="utf-8") as infile:
62
63
  content = infile.read()
63
- self.logger.debug(f"Raw content read from file: {repr(content)}")
64
64
  lines = content.splitlines()
65
- self.logger.debug(f"Number of lines read: {len(lines)}")
66
- for i, line in enumerate(lines):
67
- self.logger.debug(f"Line {i}: {repr(line)}")
65
+ self.logger.debug(f"Read {len(lines)} lines from {self.input_filename}")
68
66
  return self.clean_text(content).splitlines()
69
67
 
70
68
  def read_doc_file(self):
71
- text = docx2txt.process(self.input_filename)
69
+ try:
70
+ text = docx2txt.process(self.input_filename)
71
+ except Exception as e:
72
+ self.logger.debug(f"docx2txt failed to read file, trying textract: {str(e)}")
73
+ try:
74
+ # Use textract as fallback for .doc files
75
+ text = textract.process(self.input_filename).decode("utf-8")
76
+ except Exception as e2:
77
+ raise ValueError(f"Failed to read doc file with both docx2txt and textract: {str(e2)}")
72
78
  return self.clean_text(text).splitlines()
73
79
 
74
80
  def read_rtf_file(self):
@@ -78,16 +84,29 @@ class KaraokeLyricsProcessor:
78
84
  return self.clean_text(plain_text).splitlines()
79
85
 
80
86
  def clean_text(self, text):
81
- self.logger.debug(f"Cleaning text: {repr(text)}")
82
- # Remove any non-printable characters except newlines and U+2005 (four-per-em space)
87
+ # Remove any non-printable characters except newlines and U+2005
88
+ original_len = len(text)
83
89
  cleaned = "".join(char for char in text if char.isprintable() or char in ["\n", "\u2005"])
84
- self.logger.debug(f"Text after removing non-printable characters: {repr(cleaned)}")
90
+ if len(cleaned) != original_len:
91
+ self.logger.debug(f"Removed {original_len - len(cleaned)} non-printable characters")
92
+
85
93
  # Replace multiple newlines with a single newline
94
+ newlines_before = cleaned.count("\n")
86
95
  cleaned = re.sub(r"\n{2,}", "\n", cleaned)
87
- self.logger.debug(f"Text after replacing multiple newlines: {repr(cleaned)}")
96
+ newlines_after = cleaned.count("\n")
97
+ if newlines_before != newlines_after:
98
+ self.logger.debug(f"Consolidated {newlines_before - newlines_after} extra newlines")
99
+
88
100
  # Remove leading/trailing whitespace from each line
89
- cleaned = "\n".join(line.strip() for line in cleaned.splitlines())
90
- self.logger.debug(f"Final cleaned text: {repr(cleaned)}")
101
+ lines_before = cleaned.splitlines()
102
+ cleaned = "\n".join(line.strip() for line in lines_before)
103
+ lines_after = cleaned.splitlines()
104
+
105
+ # Count lines that changed due to stripping
106
+ changed_lines = sum(1 for before, after in zip(lines_before, lines_after) if before != after)
107
+ if changed_lines > 0:
108
+ self.logger.debug(f"Stripped whitespace from {changed_lines} lines")
109
+
91
110
  return cleaned
92
111
 
93
112
  def find_best_split_point(self, line):
@@ -147,47 +166,39 @@ class KaraokeLyricsProcessor:
147
166
  Replace non-printable space-like characters, tabs, and other whitespace with regular spaces,
148
167
  excluding newline characters.
149
168
  """
150
- self.logger.debug(f"Replacing non-printable spaces in: {repr(text)}")
151
-
152
169
  # Log each character and its Unicode code point
153
170
  # for i, char in enumerate(text):
154
171
  # self.logger.debug(f"Character at position {i}: {repr(char)} (Unicode: U+{ord(char):04X})")
155
172
 
156
173
  # Define a pattern for space-like characters, including tabs and other whitespace, but excluding newlines
157
- space_pattern = r"[^\S\n\r]|\u00A0|\u1680|\u2000-\u200A|\u202F|\u205F|\u3000"
174
+ space_pattern = r"[^\S\n]|\u00A0|\u1680|\u2000-\u200A|\u202F|\u205F|\u3000"
158
175
 
159
176
  # Replace matched characters with a regular space
160
177
  cleaned_text = re.sub(space_pattern, " ", text)
161
178
 
162
- # Log the result of the replacement
163
- self.logger.debug(f"Text after replacing non-printable spaces: {repr(cleaned_text)}")
164
-
165
179
  # Remove leading/trailing spaces and collapse multiple spaces into one, preserving newlines
166
180
  final_text = re.sub(r" +", " ", cleaned_text).strip()
167
181
 
168
- # Log the final result
169
- self.logger.debug(f"Final text after cleaning: {repr(final_text)}")
170
-
171
182
  return final_text
172
183
 
173
184
  def clean_punctuation_spacing(self, text):
174
185
  """
175
186
  Remove unnecessary spaces before punctuation marks.
176
187
  """
177
- self.logger.debug(f"Cleaning punctuation spacing in: {text}")
188
+ self.logger.debug(f"Cleaning punctuation spacing")
178
189
  # Remove space before comma, period, exclamation mark, question mark, colon, and semicolon
179
190
  cleaned_text = re.sub(r"\s+([,\.!?:;])", r"\1", text)
180
- self.logger.debug(f"Text after cleaning punctuation spacing: {cleaned_text}")
191
+
181
192
  return cleaned_text
182
193
 
183
194
  def fix_commas_inside_quotes(self, text):
184
195
  """
185
196
  Move commas inside quotes to after the closing quote.
186
197
  """
187
- self.logger.debug(f"Fixing commas inside quotes in: {text}")
198
+ self.logger.debug(f"Fixing commas inside quotes")
188
199
  # Use regex to find patterns where a comma is inside quotes and move it outside
189
200
  fixed_text = re.sub(r'(".*?)(,)(\s*")', r"\1\3\2", text)
190
- self.logger.debug(f"Text after fixing commas inside quotes: {fixed_text}")
201
+
191
202
  return fixed_text
192
203
 
193
204
  def process_line(self, line):
@@ -228,6 +239,9 @@ class KaraokeLyricsProcessor:
228
239
  line = line[end_paren + 1 :].strip()
229
240
  else:
230
241
  split_point = self.find_best_split_point(line)
242
+ # Ensure we make progress - if split_point is 0 or too small, force a reasonable split
243
+ if split_point <= 0:
244
+ split_point = min(self.max_line_length, len(line))
231
245
  processed_lines.append(line[:split_point].strip())
232
246
  line = line[split_point:].strip()
233
247
 
@@ -265,6 +279,9 @@ class KaraokeLyricsProcessor:
265
279
  split_lines = []
266
280
  while len(line) > self.max_line_length:
267
281
  split_point = self.find_best_split_point(line)
282
+ # Ensure we make progress - if split_point is 0 or too small, force a reasonable split
283
+ if split_point <= 0:
284
+ split_point = min(self.max_line_length, len(line))
268
285
  split_lines.append(line[:split_point].strip())
269
286
  line = line[split_point:].strip()
270
287
 
@@ -289,6 +306,8 @@ class KaraokeLyricsProcessor:
289
306
 
290
307
  all_processed = True
291
308
  new_lyrics = []
309
+ previous_line_count = len(lyrics_lines)
310
+
292
311
  for line in lyrics_lines:
293
312
  line = line.strip()
294
313
  processed = self.process_line(line)
@@ -298,6 +317,11 @@ class KaraokeLyricsProcessor:
298
317
 
299
318
  lyrics_lines = new_lyrics
300
319
 
320
+ # Safety check: if no progress is being made, break out of the loop
321
+ if len(lyrics_lines) == previous_line_count and not all_processed:
322
+ self.logger.warning("No progress made in processing, forcing completion to avoid infinite loop")
323
+ break
324
+
301
325
  iteration_count += 1
302
326
 
303
327
  processed_lyrics_text = "\n".join(lyrics_lines)
@@ -307,7 +331,7 @@ class KaraokeLyricsProcessor:
307
331
  processed_lyrics_text = self.clean_punctuation_spacing(processed_lyrics_text)
308
332
 
309
333
  self.processed_lyrics_text = processed_lyrics_text
310
-
334
+
311
335
  # Try to copy to clipboard, but don't fail if it's not available
312
336
  try:
313
337
  pyperclip.copy(processed_lyrics_text)
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 karaokenerds
3
+ Copyright (c) 2023 Nomad Karaoke LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,217 @@
1
+ Metadata-Version: 2.3
2
+ Name: karaoke-lyrics-processor
3
+ Version: 0.6.0
4
+ Summary: Process song lyrics to prepare them for karaoke video production, e.g. by splitting long lines
5
+ License: MIT
6
+ Author: Andrew Beveridge
7
+ Author-email: andrew@beveridge.uk
8
+ Requires-Python: >=3.10,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: docx2txt (>=0.8)
16
+ Requires-Dist: pyperclip (>=1.8)
17
+ Requires-Dist: python-docx (>=1)
18
+ Requires-Dist: striprtf (>=0.0.27)
19
+ Requires-Dist: textract-py3 (>=2.1.0)
20
+ Project-URL: Documentation, https://github.com/nomadkaraoke/karaoke-lyrics-processor/blob/main/README.md
21
+ Project-URL: Homepage, https://github.com/nomadkaraoke/karaoke-lyrics-processor
22
+ Project-URL: Repository, https://github.com/nomadkaraoke/karaoke-lyrics-processor
23
+ Description-Content-Type: text/markdown
24
+
25
+ # Karaoke Lyrics Processor 🎶 ✍️
26
+
27
+ ![PyPI - Version](https://img.shields.io/pypi/v/karaoke-lyrics-processor)
28
+ ![Test Coverage](https://codecov.io/gh/nomadkaraoke/karaoke-lyrics-processor/branch/main/graph/badge.svg)
29
+ ![Python Version](https://img.shields.io/badge/python-3.9+-blue)
30
+ ![Tests](https://github.com/nomadkaraoke/karaoke-lyrics-processor/workflows/Test%20and%20Publish/badge.svg)
31
+
32
+ Karaoke Lyrics Processor is a tool to prepare song lyrics for karaoke video production.
33
+
34
+ It processes lyrics by intelligently splitting long lines, handling parentheses, cleaning punctuation, and ensuring that each line fits within a specified maximum length. This tool is especially useful for creating karaoke tracks where timing and line length are crucial for readability.
35
+
36
+ ## ✨ Features
37
+
38
+ ### Core Processing
39
+ - **Smart Line Splitting**: Automatically splits long lines using intelligent algorithms that prioritize commas, "and" conjunctions, and natural word boundaries
40
+ - **Parentheses Handling**: Properly processes lines containing parentheses, maintaining lyrical flow and handling nested parentheses
41
+ - **Punctuation Cleanup**: Removes unnecessary spaces before punctuation marks and fixes comma placement
42
+ - **Unicode Support**: Handles international characters and special Unicode spaces correctly
43
+ - **Safety Mechanisms**: Built-in infinite loop prevention and iteration limits for robust processing
44
+
45
+ ### File Format Support
46
+ - **Multiple Input Formats**: Supports TXT, DOCX, DOC, and RTF files
47
+ - **Encoding Handling**: Properly handles UTF-8 and various text encodings
48
+ - **Fallback Processing**: Uses multiple libraries (docx2txt, textract) for maximum compatibility
49
+
50
+ ### User Experience
51
+ - **Clipboard Integration**: Automatically copies processed lyrics to clipboard for easy pasting
52
+ - **Flexible Output**: Customizable output filenames and automatic naming conventions
53
+ - **Debug Mode**: Comprehensive logging for troubleshooting and fine-tuning
54
+ - **Command Line Interface**: Full-featured CLI with helpful options and error handling
55
+
56
+ ### Quality & Reliability
57
+ - **98% Test Coverage**: Comprehensive test suite with 88 tests covering all functionality
58
+ - **Edge Case Handling**: Robust handling of empty files, very long words, malformed input, and unusual formatting
59
+ - **Performance Tested**: Memory efficient processing with performance safeguards
60
+ - **Error Recovery**: Graceful error handling with informative messages
61
+
62
+ ## 🚀 Installation
63
+
64
+ To install the Karaoke Lyrics Processor, ensure you have Python 3.9 or newer in your environment.
65
+
66
+ This package is available on PyPI and can be installed using pip:
67
+
68
+ ```bash
69
+ pip install karaoke-lyrics-processor
70
+ ```
71
+
72
+ ## 📋 Usage
73
+
74
+ ### Command Line Interface
75
+
76
+ Process a lyrics file with default settings:
77
+ ```bash
78
+ karaoke-lyrics-processor path/to/your/lyrics.txt
79
+ ```
80
+
81
+ **Output**: Creates `path/to/your/lyrics (Lyrics Processed).txt` with processed lyrics.
82
+
83
+ ### Advanced Usage Examples
84
+
85
+ ```bash
86
+ # Custom output file
87
+ karaoke-lyrics-processor -o my_processed_lyrics.txt song.txt
88
+
89
+ # Custom line length (default is 36 characters)
90
+ karaoke-lyrics-processor -l 50 song.txt
91
+
92
+ # Debug mode for detailed logging
93
+ karaoke-lyrics-processor -d song.txt
94
+
95
+ # Combine all options
96
+ karaoke-lyrics-processor -d -o output.txt -l 40 input.docx
97
+ ```
98
+
99
+ ### Supported Input Formats
100
+
101
+ - **`.txt`** - Plain text files (UTF-8 recommended)
102
+ - **`.docx`** - Microsoft Word documents
103
+ - **`.doc`** - Legacy Microsoft Word documents
104
+ - **`.rtf`** - Rich Text Format files
105
+
106
+ ### Command Line Options
107
+
108
+ ```bash
109
+ usage: karaoke-lyrics-processor [-h] [-v] [-d] [-o OUTPUT] [-l LINE_LENGTH] filename
110
+
111
+ Process song lyrics to prepare them for karaoke video production
112
+
113
+ positional arguments:
114
+ filename Path to the lyrics file to process
115
+
116
+ options:
117
+ -h, --help Show help message and exit
118
+ -v, --version Show program's version number and exit
119
+ -d, --debug Enable debug mode with detailed logging
120
+ -o OUTPUT, --output OUTPUT Specify the output filename
121
+ -l LINE_LENGTH, --line_length LINE_LENGTH Maximum line length (default: 36)
122
+ ```
123
+
124
+ ## 🔧 Processing Features
125
+
126
+ ### Intelligent Line Splitting
127
+ The processor uses sophisticated algorithms to find optimal split points:
128
+
129
+ 1. **Comma Priority**: Splits at commas near the middle of long lines
130
+ 2. **Conjunction Splitting**: Uses "and" as split points when appropriate
131
+ 3. **Word Boundaries**: Respects word boundaries and avoids breaking words
132
+ 4. **Parentheses Awareness**: Handles parenthetical content intelligently
133
+ 5. **Fallback Mechanisms**: Forces splits when no natural break points exist
134
+
135
+ ### Text Cleaning
136
+ - Removes non-printable characters while preserving essential formatting
137
+ - Normalizes various Unicode space characters to regular spaces
138
+ - Consolidates multiple consecutive newlines
139
+ - Strips unnecessary whitespace from line beginnings and ends
140
+
141
+ ### Error Handling
142
+ - Graceful handling of unsupported file formats
143
+ - Recovery from encoding issues
144
+ - Protection against infinite processing loops
145
+ - Clear error messages for troubleshooting
146
+
147
+ ## 🧪 Development & Testing
148
+
149
+ This package maintains high quality standards with comprehensive testing:
150
+
151
+ - **98% Test Coverage** across all modules
152
+ - **88 Total Tests** including unit, integration, and CLI tests
153
+ - **Edge Case Testing** for robustness
154
+ - **Performance Testing** to prevent regressions
155
+ - **Continuous Integration** with automated testing
156
+
157
+ ### Running Tests
158
+
159
+ ```bash
160
+ # Install development dependencies
161
+ pip install pytest pytest-cov
162
+
163
+ # Run the full test suite
164
+ pytest --cov=karaoke_lyrics_processor --cov-report=html
165
+
166
+ # Run with verbose output
167
+ pytest -v
168
+
169
+ # Generate coverage report
170
+ pytest --cov-report=term-missing
171
+ ```
172
+
173
+ ## 🤝 Contributing
174
+
175
+ Contributions are very much welcome! This project follows best practices for maintainability:
176
+
177
+ 1. **Fork** the repository
178
+ 2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
179
+ 3. **Write tests** for your changes
180
+ 4. **Ensure** tests pass and maintain >90% coverage
181
+ 5. **Commit** your changes (`git commit -m 'Add amazing feature'`)
182
+ 6. **Push** to the branch (`git push origin feature/amazing-feature`)
183
+ 7. **Open** a Pull Request
184
+
185
+ ### Development Setup
186
+
187
+ ```bash
188
+ # Clone the repository
189
+ git clone https://github.com/nomadkaraoke/karaoke-lyrics-processor.git
190
+ cd karaoke-lyrics-processor
191
+
192
+ # Install development dependencies
193
+ pip install -e ".[dev]"
194
+
195
+ # Run tests
196
+ python run_tests.py
197
+ ```
198
+
199
+ - This project is 100% open-source and free for anyone to use and modify as they wish
200
+ - All contributions are tested automatically via CI/CD
201
+ - Code quality is maintained through comprehensive testing and reviews
202
+
203
+ ## 📄 License
204
+
205
+ This project is licensed under the MIT [License](LICENSE).
206
+
207
+ ## 💌 Contact
208
+
209
+ For questions, feature requests, or bug reports:
210
+ - **Issues**: [GitHub Issues](https://github.com/nomadkaraoke/karaoke-lyrics-processor/issues)
211
+ - **Email**: [Andrew Beveridge](mailto:andrew@beveridge.uk) (@beveradb)
212
+ - **Discussions**: [GitHub Discussions](https://github.com/nomadkaraoke/karaoke-lyrics-processor/discussions)
213
+
214
+ ---
215
+
216
+ *Built with ❤️ for the karaoke community*
217
+
@@ -0,0 +1,8 @@
1
+ karaoke_lyrics_processor/__init__.py,sha256=hvvtfq-00myAQ8fh8lSpfmZ2CEUM8sRwpSJ71zHkTeg,61
2
+ karaoke_lyrics_processor/cli.py,sha256=lcqKBwnLnZIw51P79NNTs95nsyv6XDS1ho2NDjyOrmU,2614
3
+ karaoke_lyrics_processor/karaoke_lyrics_processor.py,sha256=Y0BJPXYH82XRecahp63nqCRa1XJG0pEx1PXp-0bT1go,14693
4
+ karaoke_lyrics_processor-0.6.0.dist-info/LICENSE,sha256=TW0vsdMUcgKaaExYAGNzumF-6GNsAGEwxG2vrjxc71E,1074
5
+ karaoke_lyrics_processor-0.6.0.dist-info/METADATA,sha256=-HkXqkO5XmEYbxGNr0Cr7N_s74caPPFSOZ4ilSmDQqE,8236
6
+ karaoke_lyrics_processor-0.6.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
7
+ karaoke_lyrics_processor-0.6.0.dist-info/entry_points.txt,sha256=hjFp6CUxl1p-1WJYfB6TbNcI_DHEnVzX3BXAs4y_0O8,78
8
+ karaoke_lyrics_processor-0.6.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,93 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: karaoke-lyrics-processor
3
- Version: 0.4.1
4
- Summary: Process song lyrics to prepare them for karaoke video production, e.g. by splitting long lines
5
- Home-page: https://github.com/karaokenerds/karaoke-lyrics-processor
6
- License: MIT
7
- Author: Andrew Beveridge
8
- Author-email: andrew@beveridge.uk
9
- Requires-Python: >=3.9,<3.13
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.9
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Requires-Dist: docx2txt (>=0.8)
17
- Requires-Dist: pyperclip (>=1.8)
18
- Requires-Dist: python-docx (>=1)
19
- Requires-Dist: striprtf (>=0.0.27)
20
- Project-URL: Documentation, https://github.com/karaokenerds/karaoke-lyrics-processor/blob/main/README.md
21
- Project-URL: Repository, https://github.com/karaokenerds/karaoke-lyrics-processor
22
- Description-Content-Type: text/markdown
23
-
24
- # Karaoke Lyrics Processor 🎶 ✍️
25
-
26
- ![PyPI - Version](https://img.shields.io/pypi/v/karaoke-lyrics-processor)
27
-
28
- Karaoke Lyrics Processor is a tool to prepare song lyrics for karaoke video production.
29
-
30
- It processes lyrics by splitting long lines, handling parentheses, and ensuring that each line fits within a specified maximum length.
31
- This tool is especially useful for creating karaoke tracks where timing and line length are crucial for readability.
32
-
33
- ## Features
34
-
35
- - **Line Splitting**: Automatically splits long lines of lyrics to ensure they fit within a specified maximum length, making them more readable and suitable for karaoke display.
36
- - **Intelligent Splitting**: Finds the best split points in lines, considering punctuation and logical breaks in the lyrics.
37
- - **Parentheses Handling**: Processes lines containing parentheses appropriately, ensuring that the lyrical flow is maintained.
38
- - **Clipboard Support**: Copies the processed lyrics to the clipboard for easy pasting into video production software or other applications.
39
- - **Debug Mode**: Offers a debug mode for detailed logging, helping with troubleshooting and fine-tuning the processing.
40
-
41
- ## Installation
42
-
43
- To install the Karaoke Lyrics Processor, ensure you have Python 3.9 or newer in your environment.
44
-
45
- This package is available on PyPI and can be installed using pip. Run the following command in your terminal:
46
-
47
- ```bash
48
- pip install karaoke-lyrics-processor
49
- ```
50
-
51
- ## Usage (CLI)
52
-
53
- To process a file containing song lyrics, use the following command:
54
-
55
- ```bash
56
- karaoke-lyrics-processor <path_to_lyrics_file>
57
- ```
58
-
59
- By default, this will create a new file in your current directory with `(Lyrics Processed)` in the filename containing the processed lyrics.
60
-
61
- ### Command line options
62
-
63
- ```bash
64
- usage: karaoke-lyrics-processor [-h] [-v] [-d] [-o OUTPUT] [-l LINE_LENGTH] filename
65
-
66
- Process song lyrics to prepare them for karaoke video production, e.g. by splitting long lines
67
-
68
- positional arguments:
69
- filename The path to the file containing the song lyrics to process.
70
-
71
- options:
72
- -h, --help show this help message and exit
73
- -v, --version show program's version number and exit
74
- -d, --debug Enable debug mode, setting log level to DEBUG.
75
- -o OUTPUT, --output OUTPUT Optional: Specify the output filename for the processed lyrics.
76
- -l LINE_LENGTH, --line_length LINE_LENGTH Optional: Specify the maximum line length for the processed lyrics. Default is 36.
77
- ```
78
-
79
- ## Contributing 🤝
80
-
81
- Contributions are very much welcome! Please fork the repository and submit a pull request with your changes, and I'll try to review, merge and publish promptly!
82
-
83
- - This project is 100% open-source and free for anyone to use and modify as they wish.
84
- - If the maintenance workload for this repo somehow becomes too much for me I'll ask for volunteers to share maintainership of the repo, though I don't think that is very likely
85
-
86
- ## License 📄
87
-
88
- This project is licensed under the MIT [License](LICENSE).
89
-
90
- ## Contact 💌
91
-
92
- For questions or feedback, please raise an issue or reach out to @beveradb ([Andrew Beveridge](mailto:andrew@beveridge.uk)) directly.
93
-
@@ -1,8 +0,0 @@
1
- karaoke_lyrics_processor/__init__.py,sha256=rLRkJQi61qkRiNXdlTleE3ahJ1oBKcghYVkz64x7IIg,62
2
- karaoke_lyrics_processor/cli.py,sha256=bdtseRI2jcChb1bMr92pc5mpSWpHXh4TSzA2tknbyjU,2522
3
- karaoke_lyrics_processor/karaoke_lyrics_processor.py,sha256=Ew91yh7f0kbBy_nnWGntBClRQ1uxE9brhtWExcRl7t0,13716
4
- karaoke_lyrics_processor-0.4.1.dist-info/LICENSE,sha256=BiPihPDxhxIPEx6yAxVfAljD5Bhm_XG2teCbPEj_m0Y,1069
5
- karaoke_lyrics_processor-0.4.1.dist-info/METADATA,sha256=4Ut0L964ec92IuLlQiZilngjnjMr4dUm2FAIFk5uCLg,4264
6
- karaoke_lyrics_processor-0.4.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
7
- karaoke_lyrics_processor-0.4.1.dist-info/entry_points.txt,sha256=hjFp6CUxl1p-1WJYfB6TbNcI_DHEnVzX3BXAs4y_0O8,78
8
- karaoke_lyrics_processor-0.4.1.dist-info/RECORD,,