Plagger:tDiaryからWordPressへ 初投稿の日付

うーん、同じyamlを使ってるのにたまに取ってきたりこなかったり。(追記:これはキャッシュのある$HOME/.plagger*を削除するとOKだった。)

まあいっかと、今度は、日付を取得。結局#pddごとに、月単位で、outputした後、WordPressへという流れにする。となると、tDiaryには初投稿の時間のデータはないから、「2007-09-28T00:00:01」というようなのを作らないといけない。で都合よく#pdd単位で全文をひろってくるので、ddの部分を秒(%S)に設定。これでよかったみたい。
[text]
author: Jareth
custom_feed_handle: http://eojareth.net/diary
custom_feed_follow_link: /d{8}.html#p01
handle: http://eojareth.net/diary/d{8}.html#p01
extract: <h3><a name=”p01″ href=”./(d{8}.html#pdd)”></a>s(.*?)</h3>s(.*?)<div class=”tags”>
extract_capture: date title body
extract_date_format: %Y%m%d.html#p%S[/text]
上のやつを、p01.yamlとすると、p06.yamlの6つをassets配下へconfigの方もメモとして貼り付け
[text]
global:
assets_path: /home/jareth/plagger/assets
timezone: Asia/Tokyo
log:
level: debug
plugins:
– module: Subscription::Config
config:
feed:
– http://eojareth.net/diary/20070901.html  (一月分全部
        …(略)
– http://eojareth.net/diary/20070930.html
– module: Filter::EntryFullText
config:
store_html_on_failure: 0
force_upgrade: 0
 - module: Aggregator::Null (記述なしでは、Aggregator::Simpleが呼ばれるが、記述するとNullだけ呼ばれるみたい)
– module: Filter::Rule   (重複をカット)
rule:
module: Deduped
– module: Filter::Regexp  (取得したbodyの一部の置換のため)
config:
regexp: s/AA/BB/g
text_only: 1
– module: Publish::Template (テンプレートへの出力)
config:
dir: /home/jareth/test/out
template: wp-export.tt
filename: output_%t.rdf (output_??文字化け??_2007_09_01_.txtなどと、吐いてくれる。)[/text]
これで、WordPresME2.3がでるまで待つことに。

タイトルとURLをコピーしました