OSDN Git Service

renamed: admin/JFcopy.txt -> admin/legacy/JFcopy.txt
[linuxjf/JF.git] / admin / legacy / Monthly-News / dbencode.pl
1 #! /usr/bin/perl
2 # $Id: dbencode.pl,v 1.1 2000/01/25 18:51:03 fuku Exp $
3 # monthly.msg ¤ÎÀ¸À®¤ËɬÍפʠjfindex.db ¤ò JF ¤Î build ¥Þ¥·¥ó¤«¤é
4 # »ý¤Ã¤Æ¤¯¤ë¤È¤­¤Ë¡¢°ìö plain text ¤ËÊÑ´¹¤·¤ÆžÁ÷¤¹¤ëºÝ¤Ë»È¤¤¤Þ¤¹¡£
5 # (Ä̾ï¤ÏɬÍפ¢¤ê¤Þ¤»¤ó)
6
7 # master.linux.or.jp -> news.amorph.rim.or.jp
8 #
9
10 my $indexfile = "./jfindex.db";
11 my $textfile  = "./jfindex.txt";
12
13 use DB_File;
14 my %hash;
15 tie(%hash, 'DB_File', $indexfile, O_RDWR|O_CREAT, 0644, $DB_BTREE) or die;
16
17 open(J,"$textfile") or die;
18 while (<J>) {
19   if (/^(.*\@\@....) (.*)$/) {
20     $hash{$1} = $2;
21   }
22 }
23 untie %hash;
24 exit;