Skip to content

Commit

Permalink
Теперь исполняемый!
Browse files Browse the repository at this point in the history
  • Loading branch information
u07 authored and u07 committed May 25, 2023
1 parent ad375f9 commit 57e5f31
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 8 deletions.
Binary file added check_eksmo.exe
Binary file not shown.
16 changes: 8 additions & 8 deletions check_eksmo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# А. Петелин, 2023
# Обновлено 22.05.2023
# Обновлено 25.05.2023
#
# Работает с облегчённым ffmpeg_slim либо обычным 2023-04-17-git-65e537b833-essentials_build-www.gyan.dev win 64 2023 gcc 12.2.0
# Работает с облегчённым ffmpeg (в комплекте) либо с обычным 2023-04-17-git-65e537b833-essentials_build-www.gyan.dev win 64 2023 gcc 12.2.0
#

def on_error(exc_type, exc_value, exc_traceback):
Expand All @@ -11,6 +11,7 @@ def on_error(exc_type, exc_value, exc_traceback):
input(f"\nТысяча чертей! Какая-то дурацкая ошибка! \n\n {exc_value}\n")
sys.exit(-1)

print("\nЗагрузка...", end='\r')
import sys; sys.excepthook = on_error
import os
import re
Expand All @@ -23,11 +24,10 @@ def on_error(exc_type, exc_value, exc_traceback):
import datetime


help_string = """
Этот скрипт проверит ваши аудиокниги на соответствие требованиям
издательства Эксмо. Принимаются файлы mp3, wav и папки.
help_string = """ Эта утилита проверит ваши аудиокниги на соответствие требованиям
издательства Эксмо. Принимаются файлы mp3, wav, flac и папки.
Пример: check_eksmo.py "D:\Книга 1\" "D:\Книга 2\"
Пример запуска: check_eksmo "D:\Книга 1\" "D:\Книга 2\"
Или просто перетащите файл/папку сюда и нажмите Enter:
Expand Down Expand Up @@ -198,7 +198,7 @@ async def run_ffmpeg(file, sem):
async with sem:
shortname = os.path.basename(file) # 001.mp3
print(f"Анализирую {shortname} ...")
cmd = f'ffmpeg_slim -hide_banner -nostats -loglevel info -i "{file}" -af astats,silencedetect=n=-45dB:d=5 -vn -f null - 2>&1'
cmd = f'ffmpeg -hide_banner -nostats -loglevel info -i "{file}" -af astats,silencedetect=n=-45dB:d=5 -vn -f null - 2>&1'
proc = await asyncio.create_subprocess_shell(cmd, stdout=asyncio.subprocess.PIPE)
stdout, stderr = decode(await proc.communicate())
#proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Expand Down Expand Up @@ -267,7 +267,7 @@ async def main(files):

if not files:
input("Нет ни одного подходящего файла!")
exit()
sys.exit(-1)
print(f'\nВсего {len(files)} файлов. Анализируем по {MAX_CONCURRENT_TASKS} одновременно.')

asyncio.run(main(files))
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions материалы/compile with pyinstaller.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


���������� ������ ��� 32-��� ������ � �������:

pip config set global.target C:\Users\user\AppData\Roaming\Python\python38-32\site-packages
py -3.8-32 -m pip install (������ ������)
pip config unset global.target

����������:

pyinstaller.exe check_eksmo.py --onefile -i giza_pyramidki_all_sizes.ico

����:

C:\Users\user\AppData\Local\Programs\Python\Python38-32\Scripts\pyinstaller.exe
C:\Users\user\AppData\Roaming\Python\Python38-32\Scripts\pyinstaller.exe (���� ����������)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added материалы/иконка/giza_pyramid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added материалы/иконка/giza_pyramid.psd
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added материалы/иконка/wigwam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added материалы/иконка/wigwam.psd
Binary file not shown.
Binary file added материалы/иконка/wigwam_db.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 57e5f31

Please sign in to comment.