ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] ALT Linux Team
@ 2004-08-31 21:10 Alexey I. Froloff
  2004-08-31 21:39 ` Dmitry V. Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey I. Froloff @ 2004-08-31 21:10 UTC (permalink / raw)
  To: ALT Devel discussion list


[-- Attachment #1.1: Type: text/plain, Size: 352 bytes --]

Собрал тут ruby-gpgme и попутно сваял скриптик, который генерит
список alias'ов для mutt.  Может кому пригодится?

mkdir tmp/altkeys
cp /usr/lib/alt-gpgkeys/* tmp/altkeys
GNUPGHOME=$HOME/tmp/altkeys ruby -w getkeys.rb >> ~/.mutt/alias

P.S. Вот зачем gnupg хочет trustdb создавать при попытке
перебрать все ключи?

-- 
Regards,
Sir Raorn.

[-- Attachment #1.2: getkeys.rb --]
[-- Type: text/plain, Size: 504 bytes --]

#!/usr/bin/ruby -w

require 'gpgme'

alt=Hash.new(nil)

ctx = GPGME::GpgmeCtx.new

ctx.keylist_mode=GPGME::GPGME_KEYLIST_MODE_LOCAL

ctx.each_keys(ARGV[0]) do |k|
    i = 0
    while k[GPGME::GPGME_ATTR_KEYID, i] do
	if k[GPGME::GPGME_ATTR_EMAIL, i] =~ /@altlinux/ then
	    key = k[GPGME::GPGME_ATTR_EMAIL, i].gsub(/@.*$/, '').downcase
	    alt[key] = k[GPGME::GPGME_ATTR_NAME, i]
	end
	i += 1
    end
end

alt.keys.sort.each do |id|
    puts "alias\talt-#{id}\t\"#{alt[id]}\"\t<#{id}@altlinux.ru>"
end

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-01  5:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-31 21:10 [devel] ALT Linux Team Alexey I. Froloff
2004-08-31 21:39 ` Dmitry V. Levin
2004-09-01  5:39   ` Alexey I. Froloff

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

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


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