3 function make_short_title(long_title) |
3 function make_short_title(long_title) |
4 local short_title = long_title:gsub("%W+", "-"):lower():sub(1,45) |
4 local short_title = long_title:gsub("%W+", "-"):lower():sub(1,45) |
5 if #long_title:gsub("%W+", "-") > 45 then |
5 if #long_title:gsub("%W+", "-") > 45 then |
6 short_title = short_title:gsub("%-%w+$", ""); |
6 short_title = short_title:gsub("%-%w+$", ""); |
7 end |
7 end |
8 return short_title; |
8 return short_title:gsub("%W+$", ""); |
9 end |
9 end |
10 |
10 |
11 -- Config -- |
11 -- Config -- |
12 local conffile = ".blogrc"; |
12 local conffile = ".blogrc"; |
13 for i=1,#arg do |
13 for i=1,#arg do |