Skip to content

Commit

Permalink
chg: dev: release 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nicfit committed Apr 4, 2020
1 parent 1e42b3b commit 763f079
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 37 deletions.
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
include README
include AUTHORS.rst
include HISTORY.rst
include LICENSE
include Makefile
include tox.ini
include parcyl.py
include mop/*.ui
include screenshot.png

recursive-include requirements *.txt
recursive-include requirements *.txt
recursive-include data *.desktop
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ dist: clean sdist bdist
@ls -l dist

requirements:
./parcyl.py requirements
./parcyl.py requirements -RC

install-requirements:
pip install -r requirements/requirements.txt
Expand Down
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
![](https://img.shields.io/pypi/v/eyeD3)
![](https://img.shields.io/pypi/pyversions/eyeD3)
![](https://img.shields.io/pypi/l/eyeD3)


# Mop
GTK+ ID3 tag editor.
Supports ID3 v2.4, v2.3, v2.2 (read-only), and v1.x tags.

![Screenshot](https://github.com/nicfit/Mop/raw/master/screenshot.png)


## Installation
Install via pip:

pip install Mop

Clone from GitHub:

git clone https://github.com/nicfit/Mop.git
cd Mop
pip install -e .


## Usage
Run `mop` with no options will open a file dialog allowing you to select file or
directories. Alternatively files can be specified on the command line.

mop "./Hawkwind/1973 - Space Ritual/"


## Acknowledgements
Mop's user interface is heavily inspired by [easytag](https://gitlab.gnome.org/GNOME/easytag).


## License

Copyright (C) 2020 Travis Shirk

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

![Screenshot](https://github.com/nicfit/Mop/raw/master/screenshot.png)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
6 changes: 3 additions & 3 deletions mop/__about__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import dataclasses

project_name = "Mop"
version = "0.1a3"
release_name = "EHG"
version = "0.1"
release_name = "Like Rats"
author = "Travis Shirk"
author_email = "[email protected]"
years = "2020"
Expand All @@ -15,4 +15,4 @@ class Version:
release: str
release_name: str

version_info = Version(0, 1, 0, "a3", "")
version_info = Version(0, 1, 0, "final", "Like Rats")
4 changes: 2 additions & 2 deletions mop/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def __init__(self):

def _initArgs(self):
self.add_argument("--version", action="version", version=f"%(prog)s {version}")
addLoggingArgs(self)
addLoggingArgs(self, hide_args=True)
self.add_argument("path_args", nargs="*", metavar="PATH", type=pathlib.Path,
help="An file and/or directories of audio files.")
help="An audio file or directory of audio files.")


def main():
Expand Down
47 changes: 34 additions & 13 deletions parcyl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import warnings
import functools
import setuptools
import subprocess
import configparser
from enum import Enum
from pathlib import Path
Expand All @@ -19,6 +20,7 @@
from setuptools.command.develop import develop as _DevelopCommand
from setuptools.command.install import install as _InstallCommand

# FIXME: dup'd in setup.cfg, which should be the source of truth
VERSION = "1.0a4"

_EXTRA = "extra_"
Expand Down Expand Up @@ -393,31 +395,37 @@ def _loadCfg(self, req_config):

return reqs

def write(self, include_extras=True, groups=None):
if not _REQ_D.exists():
raise NotADirectoryError(str(_REQ_D))

def iterReqs(self, groups=None):
groups = groups or list([k for k in self._req_dict.keys()
if self._req_dict[k] and (k in self.GROUPS or
k.startswith(_EXTRA))
]) + ["requirements"]

for req_grp in [k for k in self._req_dict.keys() if self._req_dict[k] and k in groups]:
# Individual requirements files
RequirementsDotText(_REQ_D / f"{req_grp}.txt",
reqs=self._req_dict[req_grp], pins=self.pins)\
.write()
yield RequirementsDotText(_REQ_D / f"{req_grp}.txt", reqs=self._req_dict[req_grp],
pins=self.pins)

def write(self, groups=None, requirements_txt=False):
if not _REQ_D.exists():
raise NotADirectoryError(str(_REQ_D))

if "requirements" in groups:
for reqs_txt in self.iterReqs(groups=groups):
reqs_txt.write()

# TODO: Future option of not including extras
include_extras = True

if requirements_txt:
# Make top-level requirements.txt files
pkg_reqs = []
for name, pkgs in self._req_dict.items():
if name == "install" or (name.startswith(self._EXTRA) and include_extras):
pkg_reqs += pkgs or []

if pkg_reqs and "requirements" in groups:
RequirementsDotText("requirements/requirements.txt",
reqs=pkg_reqs, pins=self.pins).write()
if pkg_reqs:
RequirementsDotText("requirements/requirements.txt", reqs=pkg_reqs,
pins=self.pins).write()

def __bool__(self):
return bool(self._req_dict)
Expand Down Expand Up @@ -585,6 +593,11 @@ def parseVersion(v):
return ver, ver_info


def _pipCompile(path):
print(f"Compiling {path}...")
subprocess.run(f"pip-compile --annotate --upgrade -o {path} {path}", shell=True, check=True)


def _main():
import argparse

Expand All @@ -600,6 +613,10 @@ def _main():
help="Generate requirement files (setup.cfg -> *.txt)")
reqs_p.add_argument("req_group", action="store", nargs="*",
help="Which requirements group/file to operate on.")
reqs_p.add_argument("-R", "--requirements.txt", dest="requirements_txt", action="store_true",
help="Write a requirements.txt file composed of install and all extras.")
reqs_p.add_argument("-C", "--compile", dest="compile", action="store_true",
help="Compile requirement files.")

args = p.parse_args()

Expand All @@ -617,8 +634,12 @@ def _main():
try:
req = SetupRequirements()
if req:
req.write(groups=args.req_group or None)
except RequirementParseError as req_err:
req.write(groups=args.req_group or None, requirements_txt=args.requirements_txt)

if args.compile:
for req_txt in req.iterReqs(groups=args.req_group or None):
_pipCompile(req_txt.filepath)
except (RequirementParseError, subprocess.CalledProcessError) as req_err:
print(req_err, file=sys.stderr)
return 1

Expand Down
50 changes: 46 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
Parcyl
PyGObject-stubs
tox
twine
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file=requirements/dev.txt requirements/dev.txt
#
appdirs==1.4.3 # via virtualenv
bleach==3.1.4 # via readme-renderer
certifi==2019.11.28 # via requests
cffi==1.14.0 # via cryptography
chardet==3.0.4 # via requests
click==7.1.1 # via pip-tools
cryptography==2.9 # via secretstorage
distlib==0.3.0 # via virtualenv
docutils==0.16 # via readme-renderer
filelock==3.0.12 # via tox, virtualenv
idna==2.9 # via requests
jeepney==0.4.3 # via keyring, secretstorage
keyring==21.2.0 # via twine
packaging==20.3 # via tox
parcyl[requirements]==1.0a4 # via -r requirements/dev.txt
pip-tools==4.5.1 # via parcyl
pkginfo==1.5.0.1 # via twine
pluggy==0.13.1 # via tox
py==1.8.1 # via tox
pycairo==1.19.1 # via pygobject
pycparser==2.20 # via cffi
pygments==2.6.1 # via readme-renderer
pygobject-stubs==0.0.2 # via -r requirements/dev.txt
pygobject==3.36.0 # via pygobject-stubs
pyparsing==2.4.6 # via packaging
readme-renderer==25.0 # via twine
requests-toolbelt==0.9.1 # via twine
requests==2.23.0 # via requests-toolbelt, twine
secretstorage==3.1.2 # via keyring
six==1.14.0 # via bleach, cryptography, packaging, pip-tools, readme-renderer, tox, virtualenv
toml==0.10.0 # via tox
tox==3.14.6 # via -r requirements/dev.txt
tqdm==4.45.0 # via twine
twine==3.1.1 # via -r requirements/dev.txt
urllib3==1.25.8 # via requests
virtualenv==20.0.16 # via tox
webencodings==0.5.1 # via bleach

# The following packages are considered to be unsafe in a requirements file:
# setuptools
20 changes: 17 additions & 3 deletions requirements/install.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
eyeD3>=0.9.5
nicfit.py
PyGObject
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file=requirements/install.txt requirements/install.txt
#
attrs==19.3.0 # via nicfit.py
deprecation==2.0.7 # via eyed3, nicfit.py
eyed3==0.9.5 # via -r requirements/install.txt
filetype==1.0.6 # via eyed3
nicfit.py==0.8.6 # via -r requirements/install.txt
packaging==20.3 # via deprecation
pycairo==1.19.1 # via pygobject
pygobject==3.36.0 # via -r requirements/install.txt
pyparsing==2.4.6 # via packaging
pyyaml==5.3.1 # via nicfit.py
six==1.14.0 # via packaging
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
eyeD3>=0.9.5
nicfit.py
nicfit.py>=0.8.6
PyGObject
18 changes: 17 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
tox
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file=requirements/test.txt requirements/test.txt
#
appdirs==1.4.3 # via virtualenv
distlib==0.3.0 # via virtualenv
filelock==3.0.12 # via tox, virtualenv
packaging==20.3 # via tox
pluggy==0.13.1 # via tox
py==1.8.1 # via tox
pyparsing==2.4.6 # via packaging
six==1.14.0 # via packaging, tox, virtualenv
toml==0.10.0 # via tox
tox==3.14.6 # via -r requirements/test.txt
virtualenv==20.0.16 # via tox
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[parcyl]
version = 0.1a3
release_name =
version = 0.1
release_name = Like Rats
years = 2020

project_name = Mop
Expand All @@ -9,16 +9,18 @@ author_email = [email protected]
license = GPL
description = MPEG ID3 tagger using Python, eyeD3, and GTK+
long_description =
url =
github_url =
classifiers =
url = https://github.com/nicfit/Mop
github_url = https://github.com/nicfit/Mop
classifiers = Environment :: X11 Applications :: GTK
Intended Audience :: End Users/Desktop
Topic :: Multimedia :: Sound/Audio :: Editors
keywords = mp3 id3 eyed3 tagger gtk gui

[parcyl:requirements]
install = eyeD3>=0.9.5
nicfit.py
nicfit.py>=0.8.6
PyGObject
dev = Parcyl
dev = Parcyl[requirements]>=1.0a4
PyGObject-stubs
tox
twine
Expand Down

0 comments on commit 763f079

Please sign in to comment.