Code Monkey home page Code Monkey logo

demlo's People

Contributors

ambrevar avatar tuedachu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

tuedachu

demlo's Issues

Let -s ignore number prefix of script to include

The indeces of the scripts are an implementation detail that the user should not need to worry about. The user only cares about the functionality of the included script, which is indicated in the main part of the name. E.g. -s cover vs -s 70-cover.

Another, more drastic idea would be to make -s work exactly like -r—that is, make it include all scripts whose name match the provided regex. This is desirable for the same reason as it is for -r. Suppose you have two scripts that deal with file tags (as I do): 10-tag-fields and 11-tag-contents. If you want to run only those scripts, you'd need to do -r '' -s 10-tag-fields -s 11-tag-contents. With the regex strategy, this becomes -r '' -s tag. This also occurs when the scripts you want to include are not run by default.

What do you think?

Self-documenting scripts

Add a -h commandline flag which displays the documentation of a script, then exits.

The flag could be called several times.
The documentation could be stored in a global variable.

A lingering TagLib problem

Hi again! It's dylandforbes from Bitbucket.

I'm finally getting around to following up on this issue. While Demlo does a decent job at deciding when to use TagLib and when to use FFmpeg, it's not perfect; there is one crucial missing case involving date. It took some investigating, but I figured out that the problem is that TagLib doesn't support setting the date tag to an arbitrary string, only to an integer. As I like to store dates in ISO 8601 format, this is crucial for me. Unfortunately, Demlo does not take this into account when deciding between TagLib and FFmpeg.

Thus the fix is to force use of FFmpeg when type(o.date) == 'string'. Should be simple enough.

Thanks!

Emacs mode (GUI)

Like many semi-interactive programs, Demlo's user-experience feels limited on the commandline.
In particular, it can be frustrating to re-run Demlo over and over with different pre-/post-/scripts until we get the result right.

I've been thinking of writing an Emacs mode to provide for a better experience.
Why Emacs? Mostly because:

  • of its textual nature;
  • of its keyboard-based, power-user bindings;
  • I use it, I know it, I can program it :)

Running Demlo from Emacs would produce a special buffer "à-la-Magit" where each audio file would contain the diff as it is currently displayed in shells.
The entry would be collapsable.

There would be two collapsable subsections:

  • A subsection containing the list of scripts which could be turned on and off with a simple binding.

  • A subsection containing the pre/post scripts which would be writable (in Lua mode, obviously).

A C-c C-c key press on a track section would update the "diff" by running Demlo with the changed made to the scripts in the subsections.
A C-u C-c C-c would do the same to all tracks.

Last but not least, the diff "after" fields would be writable. This would effectively allow for a very convenient way of hand-editing tags and other properties.

Finally, C-x C-s would process the track at point while C-x s would process all tracks.

Album-awareness and input ordering

In #4 we mentioned the issue of auto-numbering tracks according to their position in the queue.

There are several ways to proceed. Some do not cope well with parallelization.

Using the queue order in the script is not very flexible though: what if the sorting (which depends on the locale) does not suit the user?

Probably better: add a directory listing function. That should not harm the sandboxed nature of Demlo.
By matching the track path with the directory listing, we could auto-number the tracks.

Overhaul default config

As mentioned in #3, the default config is somewhat useless at the moment.

Change Demlo's loading process so that it falls back to the system config if no user config is found.

Export an 'input()' and 'print()' functions to the Lua scripts

Mentioned in #4.

Sometimes it could be handy to make Demlo's process more interactive.

A script could ask the user to enter a value with
func input(prompt string) string.

Example: when a disc number is found, ask the user if we should ignore it for the current album or not.

Some input functions could be recurring (booleans, number queries). Add input_bool and input_number?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.