RSS builder fix, proof read, minor CSS improvements

This commit is contained in:
Yann Esposito (Yogsototh) 2019-09-25 15:36:52 +02:00
parent e229deb765
commit d2c26615d8
Signed by untrusted user who does not match committer: yogsototh
GPG Key ID: 7B19A4C650D59646
4 changed files with 142 additions and 96 deletions

View File

@ -3,9 +3,9 @@
rootdir=${0:h}
echo $rootdir
echo -n "Building RSS"
echo "Building RSS"
./mkrss.sh
echo " [done]"
echo "RSS Built"
echo -n "Publishing"
rsync --progress --partial -avHe ssh $rootdir/_site/ root@shoggoth1:/var/www/her.esy.fun/ --delete
echo " [done]"

View File

@ -5,21 +5,26 @@ rsstpl="rss.tpl"
webdir="_site"
rssfile="$webdir/rss.xml"
xmlize() {
local fic="$1";
hxclean $fic
}
formatdate() {
local d=$1
LC_TIME=en_US date --date $d +'%a, %d %b %Y %H:%M:%S %z'
}
finddate(){
local fic="$1"
grep 'article-date' < $fic | perl -pe 's#.*<span class="article-date">([^<]*)</span>.*#$1#'|egrep '[0-9]+-[0-9]+-[0-9]+'
cat $fic | hxselect -c '.article-date'
}
findtitle(){
local fic="$1"
grep '<h1>' < $fic | perl -pe 's#.*<h1>([^<]*)</h1>.*#$1#'
cat $fic | hxselect -c 'h1'
}
getcontent(){
local fic="$1"
cat $fic | perl -pe 's#.*<(link|meta).*$##;s#<(img|input) ([^>]*[^/])>#<img $1/>#g' | hxselect '#content'
cat $fic | hxselect '#content'
}
realname="Yann Esposito"
@ -30,13 +35,16 @@ autoload -U colors && colors
tmpdir=$(mktemp -d)
for fic in $webdir/posts/**/*.html; do
printf "%-40s" "$fic"
d=$(finddate $fic)
xfic="$tmpdir/$fic.xml"
mkdir -p $(dirname $xfic)
xmlize $fic > $xfic
d=$(finddate $xfic)
echo -n " [$d]"
rssdate=$(formatdate $d)
title=$(findtitle $fic)
title=$(findtitle $xfic)
printf ": %-30s" "$title"
blogfile="$(echo $fic | perl -pe 's#.*?/posts/#/posts/#')"
printf "\\n<item>\\n<title>%s</title>\\n<guid>%s%s</guid>\\n<pubDate>%s</pubDate>\\n<description><![CDATA[\\n%s\\n]]></description>\\n</item>\\n\\n" "$title" "$website" "$blogfile" "$rssdate" "$(getcontent "$fic")" >> "$tmpdir/${d}-$(basename $fic).rss"
printf "\\n<item>\\n<title>%s</title>\\n<guid>%s%s</guid>\\n<pubDate>%s</pubDate>\\n<description><![CDATA[\\n%s\\n]]></description>\\n</item>\\n\\n" "$title" "$website" "$blogfile" "$rssdate" "$(getcontent "$xfic")" >> "$tmpdir/${d}-$(basename $fic).rss"
echo " [${fg[green]}OK${reset_color}]"
done
for fic in $(ls $tmpdir/*.rss | sort -r); do

View File

@ -106,6 +106,17 @@ td, th {
border-right: solid 1px;
border-left: solid 1px;
}
sup {
vertical-align: top;
position: relative;
top: -.25em;
}
sup > a {
text-decoration: none;
padding: 1px 2px;
font-weight: bold;
background: var(--reveal-background);
}
/* Markdown tricks */
h1 {
@ -369,7 +380,7 @@ input#simple:target ~ .main {
--color-h6: #333;
--color-link: var(--magenta);
font-family: "Helvetica Neue";
font-size: 16px;
font-size: 14px;
line-height: 1.5em;
}
input#simple:checked ~ .main .content,
@ -383,7 +394,7 @@ input#simple:target ~ #labels {
background: #fff;
color: #333;
font-family: "Helvetica Neue";
font-size: 16px;
font-size: 14px;
line-height: 1.5em;
}
input#simple:checked ~ .main code,
@ -554,7 +565,7 @@ input#darksimple:target ~ .main {
--color-link: var(--yellow);
font-family: "Helvetica Neue", sans-serif;
font-weight: 300;
font-size: 16px;
font-size: 14px;
line-height: 1.5em;
}
input#darksimple:checked ~ #labels ,
@ -563,7 +574,7 @@ input#darksimple:target ~ #labels {
color: #ccc;
font-family: "Helvetica Neue", sans-serif;
font-weight: 300;
font-size: 16px;
font-size: 14px;
line-height: 1.5em;
}
input#darksimple:checked ~ .main code,

