(defun szotar-next-line () "Takes the next line and prints its HTML representation." (if (re-search-forward "^\\(.*\\) = \\(.*\\)$" (point-max) t) (let* ((definition (match-string 1)) (arabic (match-string 2))) (princ (concat "\n" "" definition "\n" "" arabic "\n" "\n")) t) nil)) (defun szotar-htmlize () "Generates a CSS-driven HTML file from the current buffer. The buffer is assumed to be in UTF-8 encoding." (interactive) (with-output-to-temp-buffer (concat (buffer-name (current-buffer)) ".html") (princ (concat "\n" "\n" "" (buffer-name (current-buffer)) "\n" "\n" "\n" "\n" "\n" "\n")) (save-excursion (goto-char (point-min)) (while (szotar-next-line))) (princ "
\n\n")))