yt-project / blog

This is the repository that the yt Project's blog is held in.
https://yt-project.github.io/blog/
1 stars 5 forks source link

Port old blog posts #9

Closed matthewturk closed 3 years ago

matthewturk commented 3 years ago

Here is a listing of all the files in the old blog. We can check these off as they go:

munkm commented 3 years ago

Awesome!!! Thanks for making this so we can track our progress!!!

matthewturk commented 3 years ago

I think the hardest ones to convert will be the non-post_ ones, since the post ones all have the metadata in them for time/author/etc. The newer ones there aren't that many of.

One thing I'm annoyed by is that default pandoc doesn't convert images the way I want it to -- it uses some other method of inlining them.

matthewturk commented 3 years ago

awk '{ sub(/[0-9]{10}/, strftime("%Y-%m-%dT%H:%M:%S-00:00", substr($0,10,10))) }1' file

this will convert the dates, which I'm now doing ...

sed -i 's/.. author: \(.*\) <.*$/author: \1/' *.conv.rst
sed -i 's/.. date: /date: /' *.conv.rst
matthewturk commented 3 years ago

Applying this to the pre-processed old posts:

perl -0777p -e 's/^# (.*)\n\n^author: (.*)\n\n^date: (.*)\n/---\ntitle: \1\nauthor: \2\ndate: \3\nlastmod: \3\ncover: \/img\/random\/shoes.jpeg\ncategories:\n  - archive\ntags:\n  - archive\n---/mg'
matthewturk commented 3 years ago

So I've gotten the markdown converted for all of these, but I'm leaving them unchecked because we need to tag them and categorize them, and also probably come up with cover images.

munkm commented 3 years ago

resolved via munkm/yt-blog#11 -- I pushed a commit that updated the tags, author links, categories, and broken video URLs. We can go back and add short summaries later if we feel like it. We can also choose to remove either the archive category or tag, since one is redundant.