Archive of posts from 2025-7

« 2025-06 | 2025 | 2025-08 »

[映画] 夏の砂の上

髙石あかりを目当てに見てきた。いつも通りすばらしい演技力。映像に収めてくれてありがたい!!

一方、物語はなあ……全体的にキャラの深堀りをしないまま話を進めるので、すぐ置いてけぼりになる。突然奇行を始める人たちばかり、という印象しかない。いちいち怒鳴る必要ないんだよなあ。もっと丁寧に描いてくれたらよかったのに。

主人公がすべてを失って終わるが、実際はそんなに気にしてなさそう。よくわからない。オダギリジョーじゃなければ、もっと悲壮感があったかもしれない。

[映画] リバー、流れないでよ

「ドロステのはてで僕ら」と同じく、記憶を保持したまま2分間をずっとループするというもの。記憶を持ち越すので、時間がループするたびに(ループしてるのに)イベントが積み重なっていくのが面白い。ちゃんと展開もあって、笑いもあって、恋愛もあって、ループする理由も用意してあって、よくできてる。

私が使っているObsidianのプラグイン

そんなに真面目に使ってないけど、気づいたらいろいろ入れていた。

tDiaryの過去ログをJekyllに移行したい

プラグインまわりが微妙すぎるけど、とりあえず……。

require 'fileutils'
require 'hiki2md'
require 'yaml'

INPUT_DIR = 'diary_log'
OUTPUT_DIR = '_posts'

def parse_td2_file(path)
  entries = []
  current = nil
  skip_keys = ['Title:', 'Last-Modified:', 'Visible:', 'Format:']

  File.read(path).split("\n").each do |line|
    if line.strip == '.'
      entries << current if current
      current = nil
    elsif line.start_with?('Date:')
      current = { date: line.sub('Date: ', '').strip, lines: [] }
    elsif current
      unless skip_keys.any? { |k| line.start_with?(k) }
        current[:lines] << line
      end
    end
  end

  entries << current if current
  entries
end

def split_by_heading(lines)
  sections = []
  current = nil

  lines.each do |line|
    if line.strip.start_with?('!')
      # ! で始まる見出しを新規セクションとする
      if line.strip =~ /^![^!]/
        sections << current if current
        current = [line]
      else
        current << line if current
      end
    else
      current << line if current
    end
  end

  sections << current if current
  sections
end

def write_markdown_sections(entry)
  date_str = entry[:date]
  y = date_str[0..3]
  m = date_str[4..5]
  d = date_str[6..7]
  ymd = "#{y}-#{m}-#{d}"

  sections = split_by_heading(entry[:lines])

  sections.each_with_index do |section_lines, idx|
    next if section_lines.nil? || section_lines.empty?

    heading_line = section_lines.first
    title_text = heading_line.sub(/^!+/, '').strip

    content = section_lines.join("\n")
    content = Hiki2md.new.convert(content)
    markdown = convert_liquid_tags(content)

    front_matter_hash = {
      'title'      => title_text
    }
    front_matter = YAML.dump(front_matter_hash) + "---\n"

    output_dir = File.join(OUTPUT_DIR, y, m)
    FileUtils.mkdir_p(output_dir)
    filename = File.join(output_dir, "#{ymd}-#{idx + 1}.md")

    File.write(filename, front_matter + "\n" + markdown)
    puts "Wrote #{filename}"
  end
end

def convert_liquid_tags(text)
  # Jekyllでエラーが出ちゃったから、%は小文字に置き換えて
  text.gsub(/\{\{\s*(\w+.*?)\s*\}\}/, "{% \1 %}")
end

Dir.glob("#{INPUT_DIR}/**/*.td2") do |file|
  entries = parse_td2_file(file)
  entries.each { |entry| write_markdown_sections(entry) }
end

プラグインはダミーのJekyllプラグインを作っておく。

# _plugins/tdiary.rb
module Jekyll
  class IsbnTag < Liquid::Tag
    def initialize(tag_name, text, tokens)
      super
      @isbn = text.strip
    end

    def render(context)
      "<p>(ISBN: #{@isbn})</p>"
    end
  end
end

Liquid::Template.register_tag('isbn', Jekyll::IsbnTag)

「タイトルがリンク」みたいなのをどうにかしたい

# _plugins/render_title_generator.rb
class RenderTitleGenerator < Jekyll::Generator
  def generate(site)
    site.posts.docs.each do |post|
      title_line = post.content.lines.first.to_s.strip
      title_line.gsub!(/^#\s*/, "")
      title_line.gsub!(/\[([^\[\]]+?(?:\[[^\]]+\])?[^\]]*?)\]\((https?:\/\/[^\s)]+)\)/, '\1')

      context = Liquid::Context.new({ "page" => post.data }, {}, { site: site })
      rendered = Liquid::Template.parse(title_line).render!(context)
      post.data["title_rendered"] = rendered
    end
  end
end

↑これを入れておけば{{ post.title_rendered }}でタイトルを表示できる。

[映画] フォーチュンクッキー

原題は「Fremont」。母国アフガニスタンの米軍基地で通訳だったドニヤが、カリフォルニア州フリーモントに移住して、高学歴なのにクッキー工場で働く毎日。というところからスタートして、ストレスフルな退屈な日々と、そこから抜け出す新しい船出みたいな感じ。が、前半は退屈すぎて寝た。で、後半はいい感じなのだが、いよいよというところで終わってしまった。こういうのが好きな人は好きなんだろう。

[映画] 『選挙』(2006)

淡々と選挙活動が映されるので終始退屈なんだけど、ブチ切れる謎のおじさん、BBAたちの世間話(悪口)、コンプラ無視のジョーク、奥さんの愚痴などが収録されていて、かなりアツい。

スクラムガイドの「確約」

とりとめもなくメモ的に書く。

スクラムフェス大阪2025でジム・コプリエンに説教された

(任意)スクラムガイドの現状確認

こちらからの回答と考察(うまく英語で伝えられなかったので、ここにまとめている)

[映画] 顔を捨てた男

全体的におもしろかったけど、まあ想定内かなあ。終盤はグダったけど。観客に考えさせるようなラストは嫌い。しかしこれもA24なのかあ。すごいな。

安藤忠雄展 青春 – TADAO ANDO YOUTH

大阪に来たついでに見てきた。模型がたくさんあって楽しかったなあ。

ご本人がいらっしゃったので、サインをいただいた。最高。

[映画] 罪人たち

なにがなんだかよくわからなかったが、くそ面白かったぞ!

[映画] スーパーマン by ジェームズ・ガン

もう世の中にスーパーマンはいるのは当たり前だよね、クラーク・ケントも知ってるよね、という前提で描かれてあって、すごい。子どもがはじめて見ると困惑したりしないんかな。

[映画] F1

かなりしょぼい物語だったけど、映像とブラピは良かったです。

そういえば、映画「F1」のテーマ曲(?)はマーメイドエフェクトのBGMだったなあ(そう表記してあることに気づいてなかった)。

« 2025-06 | 2025 | 2025-08 »