Moss - create and execute playlists of arbitrary commands

I've been a happy user of MPD for several years, but I've often found that I want to put other things in my playlist besides audio files under a specific directory on my filesystem--and even if I could put those things in my playlist, MPD wouldn't know how to play them. To this end, I've created Moss, a client/server program that allows you to put whatever you want in a playlist. By default, playlist items are passed to /bin/sh -c for execution, but Moss can easily be configured to invoke a different program if the item matches a given regular expression.
For mpc users, the interface should be very familiar. Essentially no setup is required, except for optionally writing a ~/.mossrc or ~/.config/mossrc file (you could use the example file from the git repo as a starting point).
An AUR package is available. Let me know if you find a bug, have a suggestion, or just want to give general feedback.

So this hasn't got much attention, but I've been using Moss for the past week or so and have found it to be useful and stable, so I implemented a couple more features and pushed out version 1.0.0. One of the new features is the -stdin flag, which allows additional arguments to be read from standard input. Among other things, this is useful for saving and loading playlists to/from files using moss ls > file and moss -stdin add < file. You could also shuffle the current playlist using (moss ls | shuf && moss clear) | moss -stdin add.
The other new feature is an optional <format> argument to the status command, which lets you easily print specific information like playlist index, playlist length, current item, process ID of current command, et cetera. If you have a song currently playing and want to view its metadata, you could use something like soxi `moss status %f`--or remove everything before the current playlist item using seq $(expr `moss status %i` - 1) | moss -stdin del.
The point is, I think I've made something that's nicely programmable and "composable", where a lot of functionality emerges from the design. There are probably a number of potential applications and patterns that haven't occurred to me yet.

