Changeset 49 for mt-cats2keywords/trunk
- Timestamp:
- 04/24/05 16:02:16 (4 years ago)
- Files:
-
- 1 modified
-
mt-cats2keywords/trunk/mt-cats2keywords.cgi (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mt-cats2keywords/trunk/mt-cats2keywords.cgi
r48 r49 1 1 #!/usr/bin/perl -w 2 2 # 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) 5 6 # 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 7 11 12 # PLEASE CHANGE THIS "BLOG_ID" AS YOU WANT 8 13 use constant BLOG_ID => 1; 14 9 15 use strict; 10 16 local $|=1; … … 24 30 use MT::Entry; 25 31 use MT::Category; 26 #use MT::ConfigMgr;27 32 28 33 print "Content-Type: text/html\n\n"; … … 44 49 my $keywords = join ' ', map { $_->label } @$cats; 45 50 $e->keywords($keywords); 46 #$e->save47 #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); 48 53 printf("Entry [%s] title=%s keywords=%s\n", $e->id, $e->title, $e->keywords); 49 54 }
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)