Convert OPML to Voracious' format

I just stumbled on Xyne's Voracious feed aggregator, and liked the look of it (I had thought of writing something similar). I had a big fat OPML file though, which I didn't want to move into this new format by hand, so I wrote a Perl script to do it.
I don't have anywhere nice to host it, so if someone wants to throw it up someplace, feel free. Otherwise, if you make use of it, it would be cool to hear any feedback, I haven't thrown many different files at it.
The first argument should be the OPML file to convert, an optional second argument says where to output, or by default it will put it in the default Voracious config location so be careful not to overwrite an existing config.
#!/usr/bin/env perl
# Converts an OPML file to a format readable by Voracious.
# Written by Trevor Vallender <tsv AT tsv DOT me DOT uk>.
# Released into the public domain.
use warnings;
use strict;
use XML::XPath;
my $input;
my $output;
sub main {
get_args( );
open( OUTPUT, ">", $output ) or die $!;
print( OUTPUT "[paths]\n/\n" );
my $xp = XML::XPath->new( filename => $input );
foreach my $outline ( $xp->find( '/opml/body/outline' )->get_nodelist ) {
parse_outline( $outline, '', \*OUTPUT );
close( OUTPUT );
sub parse_outline {
my ( $outline, $parent, $fref ) = @_;
if ( $outline->find( '@type' )->string_value eq 'folder' ) {
$parent .= '/'.$outline->find( '@title' )->string_value;
$parent =~ s/ /_/g;
print( $fref $parent . "\n");
foreach my $subol ( $outline->find( 'outline' )->get_nodelist ) {
parse_outline( $subol, $parent, $fref );
} elsif ( $outline->find( '@type' )->string_value eq 'vfolder' ) {
# Ignore them
} else {
print( $fref "\t" . $outline->find( '@xmlUrl' )->string_value . "\n" );
sub get_args {
my $config_path = "/voracious/config.txt";
if ( $#ARGV == 0 ) {
$input = $ARGV[0];
if ( $ENV{XDG_CONFIG_HOME} ) {
$output = $ENV{XDG_CONFIG_HOME} . $config_path;
} else{
$output = "~/.config" . $config_path;
} elsif ( $#ARGV == 1 ) {
$input = $ARGV[0];
$output = $ARGV[1];
} else {
print STDERR "Invalid input\n";
exit;
main( );

Hi ,
Try this link:
https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-GettingPDFfilefromspooling+list
This is a good example of saving files from splooing list.
May it helps you.
Regards.
DS

Similar Messages

  • I am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    i am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    When you make a DNG that's like making another raw file, so you will need to convert the DNG file just like your original raw. Don't use the Save button in the raw converter. That's just a link to the DNG converter. Normally you would click Open instead and then save in the editor as a jpg or other image format of your choice.

  • How to upload a PDF file and convert it to OTF format

    We have come across rquirements like converting OTF to PDF but my requirement is to read a PDF file in SAP and convert it to OTF format for printing.
    Can anyone please help me with the Function Modules to do so.

    Hello,
    Try the following FM:
    CONVERT_OTF Convert SAP documents (SAPScript) to other types.
    Example:
    CALL FUNCTION "CONVERT_OTF"
    EXPORTING FORMAT = "PDF"
    IMPORTING BIN_FILESIZE = FILE_LEN
    TABLES OTF = OTFDATA
    LINES = PDFDATA
    EXCEPTIONS ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    OTHERS = 4.
    Hope this helps.
    Reward if helpful.
    Regards,
    Vasanth

  • Convert Char to Date format - Evaluate

    Hi,
    Could anyone provide us the Evaluate formula to convert Char to Date format
    2009-06-20 should be converted to 06/20/2009
    Regards,
    Vinay

    Hi,
    Refer the below threads...
    Re: How to convert string to date format?
    how to convert character string into date format????
    Regards,
    Chithra Saravanan

  • After Effects CS4 and converting to a lossless format

    I posted in the Adobe Premiere forums about an issue I was having with my renders. If you want to read it then you can check it out with the url below.
    http://forums.adobe.com/message/2622969#2622969
    What I have figured out is that After Effects does not like my AVCHD files I get from my camera. (They are h.264 in an ,m2ts file type and not mp4)
    The issue is that I get "echos" or skips when I render something in After Effects or render with Media Encoder via dynamic link and Premiere Pro CS4.
    What I am not familar with is the types of files that many of you who are more expereinced than I am use for After Effects when you need to convert to a lossless format (or one as close as you can get to being "lossless."
    I was wondering if someone could recommend the kinds of files I should be converting to and if you have a good method of converting them. Not that I want people to discuss other software here, but if you do not use Adobe programs to convert, then what kinds of files do you convert to?
    In other words, where do you recommend I begin reading or researching this because a lot of companies sell conversion programs. I currently have one that I paid for but it does not do the job I need it to do for HD. I would like to keep it as close to HD quality as possible.
    FYI I generally will do video work with some effects and green screen work in After Effects. My output is video. If you have any other questions about my process, then please do not hesitate to ask me. Other than that, I appreicate anyone's guidance.

    Yeah, AE does not like video files with interframe compression. It processes video in a completely different way than a non-linear editing program like Premiere does. My friend Dave LaRonde from the friendly forums at CreativeCOW.net explains it this way:
    If the footage you imported into AE is any kind of the following -- footage in an HDV acquisition codec, MPEG1, MPEG2, mp4, m2t, H.261 or H.264 -- you need to convert it to a different codec.
    These kinds of footage use temporal, or interframe compression. They have keyframes at regular intervals, containing complete frame information. However, the frames in between do NOT have complete information. Interframe codecs toss out duplicated information.
    In order to maintain peak rendering efficiency, AE needs complete information for each and every frame. But because these kinds of footage contain only partial information, AE freaks out, resulting in a wide variety of problems.
    You have experienced this delightful problem for yourself.
    There are several different file formats that people use. Uncompressed AVI is one as is Quicktime with the animation codec. However, lately folks seem to prefer Quicktime with the PNG codec (not a PNG sequence). It produces a significantly smaller file size, but is still effectively lossless.
    You can use the Adobe Media Encoder to export it out of Premiere to use in AE.

  • Can't convert .DV to any format in Quicktime

    Hi!
    I've recently created a movie project in iMovie and exported it to Quicktime, for it to keep it's full resolution. The problem is... the file measures about 1.09 Gb, for a 5:49 movie. I want to convert it to .avi to reduce it's size, maintain quality and play on YouTube, etc,; I've tried different specs but it always freezes! I've tried also converting it to different formats like Divx or .mp4 but with no luck at all. Any tips on how to fix this?

    First don't export to AVI there are enough horrible AVI's out there from Windows users to last until the 22nd century.
    You don't need to export it at all just open the reference file in QT and export how you like. You have said nothinga about how it doesn't work, error messages or anything at all to help so try doing that.
    DV is 13GB an hour so the size is simply a normal DV size for the duration you have there, and not a problem, and you may be happier opening it in MPEG Streamclip (free), and export to MPEG-4 with one of the iTunes presets.

  • I've uploaded 4 pdf documents. Now how do I convert them to Excel format?

    I've uploaded 4 pdf docs. Now how do I convert them to Excel format so I can manipulate the data?
    linda93790

    Hi linda93790,
    If you uploaded your files to http://cloud.acrobat.com, simply click on one of the PDF files, then click 'ExportPDF' from along the top-bar in your browser.  This will automatically load that PDF into the ExportPDF system.  From there, you can configure any options you may need and convert the file to an .xlsx file.
    Please let us know if you have any questions!
    Thanks,
    David

  • Converting String To XML Format and send as attachment

    Hi
    My requirement is to convert String into XML Format and that XML File i have to send as an attachment
    can any one one give solution for this Problem.
    Thank you
    Venkatesh.K

    hi,
    i m filling the itab first and converting to xml
    itab contaning these data
    GS_PERSON-CUST_ID   = '3'.
    GS_PERSON-FIRSTNAME = 'Bill'.
    GS_PERSON-LASTNAME  = 'Gates'.
    APPEND GS_PERSON TO GT_PERSON.
    GS_PERSON-CUST_ID   = '4'.
    GS_PERSON-FIRSTNAME = 'Frodo'.
    GS_PERSON-LASTNAME  = 'Baggins'.
    APPEND GS_PERSON TO GT_PERSON.
    after conversion data is coming like that
    #<?xml version="1.0" encoding="utf-16"?>
    <CUSTOMERS>
      <item>
        <customer_id>0003</customer_id>
        <first_name>Bill</first_name>
        <last_name>Gates</last_name>
      </item>
      <item>
        <customer_id>0004</customer_id>
        <first_name>Frodo</first_name>
        <last_name>Baggins</last_name>
      </item>
    </CUSTOMERS>
    but errors are  1) # is coming at the first
                            2)for 'encoding="utf-16"?>', it is not coming perfectly, some other data (iso-8859-1) should come here
    can anybody plz solve it.
    regards,
    viki

  • Converting string to XML format

    Hi All,
    I have a requirement to convert string to xml format and download it. Atpresent, I have a string which is a collection of xml tags. I want to convert this string to xml format like <VALUE004>20387899.437</VALUE004>
    <VALUE005>20387899.437</VALUE005>
    <VALUE006>20387899.437</VALUE006>
    Is there any function module for this.

    Chk this thread.
    Re: Regd: File Conversion to XML format

  • Convert to a date format

    Hi,
    I have a table with a date field that comes as varchar2(20byte) with a content like this:
    20/Jan/2011
    and I need it to be converted toa real date format e.g. 20.01.2011.
    Please help,
    Thanks
    Walter

    Hi, Walter,
    user457173 wrote:
    Hi,
    I have a table with a date field that comes as varchar2(20byte) with a content like this:
    20/Jan/2011
    and I need it to be converted toa real date format e.g. 20.01.2011.'20/Jan/2011' is actually just as "real" as '20.01.2011'. Neither is a real DATE; both are strings.
    Please help,
    Thanks
    WalterUse TO_DATE to convert a string into a DATE:
    TO_DATE ( column_x
            , 'DD/Mon/YYYY'
            )Use TO_CHAR to display a DATE in a given format:
    TO_CHAR ( d
            , 'DD.MM.YYYY'
            )d can be any DATE, including the DATE returned by the TO_DATE function, above.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    Edited by: Frank Kulash on Oct 25, 2011 7:57 AM

  • I need to know the best, safest way to convert video for Mac.  I just had home movies converted to a DVD format a realize now that I need another step to burn them to my computer.

    I just had home movies converted to a DVD format a realize now that I need another step to burn them to my computer.  This is for a Christmas present!  Help.

    I don't think you need to use a ripper program to read a home movie DVD. Those are primarily for copy-protected commercial DVDs, right?
    I think you just need to transcode the DVD files using a utility like Handbrake, which is free and fast.
    http://handbrake.fr/details.php

  • How to convert Xstring to PDF format and send pdf to multiple user

    Hi to all
    can any one provide me saple code to convert Xstring to PDF format and send pdf to multiple user
    i have searched the SDN , but cant get any proper soulution.
    I shall be thankful to you for this.
    Regards
    Pavneet Rana

    Use function module 'SCMS_XSTRING_TO_BINARY' to convert from XString to a Binary table. Just like this:
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer          = lv_xstring_pdf
          append_to_table = ' '
        TABLES
          binary_tab      = lt_doc_content.
    To send the email in an OO way you should user class CA_SEND_REQUEST_BCS. Take a look to program BCS_EXAMPLE_6 or any of the test programs in package SBCOMS.

  • I am wondering what upgrades I need in order to convert PDFs into another format and compress the size of a PDF (if this is possible)?

    I want to be able to convert PDFs into another format and I know this can be achieved with a small upgrade. However I am also looking for the ability to compress the size of PDFs, if this is at all possible.

    You can use Acrobat Standard for this.

  • How to convert 12 hour time format to 24 hour time format ?

    Hi,
    How to convert 12 hour time format to 24 hour time format is there any FM if not, please suggest me how to convert .
    regards,
    rakesh

    Hi,
    Have you tried function module HRVE_CONVERT_TIME
    Input parameters will be like
    TYPE_TIME                       B
    INPUT_TIME                      01:00:00
    INPUT_AM_PM                  PM
    Output
    OUTPUT_TIME                     13:00:00
    Regards

  • How to convert image to binary format

    Hi all,
      We have developed an Employee search  mobile web application in .net which is hosted on an exposed IP server, we need to show the employee data along with the image of the employee on mobile.
    When we run this application through our desktop we are able to see the image of the employee since we are doing this through <b>intranet</b> , but when we try to access the same from any mobile device we are able to see only the data but no image, since we are doing this through <b>internet(exposed server).</b>
    Please suggest some way to get this image,
    is there any<b> function module in ABAP</b> which can <b>convert image to binary format</b>
    so that we <b>export binary data</b> to .net application

    Hei evryone!
    CAn anyone pls help me on how to solve this error:
    java.security.AccessControlException: access denied (java.security.SecurityPermission insertProvider.SunJCE)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkSecurityAccess(Unknown Source)
         at sun.plugin.security.ActivatorSecurityManager.checkSecurityAccess(Unknown Source)
         at java.security.Security.check(Unknown Source)
         at java.security.Security.insertProviderAt(Unknown Source)
         at java.security.Security.addProvider(Unknown Source)
         at CryptoTest.processFile(SwingApplet.java:68)
         at CryptoTest.<init>(SwingApplet.java:65)
         at SwingApplet.init(SwingApplet.java:39)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Is it allright for a swing code to access local resources? like in my case i want my swing app to decrypt and encrypt an image file but when i tried to access the method for decrypting and encrypting i got this error message on my console. Do i have to make my code signed before i could write/read a file on my hard drive?
    Any help / suggestions would be much appreciated.Thanks!

Maybe you are looking for

  • Ultra-Slow PDF's on new HP DJ 6980 (MacOS 10.3.9 with Reader 6.0)

    Any size PDF from any source takes between 5-10 minutes before the printer spits it out in the usual seven seconds. Any other document, web page, etc prints quickly. Using Rendezvous, Ethernet connection thru Linksys router/switch. Print box from Rea

  • Tunes not starting in iTunes.  No sound in QuickTime.

    Hello, I've just upgraded my iTunes to 6.0.4.2 . I opened iTunes and my library is all present and correct, but, if I try to start a track (double click, press play, hit space, use the menus, whatever), the following happens: The play symbol changes

  • Libvirt networking [solved]

    I installed libvirt from AUR and I don't seem to be having any luck getting networking going with it.  I thought I would see if any one has any ideas. Whenever I start libvirtd, I get the following error: # libvirtd libvir: QEMU error : internal erro

  • Help. I can't restore my photo library

    I recently had a residential burglary in which my iMac was stolen. It's since been retrieved, but the thief erased every single photo in my library. However, I did have an external hard drive with the library saved on it. While i was without the iMac

  • Question in the PIM API

    I am working with the MIDP PIM API (javax.microedition.pim.*) so in the contacts part, could i define new fields other than the existing standard fields as the Name and Address in an item? I read in the PIM specification that there are extended field