mirror of
https://github.com/iluvcapra/wavinfo.git
synced 2025-12-31 08:50:41 +00:00
Merge branch 'master' of https://github.com/iluvcapra/wavinfo into feature-interactive
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -110,3 +110,5 @@ venv_docs/
|
||||
.DS_Store
|
||||
|
||||
.vscode/
|
||||
|
||||
poetry.lock
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
[build-system]
|
||||
requires = ["flit_core >=3.2,<4"]
|
||||
build-backend = "flit_core.buildapi"
|
||||
# https://python-poetry.org/docs/pyproject/
|
||||
|
||||
[project]
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry]
|
||||
name = "wavinfo"
|
||||
authors = [{name = "Jamie Hardt", email = "jamiehardt@me.com"}]
|
||||
version = "3.0.1"
|
||||
description = "Probe WAVE files for all metadata"
|
||||
authors = ["Jamie Hardt <jamiehardt@me.com>"]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
dynamic = ["version", "description"]
|
||||
requires-python = "~=3.8"
|
||||
classifiers = [
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
@@ -20,9 +23,10 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13"
|
||||
]
|
||||
dependencies = [
|
||||
"lxml ~= 5.3.0"
|
||||
]
|
||||
homepage = "https://github.com/iluvcapra/wavinfo"
|
||||
repository = "https://github.com/iluvcapra/wavinfo.git"
|
||||
documentation = "https://wavinfo.readthedocs.io/"
|
||||
urls.Tracker = 'https://github.com/iluvcapra/wavinfo/issues'
|
||||
keywords = [
|
||||
'waveform',
|
||||
'metadata',
|
||||
@@ -35,29 +39,17 @@ keywords = [
|
||||
'broadcast'
|
||||
]
|
||||
|
||||
[tool.flit.module]
|
||||
name = "wavinfo"
|
||||
[tool.poetry.extras]
|
||||
doc = ['sphinx', 'sphinx_rtd_theme']
|
||||
|
||||
[project.optional-dependencies]
|
||||
doc = [
|
||||
'sphinx >= 5.3.0',
|
||||
'sphinx_rtd_theme >= 1.1.1',
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Home = "https://github.com/iluvcapra/wavinfo"
|
||||
Documentation = "https://wavinfo.readthedocs.io/"
|
||||
Source = "https://github.com/iluvcapra/wavinfo.git"
|
||||
Issues = 'https://github.com/iluvcapra/wavinfo/issues'
|
||||
|
||||
[project.entry_points.console_scripts]
|
||||
[tool.poetry.scripts]
|
||||
wavinfo = 'wavinfo.__main__:main'
|
||||
|
||||
[project.scripts]
|
||||
wavinfo = "wavinfo.__main__:main"
|
||||
|
||||
[tool.flit.external-data]
|
||||
directory = "data"
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
lxml = "~= 5.3.0"
|
||||
sphinx_rtd_theme = {version= '>= 1.1.1', optional=true}
|
||||
sphinx = {version= '>= 5.3.0', optional=true}
|
||||
|
||||
[tool.pyright]
|
||||
typeCheckingMode = "basic"
|
||||
|
||||
@@ -4,6 +4,3 @@ Probe WAVE Files for iXML, Broadcast-WAVE and other metadata.
|
||||
|
||||
from .wave_reader import WavInfoReader
|
||||
from .riff_parser import WavInfoEOFError
|
||||
|
||||
__version__ = '3.0.0'
|
||||
__short_version__ = '3.0.0'
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import datetime
|
||||
from . import WavInfoReader
|
||||
from . import __version__
|
||||
|
||||
import datetime
|
||||
from optparse import OptionParser
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
from enum import Enum
|
||||
import importlib.metadata
|
||||
from base64 import b64encode
|
||||
from cmd import Cmd
|
||||
from shlex import split
|
||||
@@ -106,10 +107,22 @@ class MetaBrowser(Cmd):
|
||||
|
||||
|
||||
def main():
|
||||
version = importlib.metadata.version('wavinfo')
|
||||
manpath = os.path.dirname(__file__) + "/man"
|
||||
parser = OptionParser()
|
||||
|
||||
parser.usage = 'wavinfo (--adm | --ixml) <FILE> +'
|
||||
|
||||
# parser.add_option('--install-manpages',
|
||||
# help="Install manual pages for wavinfo",
|
||||
# default=False,
|
||||
# action='store_true')
|
||||
|
||||
parser.add_option('--man',
|
||||
help="Read the manual and exit.",
|
||||
default=False,
|
||||
action='store_true')
|
||||
|
||||
parser.add_option('--adm', dest='adm',
|
||||
help='Output ADM XML',
|
||||
default=False,
|
||||
@@ -129,6 +142,26 @@ def main():
|
||||
|
||||
interactive_dict = []
|
||||
|
||||
|
||||
# if options.install_manpages:
|
||||
# print("Installing manpages...")
|
||||
# print(f"Docfiles at {__file__}")
|
||||
# return
|
||||
|
||||
if options.man:
|
||||
import shlex
|
||||
print("Which man page?")
|
||||
print("1) wavinfo usage")
|
||||
print("7) General info on Wave file metadata")
|
||||
m = input("?> ")
|
||||
|
||||
args = ["man", "-M", manpath, "1", "wavinfo"]
|
||||
if m.startswith("7"):
|
||||
args[3] = "7"
|
||||
|
||||
os.system(shlex.join(args))
|
||||
return
|
||||
|
||||
for arg in args[1:]:
|
||||
try:
|
||||
this_file = WavInfoReader(path=arg)
|
||||
@@ -146,7 +179,7 @@ def main():
|
||||
ret_dict = {
|
||||
'filename': arg,
|
||||
'run_date': datetime.datetime.now().isoformat(),
|
||||
'application': "wavinfo " + __version__,
|
||||
'application': f"wavinfo {version}",
|
||||
'scopes': {}
|
||||
}
|
||||
for scope, name, value in this_file.walk():
|
||||
|
||||
@@ -18,7 +18,7 @@ With no options,
|
||||
will emit a JSON (Javascript Object Notation) object containing all
|
||||
detected metadata.
|
||||
.IP "\-\-adm"
|
||||
Output any Audio Definition Model (ADM) metadata in
|
||||
Output Audio Definition Model (ADM) XML metadata in
|
||||
.BR FILE .
|
||||
.IP "\-\-ixml"
|
||||
Output any iXML metdata in
|
||||
Reference in New Issue
Block a user