Comments (5)
Uh oh. I'm a hardcore vim guy. Lol.
Three serious thoughts.
- I have no problem with an Emacs plugin (if that's what they're called, I dunno) for Demlo that does this. I would however complain if it became the de-facto GUI. I think it unwise to require Emacs as a dependency for software that isn't really related to it.
- If you're going to make a GUI for Demlo, you risk going down the route of Mp3Tag/PuddleTag, where there are tons of features, and it's not really a simple app anymore. Though I do know I'd appreciate an auto-numbering feature (for tracknumbers). That reminds me, I need to submit a feature request...
- Is there a reason you're averse to allowing user interaction? I know it's written somewhere in the manual but I don't know if the philosophy is ever spelled out. As I envision it, cripts could just call a sandboxed function
input()
that would return as a Lua string one line of user input from readline (or something else). There would also need to be a non-debug print function, to tell the user what it's asking for. I suppose that's a large departure from how Demlo has works up until now. However, consider this: because Lua's booleans are really tri-valued (withnil
), this opens up a possibility for user interaction. If a variable is set to true or false in a script, then that value is used; if it is unset (or set explicitly to nil), then the user should be prompted. That would be the paradigm for making scripts, is what I'm saying.
from demlo.
-
I never said the commandline interface would step down :p Obviously the GUI will be completely optional.
That said, like many Emacs packages (e.g. Magit), it's possible to run the package without any Emacs config. -
See 1. Regarding auto-numbering, the issue is that Demlo (as opposed to Beets) does not have a "per-album awareness". There is a work-around though: disable parallel processing (
-cores 1
) and use a global variable to keep track of the numbers, then reset the number to 1 as soon as the album name changes. It's brittle and losing parallelization is a shame.
If you can think of something better, I'd be happy to look at your request. -
Demlo was designed as an unattended tool, which is why all the user interactions are meant to be done before starting the process.
That said, you suggestion is not stupid. I don't thinknil
would work though, since an undefined variable is also nil.
What about adding aninput()
function as you said and leaving it to each script to decide wheninput()
should be called?
from demlo.
2. Per-album awareness is definitely something I've wanted Demlo to have for a while and I do have some ideas about how it might work. That workaround is pretty interesting—does it process input files in the right order all the time though? Like, does it sort them by filename initially, or just use the order returned by the system call?
3. An undefined variable is also nil, yes. That's intentional. In my system, the scripts would prompt the user for decisions that it wasn't told to make. Defaults can be set by setting global variables to true or false in certain scripts; leaving them nil means "ask me if the issue ever arises" (some questions only come up in certain cases). Adding an input()
function and letting each script decide when it would be called is exactly what I meant; sorry if that wasn't clear. I meant that whenever a global variable was unset, and a decision needed to be made, the scripts would prompt the user for an answer.
from demlo.
does it process input files in the right order all the time though?
Indeed, it would require demlo to make sure the files are sorted.
Did you have any other workaround in mind?
I'll have a more in-depth look at your demloconf very soon. Thanks a lot for the hard work!
from demlo.
Did you have any other workaround in mind?
Sadly I don't. I think you just have to do that if you want to do auto-numbering. Or at least some type of sorting. I know in Mp3Tag you can sort the files by any of the columns along the top, and then auto-number using the resulting order. So I guess a maximally general version of this feature would have a commandline option for how to sort the input files, like -order <string>
, where <string>
can be any element of the input
table, e.g. tags.title
or path
.
from demlo.
Related Issues (10)
- A lingering TagLib problem HOT 13
- Modularize path.lua into basename.lua and directory.lua HOT 3
- Support the full TagLib API HOT 1
- Let -s ignore number prefix of script to include HOT 8
- Overhaul default config HOT 1
- Add completion to `-r` HOT 1
- Self-documenting scripts HOT 37
- Export an 'input()' and 'print()' functions to the Lua scripts HOT 3
- Album-awareness and input ordering HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demlo.