33 -- Ignore dotfiles |
33 -- Ignore dotfiles |
34 if not post_filename:match("^%.") then |
34 if not post_filename:match("^%.") then |
35 msg_info("Processing %s", post_filename); |
35 msg_info("Processing %s", post_filename); |
36 local post_file, err = io.open(posts_dir..post_filename); |
36 local post_file, err = io.open(posts_dir..post_filename); |
37 if post_file then |
37 if post_file then |
38 local post_format = post_filename:match("%.(%w+)") or "text"; |
38 local post_format = post_filename:match("%.(%w+)$") or "text"; |
39 local post = { filename = post_filename, path = posts_dir..post_filename, format = post_format }; |
39 local post = { filename = post_filename, path = posts_dir..post_filename, format = post_format }; |
40 if not parsers[post_format] then |
40 if not parsers[post_format] then |
41 msg_warn("Post format '%s' not supported", post_format); |
41 msg_warn("Post format '%s' not supported", post_format); |
42 else |
42 else |
43 local inside_header, line_num = nil, 0; |
43 local inside_header, line_num = nil, 0; |