Skip to content

Commit

Permalink
1.0.1: Windows compatibility notes added
Browse files Browse the repository at this point in the history
  • Loading branch information
Locchan committed Mar 4, 2024
1 parent 1c47542 commit 0ed2627
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion src/cue_splitter/main.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
#!/usr/bin/env python
import os

import argparse
from cueparser import CueSheet
import os

from cue_splitter.utils.ffmpeg import encode_cue
from cue_splitter.utils.utils import check_args

version = 1

def main():

if os.name == "nt":
print("Windows detected. Checking default codepage...")
try:
print("This is a test: 漢字")
print("Done. The system is compatible. Continuing...")
except:
print("\nWarning: This script will be unable to execute in current configuration.\nReason: The shell should be able to print UTF-8.")
print("\nRun the following commands before the script:")
print("\tIf you're using cmd or powershell:")
print("\t\tchcp 65001")
print("\t\tset PYTHONIOENCODING=utf-8")
print("\tIf you're using Git Bash or any other Unix-like shell:")
print("\t\tchcp.com 65001")
print("\t\texport PYTHONIOENCODING=utf-8")
exit(1)

argParser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
argParser.add_argument("-v", "--version", help="Display version and license info.", action='store_true')
argParser.add_argument("-p", "--path", help="Path to the .cue file or directory with .cue file(s).", type=str)
Expand Down
2 changes: 1 addition & 1 deletion src/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools", "CueParser", "argparse"]

[project]
name = "cue_splitter"
version = "1"
version = "1.0.1"
description = "Lossless audio splitter"

[project.scripts]
Expand Down

0 comments on commit 0ed2627

Please sign in to comment.