autoys
3 months agogremlin/gremlin.in: Use `locale.getpreferredencoding'. master
Mark Wooding [Mon, 15 Jan 2024 14:16:20 +0000 (14:16 +0000)]
gremlin/gremlin.in: Use `locale.getpreferredencoding'.

Inexplicably, Python doesn't attach the locale encoding to `stdout' by
default.

3 months agogremlin/gremlin.in: Sort the imports alphabetically.
Mark Wooding [Mon, 15 Jan 2024 14:16:02 +0000 (14:16 +0000)]
gremlin/gremlin.in: Sort the imports alphabetically.

6 years agogremlin/gremlin.in: Try querying duration early to guess bitrate.
Mark Wooding [Fri, 20 Apr 2018 12:21:24 +0000 (13:21 +0100)]
gremlin/gremlin.in: Try querying duration early to guess bitrate.

This seems to work reliably now.

6 years agogremlin/gremlin.in: Clear `measure bitrate' progress when it's done.
Mark Wooding [Thu, 19 Apr 2018 11:16:11 +0000 (12:16 +0100)]
gremlin/gremlin.in: Clear `measure bitrate' progress when it's done.

This makes the display more flickery when every file needs to be
measured, but it avoids leaving debris on the screen at the end, or if
there are only a few files which need measuring.

6 years agogremlin/gremlin.in: GStreamer pipelines are very expensive.
Mark Wooding [Thu, 19 Apr 2018 11:09:02 +0000 (12:09 +0100)]
gremlin/gremlin.in: GStreamer pipelines are very expensive.

AudioIdentifier would keep its pipeline lying around in case it needed
to do the heavyweight bitrate calculation.  But the directory grobbler
keeps an identifier for each master file in the directory, and in large
directories this means there are lots of live pipelines.  Since
pipelines maintain file descriptors and threads (and therefore
stack-segment address space), this can cause the gremlin to run out of
resources for no good reason.

Instead, factor out the pipeline setup, and shut the pipeline down
between initial identification and tag collection, and the possibly-
on-demand slow bitrate calculation.  There wasn't a lot of point in
retaining the pipeline for the bitrate calculation, because wading
through the file is much heavier than rebuilding the pipeline, so I
doubt whether anyone will care.

6 years agogremlin/gremlin.in: Update progress every 100ms rather than 200ms.
Mark Wooding [Thu, 19 Apr 2018 10:52:28 +0000 (11:52 +0100)]
gremlin/gremlin.in: Update progress every 100ms rather than 200ms.

Makes the display subjectively much smoother.

6 years agogremlin/gremlin.in: Fix bizarre editing debris.
Mark Wooding [Thu, 19 Apr 2018 10:51:06 +0000 (11:51 +0100)]
gremlin/gremlin.in: Fix bizarre editing debris.

6 years agogremlin/gremlin.in: Fix things for new GI-based GStreamer etc. bindings.
Mark Wooding [Tue, 17 Apr 2018 21:34:31 +0000 (22:34 +0100)]
gremlin/gremlin.in: Fix things for new GI-based GStreamer etc. bindings.

Quite a lot of mostly petty details need changing, because stable
interfaces are for losers who can't cope with the world changing every
five minutes.

6 years agogremlin/gremlin.in: Refactor content-type guessing.
Mark Wooding [Tue, 17 Apr 2018 21:33:54 +0000 (22:33 +0100)]
gremlin/gremlin.in: Refactor content-type guessing.

Remove the `gf' temporary, which isn't really doing much of any good.

6 years agogremlin/gremlin.in: Cope without Bin and Pipeline multi-arg `add'.
Mark Wooding [Tue, 17 Apr 2018 21:28:32 +0000 (22:28 +0100)]
gremlin/gremlin.in: Cope without Bin and Pipeline multi-arg `add'.

In order to make life more convenient for programmers who live backwards
through time, later GStreamer bindings remove the ability to add
multiple children to bins and pipelines.

6 years agogremlin/gremlin.in: Add function to iterate over a bin's children.
Mark Wooding [Tue, 17 Apr 2018 21:26:25 +0000 (22:26 +0100)]
gremlin/gremlin.in: Add function to iterate over a bin's children.

The newer GStreamer bindings don't have the convenient method for doing
this directly, so stitch it together with the low-level stuff that is
provided.

6 years agogremlin/gremlin.in: Add function for linking a sequence of elements.
Mark Wooding [Tue, 17 Apr 2018 21:23:07 +0000 (22:23 +0100)]
gremlin/gremlin.in: Add function for linking a sequence of elements.

Later versions of the Python GStreamer bindings lack a binding for
`gst_element_link_many' -- because that would make things too easy or
something -- so prepare by introducing and using a utility function.

No functional change.

6 years agogremlin/gremlin.in: Attach a name to the FormatSpec parser.
Mark Wooding [Tue, 17 Apr 2018 01:11:44 +0000 (02:11 +0100)]
gremlin/gremlin.in: Attach a name to the FormatSpec parser.

Just for diagnostic purposes.

6 years agogremlin/gremlin.in: Don't report zero seconds left until we're done.
Mark Wooding [Tue, 17 Apr 2018 01:11:17 +0000 (02:11 +0100)]
gremlin/gremlin.in: Don't report zero seconds left until we're done.

6 years agogremlin/gremlin.in: Fix incorrect indentation. Oops.
Mark Wooding [Tue, 17 Apr 2018 01:10:15 +0000 (02:10 +0100)]
gremlin/gremlin.in: Fix incorrect indentation.  Oops.