View File

@ -1,5 +1,5 @@
#+TITLE: How I Internet
#+SUBTITLE: Self hosting other advantages
#+SUBTITLE: Some unexpected consequences of self hosting
#+AUTHOR: Yann Esposito
#+EMAIL: yann@esposito.host
#+DATE: [2019-09-23 Mon]
@ -23,29 +23,34 @@ how you consume Internet for the best.
#+end_notes
The way we use Internet as changed drastically in a few years.
It started with social networks and smartphones.
More recently, applications started to introduce "features" targeting our
"lower brain" or "social brain".
It is not unusual to stay a lot longer on our smartphone than what we
expected.
Those changes start to influence our life balance.
A popular meme about it states:
Focus on long time on some subject, and even might feel a lot more social
anxieties.
#+begin_quote
- toilet ⇒ 5min
- toilet + smarphone ⇒ 55min
#+end_quote
One solution is of course to totally get rid of those platforms.
But it would mean throw away all the benefit they provide.
The book Digital Minimalism[fn:dm] provide a lot of great information on
the subject.
In particular the apparition of grabbing features that target our "social
brain".
So my personal solution is to still keep the best of those platform while
minimizing my exposure to most /anti-features/.
All start by how I produce content.
And it naturally affect also how I consume information on Internet.
One solution to protect ourselve from the problem generated by those
plateform would be to get rid of those them.
But those platform are useful.
My current[fn:1] personal solution is to still keep the useful feature of those platform while
minimizing my exposition to most /anti-features/.
Everything start by how I produce content.
It then affect how I consume Internet.
[fn:posse] https://indieweb.org/POSSE
[fn:dm] http://www.calnewport.com/books/digital-minimalism/
[fn:espial] https://github.com/jonschoning/espial
[fn:node-red] https://nodered.org
[fn:pinboard] https://pinboard.in
[fn:1] While I wrote this article I already improved a lot my workflow, but
it plan to continue to make my Internet usage evolve for a long time.
* Producing
:PROPERTIES:
@ -54,42 +59,42 @@ And it naturally affect also how I consume information on Internet.
I self host many services.
I control my data, and then I broadcast those info to different platforms.
This is called POSSE[fn:posse].
** Articles: Self hosted blog
:PROPERTIES:
:CUSTOM_ID: self-hosting
:END:
First thing, is I /blog/.
Writing a blog article is an intermediate format.
A lot simpler than a real article for some journal, but also should contain
more details than just a "micro-blog status" where you can mostly express
an impression, a photo, an opinion...
First thing the classical /blog/.
It is more and more common now, to simply use micro-blogging, or commenting.
I think blog article format is important.
It is a longer form than a comment or a tweet.
But in the same time, it is not necessary to work on it as hard as for a
journal article.
I wrote an [[file:new-blog.org][article]] that explain the technical details behind my blog.
It also describes how I try to make it a /respectful/ blog.
It also describes how I try to make it /respectful/.
The harder part if you want to do it yourself will be about self-hosting it.
You need to buy a domain name, and configure you DNS correctly.
This is not something tremendously hard, but don't expect to do that as
easily as registering to a private service.
But hey, I really believe this is worth the price.
To self host anything, you should buy a domain name, and configure you DNS
correctly.
That is certainly the biggest blocker for non technical people.
** Code: Git Broadcast
:PROPERTIES:
:CUSTOM_ID: git-broadcast
:END:
I also self-host the code for my open-source projects.
But, Github is the developer social network.
It is easier to find contributor on Github than on your self-hosted repository.
I self-host the code of my open-source projects.
As Github is the de-facto developer social network, it is easier to find
contributor on Github than on your self-hosted repository.
So, I sync my code between my self-hosted instance and GitHub.
So if tomorrow something is wrong with Github, I could easily switch to my
self hosted repositories only.
Thus I sync my repositories between my self-hosted instance and GitHub.
If something goes wrong with Github, I could easily switch to my self
hosted repositories only.
Here is how you can configure your git repositories to push to multiple
URLs:
This is how I configured my git repos to push to multiple URLs:
#+begin_src
git remote set-url origin --push --add <remote-url>
@ -100,21 +105,24 @@ git remote set-url origin --push --add <another-remote-url>
:PROPERTIES:
:CUSTOM_ID: espial
:END:
I also like a tool to synchronize articles on the Internet I like and
appreciate.
For that, I use [[https://github.com/jonschoning/espial][espial]] which is an open-source, web-based bookmarking server.
I also wanted a tool to keep track of web pages I like and might want to
keep track of.
For that, I self host [[https://espial.esy.fun/u:yogsototh][espial]][fn:espial]; an open-source, web-based
bookmarking server.
It is a very easy to install, this is a single binary.
Your bookmark are kept in a single sqlite file.
This is perfect if you want to keep a lot of bookmarks some private some
public.
But as well as I use espial I plan (I haven't done it yet) to synchronize
my bookmark from espial[fn:espial] to pinboard[fn:pinboard].
** Notes: Espial
:PROPERTIES:
:CUSTOM_ID: notes--espial
:END:
Another feature provided by [[https://github.com/jonschoning/espial][espial]] is the ability to save notes.
Another feature provided by espial[fn:espial] is the ability to save [[https://espial.esy.fun/u:yogsototh/notes][notes]].
You can generate public or private notes.
I intend to use those notes for my "micro-blogging" needs.
@ -139,36 +147,29 @@ feeds of my public bookmarks as well as an RSS feed for my public notes.
:END:
With those RSS, it is then quite natural to syndicate elsewhere.
For that I use [[https://nodered.org][node-red]].
For that I use node-red[fn:node-red].
This is a web-based tool that make it easy to write /flows/.
Think about it like a super IFTTT.
To give you an example, each time I save a new public bookmark, a new blog
post, a new note, I tweet it.
* Consuming
:PROPERTIES:
:CUSTOM_ID: consuming
:END:
As I said, now that I can generate my content using my own, self-made
environment, it also influenced a lot the way I consume and interact with
other people on the Internet.
Since I generate my content using my own, self-made environment, it also
influenced a for the best the way I consume and interact on Internet.
I consumed a lot of /news/ directly from my smartphone.
Most of the time using an app dedicated to some social network.
Before I read a lot of /news/ directly from my smartphone.
Most of the time using many apps dedicated to some social networks.
The natural presentation is an infinite scroll of content, with buttons to
engage in the social network with likes/upvotes/comments etc...
Most of the time, with enabled notifications to answer ASAP to anyone that
might [[https://www.xkcd.com/386/]["be wrong on the Internet"]].
Here is how I consume Internet content now.
** News
:PROPERTIES:
:CUSTOM_ID: news
:END:
Most of the time, notifications where enabled by fear of missing a comment
or any kind of interaction.
Before explaining how I consume Internet news, I like to make a short
digression:
@ -179,14 +180,22 @@ via *news*.
More than that, that now, Internet is almost synonymous to news on the web.
Which is only a very small part of the Internet.
Consuming news via a social network platform makes you a lot more passive.
I can remember being a lot more active to consume the Internet content
years ago.
Consuming news via a social networks makes you a lot more passive.
I can remember being a lot more active on the Internet just a few years
ago.
This is something to keep in mind I think.
I'll certainly write an article about that in the future.
#+end_quote
So my entry point to news consumption are:
Here is how I consume Internet content now.
** News
:PROPERTIES:
:CUSTOM_ID: news
:END:
My entry point to news consumption are:
- highly selected RSS sources (for example HN posts with > 500 upvotes)
- [[https://lobste.rs][lobste.rs]]
@ -199,20 +208,24 @@ I plan on generating RSS from those different sources with "smart filters".
Typically number of upvote filters for lobste.rs, laarc.io, sub-reddits,
but also number of bookmarks in popular pinboard, etc...
I use [[https://github.com/skeeto/elfeed][elfeed]] inside Spacemacs.
My preferred /Internet consumption environment/ is elfeed[fn:elfeed] inside Spacemacs.
I really enjoy staying inside emacs as much as I can.
This is a clean, dense, text-oriented environment.
I also use [[https://github.com/remyhonig/elfeed-org][elfeed-org]] to organize my feeds and I also take care to remove
I also use elfeed-org[fn:elfeed-org] to organize my feeds and I also take care to remove
feeds with too much volume.
Generally we shouldn't read more than a few articles a day.
[fn:elfeed] https://github.com/skeeto/elfeed
[fn:spacemacs] http://spacemacs.org
[fn:elfeed-org] https://github.com/remyhonig/elfeed-org
** Mail
:PROPERTIES:
:CUSTOM_ID: mail
:END:
Most of my notifications go through my email.
Social network notifications are moved inside folder and are not directly
present in my inbox.
Social network notifications are moved inside a dedicated folder and are
not directly present in my inbox.
I check my social notifications once in a while.
So if you are waiting for an answer, sorry for the late reply, it might
take a while.
@ -229,21 +242,21 @@ So even for Github, I can take a few days to react.
:PROPERTIES:
:CUSTOM_ID: conclusion
:END:
So I described how while still using centralized social media platform, I
still own my data, I protect myself from new attention grabbing features
and design / UX pattern changes in those platforms.
I described how I control my usage of social networks.
I own my data.
I am a lot less exposed to attention grabbing techniques.
Mostly, I take the positive aspect of those platform while not paying most
of the negative price.
For now I'm quite happy with the system I made, and I'll certainly improve
it in the future by synchronizing more and more services between a
self-hosted one and a social-network one.
For now my system is quite tailored made, and adapted to me.
I think we could imagine that we could offer that to more people by having
a single, easy to create platform.
I really advice anyone with sufficient tehcnical skills to do the same.
This is really worth your time.
The bit sad state, is that I know there are a few system that try to make
it easy for more people to self-host, or provide self-hosting for a small
community or family.
But this is still reserved to technical people in my opinion.
For other people, I know some platform intented to be self-hosted and here
to provide a bunch of services for you.
But having a self made environment also enhance greatly the experience.
And really, self-hosting is still reserved to few people.
I think we could be inspired by espial[fn:espial] to create a simple small platform to
provide those feature to most people.
@ -252,28 +265,42 @@ provide those feature to most people.
- ability to publish securely private info to a small group of friends and family
- generate RSS for different group of peoples
I would personally prefer that to a Federation platform (like Mastodon).
Unfortunately the federated network mostly replicate the anti-features of twitter, Facebook,
and other social media platforms. While I believe we should change our
consumption habit.
** Federation
:PROPERTIES:
:CUSTOM_ID: federation
:END:
RSS is already a great tool for that.
I think I can say a few word about federated networks like Mastodon, but
somehow, mastodon replicate the anti-features promoted by twitter or
Facebook.
Also there are some details I don't really like about the federation
foundations (ActivityPub).
Also, for example, I wrote a commenting system that I could easily
self-host.
I intended to use it for my blog.
But after a second though, I'm not sure comments are that positive.
I prefer to edit my article with comment people send me via other
communication channel, typically, my mail.
** Anti-features
:PROPERTIES:
:CUSTOM_ID: anti-features
:END:
A last note about anti-features used by social media platforms.
Those are anti-features, as they provide almost no benefit for the user.
All those anti-feature share the same pattern.
They use /spaced random reward/:
A last note about anti-features.
I call /anti-feature/ a feature that provide very few or no benefit for the
user but provide a lot more benefits to the platform.
Generally it is a feature just here to make you stay on the platform and
many quite talented specialist work on optimizing those.
Most anti-features share the same pattern; they use /spaced random reward/:
#+begin_notes
*Spaced Random Reward*
Typically the few first random gifts in a new
downloaded game.
Typically the few first random gifts in a new downloaded game.
The main way used to /hack/ your brain, is by giving it something he likes
at a random time.
Then you start to give reward with lower and lower probability.