I made first version of new module for Media Mover which gives user ability to run custom commands.
Will it be better as separate project or it can be part of Media Mover package?
Media Mover Custom Command
**************************
Allow user to define custom commands for process, storage and complete actions.
Module uses tokens to provide easy access to file values.
Dependencies
============
- media_mover_api
- mm_token
Install
=======
1) Copy the mm_custom_command folder to the modules folder in your installation.
2) Enable the module using Administer -> Modules (/admin/build/modules).
3) Go to Media Mover configuration where you want to use custom command and
choose "Custom Command: Use custom command".
4) Set 'Output file' and 'Command'.
Examples
========
Encode files with Sorenson Squeeze 5 on Windows machine running Drupal
----------------------------------------------------------------------
- Create your Media Mover configuration
- For process action choose "Custom Command: Use custom command"
- Set 'Output file' for example 'video-[nid].flv'
- Set command. Because I didn't find parameter for Squeeze to set output file I
will use batch file 'compress-video.bat' which will after encoding rename
output file. So command will look like this:
'd:\compress-video.bat [harvest_file] [output_file]'
Rename/move file
----------------
- Create your Media Mover configuration
- For storage action choose "Custom Command: Use custom command"
- Set 'Output file' for example 'video-[nid].flv'
- Set 'Command' to 'mv [process_file] [output_file]'
....
Todo:
=====
- make validation of config values
- create permissions to set if user can use Custom Command or not
- ...
| Comment | File | Size | Author |
|---|---|---|---|
| mm_custom_commmand.zip | 2.38 KB | anantagati |
Comments
Comment #1
anantagati commentedComment #2
arthurf commentedFantastic!
This is a super powerful addition to media mover- of course, it has some security risks, but only admin's should be building media mover configurations anyway.
I would gladly take it into the main module, but I wonder if it is easier for people to maintain their modules out side of the repository. I've been thinking about breaking the main media mover module down to a few core modules and having a "bonus" set of modules. Largely this is because there is just to much to maintain for me right now. Again, I'd take this into the core group of modules as it's awesome functionality, but if you're willing to maintain it, great.
Comment #3
anantagati commentedI was thinking about security risks, but got to same point that only admins should have access. Same as PHP input filter.
I am comfortable with both solutions, part of Media Mover or I can create new project and maintain it. Same with Remote Exchange module for Media Mover I am currently building / testing.
Because English is not my native language, I didn't understand which way will be better for you. Seperate or in package?
Comment #4
aaron commentedOn the one hand, it might be good to separate packages out. On the other hand, it then becomes more difficult for developers to keep track of what modules they need to install. If you separate them, at least you should have a listing on the project page of related modules. Might be good (in either case) to work towards recruiting a few volunteers as co-maintainers once the module has matured. Is there a working group at dgo? The scope and size of these modules warrant that in my belief. That would be beneficial for helping keep co-maintainers on the same page, tracking plans, gathering ideas, etc. Would be good to link to that page on the project page as well.
Comment #5
arthurf commentedI agree with Aaron here. anantagati- if you want to create a project, I'll like from the main media mover project, as well as post an announcement on my blog and on the mediamover.24b6.net site.
Comment #6
anantagati commentedOk, I will create new project tomorrow and post link.
Comment #7
anantagati commentedCreated project: http://drupal.org/project/mm_custom_command
Comment #8
arthurf commentedFantastic! I just added a link on the Media Mover project page, and will post an announcement about it shortly!