From 5aab49f319679cf7912f1abf4914272e5112e247 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 29 Dec 2023 18:05:14 +0000 Subject: lei: support reading MH for convert+import+index The MH format is widely-supported and used by various MUAs such as mutt and sylpheed, and a MH-like format is used by mlmmj for archives, as well. Locking implementations for writes are inconsistent, so this commit doesn't support writes, yet. inotify|EVFILT_VNODE watches aren't supported, yet, but that'll have to come since MH allows packing unused integers and renaming files. --- lib/PublicInbox/LeiConvert.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/PublicInbox/LeiConvert.pm') diff --git a/lib/PublicInbox/LeiConvert.pm b/lib/PublicInbox/LeiConvert.pm index 8f628562..17a952f2 100644 --- a/lib/PublicInbox/LeiConvert.pm +++ b/lib/PublicInbox/LeiConvert.pm @@ -28,6 +28,11 @@ sub input_maildir_cb { $self->{wcb}->(undef, { kw => $kw }, $eml); } +sub input_mh_cb { + my ($dn, $bn, $kw, $eml, $self) = @_; + $self->{wcb}->(undef, { kw => $kw }, $eml); +} + sub process_inputs { # via wq_do my ($self) = @_; local $PublicInbox::DS::in_loop = 0; # force synchronous awaitpid -- cgit v1.2.3-24-ge0c7