a location to show events related to the library...
maybe by category?
eg: Read & Repair, Bibliotecha, maybe others?
thinking of reading club sites...
https://rupert.lt/
https://salwafoundation.nl/
https://www.stroom.nl/paginas/pagina.php?pa_id=4918149
I think in an ideal world,
the r&r events are made in md format, and made into html by pelican.
Its better to be able to also port these MD files into the library page, so you don't have to make an announcement 3 times, where one is in a completely different format.
but I don't know if there is a way to do only that and not become a full blown pelican. (currently this project is very small and precise and not a big unruly beast like pelican)
In another way, we can keep the r&r events on the library page to be reflective instead of an announcement. (written afterwards)
The goal of this page should be to showcase what we have in the library so people are more inclined to read.
Its relatively easy to include a few books from the csv on a page with a text.
Those are just my thoughts for now.
I think in an ideal world,
the r&r events are made in md format, and made into html by pelican.
Its better to be able to also port these MD files into the library page, so you don't have to make an announcement 3 times, where one is in a completely different format.
but I don't know if there is a way to do only that and not become a full blown pelican. (currently this project is very small and precise and not a big unruly beast like pelican)
In another way, we can keep the r&r events on the library page to be reflective instead of an announcement. (written afterwards)
The goal of this page should be to showcase what we have in the library so people are more inclined to read.
Its relatively easy to include a few books from the csv on a page with a text.
Those are just my thoughts for now.
Happy to brainstorm together how we could do that.
Thinking of:
the RSS feed of the Varia site (maybe filtering the R&R category)
the RSS of a Mastodon account for R&R/the R&R hashtag
implementing the same system as the books: adding events in a separate spreadsheet where we add: title, description, date, time, guest
And this could be applied also for Bibliotecha events etc...
Going to keep thinking about it...
Happy to brainstorm together how we could do that.
Thinking of:
- the RSS feed of the Varia site (maybe filtering the R&R category)
- the RSS of a Mastodon account for R&R/the R&R hashtag
- implementing the same system as the books: adding events in a separate spreadsheet where we add: title, description, date, time, guest
And this could be applied also for Bibliotecha events etc...
Going to keep thinking about it...
>>>fromfeedparserimportparse>>>frompprintimportpprint>>>feed=parse("https://varia.zone/feeds/all-nl.rss.xml")>>>pprint([entry.titleforentryinfeed.entriesif"Read & Repair"inentry.title])['Read & Repair feat. Minimal Viable Learning','Read & Repair feat. Christina Karagianni en Anita Hrnić','Read & Repair - Neoliberalism with Dutch Characteristics: The Big Fix Up of ''the Netherlands and the Practice of Embedded Cultural Activism','Read & Repair - The Means of Communication as a Means of Production','Read & Repair feat. stone throw - sessie 1','Read & Repair feat. stone throw - sessie 2','Read & Repair feat. Digital Solidarity Networks','Read & Repair feat. Deaf Republic Reading','Read & Repair feat. readings & listings: open licenses edition','Read & Repair feat. The Bootleg Library']
> the RSS feed of the Varia site (maybe filtering the R&R category)
From [the NL feed](https://varia.zone/feeds/all-nl.rss.xml), for example, I did:
```bash
$ apt install python3-feedparser
```
And then:
```python
>>> from feedparser import parse
>>> from pprint import pprint
>>> feed = parse("https://varia.zone/feeds/all-nl.rss.xml")
>>> pprint([entry.title for entry in feed.entries if "Read & Repair" in entry.title])
['Read & Repair feat. Minimal Viable Learning',
'Read & Repair feat. Christina Karagianni en Anita Hrnić',
'Read & Repair - Neoliberalism with Dutch Characteristics: The Big Fix Up of '
'the Netherlands and the Practice of Embedded Cultural Activism',
'Read & Repair - The Means of Communication as a Means of Production',
'Read & Repair feat. stone throw - sessie 1',
'Read & Repair feat. stone throw - sessie 2',
'Read & Repair feat. Digital Solidarity Networks',
'Read & Repair feat. Deaf Republic Reading',
'Read & Repair feat. readings & listings: open licenses edition',
'Read & Repair feat. The Bootleg Library']
```
So, that seems very doable! More API stuff @ https://feedparser.readthedocs.io.
Awesome! It is also possible btw to enable generating feeds for categories in pelican, less parsing and the post titles do not necessarily need to be called 'Read and Repair' that way: https://docs.getpelican.com/en/stable/settings.html?highlight=feeds#feed-settings
with 8d80bb7c17 I made a page that shows the read and repair category >readrepair/category>
events, from the past.
My next questions are:
Can we have a field in the RSS (I know nothing about RSS feeds except for consuming them) that has the date of the event. similar to lastBuildDate>Tue, 26 Jan 2021 10:22:21 +0100/lastBuildDate>. That way I can make an upcoming event page too.
Is there a field where we can put some tags relating to the events, we can than use the fields field in the varlib.csv to generate a list of links for further reading.
with 8d80bb7c17 I made a page that shows the read and repair category >readrepair/category>
events, from the past.
My next questions are:
1. Can we have a field in the RSS (I know nothing about RSS feeds except for consuming them) that has the date of the event. similar to lastBuildDate>Tue, 26 Jan 2021 10:22:21 +0100/lastBuildDate>. That way I can make an upcoming event page too.
2. Is there a field where we can put some tags relating to the events, we can than use the fields field in the varlib.csv to generate a list of links for further reading.
(I know nothing about RSS feeds except for consuming them)
So, the short of creating them is that Pelican generates them from the content in the event posts in the varia.website repository and uses the file metadata (stuff at the top of the file) to add additional data like categories.
Can we have a field in the RSS that has the date of the event.
Is there a field where we can put some tags relating to the events, we can than use the fields field in the varlib.csv to generate a list of links for further reading.
Very nice!
> (I know nothing about RSS feeds except for consuming them)
So, the short of creating them is that Pelican generates them from the content in the event posts in the varia.website repository and uses the file metadata (stuff at the top of the file) to add additional data like categories.
> Can we have a field in the RSS that has the date of the event.
Can you use `event_start`? For example, `event_start: 2020-04-26 10:30` in https://git.vvvvvvaria.org/varia/varia.website/raw/branch/master/content/r&r-apr-EN.md.
> Is there a field where we can put some tags relating to the events, we can than use the fields field in the varlib.csv to generate a list of links for further reading.
Pelican supports a `tags` field. See https://docs.getpelican.com/en/3.6.3/content.html#file-metadata. So, we just add a `tags: ...` to each event markdown file and then they will be available.
Oh wait, right, it seems those metadata values are not getting pushed into the RSS field! I guess we need to fiddle with the RSS generation side then to include some extra info.
Oh wait, right, it seems those metadata values are not getting pushed into the RSS field! I guess we need to fiddle with the RSS generation side then to include some extra info.
The event start I can get by BeautifulSouping the Link of the RSS item and getting class="article-event-start" content. Thats less ideal but I think for now a better solution than hacking the core of pelican as thought of in https://git.vvvvvvaria.org/varia/varia.website/issues/4
let me know what you think
Tags become additional categories. As you can see here with the latest R&R event.
http://varia.zone/en/feeds/all-en.rss.xml
The event start I can get by BeautifulSouping the Link of the RSS item and getting class="article-event-start" content. Thats less ideal but I think for now a better solution than hacking the core of pelican as thought of in https://git.vvvvvvaria.org/varia/varia.website/issues/4
let me know what you think
event_start is non-standard pelican unfortunately as it is part of the events plugin.
If it is just about getting upcoming dates for these read & repair events, I'd just add that information in the post itself and then extract from the RSS body?
Or even better (in case you want to do it for all events), make the events plugin write that information in to the generated html of the post. That way it also makes its way in to the RSS.
event_start is non-standard pelican unfortunately as it is part of the `events` plugin.
If it is just about getting upcoming dates for these read & repair events, I'd just add that information in the post itself and then extract from the RSS body?
Or even better (in case you want to do it for all events), make the events plugin write that information in to the generated html of the post. That way it also makes its way in to the RSS.
Aha, wonderful! We can do this from the events already it seems. I was definitely not wanting to do anything to do with hacking Pelican core indeed...and adding stuff to the body seemed workable but also potentially fragile. Here is some code to pull the event_start out of the existing events.ics file! Whatcha think?
Re: enabling RSS feeds for categories and tags: it should be possible. I tried to enable them locally, but got stuck at generating them for both NL and EN. The {lang} variable is causing an error...
And by default you only get the NL feeds as that is the default language of the website.
Also, we still use Pelican 3, but installing Pelican 4 didn't help either. Hmm!
Nice thread here :)
Re: enabling RSS feeds for categories and tags: it should be possible. I tried to enable them locally, but got stuck at generating them for both NL and EN. The `{lang}` variable is causing an error...
And by default you only get the NL feeds as that is the default language of the website.
Also, we still use Pelican 3, but installing Pelican 4 didn't help either. Hmm!
https://docs.getpelican.com/en/latest/settings.html#translations
> Also, we still use Pelican 3
Ah you'll be pleased to hear the [upgrade work was done recently](https://git.vvvvvvaria.org/varia/varia.website/src/commit/6bf595f0076964d06ed9ef4bbcc0630442e6e57d/requirements.txt#L6) 🚀 the site is much easier to hack on nowadays https://git.vvvvvvaria.org/varia/varia.website#hackity-hack-hack
Implementation leads to more elaborate ideas for the future.
But so far we have:
Page shows upcoming or latest events based on the ics start time. with small disclaimer that an event has already been and to check varia.zone for the latest updates.
Books from the library can be recommended using the tags in pelican, if they match the fields in the csv of books. This creates links to these books on the past events page.
Implementation leads to more elaborate ideas for the future.
But so far we have:
1. Page shows upcoming or latest events based on the ics start time. with small disclaimer that an event has already been and to check varia.zone for the latest updates.
2. Books from the library can be recommended using the tags in pelican, if they match the fields in the csv of books. This creates links to these books on the past events page.
closing with commit: a34cc1f634
a location to show events related to the library...
maybe by category?
eg: Read & Repair, Bibliotecha, maybe others?
thinking of reading club sites...
https://rupert.lt/
https://salwafoundation.nl/
https://www.stroom.nl/paginas/pagina.php?pa_id=4918149
I think in an ideal world,
the r&r events are made in md format, and made into html by pelican.
Its better to be able to also port these MD files into the library page, so you don't have to make an announcement 3 times, where one is in a completely different format.
but I don't know if there is a way to do only that and not become a full blown pelican. (currently this project is very small and precise and not a big unruly beast like pelican)
In another way, we can keep the r&r events on the library page to be reflective instead of an announcement. (written afterwards)
The goal of this page should be to showcase what we have in the library so people are more inclined to read.
Its relatively easy to include a few books from the csv on a page with a text.
Those are just my thoughts for now.
Happy to brainstorm together how we could do that.
Thinking of:
And this could be applied also for Bibliotecha events etc...
Going to keep thinking about it...
a wish...to a wish for events 3 years agoFrom the NL feed, for example, I did:
And then:
So, that seems very doable! More API stuff @ https://feedparser.readthedocs.io.
Something is cooking...
Awesome! It is also possible btw to enable generating feeds for categories in pelican, less parsing and the post titles do not necessarily need to be called 'Read and Repair' that way: https://docs.getpelican.com/en/stable/settings.html?highlight=feeds#feed-settings
with
8d80bb7c17
I made a page that shows the read and repair category >readrepair/category>events, from the past.
My next questions are:
Can we have a field in the RSS (I know nothing about RSS feeds except for consuming them) that has the date of the event. similar to lastBuildDate>Tue, 26 Jan 2021 10:22:21 +0100/lastBuildDate>. That way I can make an upcoming event page too.
Is there a field where we can put some tags relating to the events, we can than use the fields field in the varlib.csv to generate a list of links for further reading.
Very nice!
So, the short of creating them is that Pelican generates them from the content in the event posts in the varia.website repository and uses the file metadata (stuff at the top of the file) to add additional data like categories.
Can you use
event_start
? For example,event_start: 2020-04-26 10:30
in https://git.vvvvvvaria.org/varia/varia.website/raw/branch/master/content/r&r-apr-EN.md.Pelican supports a
tags
field. See https://docs.getpelican.com/en/3.6.3/content.html#file-metadata. So, we just add atags: ...
to each event markdown file and then they will be available.Oh wait, right, it seems those metadata values are not getting pushed into the RSS field! I guess we need to fiddle with the RSS generation side then to include some extra info.
Tags become additional categories. As you can see here with the latest R&R event.
http://varia.zone/en/feeds/all-en.rss.xml
The event start I can get by BeautifulSouping the Link of the RSS item and getting class="article-event-start" content. Thats less ideal but I think for now a better solution than hacking the core of pelican as thought of in https://git.vvvvvvaria.org/varia/varia.website/issues/4
let me know what you think
event_start is non-standard pelican unfortunately as it is part of the
events
plugin.If it is just about getting upcoming dates for these read & repair events, I'd just add that information in the post itself and then extract from the RSS body?
Or even better (in case you want to do it for all events), make the events plugin write that information in to the generated html of the post. That way it also makes its way in to the RSS.
Aha, wonderful! We can do this from the events already it seems. I was definitely not wanting to do anything to do with hacking Pelican core indeed...and adding stuff to the body seemed workable but also potentially fragile. Here is some code to pull the
event_start
out of the existingevents.ics
file! Whatcha think?And then
Nice thread here :)
Re: enabling RSS feeds for categories and tags: it should be possible. I tried to enable them locally, but got stuck at generating them for both NL and EN. The
{lang}
variable is causing an error...And by default you only get the NL feeds as that is the default language of the website.
Also, we still use Pelican 3, but installing Pelican 4 didn't help either. Hmm!
https://docs.getpelican.com/en/latest/settings.html#translations
Ah you'll be pleased to hear the upgrade work was done recently 🚀 the site is much easier to hack on nowadays https://git.vvvvvvaria.org/varia/varia.website#hackity-hack-hack
Implementation leads to more elaborate ideas for the future.
But so far we have:
closing with commit:
a34cc1f634