6 years agogremlin/gremlin.in: Apparently eyeD3 has completely changed.
Mark Wooding [Tue, 17 Apr 2018 01:09:55 +0000 (02:09 +0100)]
gremlin/gremlin.in: Apparently eyeD3 has completely changed.

6 years agocoverart/coverart.in: Reorder, reformat, and document.
Mark Wooding [Thu, 5 May 2016 09:11:17 +0000 (10:11 +0100)]
coverart/coverart.in: Reorder, reformat, and document.

Lots of other minor changes mixed in.  This was a mess I found in my
working tree, and didn't bother to untangle.

6 years ago.gitignore: Ignore another generated makefile.
Mark Wooding [Tue, 17 Apr 2018 00:59:30 +0000 (01:59 +0100)]
.gitignore: Ignore another generated makefile.

8 years agomisc/ab-chop: Fix the licensing notice.
Mark Wooding [Sat, 13 Feb 2016 19:33:40 +0000 (19:33 +0000)]
misc/ab-chop: Fix the licensing notice.

8 years agocoverart/: Prepare for proper release.
Mark Wooding [Sat, 13 Feb 2016 19:33:40 +0000 (19:33 +0000)]
coverart/: Prepare for proper release.

Substantial reorganization, and a lot of internal documentation.

8 years agogremlin/gremlin.in: Remove execute bit from input file.
Mark Wooding [Sun, 14 Feb 2016 13:24:32 +0000 (13:24 +0000)]
gremlin/gremlin.in: Remove execute bit from input file.

You can't run it directly since the shebang line was replaced by a
substitution token.

8 years agogremlin/gremlin.in: Fix licensing notice.
Mark Wooding [Sat, 13 Feb 2016 19:33:40 +0000 (19:33 +0000)]
gremlin/gremlin.in: Fix licensing notice.

8 years agoRelease 0.1.0. 0.1.0
Mark Wooding [Sun, 14 Feb 2016 02:01:51 +0000 (02:01 +0000)]
Release 0.1.0.

8 years agogremlin/: Add a manpage! Approximately ready for release now.
Mark Wooding [Sun, 14 Feb 2016 02:00:43 +0000 (02:00 +0000)]
gremlin/: Add a manpage!  Approximately ready for release now.

8 years agogremlin/gremlin.in: Sane behaviour if `bitrate' property is omitted.
Mark Wooding [Sun, 14 Feb 2016 02:00:21 +0000 (02:00 +0000)]
gremlin/gremlin.in: Sane behaviour if `bitrate' property is omitted.

The OggVorbisFormat would choose the most terrible quality; and
MP3Format just threw a fatal exception.

8 years agogremlin/gremlin.in (JPEGFormat): Fix property name in docstring.
Mark Wooding [Sun, 14 Feb 2016 01:58:59 +0000 (01:58 +0000)]
gremlin/gremlin.in (JPEGFormat): Fix property name in docstring.

8 years agogremlin/gremlin.in: Use `https' scheme for Wikipedia link.
Mark Wooding [Sun, 14 Feb 2016 01:58:07 +0000 (01:58 +0000)]
gremlin/gremlin.in: Use `https' scheme for Wikipedia link.

Just to encourage the use of encryption to thwart mass surveillance.

8 years agogremlin/gremlin.in: Remove old debugging code.
Mark Wooding [Sun, 14 Feb 2016 01:57:20 +0000 (01:57 +0000)]
gremlin/gremlin.in: Remove old debugging code.

8 years agogremlin/gremlin.in: Walk the various output trees concurrently.
Mark Wooding [Sat, 13 Feb 2016 21:48:19 +0000 (21:48 +0000)]
gremlin/gremlin.in: Walk the various output trees concurrently.

Rather than doing them one after the other.  This makes the progress
report rather more helpful, and may even make things slightly faster.

The change isn't as complicated as the diff makes it look.  The Grobbler
class has been replaced with a function, with its methods now nested
functions within it, which actually makes calling it slightly simpler.
Another simplification is that the function takes `TargetJob' objects
rather than directory names, simply because they're a convenient way to
bundle the directory names with their conversion policies.  But this
means that the function has been sunk beneath the various auxiliary
class definitions used by the top-level config parser, and Git diff
makes a mess of this.

8 years agogremlin/gremlin.in: Include all of the options in the usage synopsis.
Mark Wooding [Sat, 13 Feb 2016 21:46:45 +0000 (21:46 +0000)]
gremlin/gremlin.in: Include all of the options in the usage synopsis.

8 years agogremlin/: Start on making it be a proper built thing.
Mark Wooding [Sat, 13 Feb 2016 19:33:40 +0000 (19:33 +0000)]
gremlin/: Start on making it be a proper built thing.

8 years agoBasic building and packaging machinery, which does nothing useful. 0.1.0-pre0
Mark Wooding [Sat, 13 Feb 2016 19:17:32 +0000 (19:17 +0000)]
Basic building and packaging machinery, which does nothing useful.

8 years agoInitial import of unaltered files.
Mark Wooding [Sat, 13 Feb 2016 18:39:07 +0000 (18:39 +0000)]
Initial import of unaltered files.

These programs have been collected from various machines with a view to
turning them into something that someone else might actually be able to
use.  Some won't make the cut and will be deleted; others may remain as
simple scripts; and some will grow proper documentation and packaging.