;;; rcd-utilities.el --- RCD utilities for GNU Emacs Lisp  -*- lexical-binding: t; -*-...
;;; Commentary:...
;;; Change Log:...
;;; Code:...
(setq lexical-binding t)...
(require 'calendar)
(require 'cl-lib)
(require 'dired)
(require 'seq)
(require 'subr-x)
(require 'rcd-template)...
(defcustom rcd-current-project-directory "~/Programming/emacs-lisp/"...
(defcustom rcd-public-html-basedir "public_html"...
(defcustom rcd-public-html-dir (concat (getenv "HOME") "/" rcd-public-html-basedir)...
(defcustom rcd-warning-message-sound-file nil...
(defvar *image-default-resize-size* 1536)
(defvar *image-resize-sizes* '())...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun rcd-notify (summary body &optional expire-time icon urgency category hint)...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
(defun string-cut-id (s)...
(defun string-cut-id-with-part (s)...
(defun string-cut-right-square-bracket-reference (s)...
(defun string-is-number-p (s)...
(defun rcd-get-bracketed-id-end (s)...
(defun slash-add-clean (string)...
(defun slash-add (path)...
(defun slash-remove (string)...
(defun string-add (string add)...
(defun downcase-even-nil (s)...
(defun single-quote (s)...
(defun shell-double-quote (s)...
(defun string-to-double-quotes (s)...
(defun string-to-single-quotes (s)...
(defun escape-$ (s)...
(defun rcd-string-not-empty-p (s)...
(defun string-blank-if-nil (s)...
(defun string-or-empty-string (i)...
(defun rcd-number-expand-dir (n)...
(defun number-to-string-any (n)...
(defun insert-or-message (s)...
(defun string-slug (s &optional random)...
(defun region-to-variable-history nil "History fo `region-to-variable'.")...
(defun region-to-variable (beg end)...
(defun rcd-unenrich (enriched)...
(defun rcd-markdown-delete-anchors ()...
(defun rcd-markdown-toc ()...
;;;; ━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━...
(defun eur-format (amount)...
(defun usd-format (amount)...
(defun usd (number)...
;;;; ━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━...
(defun rcd-kill-to-signature (arg)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━...
(defun xml-escape (string)...
(defun spaces-to-%20 (s)...
(defun public-html-rest (path)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun rcd-timestamp-date-time ()...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━...
(defun rcd/expand-<%template%>-plist (template plist)...
(defun rcd/expand-<%template%>-alist-1 (template alist)...
(defun rcd/expand-<%template%>-eval (template)...
(defun rcd/expand-<%template%> (template plist)...
(defun rcd-edit-with-external-editor ()...
;;;; ━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━...
(defun list-of-strings-to-string (list)...
(defun list-has (needle haystack)...
(defun list-has-elements (needles haystack)...
(defun next-circular-list-item (list previous-item)...
(defun file-to-list (file)...
(defun list-to-file (list file)...
(defun list-append-first-to-first-cons (list)...
(defun list-joined-with-format-and-separator (format list separator)...
(defun list-append-elts-to-first-cons (list)...
(defun iota (count &optional start step)...
;;;; ━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━...
(defun hash-to-plist (hash)...
(defun hash-to-alist (hash)...
(defun hash-to-list (hash)...
(defun hash-append (h1 &rest hashes)...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
(defun vector-to-list (vector)...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
(defun random-number (&optional digits)...
;;;; Published 2020-10-13;; TODO publish again
(defun clisp-number-to-words (n &optional trim)...
(defun perl (string)...
(defun clisp (data &optional trim)...
(defmacro clisp-macro (&rest body)...
;;;; ━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━...
(defun sql-number-or-null (number)...
(defun sql-escape-string (str &optional trim)...
(defun psql-age (date)...
(defun rcd-sql-prepare-text-query (query)...
(defun rcd-sql-id-list (list)...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
(defun pop-buffer-highlight-elements (query list buffer &optional trim)...
(defvar rcd-word-processing t...
(defun rcd-word-processing ()...
(defun rcd-read-from-minibuffer-without (without-list prompt &optional initial-contents keymap read hist default-value inherit-input-method)...
(defun read-from-buffer (&optional value buffer-name mode title keymap)...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;; TODO make it defcustom, set some defaults
(defvar rcd-speech-function 'identity "The function that handles strings to be spoken")
(defvar rcd-speech t "If TRUE the RCD programs will enable speech")
(defvar rcd-festival-function 'festival-say-string "Which festival function to be called")
(setq rcd-speech-function 'rcd-speak-festival)...
(defun speak (string)...
(defun rcd-speak-festival (string)...
;;;; ━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━...
(defun rcd-enclose-region (open close)...
(defvar rcd-enclose-region-ask-history nil)...
(defun rcd-enclose-region-ask (open close)...
(defun rcd-markdown-tag (type)...
(defun rcd-markup-tags-by-mode ()...
(defun rcd-bracket-region-heavy-angle-bracket-ornaments (beg and)...
(defvar rcd-html-tag-history nil)...
(defun rcd-html-tag ()...
(defun rcd-html-strong ()...
(defun text-alphabetic-only (text)...
(defun rcd-word-frequency (text &optional length)...
(defun rcd-word-frequency-string (text &optional length how-many-words)...
(defun insert-= (times)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun split-attribute-colon-value (item)...
(defun last-key ()...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━...
(defun string-to-file-force (string file)...
(defun file-to-string (file)...
(defun data-to-file (data file)...
(defun data-from-file (file)...
;;;; ━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━...
(defun rcd-normalize-files ()...
(defun parent-dir (path)...
(defun mkdatedir (&optional directory)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━...
(defvar commented-heading-char nil)...
(defun commented-heading (text)...
(defun heading-underlined ()...
(defun underline-text (text &optional no-newlines)...
(defun underline-text-interactive (text)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun pdfinfo (file)...
(defun rcd-mime-type (file)...
(defun image-mime-type-p (file)...
(defun shell-escaped-file-name (s)...
(defun command-stream (command string &rest args)...
(defun command-stream-in-out (command string &rest args)...
(defun call-process-to-string (program &optional infile display &rest args)...
(defun rcd-command-output-from-input (program input &rest args)...
(defun rcd-load-file-with-sound (file)...
(defun psql (sql &rest args)...
(defun psql-html (sql &rest args)...
(defun psql-html-only (sql &rest args)...
(defun rcd-lightweight-markup-hyperlink (hyperlink name markup &optional title)...
(defun rcd-perl (program)...
(defun rcd-markdown (text)...
(defun rcd-pandoc-markdown (string &rest args)...
(defun rcd-pandoc-org-markdown (string &rest args)...
(defun rcd-pandoc-markdown-to-plain (string)...
(defun rcd-pandoc-html-to-plain (string)...
(defun rcd-txt2tags-html (text)...
(defun rcd-txt2tags-html-preview ()...
(defun rcd-asciidoctor (string &rest args)...
(defun rcd-lightweight-markup-preview ()...
(defun rcd-asciidoctor-preview ()...
(defun rcd-a2x (text)...
(defun rcd-a2x-preview ()...
(defun rcd-markdown-preview ()...
(defun rcd-bc (expression)...
(defun rcd-mkd2html (text &optional title author date)...
(defun rcd-which (command)...
(defun rcd-which-list (command-list)...
(defun xclip-primary-selection ()...
(defun xclip-primary-selection-html ()...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun pct-minus (amount percent)...
(defun pct-plus (amount percent)...
(defun pct-plus-times (amount percent times)...
(defun pct-of-number-in-total (number total)...
(defun pct-of-number-in-total-1 (number total)...
(defun pct-list (list)...
;;;; ━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━...
(defun rcd-memory-dir ()...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
(defun kill-any (any)...
;;;; ━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━...
(defun rgrep-current-word-in-el-project ()...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
(defun message-any (any)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun rcd-sql-timestamp ()...
(defun rcd-timestamp ()...
(defun rcd-iso-date ()...
(defun rcd-insert-iso-date ()...
(defun insert-timestamp-underlined ()...
(defun rcd-read-time ()...
(defun rcd-date-dir (&optional ask-for-date)...
(defun rcd-date-choice (&optional ask-for-date)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━...
(defun rcd-view-image (image)...
(defun optimize-image-jpg (file)...
(defun optimize-jpg-images-dired ()...
(defun image-resize (file &optional size)...
(defun image-resize-dired ()...
(defun rcd-message (message &optional buffer)...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━...
(defvar espeak-history nil)
(defvar espeak-voice "en")
(defvar espeak-amplitutde 40)
(defun espeak (&optional text speed)...
(defun rcd-play-sound-bg (file)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun rcd-warning-message (format-string &rest message)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━...
(defun wrs-xml-sitemap-block (sitemap)...
(defun wrs-xml-sitemap-url (url date-modified &optional change-frequency)...
;;;; ━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━...
(defun rcd-r-colors (how-many)...
(defun rcd-r-pie-chart (title labels values output-file &optional overwrite colors)...
;;;; ━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━...
(defun image-dimension (file)...
(defun video-dimension (file)...
(defun media-dimension (file &optional mime-type)...
(defun media-scale (width height new-width)...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━...
;;;; ━━━━━━━━━━━━━━━━━━━━━━━━...
(defun rcd-eval-visually ()...
(rcd-notify "LOADED rcd-utilities.el" "Loaded rcd-utilities.el" "100" "emacs")...
(provide 'rcd-utilities)...
;;; rcd-utilities.el ends here...