Compare commits
No commits in common. "a6e848bcf2523cc4fa319b31ec66e8f198382972" and "d4f8229b7faa5a3ef25e43794428ef82135b2224" have entirely different histories.
a6e848bcf2
...
d4f8229b7f
51 changed files with 273 additions and 236 deletions
134
config.org
134
config.org
|
@ -18,7 +18,7 @@
|
|||
(load-directory (concat (file-name-as-directory fileroot) "admin/emacs/custom/"))
|
||||
#+END_SRC
|
||||
|
||||
* Identity
|
||||
* =$whoami=, a big neckbeard, that’s who
|
||||
|
||||
Set name and location based on who I’m being right now.
|
||||
|
||||
|
@ -30,7 +30,16 @@ Set name and location based on who I’m being right now.
|
|||
(load-file (concat (file-name-as-directory fileroot) "admin/emacs/identity-home.el"))))
|
||||
#+END_SRC
|
||||
|
||||
* Suppress certain warnings
|
||||
* Sonic arts
|
||||
|
||||
Stop Emacs making sounds. I don’t think it ever made sounds before, but everyone is very insistent about the need to stop Emacs making sounds.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq ring-bell-function 'ignore)
|
||||
(setq visible-bell t)
|
||||
#+END_SRC
|
||||
|
||||
Also suppress certain warnings that would otherwise come up all the time and contribute very little to the experience.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq ad-redefinition-action 'accept)
|
||||
|
@ -48,7 +57,7 @@ I don’t want finding files to be case-sensitive, same as in =zsh=:
|
|||
(setq read-buffer-completion-ignore-case t)
|
||||
#+END_SRC
|
||||
|
||||
Remove certain graphical elements.
|
||||
Make the +window+ /frame/ look nice and clean. Scroll bars behave pointlessly on Windows anyway. Not hiding the menu bar because I’m not quite that leet yet. One day …
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq inhibit-startup-screen t)
|
||||
|
@ -67,7 +76,7 @@ Make everything just a little tiny bit transparent unless I’m using the boring
|
|||
(add-to-list 'default-frame-alist '(alpha . 95))))
|
||||
#+END_SRC
|
||||
|
||||
Stop creating all those =~= files everywhere. Put them somewhere I can ignore them.
|
||||
Stop creating all those =~= files everywhere. Put them somewhere that I can ignore them.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
|
||||
|
@ -120,7 +129,7 @@ And to narrow to them.
|
|||
(put 'narrow-to-region 'disabled nil)
|
||||
#+END_SRC
|
||||
|
||||
It’s +2022+ +2023+ unquestionably the python3 era.
|
||||
It’s +2022+ +2023+ nearly the second half of 2024.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq python-shell-interpreter "python3")
|
||||
|
@ -178,7 +187,7 @@ Android has enormous issues with keybindings, so requiring =yes-or-no-p= where p
|
|||
|
||||
* =use-package=
|
||||
|
||||
Set up package handling, including =use-package= in the standard way.
|
||||
Set up package handling, including =use-package=. Some of the =org= tools I use are from Non-GNU ELPA, I think. Most of this is the standard =use-package= setup stuff.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -218,6 +227,23 @@ I use BibLaTeX for better compatibility with accented characters and generally b
|
|||
(setq bibtex-dialect 'biblatex)))
|
||||
#+END_SRC
|
||||
|
||||
** =calibredb=
|
||||
|
||||
This may work only on Linux (it uses SQL???), but my ebooks are only on Linux so that’s ok.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (string-equal system-type "gnu/linux")
|
||||
(use-package calibredb
|
||||
:defer t
|
||||
:config
|
||||
(setq calibredb-root-dir "~/Documents/calibre/books")
|
||||
(setq calibredb-db-dir (expand-file-name "metadata.db" calibredb-root-dir))
|
||||
(setq calibredb-library-alist '(("~/Documents/calibre/books")
|
||||
("~/Documents/calibre/ficrecs")))
|
||||
(setq calibredb-sort-by 'author)
|
||||
(setq calibredb-order 'asc)))
|
||||
#+END_SRC
|
||||
|
||||
** =csv-mode=
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -233,7 +259,7 @@ I use BibLaTeX for better compatibility with accented characters and generally b
|
|||
|
||||
** =deft=
|
||||
|
||||
Lets me search my journal files when I’m not at work, and reading notes otherwise. Set regexp search by default.
|
||||
Let me search my journal files when I’m not at work, and reading notes otherwise. Set regexp search by default.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -266,7 +292,7 @@ Dims inactive buffers. Adjustments for =modus-themes= as suggested.
|
|||
|
||||
** =doom-modeline=
|
||||
|
||||
Much nicer-looking modeline.
|
||||
Much nicer-looking modeline, and still my favourite over newer, trendier options. Last time I tried installing this from MELPA it made Emacs crash; I don’t know if this is fixed yet.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -283,7 +309,7 @@ Much nicer-looking modeline.
|
|||
|
||||
** =git-gutter=
|
||||
|
||||
Shows =git diff= in the left margin if the file is being tracked by =git=.
|
||||
Shows, or at least purports to show, =git diff= in the left margin if the file is being tracked by =git=.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -349,7 +375,7 @@ Lists minor modes in a menu.
|
|||
|
||||
** =mu4e=
|
||||
|
||||
Does this work in emacs28???
|
||||
I really only use this for DW posts, but I’m constantly surprised by how well it works. This package is the reason I can’t upgrade to =emacs28=, because it doesn’t currently seem to work; also, it uses =cl=, which is deprecated, hence suppressing warnings about it above.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (string-equal system-type "gnu/linux")
|
||||
|
@ -393,7 +419,52 @@ Attempting to do TEI stuff at work but I can’t link directly to the =.rnc= fil
|
|||
(lambda () (local-set-key (kbd "<tab>") 'completion-at-point))))
|
||||
#+END_SRC
|
||||
|
||||
** =org=
|
||||
Show path of current element (from [[https://emacs.stackexchange.com/questions/28606/how-to-show-xpath-for-current-location-in-an-xml-hierarchy-in-the-modeline][here]]).
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
(defun nxml-where ()
|
||||
"Display the hierarchy of XML elements the point is on as a path."
|
||||
(interactive)
|
||||
(let ((path nil))
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(while (and (< (point-min) (point)) ;; Doesn't error if point is at beginning of buffer
|
||||
(condition-case nil
|
||||
(progn
|
||||
(nxml-backward-up-element) ; always returns nil
|
||||
t)
|
||||
(error nil)))
|
||||
(setq path (cons (xmltok-start-tag-local-name) path)))
|
||||
(if (called-interactively-p t)
|
||||
(message "/%s" (mapconcat 'identity path "/"))
|
||||
(format "/%s" (mapconcat 'identity path "/")))))))
|
||||
(defun xml-find-file-hook ()
|
||||
(when (derived-mode-p 'nxml-mode)
|
||||
(which-function-mode t)
|
||||
(setq which-func-mode t)
|
||||
(add-hook 'which-func-functions 'nxml-where t t)))
|
||||
(add-hook 'find-file-hook 'xml-find-file-hook t))
|
||||
#+END_SRC
|
||||
|
||||
** =nov=
|
||||
|
||||
For reading ebooks. Only on Linux because I (supposedly) use it with my calibre library.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (string-equal system-type "gnu/linux")
|
||||
(use-package nov
|
||||
:init
|
||||
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)))
|
||||
(defun my-nov-font-setup ()
|
||||
"Set the font for nov-mode"
|
||||
(face-remap-add-relative 'variable-pitch :family "Liberation Serif"
|
||||
:height 2.0))
|
||||
(add-hook 'nov-mode-hook 'my-nov-font-setup))
|
||||
#+END_SRC
|
||||
|
||||
** =org= my love
|
||||
|
||||
*** Initial settings
|
||||
|
||||
|
@ -453,7 +524,7 @@ Track when I complete todos.
|
|||
|
||||
*** Export settings
|
||||
|
||||
Allow setting certain headlines not to be exported.
|
||||
This can set certain headlines not to be exported. I haven’t used it yet but it sounds useful.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -486,7 +557,7 @@ Add a couple of classes for LaTeX export.
|
|||
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
|
||||
#+END_SRC
|
||||
|
||||
General export settings:
|
||||
Settings for export, mostly for DW post previews but also fic?? And work I guess, I do that sometimes.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq org-export-headline-levels 6)
|
||||
|
@ -532,37 +603,6 @@ Export non-breaking spaces properly; from, believe it or not, [[https://orgmode.
|
|||
'my-latex-filter-nobreaks))
|
||||
#+END_SRC
|
||||
|
||||
Export external links as ~target= “_blank”~, from [[https://emacs.stackexchange.com/a/48869][here]]:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun my-org-export-add-target-blank-to-http-links (text backend info)
|
||||
"Add target=\"_blank\" to external links."
|
||||
(when (and
|
||||
(org-export-derived-backend-p backend 'html)
|
||||
(string-match "href=\"http[^\"]+" text)
|
||||
(not (string-match "target=\"" text)))
|
||||
(string-match "<a " text)
|
||||
(replace-match "<a target=\"_blank\" " nil nil text)))
|
||||
|
||||
(add-to-list 'org-export-filter-link-functions
|
||||
'my-org-export-add-target-blank-to-http-links)
|
||||
#+END_SRC
|
||||
|
||||
Get rid of =file://= using the same method.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun my-org-export-correct-file-links (text backend info)
|
||||
"Remove generated file:// in relative links."
|
||||
(when (and
|
||||
(org-export-derived-backend-p backend 'html)
|
||||
(string-match "href=\"file[^\"]+" text))
|
||||
(string-match "file://" text)
|
||||
(replace-match "" nil nil text)))
|
||||
|
||||
(add-to-list 'org-export-filter-link-functions
|
||||
'my-org-export-correct-file-links)
|
||||
#+END_SRC
|
||||
|
||||
*** Packages
|
||||
|
||||
**** =org-agenda-property=
|
||||
|
@ -623,7 +663,7 @@ Use =org-modern=. [[https://github.com/minad/org-modern/issues/5#issuecomment-13
|
|||
|
||||
**** =org-noter=
|
||||
|
||||
Annotate PDFs (kind of) in org-mode.
|
||||
RIP =interleave=, but this does ok as a replacement.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -781,7 +821,7 @@ Gives me a dialog with recently opened files. Package management stuff has to be
|
|||
|
||||
** =tex=
|
||||
|
||||
Probably the default settings.
|
||||
As previously described, “the big boy”. I know little about most of these settings, but I think they’re the default ones.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -840,7 +880,7 @@ This is good for auto indentation, folding, killing elements, apparently XPath??
|
|||
|
||||
** =yasnippet=
|
||||
|
||||
Per-mode text expansion.
|
||||
Per-mode text expansion. What a lifechanger.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
|
|
@ -102,14 +102,14 @@
|
|||
(insert "* places\n** visited"))
|
||||
(insert "\n** visited"))))
|
||||
|
||||
(defun findweb ()
|
||||
"Find or create heading for website posts"
|
||||
(defun finddw ()
|
||||
"Find or create heading for DW posts"
|
||||
(filedate)
|
||||
(goto-char (point-min))
|
||||
(if (not (search-forward "* post" nil t))
|
||||
(if (not (search-forward "* dw" nil t))
|
||||
(progn
|
||||
(goto-char (point-max))
|
||||
(insert "* post"))))
|
||||
(insert "* dw"))))
|
||||
|
||||
(defun therating ()
|
||||
"Rate some media"
|
||||
|
@ -195,6 +195,10 @@
|
|||
(file+function "" findread)
|
||||
"* %^{Author} /%^{Title}/%(therating)%(theworkbook)"
|
||||
:jump-to-captured t)
|
||||
("d" "DW post" entry
|
||||
(file+function "" finddw)
|
||||
"* %^{Title}\n%?"
|
||||
:jump-to-captured t)
|
||||
("f" "Watched film" entry
|
||||
(file+function "" findwatched)
|
||||
"* %^{Title} (%^{Year})%(therating)"
|
||||
|
@ -223,10 +227,6 @@
|
|||
(file+function "" findreading)
|
||||
"* %^{Author} /%^{Title}/%(theworkbook)\n%(bookcalc)%?"
|
||||
:jump-to-captured t)
|
||||
("w" "Website post" entry
|
||||
(file+function "" findweb)
|
||||
"* %^{Title}\n%?"
|
||||
:jump-to-captured t)
|
||||
("1" "Completed game" entry
|
||||
(file+function "" findhundred)
|
||||
"* %^{Title} (%setconsole)"
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
(defun cardimgs (start end)
|
||||
"Insert HTML string for card images"
|
||||
(interactive "r")
|
||||
(setq original (buffer-substring (region-beginning) (region-end)))
|
||||
(delete-region start end)
|
||||
(setq imgs (replace-regexp-in-string ", " ".gif\"><img src=\"https://colors-tcg.eu/cards/" original))
|
||||
(insert (concat "<img src=\"https://colors-tcg.eu/cards/" imgs ".gif\">")))
|
145
custom/dwpost.el
Normal file
145
custom/dwpost.el
Normal file
|
@ -0,0 +1,145 @@
|
|||
;; variables live here
|
||||
|
||||
(setq dw-username "tobli")
|
||||
(setq dw-pin "0397")
|
||||
(setq dw-defaultlocation "🔺")
|
||||
(setq dw-tagslist "~/Documents/drive/admin/emacs/tags.txt")
|
||||
(setq dw-iconfile "~/Documents/drive/admin/emacs/iconchoose.el")
|
||||
(setq lastfm-login t) ;; boolean
|
||||
(setq log nil)
|
||||
(setq logfile "~/Documents/drive/org/calendar/habit.org")
|
||||
(setq lastfm-user "litrovers")
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun dwexport ()
|
||||
"Export HTML for DW posting"
|
||||
(let ((org-export-with-author 'nil)
|
||||
(org-export-with-creator 'nil)
|
||||
(org-export-with-date 'nil)
|
||||
(org-export-with-section-numbers 'nil)
|
||||
(org-export-time-stamp-file 'nil)
|
||||
(org-export-with-toc 'nil)
|
||||
(org-html-validation-link 'nil))
|
||||
(org-html-export-to-html))
|
||||
(setq oldname (concat (file-name-base) ".org"))
|
||||
(setq newname (concat (file-name-base) ".html"))
|
||||
(find-file-noselect newname)
|
||||
(with-current-buffer newname
|
||||
(goto-char (point-min))
|
||||
(setq delpoint-one (search-forward "<body>\n"))
|
||||
(delete-region (point-min) delpoint-one)
|
||||
(goto-char (point-max))
|
||||
(setq delpoint-two (search-backward "</body>"))
|
||||
(delete-region delpoint-two (point-max))
|
||||
(write-file newname)))
|
||||
|
||||
(defun dwdraft ()
|
||||
"Export HTML for DW posting and copy it to the clipboard"
|
||||
(interactive)
|
||||
(dwexport)
|
||||
(with-current-buffer newname
|
||||
(kill-ring-save (point-min) (point-max)))
|
||||
(kill-buffer newname)
|
||||
(with-current-buffer oldname
|
||||
(delete-file newname)))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwsecurity ()
|
||||
"Set security level for DW post"
|
||||
(setq security (completing-read "Security (public, access, private): " '("public" "access" "private")))
|
||||
(unless (equal security "")
|
||||
(insert (concat "post-security: " security "\n")))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwmood ()
|
||||
"Set mood for DW post"
|
||||
(setq mood (completing-read "Mood: " '("accomplished" "aggravated" "amused" "angry" "annoyed" "anxious" "apathetic" "artistic" "awake" "bitchy" "blah" "blank" "bored" "bouncy" "busy" "calm" "cheerful" "chipper" "cold" "complacent" "confused" "contemplative" "content" "cranky" "crappy" "crazy" "creative" "crushed" "curious" "cynical" "depressed" "determined" "devious" "dirty" "disappointed" "discontent" "distressed" "ditzy" "dorky" "drained" "drunk" "ecstatic" "embarrassed" "energetic" "enraged" "enthralled" "envious" "exanimate" "excited" "exhausted" "flirty" "frustrated" "full" "geeky" "giddy" "giggly" "gloomy" "good" "grateful" "groggy" "grumpy" "guilty" "happy" "high" "hopeful" "horny" "hot" "hungry" "hyper" "impressed" "indescribable" "indifferent" "infuriated" "intimidated" "irate" "irritated" "jealous" "jubilant" "lazy" "lethargic" "listless" "lonely" "loved" "melancholy" "mellow" "mischievous" "moody" "morose" "naughty" "nauseated" "nerdy" "nervous" "nostalgic" "numb" "okay" "optimistic" "peaceful" "pensive" "pessimistic" "pissed off" "pleased" "predatory" "productive" "quixotic" "recumbent" "refreshed" "rejected" "rejuvenated" "relaxed" "relieved" "restless" "rushed" "sad" "satisfied" "scared" "shocked" "sick" "silly" "sleepy" "sore" "stressed" "surprised" "sympathetic" "thankful" "thirsty" "thoughtful" "tired" "touched" "uncomfortable" "weird" "working" "worried")))
|
||||
(unless (equal mood "")
|
||||
(insert (concat "post-mood: " mood "\n")))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwmusic ()
|
||||
"Set current music for DW post"
|
||||
(setq music (lastfm-user-get-recent-tracks :user lastfm-user :from 1 :to 1))
|
||||
(setq music (replace-regexp-in-string (regexp-quote "\" \"") " – " (format "%S" music) nil 'literal))
|
||||
(sleep-for 1)
|
||||
(if (not music)
|
||||
(setq music "nil"))
|
||||
(if (equal music "nil")
|
||||
(sleep-for 0)
|
||||
(insert (concat "post-music: "
|
||||
(let* ((musicjunk
|
||||
(format "%S" music))
|
||||
(end (- (length musicjunk) 4)))
|
||||
(substring musicjunk 4 end))"\n")))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwicon (thefile)
|
||||
"Set icon for DW post"
|
||||
(setq icon "skip")
|
||||
(load-file dw-iconfile)
|
||||
(with-current-buffer thefile
|
||||
(iconchoose))
|
||||
(if (equal icon "skip")
|
||||
(sleep-for 0)
|
||||
(insert (concat "post-icon: "icon "\n")))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwtags ()
|
||||
"Set tags for DW post"
|
||||
(setq basetags (s-split "\n" (f-read dw-tagslist) t))
|
||||
(setq tagslist (completing-read-multiple "Tags: " basetags))
|
||||
(setq tags (s-join "," tagslist))
|
||||
(insert (concat "post-tags: org-export," tags "\n"))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwlocation ()
|
||||
"Set location for DW post"
|
||||
(setq location (read-string "Location: " dw-defaultlocation))
|
||||
(unless (equal location "")
|
||||
(insert (concat "post-location: " location "\n")))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwmusic-manual ()
|
||||
"Set current music for DW post if lastfm.el not set up"
|
||||
(setq music (read-string "Music: "))
|
||||
(unless (equal music "")
|
||||
(insert (concat "post-music: " music "\n")))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dw-posted ()
|
||||
"Log DW post"
|
||||
(find-file-noselect logfile)
|
||||
(with-current-buffer (file-name-nondirectory logfile)
|
||||
(goto-char (point-min))
|
||||
(re-search-forward "RECUR dw posts")
|
||||
(org-shiftright)
|
||||
(sleep-for 1)
|
||||
(save-buffer))))
|
||||
|
||||
(unless (string-equal system-type "android")
|
||||
(defun dwpost ()
|
||||
"Post to DW"
|
||||
(interactive)
|
||||
(setq psubject (read-string "Post title (REQUIRED): "))
|
||||
(dwexport)
|
||||
(compose-mail (concat dw-username "+" dw-pin "@post.dreamwidth.org") psubject)
|
||||
(with-current-buffer (concat "*unsent mail to " dw-username "*")
|
||||
(dwtags)
|
||||
(dwsecurity)
|
||||
(dwlocation)
|
||||
(dwicon newname)
|
||||
(cond
|
||||
(lastfm-login t (dwmusic))
|
||||
((dwmusic-manual)))
|
||||
(dwmood)
|
||||
(insert (concat "\n"))
|
||||
(insert-file-contents newname)
|
||||
(message-send-and-exit))
|
||||
(kill-buffer newname)
|
||||
(kill-buffer (concat "*sent mail to " dw-username "*"))
|
||||
(with-current-buffer oldname
|
||||
(delete-file newname))
|
||||
(cond
|
||||
(log t (dw-posted)))))
|
|
@ -2,14 +2,25 @@
|
|||
"Insert HTML link to a DW personal account"
|
||||
(interactive)
|
||||
(setq theuser (read-string "DW username: "))
|
||||
(setq userdisplay (subst-char-in-string ?- ?_ theuser))
|
||||
(setq userlink (subst-char-in-string ?_ ?- theuser))
|
||||
(insert (concat "<a href=\"https://" userlink ".dreamwidth.org/profile\">~</a><a href=\"https://" userlink ".dreamwidth.org\">" userdisplay "</a>")))
|
||||
(setq ao3 (y-or-n-p "For AO3?"))
|
||||
(if ao3
|
||||
(insert (concat "<a href=\"https://" theuser ".dreamwidth.org/profile\" rel=\"nofollow\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" width=\"17\" height=\"17\" /></a><b><a href=\"https://" theuser ".dreamwidth.org\" rel=\"nofollow\">" theuser "</a></b>"))
|
||||
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" theuser ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://" theuser ".dreamwidth.org/\"><b>" theuser "</b></a></span>"))))
|
||||
|
||||
(defun dwcomm ()
|
||||
"Insert HTML link to a DW community"
|
||||
(interactive)
|
||||
(setq theuser (read-string "DW comm name: "))
|
||||
(setq userdisplay (subst-char-in-string ?- ?_ theuser))
|
||||
(setq userlink (subst-char-in-string ?_ ?- theuser))
|
||||
(insert (concat "<a href=\"https://" userlink ".dreamwidth.org/profile\">/</a><a href=\"https://" userlink ".dreamwidth.org\">" userdisplay "</a>")))
|
||||
(setq ao3 (y-or-n-p "For AO3?"))
|
||||
(if ao3
|
||||
(insert (concat "<a href=\"https://" theuser ".dreamwidth.org/profile\" rel=\"nofollow\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" width=\"17\" height=\"17\" /></a><b><a href=\"https://" theuser ".dreamwidth.org\" rel=\"nofollow\">" theuser "</a></b>"))
|
||||
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" theuser ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" alt=\"[community profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://" theuser ".dreamwidth.org/\"><b>" theuser "</b></a></span>"))))
|
||||
|
||||
(defun ao3user ()
|
||||
"Insert HTML link to an AO3 user"
|
||||
(interactive)
|
||||
(setq theuser (read-string "AO3 username: "))
|
||||
(setq ao3 (y-or-n-p "For AO3?"))
|
||||
(if ao3
|
||||
(insert (concat "<a href=\"https://archiveofourown.org/users/" theuser "/profile\" rel=\"nofollow\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" width=\"16\" height=\"16\" /></a><b><a href=\"https://archiveofourown.org/users/" theuser "\" rel=\"nofollow\">" theuser "</a></b>"))
|
||||
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/" theuser "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://archiveofourown.org/users/" theuser "\"><b>" theuser "</b></a></span>"))))
|
||||
|
|
|
@ -68,8 +68,8 @@
|
|||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\[fn:\\([0-9]*\\):\\([^•]*\\)•\\]" nil t)
|
||||
(replace-match "@@html:<label for=\"\\1\" class=\"margin-toggle sidenote-number\"></label><input type=\"checkbox\" id=\"\\1\" class=\"margin-toggle\"/><span class=\"sidenote\">@@@@latex:\\\\footnote{@@\\2@@html:</span>@@@@latex:}@@"))
|
||||
(let ((user-full-name "Mez")
|
||||
(org-html-head "<link rel=\"stylesheet\" href=\"/fic/tufte.css\"/>\n<link rel=\"stylesheet\" href=\"/home/mdd/Documents/proj/fic-archive/build/tufte.css\"/>\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: light)\" content=\"#fffff8\" />\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: dark)\" content=\"#151515\" />\n<meta property=\"og:title\" content=\"Mez’s fanfiction\">\n<meta property=\"og:type\" content=\"article\">\n<meta property=\"og:image\" content=\"https://tre.praze.net/ab.png\">\n<meta name=\"description\" property=\"og:description\" content=\"Fanfiction on tre.praze.net\">\n<meta property=\"og:locale\" content=\"en_GB\">\n<meta property=\"og:site_name\" content=\"tre.praze.net\">\n<meta name=\"fediverse:creator\" content=\"@tre@ple.praze.net\">")
|
||||
(let ((user-full-name "“Tré”")
|
||||
(org-html-head "<link rel=\"stylesheet\" href=\"/fic/tufte.css\"/>\n<link rel=\"stylesheet\" href=\"/home/mdd/Documents/proj/fic-archive/build/tufte.css\"/>\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: light)\" content=\"#fffff8\" />\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: dark)\" content=\"#151515\" />\n<meta property=\"og:title\" content=\"Tré’s fanfiction\">\n<meta property=\"og:type\" content=\"article\">\n<meta property=\"og:image\" content=\"https://tre.praze.net/ab.png\">\n<meta name=\"description\" property=\"og:description\" content=\"Fanfiction on tre.praze.net\">\n<meta property=\"og:locale\" content=\"en_GB\">\n<meta property=\"og:site_name\" content=\"tre.praze.net\">\n<meta name=\"fediverse:creator\" content=\"@tre@ple.praze.net\">")
|
||||
(org-export-with-author t)
|
||||
(org-latex-default-class "memoir"))
|
||||
(org-html-export-to-html)
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
\end{minipage}
|
||||
\hspace{0.05\textwidth}
|
||||
\begin{minipage}{0.6\textwidth}
|
||||
{\Large MEZ} \\
|
||||
{\Large ``TRÉ''} \\
|
||||
\rule{0.9\textwidth}{1pt} \par
|
||||
\vspace{3\baselineskip}
|
||||
{\noindent\Huge\bfseries A SHOT} \par
|
||||
|
@ -162,4 +162,4 @@
|
|||
information, see \url{https://tre.praze.net/ffx/asal}.
|
||||
|
||||
\noindent
|
||||
{\scriptsize{\yevon Now is the time to shape your stories Your fate is in your hands}}}
|
||||
{\scriptsize{\yevon Now is the time to shape your stories Your fate is in your hands!}}}
|
|
@ -1,4 +0,0 @@
|
|||
# name: animesweat
|
||||
# key: :animesweat:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/animesweat.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: aww
|
||||
# key: :aww:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/aww.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: biggrin
|
||||
# key: :biggrin:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/biggrin.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: blankstare
|
||||
# key: :blankstare:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/blankstare.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: bleh
|
||||
# key: :bleh:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bleh.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: boogie
|
||||
# key: :boogie:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/boogie.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: bounce
|
||||
# key: :bounce:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bounce.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: bow
|
||||
# key: :bow:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bow.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: bump
|
||||
# key: :bump:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bump.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: cd
|
||||
# key: :cd:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/cd.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: clap
|
||||
# key: :clap:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/clap.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: confused
|
||||
# key: :confused:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/confused.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: cool
|
||||
# key: :cool:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/cool.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: dance
|
||||
# key: :dance:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/dance.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: dead
|
||||
# key: :dead:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/dead.gif]]
|
4
snippets/org-mode/dwcut
Normal file
4
snippets/org-mode/dwcut
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: dreamwidth-cut
|
||||
# key: dwcut
|
||||
# --
|
||||
@@html:<cut text="$1">@@$0@@html:</cut>@@
|
4
snippets/org-mode/dwuser
Normal file
4
snippets/org-mode/dwuser
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: dreamwidth-user
|
||||
# key: dwuser
|
||||
# --
|
||||
@@html:<user name="$1">@@$0
|
|
@ -1,4 +0,0 @@
|
|||
# name: eager
|
||||
# key: :eager:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/eager.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: eek
|
||||
# key: :eek:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/eek.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: giggle
|
||||
# key: :giggle:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/giggle.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: headbang
|
||||
# key: :headbang:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/headbang.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: hmm
|
||||
# key: :hmm:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/hmm.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: la
|
||||
# key: :la:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/la.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: lmao
|
||||
# key: :lmao:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/lmao.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: meow
|
||||
# key: :meow:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/meow.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: ninja
|
||||
# key: :ninja:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/ninja.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: nod
|
||||
# key: :nod:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/nod.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: ohnoes
|
||||
# key: :ohnoes:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/ohnoes.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: razz
|
||||
# key: :razz:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/razz.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: rofl
|
||||
# key: :rofl:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/rofl.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: sad
|
||||
# key: :sad:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/sad.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: shrug
|
||||
# key: :shrug:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/shrug.gif]]
|
4
snippets/org-mode/siteuser
Normal file
4
snippets/org-mode/siteuser
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: site-user
|
||||
# key: siteuser
|
||||
# --
|
||||
@@html:<user name="$1" site="$2">@@$0
|
|
@ -1,4 +0,0 @@
|
|||
# name: smile
|
||||
# key: :smile:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/smile.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: tombstone
|
||||
# key: :tombstone:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/tombstone.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: tongue
|
||||
# key: :tongue:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/tongue.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: typing
|
||||
# key: :typing:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/typing.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: wave
|
||||
# key: :wave:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/wave.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: wink
|
||||
# key: :wink:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/wink.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: winkrazz
|
||||
# key: :winkrazz:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/winkrazz.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: woot
|
||||
# key: :woot:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/woot.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: worry
|
||||
# key: :worry:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/worry.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: worship
|
||||
# key: :worship:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/worship.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: xd
|
||||
# key: :xd:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/xd.gif]]
|
Loading…
Add table
Add a link
Reference in a new issue