remove unnecessary font stuff

This commit is contained in:
Chris Cochrun 2024-04-03 10:09:50 -05:00
parent 6451e0a8cf
commit 7ab0ade216
3 changed files with 63 additions and 16 deletions

View file

@ -48,23 +48,66 @@
"Select which song to edit"
(interactive)
(with-current-buffer (get-buffer-create "*lumina*")
(fundamental-mode)
(org-mode)
(delete-region (point-min) (point-max))
(point-min)
(let* ((title (completing-read "Select a song: " (cl-loop for song in lumina-songs
collect (cadr song))))
(lyrics (cl-loop for song in lumina-songs
when (string= (cadr song) title)
return (caddr song))))
(insert lyrics)
(setf lumina-current-song title)))
(song (cl-loop for song in lumina-songs
when (string= (cadr song) title)
return song))
(lyrics (elt song 2))
(author (elt song 3))
(ccli (elt song 4))
(audio (elt song 5))
(verse-order (elt song 6))
(background (elt song 7))
(background-type (elt song 8))
(halign (elt song 9))
(valign (elt song 10))
(font (elt song 11))
(font-size (elt song 12)))
(insert (concat "#+TITLE: " title))
(newline)
(insert (concat "#+AUTHOR: " author))
(newline)
(insert (concat "#+AUDIO: " audio))
(newline)
(insert (concat "#+VERSE_ORDER: " verse-order))
(newline)
(insert (concat "#+BACKGROUND: " background))
(newline)
(insert (concat "#+BACKGROUND_TYPE: " background-type))
(newline)
(insert (concat "#+HALIGN: " halign))
(newline)
(insert (concat "#+VALIGN: " valign))
(newline)
(insert (concat "#+FONT: " font))
(newline)
(insert (concat "#+FONT_SIZE: " (number-to-string font-size)))
(newline)
(newline)
(insert (concat "* Lyrics\n" lyrics))
(print song)
(setf lumina-current-song title)))
(switch-to-buffer "*lumina*"))
(defvar lumina-current-song)
(defun lumina-grab-lyrics ()
(with-current-buffer (get-buffer-create "*lumina*")
(buffer-substring-no-properties (point-min) (point-max))))
(with-current-buffer (get-buffer "*lumina*")
(goto-char (point-min))
(search-forward "* Lyrics")
(next-line)
(move-to-left-margin)
(buffer-substring-no-properties (point) (point-max))))
(defun lumina-get-verse-order ()
(with-current-buffer (get-buffer "*lumina*")
(goto-char (point-min))
(search-forward "#+VERSE_ORDER: ")
(buffer-substring-no-properties (point) nil)))
(defvar lumina-lyrics-update-query (concat "update songs set lyrics = \"?" (lumina-grab-lyrics) "\" where title = " lumina-current-song))