Show
Ignore:
Timestamp:
04/24/05 16:02:16 (4 years ago)
Author:
ogawa
Message:

Make it feasible anyway, anyhow

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mt-cats2keywords/trunk/mt-cats2keywords.cgi

    r48 r49  
    11#!/usr/bin/perl -w 
    22# 
    3 # Copyright 2004 Hirotaka Ogawa. This code cannot be rediributed without 
    4 # permission. 
     3# mt-cats2keywords.cgi: A simple tool for adding keywords to each entries based on their categories 
     4#  
     5# Release 0.10 (Apr 18, 2005) 
    56# 
    6 # mt-cats2keywords.cgi: set keywords for each entries from their own categories 
     7# This software is provided as-is. You may use it for commercial or  
     8# personal use. If you distribute it, please keep this notice intact. 
     9# 
     10# Copyright (c) 2005 Hirotaka Ogawa 
    711 
     12# PLEASE CHANGE THIS "BLOG_ID" AS YOU WANT 
    813use constant BLOG_ID => 1; 
     14 
    915use strict; 
    1016local $|=1; 
     
    2430use MT::Entry; 
    2531use MT::Category; 
    26 #use MT::ConfigMgr; 
    2732 
    2833print "Content-Type: text/html\n\n"; 
     
    4449    my $keywords = join ' ', map { $_->label } @$cats; 
    4550    $e->keywords($keywords); 
    46 #    $e->save 
    47 #       or printf ("[ERR] %s at MT::Entry->id: [%s]\n", $e->errstr, $e->id); 
     51    $e->save 
     52        or printf ("[ERR] %s at MT::Entry->id: [%s]\n", $e->errstr, $e->id); 
    4853    printf("Entry [%s] title=%s keywords=%s\n", $e->id, $e->title, $e->keywords); 
    4954}