site

Website's source files.
Log | Files | Refs | LICENSE

commit 7db168f443b3420e04d26773f8ef48d111a0ca0e
parent 38469a06aa9038ce76bc3ca5138272685bf90713
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date:   Sat, 20 Feb 2021 01:19:04 -0800

New sitemap function, no index.org in blog sitemap, programs file

Diffstat:
Mindex.org | 3---
Mpublish.el | 48++++++++++++++++++++++++------------------------
Asoftware.org | 48++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 72 insertions(+), 27 deletions(-)

diff --git a/index.org b/index.org @@ -51,14 +51,11 @@ __PROMPT__ cat ~/intro.txt |_| |___/ </pre> - #+END_EXPORT __PROMPT__ ls -lh -#+BEGIN_EXPORT html <!--LS HERE--> -#+END_EXPORT __PROMPT__ cat reason.txt diff --git a/publish.el b/publish.el @@ -44,19 +44,21 @@ "Insert preamble, PLIST is list of options." (let* ((file-name (file-name-nondirectory (plist-get plist :output-file)))) (cond - ((string= file-name "index.html") + ;;((string= file-name "index.html") + (t (with-temp-buffer - (insert-file-contents "views/preamble-i.html") (buffer-string))) - (t (insert-file-contents "views/preamble-e.html"))))) + (insert-file-contents "views/preamble-i.html") (buffer-string)))))) + ;;(t (insert-file-contents "views/preamble-e.html"))))) (defun create-postamble (plist) "Insert postamble, PLIST is list of options." (let* ((file-name (file-name-nondirectory (plist-get plist :output-file)))) (cond - ((string= file-name "index.html") + ;;((string= file-name "index.html") + (t (with-temp-buffer - (insert-file-contents "views/postamble-i.html") (buffer-string))) - (t (insert-file-contents "views/postamble-e.html"))))) + (insert-file-contents "views/postamble-i.html") (buffer-string)))))) + ;;(t (insert-file-contents "views/postamble-e.html"))))) ;; Replace __PROMPT__ with the actual prompt (add-hook 'org-export-before-parsing-hook #'(lambda (backend) @@ -72,7 +74,7 @@ Assumes that all files in FILES exist." (when (bound-and-true-p files) (insert (concat - "<p>" + "@@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") @@ -84,11 +86,9 @@ Assumes that all files in FILES exist." (shell-command-to-string (concat "ls -dl '--time-style=+%b %m %Y' " (car files) " | awk '{printf \"%s %2d %s \", $6, $7, $8} '" )) - "<a href=\"" - (car files) - "\">" - (car files) - "</a></p>\n")) + "@@" + (format "[[file:%s]]" (car files)) + "@@html:</p>@@\n")) (do-ls-on-list (cdr files)))) @@ -98,24 +98,25 @@ Assumes that all files in FILES exist." "Create fake ls listing." (goto-char (point-min)) (while (search-forward "<!--LS HERE-->" (point-max) t) - (kill-line) + (kill-whole-line) (insert (concat - "<p>total " + "@@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"))))) + " Words</p>@@\n")) + (do-ls-on-list (list "files" "posts" "software.org"))))) (defun create-blogmap-entry (entry _style project) "Create an entry for the blogmap. One string for each ENTRY in PROJECT." - (format "@@html:<p>-rw-r--r-- 1 ryan ryan @@ %4s [[file:%s][%s]] @@html:</p>@@" - (shell-command-to-string (format "wc -c < %s | numfmt --to=si | tr -d '\n'" (org-publish--expand-file-name entry project))) - ;(format-time-string "%h %d, %Y" - ; (org-publish-find-date entry project)) - entry - (org-publish-find-title entry project) - )) + (if (string= entry "index.org") + "" + (format "@@html:<p>-rw-r--r-- 1 ryan ryan @@ %4s [[file:%s][%s]] @@html:</p>@@" + (shell-command-to-string (format "wc -c < %s | numfmt --to=si | tr -d '\n'" (org-publish--expand-file-name entry project))) + ;(format-time-string "%h %d, %Y" + ; (org-publish-find-date entry project)) + entry + (org-publish-find-title entry project)))) (defun create-blogmap (title list) "Create the sitemap for the posts/ directory. @@ -166,7 +167,6 @@ Return sitemap using TITLE and LIST returned by `create-blogmap-entry'." :sitemap-sort-files anti-chronologically :sitemap-format-entry create-blogmap-entry :sitemap-function create-blogmap - ) ("misc" :base-directory "misc" diff --git a/software.org b/software.org @@ -0,0 +1,48 @@ +#+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: Software I use +#+date: <2021-02-10 Wed> +#+author: Ryan Jeffrey +#+email: ryan@ryanmj.xyz + + +__PROMPT__ cat ~/config.html + +My machines all run a variant of Arch Linux (either Arch itself, or Parabola, etc.). My configuration is based around Emacs which I use as a Unix Userland replacement where I can. + +When I began learning how to use a computer I used the ~joe~ text editor. It's an excellent terminal-based editor with Wordstar keybindings. However it isn't extensible (it has no 'joescript', nothing like vimscript or elsip), this makes pretty unusable for things like HTML editing where extensibility goes a long way in terms of QoL. In late 2018 I used VIM and hated it. In May 2019 I switched to Emacs. + +The more I used Emacs the more I began to believe in its mission. The whole idea behind Emacs is that it's a Unix Userland replacement based on LISP. It ultimately fails at this because of how slow, legacy, and occasionally inflexible it is. That being said, it's an interesting idea and I'd like to see a more modern attempt at that concept some day. + +For email is ~mu4e~ and for my RSS feed I use ~elfeed~. Lately, I've been trying to ween myself off of file managers by replacing ~nemo~ with ~dired~. + +My web browser is the ~red cat shill browser~. + +My window manager is ~bspwm~ (this is the most likely thing to change), I switch window managers every six months because I'm never satisfied with them. Each window manager or desktop environment I try has its own issues with ~bspwm~ being a bit buggy and not always cooperating with other programs (especially polybar). +