Webloc to Webarchive (or PDF or HTML+images)

Discussion in 'Mac Programming' started by eldino, Sep 17, 2007.

  1. eldino macrumors member

    eldino

    Joined:
    Mar 8, 2007
    Location:
    Italy
    #1
    Hi Guys,
    my problem is this: i have a bunch (400+) of .webloc links (to webpages) that i'd like to batch download using a script or a workflow and then read them offline. I tried to accomplish this using Automator, but you have to manually specify the links you need soing something like:

    "Get Specified URLs" -> "Download URLs"

    so it's impossible!also saving this workflow as .app and dragging webloc in it doesn't work! Any suggestion?
    I have nice Bash skills but I have nearly any Applescript skills.. I did a search on the web and on Mac sites but it seems i'm the only one in the world with such a problem!

    The ideal goal'd be to obtain the same result of "Save page with name" function inside Firefox for every webloc I have.. but Firefox doesn't like Automator! or it does?

    Thank you very much! any help is appreciated!
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    If you need to access the URL of a .webloc file from within your Bash script, you can use this command:

    Code:
    strings bookmark.webloc/rsrc | grep http | head -n 1
    where "bookmark.webloc" is the name of your .webloc file.
     

Share This Page