From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: meta@public-inbox.org
Cc: ~monsieuricon/public-inbox@lists.sr.ht
Subject: Announce: ezpi python library for writing to public-inbox v2 repos
Date: Wed, 21 Oct 2020 17:26:02 -0400 [thread overview]
Message-ID: <20201021212602.fuiri67eaaw63usn@chatter.i7.local> (raw)
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
reply other threads:[~2020-10-21 21:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201021212602.fuiri67eaaw63usn@chatter.i7.local \
--to=konstantin@linuxfoundation.org \
--cc=meta@public-inbox.org \
--cc=~monsieuricon/public-inbox@lists.sr.ht \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).