Attachment ''


#!/usr/bin/env bash
export LC_ALL=C

# do premennej SITE ulozime iba server
SITE=`echo $1 | sed 's@\(http://[^/]*\).*@\1@'`

# ak neexistuje adresar img, vytvorime ho
# budeme donho ukladat obrazky
if ! -d img
        mkdir img

# prechadzame vsetky URL na schranke
for RURL in `
wget -O - -q $1 | 
        tr -d '\n' | 
        sed 's/>/>\n/g' |
        grep '< *[iI][mM][gG].*[sS][rR][cC]'|
        sed 's/.*</</' |
        sed "s/.*[iI][mM][gG].*[sS][rR][cC] *= *[\"']\?//" |
        sed "s/[ \"'].*//"`
        # vytvorime uplne URL pre wget
        # musime rozlisit typy ^http://, ^/ a ostatne
        if test -z `echo $RURL | grep '^http://'` 
          if test -z `echo $RURL | grep '^/'`
        # meno suboru je to, co je za poslednym lomitkom v URL
        FNM=`echo $URL | sed 's@.*/@@'`

        # niektore stranky obsahuju viacej razy ten isty obrazok
        # vtedy ho nestahujeme viac razy, je to zbytocne
        # testujeme tu, ci subor uz existuje
        if test ! -f img/$FNM
                echo $URL
                wget -O img/$FNM -q $URL

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-04-29 11:32:08, 1.0 KB) [[]]
  • [get | view] (2009-04-29 11:30:23, 8.3 KB) [[]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.