You could do that if you want to. I just thought I might possibly want to add extra fields to the file format later.

But yes, I'm aware of this trick. I'm storing my collection of (public) bookmarks in a text file where each line has the URL as the last whitespace-separated field, and generating HTML pages automatically uploaded to my homepage from them.

For example, a part of this source file looks like this. (First word is the level, as this is organized to a hierarchy; the URL null: is used for a heading that's not a link.)

2 Könyvtárak (libraries, hu) null: 4 Magyar Országos Közös Katalógus null:next 6 katalógus (MOKKA) http://webpac.mokka.hu/WebPac/CorvinaWeb 6 nyitólap http://mokka.hu/ 6 tagkönyvtárak http://mokka.hu/?q=mokkaegyesulet/adatok/nevjegyzekek/ +tagkonyvta rak 4 Fővárosi Szabó Ervin Könyvtár null:next 6 katalógus (FSzEK) http://saman.fszek.hu/WebPac/CorvinaWeb;?action=ad +vancedsear chpage 6 nyitólap http://www.fszek.hu/

This is then translated to some HTML that looks like this when rendered (I'm not pasting the HTML source here as it's a bit hard to read):

* Könyvtárak (libraries, hu): + + * Magyar Országos Közös Katalógus katalógus (MOKKA) nyitó +lap tagkönyvtárak + * Fővárosi Szabó Ervin Könyvtár katalógus (FSzEK) ny +itólap

So anyway, here I'm using the fact that the URL is always exactly the last word. If the last word of a line doesn't look like an URL, the rendering script gives me a warning.


In reply to Re^2: wgetas - download many small files by HTTP, saving to filename of your choice by ambrus
in thread wgetas - download many small files by HTTP, saving to filename of your choice by ambrus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.