summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/more/bookmarks.yml43
-rw-r--r--assets/more/links.yml6
-rw-r--r--assets/webbuttons_31/atapi.gifbin0 -> 1936 bytes
-rwxr-xr-xbin/bookmark50
-rw-r--r--config/_default/menus.en.toml4
-rw-r--r--content-org/more.org22
-rw-r--r--content/more/bookmarks/_index.md19
-rw-r--r--layouts/shortcodes/bookmarks-all.html16
-rw-r--r--layouts/shortcodes/links.html2
9 files changed, 160 insertions, 2 deletions
diff --git a/assets/more/bookmarks.yml b/assets/more/bookmarks.yml
new file mode 100644
index 0000000..20f87a7
--- /dev/null
+++ b/assets/more/bookmarks.yml
@@ -0,0 +1,43 @@
+---
+bookmarks:
+- url: https://www.youtube.com/watch?v=XA2WjJbmmoM
+ title: How to Do 90% of What Plugins Do (With Just Vim)
+ date: '2024-11-24'
+ host: youtube.com
+- url: https://dustycloud.org/blog/how-decentralized-is-bluesky/
+ title: How decentralized is Bluesky really?
+ date: '2024-11-24'
+ host: dustycloud.org
+- url: https://dataswamp.org/~solene/2024-11-15-why-i-stopped-using-openbsd.html
+ title: Why I stopped using OpenBSD'
+ date: '2024-11-24'
+ host: dataswamp.org
+- url: https://www.youtube.com/watch?v=YCjNT9qGjh4
+ title: 'Half-Life 2: 20th Anniversary Documentary'
+ date: '2024-11-24'
+ host: youtube.com
+- url: https://vermaden.wordpress.com/2024/11/22/new-jless-freebsd-jails-list-manage-tool/
+ title: New jmore(8) FreeBSD Jails List/Manage Tool
+ date: '2024-11-24'
+ host: vermaden.wordpress.com
+- url: https://brainbaking.com/post/2024/11/when-texting-destroyed-social-investment/
+ title: When Texting Destroyed Social Investment
+ date: '2024-11-24'
+ host: brainbaking.com
+- url: https://blog.thechases.com/posts/planning-the-day-on-the-cli-with-tsort/
+ title: Planning the day on the CLI with tsort |
+ date: '2024-11-24'
+ host: blog.thechases.com
+- url: https://arstechnica.com/tech-policy/2024/11/welcome-to-googles-nightmare-us-reveals-plan-to-destroy-search-monopoly/
+ title: 'Welcome to Google’s nightmare: US reveals plan to destroy search monopoly'
+ date: '2024-11-24'
+ host: arstechnica.com
+- url: https://danluu.com/input-lag/
+ title: 'Computer latency: 1977-2017'
+ date: '2024-11-24'
+ host: danluu.com
+- url: https://datatracker.ietf.org/doc/html/rfc1288
+ title: "\n \n RFC 1288 - The Finger User Information Protocol\n
+ \ \n "
+ date: '2024-11-24'
+ host: datatracker.ietf.org
diff --git a/assets/more/links.yml b/assets/more/links.yml
index c57cc45..caf46c5 100644
--- a/assets/more/links.yml
+++ b/assets/more/links.yml
@@ -154,7 +154,6 @@ links:
Title: Dillo Project
Url: https://dillo.org/
Description: The Dillo browser project
- Button: vim.gif
-
Title: Ladydbird
Url: https://ladybird.org/
@@ -214,3 +213,8 @@ links:
Title: XTeddy
Url: https://xteddy.org
Description: Personal site
+ -
+ Title: Atapi's Own Little World
+ Url: https://sterophonick.github.io/
+ Description: Personal site of a computer engineering student
+ Button: atapi.gif
diff --git a/assets/webbuttons_31/atapi.gif b/assets/webbuttons_31/atapi.gif
new file mode 100644
index 0000000..4e6a263
--- /dev/null
+++ b/assets/webbuttons_31/atapi.gif
Binary files differ
diff --git a/bin/bookmark b/bin/bookmark
new file mode 100755
index 0000000..f6d389b
--- /dev/null
+++ b/bin/bookmark
@@ -0,0 +1,50 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+require 'optparse'
+require 'uri'
+require 'nokogiri'
+require 'open-uri'
+require 'openssl'
+require 'yaml'
+
+Bookmark = Struct.new(:url, :title, :date, :host)
+bookmark = Bookmark.new(date: Time.now.strftime('%Y-%m-%d'))
+OptionParser.new do |opts|
+ opts.banner = 'Usage: bookmark [options]'
+
+ opts.on('-uURL', '--url=URL', 'Url of the new bookmark') do |n|
+ bookmark[:url] = n
+ end
+end.parse!
+
+bookmark.host = URI.parse(bookmark[:url]).host.gsub(/^www\./, '')
+
+URI.parse(bookmark[:url]).open({ ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE }) do |page|
+ noko = Nokogiri::HTML(page)
+ title = noko.xpath('//title').first.content
+
+ # remove known page title craps
+ title = case bookmark.host
+ when 'brainbaking.com' then title.gsub(/\s\|\sBrain Baking$/, '')
+ when 'vermaden.wordpress.com' then title.gsub(/\s\|\sπšŸπšŽπš›πš–πšŠπšπšŽπš—$/, '')
+ when 'youtube.com' then title.gsub(/\s-|\sYouTube$/, '')
+ when 'blog.thechases.com' then title.gsub(/\s\|\sTim's blog$/, '')
+ when 'arstechnica.com' then title.gsub(/\s-\sArs Technica$/, '')
+ else title
+ end
+
+ bookmark.title = title
+end
+
+site_dir = File.expand_path('..', __dir__)
+data_path = "#{site_dir}/assets/more/bookmarks.yml"
+
+bookmarks = YAML.load_file(
+ data_path,
+ permitted_classes: [Date]
+)
+bookmarks['bookmarks'] << bookmark.to_h.transform_keys(&:to_s)
+File.open(data_path, 'w') do |f|
+ f.write bookmarks.to_yaml
+end
diff --git a/config/_default/menus.en.toml b/config/_default/menus.en.toml
index eaf2344..af4b561 100644
--- a/config/_default/menus.en.toml
+++ b/config/_default/menus.en.toml
@@ -217,6 +217,10 @@
name = "Links"
pageRef = "/more/Links"
+[[sections-extra]]
+ name = "Bookmarks"
+ pageRef = "/more/bookmarks"
+
# [[sections]]
# name = "Links"
# pageRef = "/index.xml"
diff --git a/content-org/more.org b/content-org/more.org
index 301d924..cd03ad8 100644
--- a/content-org/more.org
+++ b/content-org/more.org
@@ -24,6 +24,7 @@ CLOSED: [2023-11-20 Wed 20:40]
- [[/blog/contact/][Contact]] - How to contact me?
- [[/more/irc][IRC channel]] - This site has an IRC channel
- [[/more/links][Links]] - Links to other sites
+- [[/more/bookmarks][Bookmarks]] - Links to interesting resources
* About :@more:
@@ -340,3 +341,24 @@ noop
#+begin_links
noop
#+end_links
+
+
+* DONE Bookmarks :@more:
+CLOSED: [2024-11-21 Thu 23:41]
+:PROPERTIES:
+:EXPORT_HUGO_SECTION: more/bookmarks
+:EXPORT_FILE_NAME: _index
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :abstract Links to interesting resouces
+:EXPORT_HUGO_PAIRED_SHORTCODES: bookmarks-all
+:END:
+
+** Bookmarks
+
+---
+
+This is a list of interesting resources I stumbled upon when surfing the web.
+
+#+begin_bookmarks-all
+noop
+#+end_bookmarks-all
+
diff --git a/content/more/bookmarks/_index.md b/content/more/bookmarks/_index.md
new file mode 100644
index 0000000..acbc626
--- /dev/null
+++ b/content/more/bookmarks/_index.md
@@ -0,0 +1,19 @@
++++
+title = "Bookmarks"
+author = ["MichaΕ‚ Sapka"]
+date = 2024-11-21T23:41:00+01:00
+categories = ["more"]
+draft = false
+weight = 1008
+abstract = "Links to interesting resouces"
++++
+
+## Bookmarks {#bookmarks}
+
+---
+
+This is a list of interesting resources I stumbled upon when surfing the web.
+
+{{< bookmarks-all >}}
+noop
+{{< /bookmarks-all >}}
diff --git a/layouts/shortcodes/bookmarks-all.html b/layouts/shortcodes/bookmarks-all.html
new file mode 100644
index 0000000..92a2d55
--- /dev/null
+++ b/layouts/shortcodes/bookmarks-all.html
@@ -0,0 +1,16 @@
+{{- $caption := .Inner }}
+{{ $lastLetter := "Dupa" }}
+{{ with resources.Get "more/bookmarks.yml"}}
+{{ with . | transform.Unmarshal }}
+<ul>
+ {{ range (sort .bookmarks ".date" "desc") }}
+ <li>
+ {{ .date }}
+ -
+ <a href="{{ .url }}">{{ .title }}</a>
+ ({{ .host }})
+
+ {{ end }}
+</ul>
+{{ end }}
+{{ end }}
diff --git a/layouts/shortcodes/links.html b/layouts/shortcodes/links.html
index 4c87b41..2707af2 100644
--- a/layouts/shortcodes/links.html
+++ b/layouts/shortcodes/links.html
@@ -15,7 +15,7 @@
<tr>
<td colspan="2">
<hr>
- <h2>{{ $letter}}</h2>
+ <h4>{{ $letter}}</h4>
</td>
</tr>
{{ end }}