commit bf628a94429712583ee42750e5d4f06d8851c1ff
parent 7db168f443b3420e04d26773f8ef48d111a0ca0e
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date: Sat, 20 Feb 2021 17:43:20 -0800
About and amazon link change
Diffstat:
A | about.org | | | 42 | ++++++++++++++++++++++++++++++++++++++++++ |
M | index.org | | | 3 | ++- |
M | publish.el | | | 75 | +++++++++++++++++++++++++++++++++++++++++++++------------------------------ |
3 files changed, 89 insertions(+), 31 deletions(-)
diff --git a/about.org b/about.org
@@ -0,0 +1,42 @@
+#+options: ':nil *:t -:t ::t <:t H:3 \n:nil ^:{} arch:headline
+#+options: author:t broken-links:nil c:nil creator:nil
+#+options: d:(not "LOGBOOK") date:t e:t email:nil f:t inline:t num:t
+#+options: p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t
+#+options: timestamp:t title:nil toc:t todo:t |:t
+#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="css/terminal.css" />
+#+HTML_HEAD: <script src="scripts/main.js"></script>
+#+language: en
+#+select_tags: export
+#+exclude_tags: noexport
+#+creator: Emacs 27.1 (Org mode 9.3)
+#+options: html-link-use-abs-url:nil
+#+options: html-scripts:nil html-style:nil
+#+options: html5-fancy:nil tex:t
+#+html_doctype: xhtml-strict
+#+html_container: div
+#+description:
+#+keywords:
+#+html_link_home:
+#+html_link_up:
+#+html_mathjax:
+#+html_head:
+#+html_head_extra:
+#+subtitle:
+#+infojs_opt:
+#+creator: <a href="https://www.gnu.org/software/emacs/">Emacs</a> 27.1 (<a href="https://orgmode.org">Org</a> mode 9.3)
+#+latex_header:
+
+#+title: about
+#+date: <2021-02-10 Wed>
+#+author: Ryan Jeffrey
+#+email: ryan@ryanmj.xyz
+
+
+__PROMPT__ whoami
+
+My name is Ryan Jeffrey, I also go by the alias Mallock sometimes. I was born in August 1998 in Austin, Texas.
+
+Though I am a Linux user I am pessimistic about the future of Linux and am disappointed that there are basically no free software OS alternatives. For many Linux /is/ free software; it feels as tough projects like the BSDs have been erased from history. It's always been a fantasy of mine to make an alternative OS myself, which I might do one day!
+
+This blog is a free software echo chamber, you will not see any positive mentions of pr*prietary software on this site!
+
diff --git a/index.org b/index.org
@@ -56,6 +56,7 @@ __PROMPT__ cat ~/intro.txt
__PROMPT__ ls -lh
<!--LS HERE-->
+#+INCLUDE: "sitemap.org" :lines "3-"
__PROMPT__ cat reason.txt
@@ -106,4 +107,4 @@ In current year it's impossible to feel anything but disgust and disappointment
But this site at www.ryanmj.xyz _is not_ about that. Instead, this is a place to LARP and pretend it's still 2008. It is a place where we can live in a world before Jack Dorsey literally ruined everything.
-[[https://www.amazon.com/Atomised-Michel-Houellebecq/dp/0099283360][This website is dedicated to mankind.]]
+[[https://openlibrary.org/works/OL2286765W/Atomised?edition=atomised00houe][This website is dedicated to mankind.]]
diff --git a/publish.el b/publish.el
@@ -68,30 +68,37 @@
(insert "@@html:<span class=\"prompt1\">ryan</span><span class=\"prompt2\">@</span><span class=\"prompt3\">themainframe</span><span class=\"prompt4\"></span>@@"))))
-(defun do-ls-on-list (files)
- "Create ls-like output on a list FILES (string paths).
-Assumes that all files in FILES exist."
- (when (bound-and-true-p files)
- (insert
- (concat
- "@@html:<p>"
- (cond ; Get the prefix if the ls -l output.
- ((file-symlink-p (car files)) "lrwxrwxrwx 1")
- ((file-directory-p (car files)) "drwxr-xr-x 2")
- (t "-rw-r--r-- 1"))
- " ryan ryan "
- (format "%4s "
- (shell-command-to-string
- (concat "find " (car files) " -name '*.org' -exec cat {} + | wc -c | numfmt --to=si | tr -d '\n'")))
- (shell-command-to-string (concat "ls -dl '--time-style=+%b %m %Y' "
- (car files)
- " | awk '{printf \"%s %2d %s \", $6, $7, $8} '" ))
- "@@"
- (format "[[file:%s]]" (car files))
- "@@html:</p>@@\n"))
- (do-ls-on-list (cdr files))))
-
-
+(defun index-sitemap-entry (entry _style project)
+ "Create ls-like output on file ENTRY with style _STYLE and from project PROJECT."
+ (if (string= entry "index.org")
+ ""
+ (concat
+ "@@html:<p>"
+ (cond ; Get the prefix if the ls -l output.
+ ((file-symlink-p entry) "lrwxrwxrwx 1")
+ ((file-directory-p entry) "drwxr-xr-x 2")
+ (t "-rw-r--r-- 1"))
+ " ryan ryan "
+ (format "%4s "
+ (shell-command-to-string
+ (concat "find " entry " -name '*.org' -exec cat {} + | wc -c | numfmt --to=si | tr -d '\n'")))
+ (shell-command-to-string (concat "ls -dl '--time-style=+%b %m %Y' "
+ entry
+ " | awk '{printf \"%s %2d %s \", $6, $7, $8} '" ))
+ "@@"
+ (format "[[file:%s]]" entry)
+ "@@html:</p>@@")))
+
+
+
+(defun create-index-blogmap (title list)
+ "Create the sitemap for the posts/ directory.
+Return sitemap using TITLE and LIST returned by `create-blogmap-entry'."
+ (concat "#+TITLE: " title "\n\n"
+ (mapconcat (lambda (li)
+ (format "%s" (car li)))
+ (seq-filter #'car (cdr list))
+ "\n")))
;; Replace <!--LS HERE--> with ls output.
(add-hook 'org-export-before-parsing-hook #'(lambda (backend)
@@ -103,8 +110,7 @@ Assumes that all files in FILES exist."
"@@html:<p>total "
(shell-command-to-string
"find . -name '*.org' -exec cat {} + | wc -c | numfmt --to=si | tr -d '\n'")
- " Words</p>@@\n"))
- (do-ls-on-list (list "files" "posts" "software.org")))))
+ " Words</p>@@\n")))))
(defun create-blogmap-entry (entry _style project)
"Create an entry for the blogmap.
@@ -126,7 +132,7 @@ Return sitemap using TITLE and LIST returned by `create-blogmap-entry'."
(mapconcat (lambda (li)
(format "%s" (car li)))
(seq-filter #'car (cdr list))
- "\n")
+ "")
"\n#+end_archive\n"))
(defun force-main-publish ()
@@ -143,11 +149,20 @@ Return sitemap using TITLE and LIST returned by `create-blogmap-entry'."
:base-directory ""
:base-extension "org"
:publishing-directory "public"
- :recursive nil
:publishing-function org-html-publish-to-html
:html-preamble create-preamble
:html-postamble create-postamble
- :auto-sitemap nil)
+ :auto-sitemap t
+ :sitemap-filename "sitemap.org"
+ :sitemap-title nil
+ :sitemap-style list
+ :sitemap-sort-files anti-chronologically
+ :sitemap-format-entry index-sitemap-entry
+ :sitemap-function create-index-blogmap
+ :sitemap-sort-folders first
+ ;;:html-link-up "/"
+ ;;:html-link-home "/"
+ :recursive nil)
("posts"
:base-directory "posts"
:base-extension "org"
@@ -204,7 +219,7 @@ Return sitemap using TITLE and LIST returned by `create-blogmap-entry'."
:base-extension "js"
:recursive t
:publishing-function org-publish-attachment)
- ("all" :components ("posts" "css" "main" "res" "files" "scripts"))))
+ ("all" :components ("posts" "css" "main" "res" "files" "scripts"))))
(provide 'publish)
;;; publish.el ends here