Similar Messages

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • How to create and execute a function whose return value is  a table

    hi folks ,
    i would like know how to create and execute a function whose return value is a table ,
    am new to pl/sql ,
    my statement for the function is
    SELECT ct.credential_code, c.expiration_date
    FROM certifications c, credential_types ct
    WHERE ct.crdnt_id = c.crdnt_id
    AND c.person_id = person_id;
    i would like to have the result of the above query as return value for the function.
    Thanks in advance ,
    Ashok.c

    hi Ps ,
    Can you please do small sample ,
    that would help me in clear understanding
    thanks in advance
    ashok.c

  • How to create and execute PL/SQL program or Procedure from Java (JDBC)

    hi all,
    user will enter the Pl/Sql program from User-Interface. that program has to be create in DB and execute that.
    due to some confusions, how to execute this from Java, i (user) entered the same logic through a Procedure.
    my Java code is
    Statement st = con.createStatement();
    Statement.execute(procedure_query); // procedure name is myPro
    CallableStatement cs = con.prepareCall("{call myPro}");
    (as given in SUN docs - http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html)
    but its not creating the procedure.
    and i tried to run a procedure (which is already created) with CallableStatement, and this is also not working.
    how to get this.
    thanks and regards
    pavan

    Hi,
    SInce the PL/SQL block is keyed in dynamically, you probably want to use the anonymous PL/SQL syntax for invoking it:
    // begin ? := func (?, ?); end; -- a result is returned to a variable
    CallableStatement cstmt3 =
    conn.prepareCall(“begin ? := func3(?, ?); end;”);
    // begin proc(?, ?); end; -- Does not return a result
    CallableStatement cstmt4 =
    Conn.prepareCall(“begin proc4(?, ?); end;”);
    SQLJ covered in chapter 10, 11, and 12 of my book furnish a more versatile dynamic SQl or PL/SQL mechanisms.
    Kuassi
    - blog http://db360.blogspot.com/
    - book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html

  • Need suggestion on PLSQL Create and EXECUTE IMMEDIATE

    Most of you already know plsql doesn't like create table, so we have to use EXECUTE IMMEDIATE for creating table. What if I want to see if the table exist, if not then create the table, later I will insert data into that table.
    My problem is it returned me the error saying I am try to insert into a non existing table when trying to compile my code. I think plsql doesn't pick up the execute statement.
    what I did is, both create and insert are executed by using EXECUTE IMMEDIATE. Anyone have such experience before and willing to share your knowledge?
    PS: I am having same problem for creating sequence as well.

    I think plsql doesn't pick up the execute statement.Since it is a runtime instruction, it will pick it up at runtime. but to be able to run, it needs to compile the code and in order to compile (so it can run) the code it needs that table/sequence you are referencing to exist already. So, you need to run the code to get the table and run needs to compile the code and compile needs the table to compile. can't go from here to there when you try to mix dynamic sql with static sql on the same object within the same program unit (or dependent units).

  • How to create and save playlist using JMF?

    Hello i m new to JMF. Can anyone tell me how to create and save a playlist of media files using JMF.
    also how can i play .DAT files using JMF?
    Does JMF supports AVI,Asf files?

    Hello i m new to JMF. Can anyone tell me how to create and save a playlist of media files using JMF.
    also how can i play .DAT files using JMF?
    Does JMF supports AVI,Asf files?

  • Display results from dynamic query created and executed inside procedure

    Hi;
    I have created this code:
    CREATE OR REPLACE PROCEDURE RunDynamicQuery(Var1 IN VARCHAR2, Var2 IN VARCHAR2, VAR3 IN VARCHAR2) AS
    -- Do something
    -- That ends up with a variable holding a query.... (just an example)
    MainQuery :='select sysdate from dual';
    end RunDynamicQuery;
    How can I run this procedure and see the result on the dymanic query generated inside it?
    BEGIN
    compare_tables_content('VAR1','VAR2','VAR3');
    END;
    Expected Output for this given example:
    20-05-2009 11:04:44 ( the result of the dymanic query inside the procedure variable MainQuery :='select sysdate from dual';)
    I tested with 'execute immediate':
    CREATE OR REPLACE PROCEDURE RunDynamicQuery(Var1 IN VARCHAR2, Var2 IN VARCHAR2, filter IN VARCHAR2) AS
    -- Do something
    -- That ends up with a variable holding a query.... (just an example)
    MainQuery :='select sysdate from dual';
    execute immediate (MainQuery );
    end RunDynamicQuery;
    BEGIN
    compare_tables_content('VAR1','VAR2','VAR3');
    END;
    Output:"Statement processed'' (no sysdate displayed ! )
    Please consider that the collums in the query are always dynamic... PIPELINE Table would not work because I would need to define a container, example:
    CREATE OR REPLACE TYPE emp_tabtype AS TABLE OF emp_type;
    FUNCTION RunDynamicQuery (p_cursor IN sys_refcursor)
    RETURN emp_tabtype PIPELINED
    IS
    emp_in emp%ROWTYPE;
    BEGIN
    LOOP
    FETCH p_cursor
    INTO emp_in;
    EXIT WHEN p_cursor%NOTFOUND;
    PIPE ROW (...)

    That would be a nice solution, thanks :)
    ''For now'' I implemented like this:
    My dynamic query now returns a single string ( select col1 || col2 || col3 from bla)
    This way I don't have dynamic collumns issue, and from business side, this ''string'' format works for them.
    This way I can use the pipelines to get the result out...
    OPEN myCursor FOR MainQuery;
    FETCH myCursor
    INTO myRow;
    WHILE (NOT myCursor%notFound) LOOP
    PIPE ROW(myRow);
    FETCH myCursor
    INTO myRow;
    END LOOP;
    CLOSE myCursor;

  • Creating and executing a job inside oracle

    I must launch a batch inside oracle, i have defined program and job like this
    begin
    dbms_scheduler.create_program
    program_name => 'PGM2',
    program_type => 'EXECUTABLE',
    program_action => 'C:\GLOBE\CPONYIN.BAT',
    enabled => TRUE,
    comments => 'CREA FILE UTENTE IN INPUT PER ONYX'
    end;
    begin
    dbms_scheduler.create_job
    job_name => 'JOB2',
    program_name => 'PGM2',
    comments => 'Move FILE ONYX IN INPUT',
    enabled => TRUE
    end;
    Are they correct ?
    what can I do for launching the job JOB2?
    I have tried :
    BEGIN
    DBMS_JOB.RUN( job => JOB2);
    END
    But oracle answers : PLS-00201 Identifier JOB2 must be declared
    Thanks for your answers

    Hi,
    dbms_scheduler and dbms_job are two different package and create different types of jobs. In 10gR1 and up you shoulod not have to use dbms_job at all since dbms_scheduler is its replacement.
    To run a dbms_scheduler job immediately you can use dbms_scheduler.run_job which is documented in the PL/SQL packages guide under dbms_scheduler .
    Hope this helps,
    Ravi.
    PS you will run into other issues with your example. A bat file cannot be run directly. You must do e.g.
    c:\win32\cmd.exe /q /c C:\GLOBE\CPONYIN.BAT
    which is done by setting number_of_arguments to 3 in create_program
    and after doing create_job (enabled=>false), you will have to call set_job_argument_value 3 times with '/q', '/c' and 'C:\GLOBE\CPONYIN.BAT' and then call dbms_scheduler.enable to enable the job .

  • Why does iTunes create and run playlists when I add folders to the library? How do I stop it?

    Just as the title says.
    Some albums, when added to the iTunes library, will auto-play and create a playlist. Is there any way to stop this?

    What version of Windows do you have?
    If the downloaded scripts open as text files then you may need to install the Windows Scripting Host: Windows Script 5.7 for Windows XP
    It may be that the file association for .vbs files is incorrectly set.
    tt2

  • Creating and execute a job

    I'd like to create a new job with dbms_job.submit.
    This job should start a procedure called IT.update_columns.
    The procedure should start every 5 minutes. I looked into the
    dbmsjob.sql-script and found the examples with 'sysdate+x' as
    interval. What is the correct interval for minutes or seconds?
    Another question is about the job-number. How do I get to now if
    there are existing jobs and if so, how do i get the
    corresponding job numbers?
    Thanks in advance

    Hi,
    Please use trunc function for sysdate in submittig the job to
    run exactly for every five minutes from the time of submission.
    submit the job as follows: (run it in the sql*plus prompt)
    variable x number;
    begin
         dbms_job.submit(:x,'job_name;',SYSDATE,
                   'trunc(SYSDATE,'mi') + 5/(24*60)');
         dbms_job.run(:x);
         COMMIT;
    end;
    Here 5/(24*60) gives five minitues, just converting into number
    of equivalent days, since we can add only days to sysdate.
    Regards,
    G. Rajakumar.

  • Licence types for users creating and executing BW reports

    Hi Friends,
    Will users who are writing queries attract a full professional licence or a limited professional licence.
    Will users who are only executing queries need an ERP employee licence, limited professional or full professional licence?
    Thanks,
    Ramesh

    Hi,
    User who are executing the reports, they will have execute authorisation of the query only. They dont require full authorisation.
    Developer who created the query they will have full authorisation of the query.
    I am not getting what are you talking about License.Can you explain ??

  • Create and select procedure

    Hello,
    i want to create and select procedure in SQL commands editor:
    CREATE OR REPLACE PROCEDURE SLEEP AS BEGIN DBMS_OUTPUT.PUT_LINE('a'); END; SELECT SLEEP() from dual;
    but i get error Error at line 1: PLS-00103
    that says it was founded SELECT...
    can u help me ? thanx..
    and, can i execute php code on this server ? thanx

    if I execute this code as one statement:
    CREATE OR REPLACE FUNCTION SLEEP RETURN VARCHAR2 IS
    BEGIN
    RETURN 'a';
    END;
    select sleep from dual;
    i get error which says, that SELECT was founded...
    if I execute first
    CREATE OR REPLACE FUNCTION SLEEP RETURN VARCHAR2 IS
    BEGIN
    RETURN 'a';
    END;
    and then
    select sleep from dual;
    i get error ORA-06575 Package or function SLEEP is in an invalid state
    1.) whats wrong?
    2.) is possioble to execute a creating function and the select it in one statement ?
    3.) can I use my own jsp or php on apex.oracle.com ?
    Thank you

  • How do I create an executable with arguments that executes once and terminates

    I'm just starting with LabView, so I'm sure this issue has been address somewhere already.  I just can't locate the answer.
    I am running version 6i (I may be able to get 7 or 8).
    I need to create a command line executable program with parameter input that executes only once and then terminates.
    This is for instrument control (sets the signal generator frequency, level, RF on/off and arms the Trigger).  I have written a simple VI that works from within LabView (programs the instrument when the Run button is pressed).  I have further managed to perform an Application Build to create an executable however, the application continues to run, waiting for the Run button to be pressed.  Also, I need to know how to pass parameters to this executable (freq, level, RF on/off, trigger arm).
    This executable will (eventually) be called repeatedly by a Matlab file.
    Thanks,
    D

    LabVIEW 7 added a property to get a command line argument. For older versions see http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DA5B56A4E034080020E74861.
    I'm not sure I understand you problem with the Run button. If you set the execution mode to Run When Opened from VI Properties, it should execute once whenever it's called. I think that when building an executable, it changes the property to this if it's not already set. If the application does not have this set, it will not be running at all. I'm assuming that you are talking about the Run button on the toolbar and not a run Boolean that you've created on the front panel.
    Since you have the app builder, your other option is to create a DLL. If you can call a DLL in Matlab, then that would probably be simpler.
    Message Edited by Dennis Knutson on 11-28-2005 02:46 PM

  • How do you create a complete database in notepad and execute it in SQL*Plus

    I am new to Oracle / SQL*PLUS / and the SQL Language. I have never done anything with these products before. I am running Oracle 9i Enterprise Edition. I have a database created and I was able to get a table created.
    That's it so far....
    I would like to start doing all coding and editing in Windows Notepad and then execute the code from within the SQL*Plus editor.
    Can someone please tell me......How do I do this???
    I have my data, that I will be running queries on, located in a text file.
    How do I get my SQL code to import the data from a text file into my tables???
    Thanks,
    Bobby Howerton

    Actually, @your_text_file would start executing this textfile - which is ok if there is SQL code in the file. But how I understand the question, is that the data to load into one ore more tables is in the text file. Is that correct?
    If so, if it's a lot of data, it's worth entering the documentation on the Server Utilities, search for SQL loader for example.
    If it's only a view records, than simply alter the contents to something like:
    insert into <put_table_name_here> (<put_column_names_here>) values (<data in the text file, seperated with comma's>);
    And there should be one line like this for each record, or look up the command "insert all" in the SQL reference.
    Good luck!

  • Hi, my problem is that i transferred music off my cd's into atones, created an mp3 playlist and would now like to copy that music on to my usb..how do i do it. also would like to snapshot my desk top info

    I ingested music off my cd's in to iTunes. have created an mp3 playlist with my music i iTunes. now how to copy my music on to a usb..also would like to snapshot my desktop so as to send info to my friend

    In iTunes, you can Control-Click on a song and select "Show in Finder".
    In theory you should also be able to select all the songs in the playlist (command-A) and drag them to the USB disk.
    Screen Shots can be obtained using:
        Mac OS X Screen Shots:
            Screen Shot to a Desktop file:
                Command-Shift-3              - Capture entire screen
                Command-Shift-4              - Drag to select copy region
                Command-Shift-4-Space   - Capture Window under cursor
                If you want a menu or pop-up, then do the
                    Command-Shift-4-Space
                after the menu or pop-up is setup as you like it.
            Screen Shot to Clipboard:
                Command-Control-Shift-3              - Capture entire screen
                Command-Control-Shift-4              - Drag to select copy region
                Command-Control-Shift-4-Space   - Capture Window under cursor
                If you want a menu or pop-up, then do the
                    Command-Control-Shift-4-Space
                after the menu or pop-up is setup as you like it.
                Now paste the clipboard into whatever document accepts graphics.
            NOTE:  Preview can be used to annotate a Screen Shot with Circles,
                   Arrows, and Text to describe interesting point in the Screen
                   Shot.
    If this is not what you were interested in, please provided clarification information

Maybe you are looking for

  • IPod Touch will not show up in iTunes anymore

    Hello. I have had my iPod Touch since 2011 and just recently I could not get it to show up in iTunes when I put the USB cable in to sync it. What ends up happening instead is a window appears showing my Apple iPod. I can click it and go into the Inte

  • How do I install a bootable copy of Tiger to an external Firewire drive?

    I've got a problem with my optical drive and cannot boot from a CD or DVD on my 17" flat panel iMac, running 10.2.8. I have bought Tiger and would like to upgrade my OS but want to be able to run some disc repair utilities on the iMac prior to doing

  • Has anyone else experienced InDesign CC and 2014 crashing when using Data Merge?

    I have already tried the Shift+Ctrl+Alt+Cmd keystroke upon start-up and saying "yes" to clearing the preferences, but unlike previously where this solved the issue (a few months back, until Adobe released an update which meant this was no longer need

  • Symbol wont go away

    I have the Curve 8900. I have a small clock looking icon that appears in the middle of the screen every few seconds. I cant figure out how to get rid of it and it is driving me mad! Any help would be appreciated.

  • T60 screen problems

    Hi all, I hope someone might be able to help me? I have replaced an LCD screen on a T60 but the screen is very dim and I can just about make out the background picture,  I have replaced the inverter but still have the same issue so I replaced the LCD