journal
all all entries rss SoML excited dreams runes YRUU ultimate KTRU skate sleepy nihongo
Rob is 20,356 days old today.
prev day next day printable version

Entries this day: ac-lesson chez-soness-features-studio-soness great-lesson hexo-and-middleman updated-hakyll.el

ac lesson

##09:26 Thursday 12 February 2015 JST##

I was a minute late to A and C's lesson, but they were 5 and 20 minutes late, respectively. whew!

We hadn't seen C in three weeks so I asked A to ask some questions about C's latest adventures. I took notes on two separate sheets of paper on which I made corrections and then had them do the same conversation again, but using the new phrases. I hope it was helpful!

At the end, each student got their own page with corrections.

permalink

chez soness features studio soness

##09:31 Thursday 12 February 2015 JST##

Headed to Chez Soness to help her record some videos for her latest project/product. Cool stuff!

##16:39

Fun times! We had lunch and converted Chez Soness into Studio Soness and then recorded several takes of her latest Show-n-Tell US video. Dogs and jets augmented the soundtrack after we got her script tweaked. Try again tomorrow!

Now I'm headed to first lesson in Akihabara, which should become a weekly event.

##17:17

D'oh! This train terminates in Shinagawa.

##17:27

yay! I got a seat on the next train leaving Shinagawa.

permalink

great lesson

##20:23 Thursday 12 February 2015 JST##

Such a nice lesson tonight! This was my first time to meet these students; they are three lovely women, two of whom are retired, one of whom does not have a computer nor TV! Wow!

We laughed a lot and they asked lots of questions and tried lots of speaking; I need to learn from them!

Also great: there are plenty of seats on the train on the way back.

permalink

hexo and middleman

##17:15 Thursday 12 February 2015 JST##

Well, Hexo looks great without any modification, and handled my journal directory without complaints... but it's slowwww (with entries spanning 23 years (and more to come after I port years 199-2004)).

Middleman had some complaints, and looks like ass, but it's fast!!!

I fixed the complaints (boo hoo the date in filename doesn't match the date in frontmatter. who fuckin' cares? Use one to override the other!), and I assume someone has written a theme or two for Middleman.

The "calendar" add-on(?) doesn't show anything like a calendar; it's just some year/month indices. Mmmaybe I'll find something and mmmmmmmmmmaaaayyybbbe I'll write something to do it.

Oh, and Middleman doesn't use the same markdown that I'm used to. If I put double tildes across text ~~like this~~, I like the strikethrough markup. But Middleman just renders the tildes. Gotta figure out how to tell it which markdown to use.

##22:17

Fixed the strikethrough thing with :redcarpet

In Gemfile:

gem "redcarpet", "~> 2.3.0"

In config.rb:

set :markdown, :tables => true, :autolink => true, :gh_blockcode => true, :fenced_code_blocks => true, :strikethrough => true
set :markdown_engine, :redcarpet
permalink

updated hakyll.el

##20:49 Thursday 12 February 2015 JST##

Though I'm no longer exclusively considering Hakyll, my emacs extension is still called hakyll.el. I've just tweaked it to add the time to the date: field in the frontmatter, and set auto-fill-mode for the buffer:

;;; hakyll.el --- Convenience functions for working with Hakyll.
;;
;;; Commentary:      
;; Convenience functions for working with Hakyll.

;;; Code:

(defvar hakyll-site-location "~/journal/"
  "The location of the Hakyll files.")

(defun hakyll-insert-image (alt-text)
  "Insert an image from /images/yyyy/mm to current buffer /posts/yyyy/mm/dd/....md"
  (interactive "sAltText: ")
  (let ((yyyymm (substring buffer-file-name 35 42)))
    (insert
     (format "![%s](/images/%s/thumbs/"
	     alt-text
	     yyyymm
	     ))
    )
  )

(defun hakyll-new-post (title tags yyyy mm dd)
  "Create a new Hakyll post for today with TITLE and TAGS."
  (interactive (list
		(read-string "Title: ")
		(read-string "Tags: ")
                (read-string (format "Year (%s): " (format-time-string "%Y")) nil nil (format-time-string "%Y"))
                (read-string (format "Month (%s): " (format-time-string "%m")) nil nil (format-time-string "%m"))
                (read-string (format "Date (%s): " (format-time-string "%d")) nil nil (format-time-string "%d"))
		)
	       )
  (let (
	(file-name (hakyll-post-title title))
	(file-path (hakyll-post-path title yyyy mm dd))
	)
    (set-buffer (get-buffer-create file-path))
    (insert
     (format "---\ntitle: %s\ntags: %s\nauthor: Rob Nugen\ndate: %s-%s-%s %s\n---\n\n%s\n\n"
             title
	     (downcase tags)
	     yyyy
	     mm
	     dd
	     (format-time-string "%H:%M JST")
	     (format-time-string "##%H:%M %A %d %B %Y %Z##")
	     ))
    (write-file
     (expand-file-name file-path (concat hakyll-site-location "posts")))
    (switch-to-buffer file-name)
    (auto-fill-mode)
    ))

(defun hakyll-new-note (title)
  "Create a new Note with TITLE."
  (interactive "sTitle: ")
  (let ((file-name (hakyll-note-title title)))
    (set-buffer (get-buffer-create file-name))
    (insert (format "---\ntitle: %s\ndescription: \n---\n\n" title))
    (write-file
     (expand-file-name file-name (concat hakyll-site-location "notes")))
    (switch-to-buffer file-name)))

(defun hakyll-post-title (title)
  "Return a file name based on TITLE for the post."
  (concat
   (url-safe-string title)
   ".md"))

(defun hakyll-post-path (title yyyy mm dd)
  "Return a file path based on TITLE and date."
  (concat
   yyyy "/" mm "/" dd "/"
   (url-safe-string title)
   ".md"))

(defun hakyll-note-title (title)
  "Return a file name based on TITLE for the note."
  (concat
   (url-safe-string title)
   ".md"))

(defun url-safe-string (title)
  "Return a URL-safe title based on TITLE."
  (replace-regexp-in-string "[:!']" ""
    (replace-regexp-in-string " " "-" (downcase title))
    )
  )


(provide 'hakyll)
;;; hakyll.el ends here

permalink
prev day next day