ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Arioch <the_Arioch@nm.ru>
To: sisyphus@lists.altlinux.org
Subject: [sisyphus] Perl content: почему dict перестал видеть словари ? 
Date: Mon, 16 Jan 2006 18:03:56 +0300
Message-ID: <dqgtij$ope$1@sea.gmane.org> (raw)

По идее скрипт /usr/sbin/dictdconfig должен перечислять все базы и
записывать из в список, однако....

zsh 642 % cat /var/lib/dictd/db.list
             - - - SKIP - - -
# See dictdconfig(8) for details.
             - - - SKIP - - -
database engcom {
   data  /usr/share/dictd/engcom.dict.dz
   index /usr/share/dictd/engcom.index
}
database foldoc {
   data  /usr/share/dictd/foldoc.dict.dz
   index /usr/share/dictd/foldoc.index
}
database vera {
   data  /usr/share/dictd/vera.dict.dz
   index /usr/share/dictd/vera.index
}
database jargon {
   data  /usr/share/dictd/jargon.dict.dz
   index /usr/share/dictd/jargon.index
}



Чем они отличаюся от других???
zsh 643 % ll /usr/share/dictd
итого 38052
drwxr-xr-x 377 root root    11064 Янв 14 18:10 ../
drwxr-xr-x   2 root root      656 Янв  6 00:11 ./
-rw-r--r--   1 root root   209247 Янв  6 00:11 engcom.dict.dz
-rw-r--r--   1 root root    35725 Янв  6 00:11 engcom.index
-rw-r--r--   1 root root  3952339 Ноя 27 22:08 gcide.index
-rw-r--r--   1 root root 13527757 Ноя 27 22:08 gcide.dict.dz
-rw-r--r--   1 root root  2105578 Сен 14 15:00 foldoc.dict.dz
-rw-r--r--   1 root root   281456 Сен 14 15:00 foldoc.index
-rw-r--r--   1 root root   164177 Май 24  2005 vera.dict.dz
-rw-r--r--   1 root root   120783 Май 24  2005 vera.index
-rw-r--r--   1 root root   832116 Мар  4  2005 slovnyk_ru-en.dict.dz
-rw-r--r--   1 root root  1486899 Мар  4  2005 slovnyk_ru-en.index
-rw-r--r--   1 root root   972387 Мар  4  2005 slovnyk_en-ru.dict.dz
-rw-r--r--   1 root root   977100 Мар  4  2005 slovnyk_en-ru.index
-rw-r--r--   1 root root  2767389 Мар  4  2005 mueller7.dict.dz
-rw-r--r--   1 root root   786401 Мар  4  2005 mueller7.index
-rw-r--r--   1 root root   636409 Мар  4  2005 jargon.dict.dz
-rw-r--r--   1 root root    43202 Мар  4  2005 jargon.index
-rw-r--r--   1 root root  8808006 Мар  4  2005 dalf.dict.dz
-rw-r--r--   1 root root  1175086 Мар  4  2005 dalf.index



Вот по идее фнукция, котораядолжна проверять наличие пар файлов, но
видимо она на Словнике затыкается. Не любит дефисы/подчеркиваия ?

sub CheckDatabase {
     my ( $base_name ) = @_;
     my $name;
     my $datafile;
     my $indexfile;
     if ( $base_name =~ m#.*/(.*)# ) { $name = $1 }
     else { $name = $base_name }
     if ( $base_name =~ m#^/# ) { $datafile = $indexfile = $base_name }
     else { $datafile = $indexfile = "$db_dir/$base_name" }
     $datafile .= ".dict.dz";
     $datafile =~ s/\.dz$// unless -f $datafile;
     $indexfile .= ".index";
     if ( ! $db_entered{ $name } && -f $datafile && -f $indexfile ) {
         AddEntry( $name, $datafile, $indexfile );
     }
}

sub CheckDirectory {
     my ( $dir ) = @_;
     $dir = "$db_dir/$dir" unless $dir =~ m#^/#;
     opendir DIR, $dir;
     for (readdir DIR) {
         if ( /(^.*)\.index$/ ) { CheckDatabase( "$dir$1" ) }
     }
     closedir DIR;
}


Я в Перле ни бум-бум, о м.б. кто подскажет чего поправить ?

Кстати, нет man page для dictdconfig, а в вывод скрипта идет ссылка на
man :)

PS: удалил slovnyk - ничего не изменилось, видит только первые 4 
словаря, и всё тут :(




             reply	other threads:[~2006-01-16 15:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-16 15:03 Arioch [this message]
2006-01-16 20:11 ` Dmitry Marochko
2006-01-17  7:41 ` Epiphanov Sergei
2006-01-17  9:24   ` [sisyphus] Re: Perl contest: почему dict пересталвидетьсловари ? Arioch
2006-01-17  9:59     ` Epiphanov Sergei
2006-01-17 10:09       ` Epiphanov Sergei
2006-01-17 14:57       ` Arioch
2006-01-18 10:02         ` Epiphanov Sergei
2006-01-18 10:23           ` Arioch
2006-01-18 11:16             ` Epiphanov Sergei
2006-01-18 13:01               ` Arioch
2006-01-18 13:52                 ` [sisyphus] Почему dict перестал видеть словари? Epiphanov Sergei
2006-01-18 14:05                   ` [sisyphus] Re: Почему dict пересталвидетьсловари? Arioch
2006-01-18 14:48                     ` Epiphanov Sergei
2006-01-18 15:10                       ` Arioch
2006-01-18 14:01                 ` [sisyphus] Почему dict перестал видеть словари? Epiphanov Sergei
2006-01-17  9:54 ` [sisyphus] Perl content: почему dict перестал видеть словари ? Epiphanov Sergei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='dqgtij$ope$1@sea.gmane.org' \
    --to=the_arioch@nm.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git