#5 custom metadata parse rules


copied from kde-apps.org

by tuxmania on: Dec 13 2009

I've just installed KRadioRipper and am enjoying it.

One question. Is there any way we can add some of the command parameters?

I would like to use a parse rule file to filter out some station advertising in the meta data which is interfering with the way the files are splitting.

In the Streamstripper you'd use the -w parameter to specify the rule file. How can I do this with KRadioRipper?


  • Anonymous - 2009-12-13
    • assigned_to: nobody --> urwald
  • Anonymous - 2009-12-13

    Well, actually there is no way to do so.

    This feature request has 2 parts:

    1.) Add a possibility to add custom options to the streamripper calls.

    This has to be rejected, sorry. First reason is that this could interfere with KRadioRipper's options that maybe work different from which you expect. And KRadioRipper wants to provide an easy-to-use GUI for KRadioRipper, without side-effects.

    2.) Have a possibility to determine a custom rule file.

    This request could be solved by adding a possibility to the GUI that lets you select a custom rule file. Or, better: We could provide a small internal editor for the file. Maybe even with syntax highlighting?

    I'll see what I can do in the next future.

    @tuxmania: Could you help with testing this?

    @tuxmania: Could you provide a sample rule file?

  • roadie_man

    roadie_man - 2009-12-13

    @ urwald. Yes option 2 would be sufficient. I can help with testing but only on a Linux system.
    A simple sample of a rule file would be: filename *parse_rules.txt* with content:-

    # Ignore metadata that begins with "A suivre"
    # The leading "m" says this is a match rule
    # The trailing "e" means drop the metadata
    m/^A suivre:/e

    It's taken from the Streamripper FAQ.

  • Anonymous - 2009-12-13

    Okay, I'll try to address this one for the next release.

    Maybe in about a month, a first test version is available...

  • roadie_man

    roadie_man - 2009-12-14

    OK. Let me know when you have something ready to test. I tried to attach the parse_rul.txt file but can't figure out how to attach a file here. Anyway you can get if from the streamripper source files. For some reason it wasn't installed with openSUSE packaged version of streamripper.

    The file has a few examples of rules.

  • Lukas Sommer

    Lukas Sommer - 2010-04-05

    Didn't made it into 0.7, sorry.

    Will be done (hopefully) for the next (major) release.

  • Lukas Sommer

    Lukas Sommer - 2010-05-05
    • summary: Command line parameters? --> custom metadata parse rules
  • Lukas Sommer

    Lukas Sommer - 2010-08-24

    Finally, this feature made it in the current development release (0.7.10-unstable). Sorry for the long time this feature took - I was quite busy in the last months.

    Right now, we have a just simple solution that permits to edit the rules within the settings dialog of the stream.

    @roadieman: Please test if this works as expected for you (changing the rules file, saving it, recording with custom rules...) Binaries are available at http://download.opensuse.org/repositories/home:/sommerluk:/kstreamripper/ for various distributions. If you prefer sources, let me know.

    Maybe we could make syntax highlighting for the rules file in a further release (should not be too much work, as our rule editor is based on Kate, which has a really good syntax highlighter - we just need to write a corresponding syntax highlighting file).

    @roadieman: Do you think that this solution matches your needs? Or do we need something more?

  • roadie_man

    roadie_man - 2010-08-25

    Ok, I've just installed kstreamripper. I'm not sure how to set it to use the rules file though. Appending options to the end of streamripper in the settings>command dialog does not work. If I was running streamripper from the command line it would look something like this.

    streamripper http://www.live9.fr/ecoute/192.m3u -d /home/myusername/streamrips/ -u FreeAmp/2.x -w /home/myusername/streamrips/parse_rules.txt

    How do I get kstreamripper to look at the rules file? Also, I note that the apps name changed from kradioripper to kstreamripper. Is this now the new name? I don't know if I'm missing something obvious here or not.

  • Lukas Sommer

    Lukas Sommer - 2010-08-26

    KRadioRipper has been renamed to KStreamRipper (to show its connection to streamripper).

    Please make sure to use the latest develop version: Do not use the package "kstreamripper", but instead "kstreamripper-unstable".

    You need at least version 0.7.10-unstable. This version is actually available for Fedora 12, 13, Mandriva 2010, SUSE Linux Enterprise Edition 11 SP1, openSUSE 11.2, 11.3, openSUSE Factory, Ubuntu 10,4 (experimental), Ubuntu 9.10 (experimental, only x586). The next build 0.7.11-unstable (which is actually on the way) will probably also be provided for older distributions.

    Access to the parse rules:
    - right-click on a stream
    - choose "Properties"
    - choose "Splitting"
    There you see an edit widget for the parse rules.

  • Lukas Sommer

    Lukas Sommer - 2010-08-29

    Because of a bug in set-version.sh (which is used internally to make the tarballs and the binary packages), the package "kstreamripper-unstable" could be installed at the same time with "kstreamripper". This probably breaks the program.

    To fix this, please uninstall both: "kstreamripper" AND "kstreamripper-unstable". Than, install ONLY ONE OF THEM again. Starting from 0.7.12, this bug should be fixed and everything work automatically again.

    Sorry for inconvenience.

  • Nobody/Anonymous

    OK, I've installed the unstable version and had a play a round with the rules in settings. It seems to be working fine, at least for the rules I changed. Thanks for adding the feature. This basically takes care of what I asked for.

  • Lukas Sommer

    Lukas Sommer - 2010-08-31

    Okay. I mark this feature request as "closed".

    A stable version should be released soon and will contain this feature.

  • Lukas Sommer

    Lukas Sommer - 2010-08-31
    • assigned_to: urwald --> nobody
    • status: open --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks