ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Alexey I. Froloff" <raorn@immo.ru>
To: ALT Devel discussion list <devel@altlinux.ru>
Subject: [devel] ALT Linux Team
Date: Wed, 1 Sep 2004 01:10:48 +0400
Message-ID: <20040831211048.GA3702@hell.devel.altlinux.ru> (raw)


[-- 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 --]

             reply	other threads:[~2004-08-31 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 21:10 Alexey I. Froloff [this message]
2004-08-31 21:39 ` Dmitry V. Levin
2004-09-01  5:39   ` Alexey I. Froloff

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=20040831211048.GA3702@hell.devel.altlinux.ru \
    --to=raorn@immo.ru \
    --cc=devel@altlinux.ru \
    /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 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