Posted By

jhenry on 03/12/08


Tagged

Bash html links images relative wget absolute standalone assets incomplete rough


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


list directory and create wget calls to build standalone html dirs


 / Published in: Ruby
 

output can be run as a shell script. should be able to refactor this as a piped wget, i think

  1. dir ="path/to/files"
  2. Dir.new(dir).entries.each { |e|
  3. dirname = e.split(".")
  4. puts "wget -nd -k -r -P#{dirname[0]} http://localhost/path/to/dirs/#{e}"
  5. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jhenry on March 12, 2008

Originally based on someone else's snippet.

Posted By: jhenry on March 12, 2008

...which is located here: http://beust.com/weblog/archives/000181.html (apparently snipplr won't let you do links in the comments?)

You need to login to post a comment.