2005-07 / 2005-07-06

前のエントリ: UVERworld new Single [diary]
次のエントリ: BINDの統計情報 [bind]

rdfには最後のカテゴリ名だけ表示
2005-07-06-1 / カテゴリ: [perl][programming][changelog][chalow] / [permlink]

[2005-06-14-2]でカテゴリ名を RSS フィードに表示するようにしたけど、カテゴリの数が多いと(こんな使い方余りいない??)、Firefox のライブブックマークでの非表示部分が多くなってしまう。
ので、記述しているカテゴリ名のうち、最後の1個だけを表示するように修正

前回の状態からは
--- chalow.20050706     2005-06-29 19:40:01.000000000 +0900
+++ chalow      2005-07-06 17:55:49.000000000 +0900
@@ -1102,7 +1102,7 @@

            push @items, {
                permlink => $permlink,
-               itemheader => html2xmlstr("[".join("][", @{$all_entries{$ymd}{$i}{cat}})."]".$all_entries{$ymd}{$i}{h}),
+               itemheader => html2xmlstr("[" . $all_entries{$ymd}{$i}{cat}[$#{$all_entries{$ymd}{$i}{cat}}] . "]" . $all_entries{$ymd}{$i}{h}),
                itemauthor => $all_entries{$ymd}{$i}{a},
                itemcontent => $cont,
                itemcontentencoded => $coen,
てな感じで。

スゲー見にくいけど、要は
$array[$#array]
で、配列最後の要素をとってるだけ。
先頭がよければ、0 で良い(未確認)
Referrer (Inside): [2006-07-30-1]
前のエントリ: UVERworld new Single [diary]
次のエントリ: BINDの統計情報 [bind]

2013 : 01 02 03 04 05 06 07 08 09 10 11 12
2012 : 01 02 03 04 05 06 07 08 09 10 11 12
2011 : 01 02 03 04 05 06 07 08 09 10 11 12
2010 : 01 02 03 04 05 06 07 08 09 10 11 12
2009 : 01 02 03 04 05 06 07 08 09 10 11 12
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12

最終更新時間: 2013-05-02 16:12