[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: generate a rss.xml from a bunch of HTML files



Dan Ritter wrote:

>>>> ... no one did it? :O
>>>
>>> In FLOSS this usually means nobody else needed it.
>> 
>> Impossible in this, basic case. The static generator guys who
>> also did the RSS as mentioned already needed it, and did it,
>> only not modular to fit this purpose (IIUC from reading here).
>
> They totally did. As a library, not a standalone.
>
> Because it turns out almost everybody needs consistency, and
> that comes from dealing with the whole problem.

Yes, but ever heard of independent tools working together?
E.g., this zsh

  hits=$(cut -d ' ' -f 2,8 $log | grep $p | sort | cut -d ' ' -f 1 | uniq -c | wc -l)

to make up a script or little program, e.g.

  https://dataswamp.org/~incal/blog/meta/piles

that produces the desired result:

  https://dataswamp.org/~incal/blog/hits.txt

Anyway that's what I would like here, if anyone else wants
something else somewhere else by all means don't make it
standalone, put it in a library... that we can't access (?) to
get a standalone either, maybe, it is too consistent with
everything else it is impossible to make out...

>>> Why do you need it? Maybe we can suggest other means to
>>> achieve your (true) goal.
>> 
>> True goal!
>> 
>> I have a blog [1], just a bunch of HTML5/CSS files,
>> absolutely nothing advanced, and I'd like an RSS file [2]
>> which is generated from the HTML files (not the CSS, so
>> even simpler actually) so I for example can submit it here
>> [2] and read it with Gnus :)
>> 
>> So one needs a parser to parse the HTML, dispose of
>> unnecessary stuff, walk the tree (ha) and output it as an
>> RSS file.
>
> That's what all those static site generators do.
>
> As a bonus, they usually offer templating (so the structure
> of pages looks similar to each other) and shared CSS (so the
> visuals are decoupled from the structure, and can be changed
> without going in to every page to repeat tweaks.)

I don't have to do that, as you see pages look similar and
there is just one CSS file:

  https://dataswamp.org/~incal/blog/index.html
  https://dataswamp.org/~incal/blog/global.css
  
> It sounds like you've written about a quarter of a static site
> generator already. 

Heh, no, what do you mean?

> You could continue down that path, or just install Pelican
> and be happy in about a day.

I would if it would do what I want namely get an RSS file and
only that. (Maybe it can even do that, I don't know.)

> Don't become that person who gets angry at wheels because
> wheels need axles and bearings when all you ever needed was
> a couple of good round logs.

Who is angry, I'm not angry and especially not at wheels:

  https://dataswamp.org/~incal/work-photos/stand.jpg
  https://dataswamp.org/~incal/#bike

But no one has or have heard of a CLI parser or shell tool...?

-- 
underground experts united
https://dataswamp.org/~incal


Reply to: