unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* Announce: ezpi python library for writing to public-inbox v2 repos
@ 2020-10-21 21:26 Konstantin Ryabitsev
  0 siblings, 0 replies; only message in thread
From: Konstantin Ryabitsev @ 2020-10-21 21:26 UTC (permalink / raw)
  To: meta; +Cc: ~monsieuricon/public-inbox

Hello:

I am writing a tool that would provide an "audit feed" of all pushes 
performed to git.kernel.org, so I needed a way to write to public-inbox 
v2 format repositories from Python. I figured this may be useful as a 
standalone library, so I published it as "ezpi":

https://pypi.org/project/ezpi/

For a quick summary:

  from email.message import EmailMessage
  from ezpi import add_rfc822

  msg = EmailMessage()
  msg.set_content('Hello world!')
  # We must have a Subject: and From: headers at least, in order
  # to make a useful git commit with that data
  msg['Subject'] = 'My excellent subject'
  msg['From'] = 'E.X. Ample <example@example.com'>
  # We won't create the repo for you, so run "git init --bare" first
  add_rfc822('example.git', msg)

It may perhaps be useful to others.

Best regards,
-K

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-21 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 21:26 Announce: ezpi python library for writing to public-inbox v2 repos Konstantin Ryabitsev

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


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