From e481880321fecef4978c02a5bb834652d8d77b46 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sun, 10 Mar 2024 21:34:29 +0200 Subject: [PATCH] Various manpage touchups and URL updates Signed-off-by: Manos Pitsidianakis --- debian/control | 6 +- meli/Cargo.toml | 4 +- meli/docs/meli-themes.5 | 108 +++++--- meli/docs/meli.1 | 415 ++++++++++++++++++++++++------- meli/docs/meli.7 | 121 +++++---- meli/docs/meli.conf.5 | 92 ++++--- scripts/make_html_manual_page.py | 6 +- scripts/rfc_to_rs_mdoc.py | 140 +++++++++++ 8 files changed, 665 insertions(+), 227 deletions(-) create mode 100644 scripts/rfc_to_rs_mdoc.py diff --git a/debian/control b/debian/control index 1d76d42a..db3fef2a 100644 --- a/debian/control +++ b/debian/control @@ -5,9 +5,9 @@ Maintainer: Manos Pitsidianakis Build-Depends: debhelper-compat (=13), mandoc (>=1.14.4-1), quilt, libsqlite3-dev Standards-Version: 4.1.4 Rules-Requires-Root: no -Vcs-Git: https://git.meliemail.org/meli/meli.git -Vcs-Browser: https://git.meliemail.org/meli/meli -Homepage: https://meliemail.org +Vcs-Git: https://git.meli-email.org/meli/meli.git +Vcs-Browser: https://git.meli-email.org/meli/meli +Homepage: https://meli-email.org Package: meli Architecture: any diff --git a/meli/Cargo.toml b/meli/Cargo.toml index f2cd2ce7..84b57f48 100644 --- a/meli/Cargo.toml +++ b/meli/Cargo.toml @@ -7,8 +7,8 @@ rust-version = "1.68.2" license = "GPL-3.0-or-later" readme = "README.md" description = "terminal e-mail client" -homepage = "https://meli.delivery" -repository = "https://git.meli.delivery/meli/meli.git" +homepage = "https://meli-email.org" +repository = "https://git.meli-email.org/meli/meli.git" keywords = ["mail", "mua", "maildir", "terminal", "imap"] categories = ["command-line-utilities", "email"] default-run = "meli" diff --git a/meli/docs/meli-themes.5 b/meli/docs/meli-themes.5 index 1799d7a3..8f3bd5be 100644 --- a/meli/docs/meli-themes.5 +++ b/meli/docs/meli-themes.5 @@ -17,7 +17,8 @@ .\" You should have received a copy of the GNU General Public License .\" along with meli. If not, see . .\" -.Dd November 11, 2022 +.\".Dd November 11, 2022 +.Dd March 10, 2024 .Dt MELI-THEMES 5 .Os .Sh NAME @@ -31,15 +32,15 @@ comes with two themes, .Ic dark (default) and .Ic light . -.sp +.Pp Custom themes are defined as lists of key-values in the configuration files: -.Bl -bullet -compact +.Bl -item -compact -offset 2 .It .Pa $XDG_CONFIG_HOME/meli/config.toml .It .Pa $XDG_CONFIG_HOME/meli/themes/*.toml .El -.sp +.Pp The application theme is defined in the configuration as follows: .Bd -literal [terminal] @@ -56,9 +57,9 @@ keys are settings for the .Ic compact mail listing style. A setting contains three fields: fg for foreground color, bg for background color, and attrs for text attribute. -.sp +.Pp .Dl \&"widget.key.label\&" = { fg = \&"Default\&", bg = \&"Default\&", attrs = \&"Default\&" } -.sp +.Pp Each field contains a value, which may be either a color/attribute, a link (key name) or a valid alias. An alias is a string starting with the \&"\&$\&" character and must be declared in advance in the .Ic color_aliases @@ -69,10 +70,14 @@ An alias' value can be any valid value, including links and other aliases, as lo In the case of a link the setting's real value depends on the value of the referred key. This allows for defaults within a group of associated values. Cyclic references in a theme results in an error: -.sp +.Pp .Dl spooky theme contains a cycle: fg: mail.listing.compact.even -> mail.listing.compact.highlighted -> mail.listing.compact.odd -> mail.listing.compact.even .Pp -Two themes are included by default, `light` and `dark`. +Two themes are included by default, +.Ql light +and +.Ql dark Ns +\&. .Sh EXAMPLES Specific settings from already defined themes can be overwritten: .Bd -literal @@ -100,18 +105,18 @@ Custom themes can be included in your configuration files or be saved independen .Pa $XDG_CONFIG_HOME/meli/themes/ directory as TOML files. To start creating a theme right away, you can begin by editing the default theme keys and values: -.sp +.Pp .Dl meli print-default-theme > ~/.config/meli/themes/new_theme.toml -.sp +.Pp .Pa new_theme.toml will now include all keys and values of the "dark" theme. -.sp +.Pp .Dl meli print-loaded-themes -.sp +.Pp will print all loaded themes with the links resolved. .Sh VALID ATTRIBUTE VALUES Case-sensitive. -.Bl -bullet -compact +.Bl -dash -compact .It "Default" .It @@ -133,7 +138,7 @@ Any combo of the above separated by a bitwise XOR "\&|" eg "Dim | Italics" .El .Sh VALID COLOR VALUES Color values are of type String with the following valid contents: -.Bl -bullet -compact +.Bl -dash -compact .It "Default" is the terminal default. (Case-sensitive) .It @@ -146,8 +151,10 @@ Three character shorthand is also valid, e.g. #09c → #0099cc (Case-insensitive name but with some modifications (for a full table see COLOR NAMES addendum) (Case-sensitive) .El .Sh NO COLOR -To completely disable ANSI colors, there are two options: -.Bl -bullet -compact +To completely disable +.Tn ANSI +colors, there are two options: +.Bl -dash -compact .It Set the .Ic use_color @@ -157,17 +164,22 @@ option (section .It The .Ev NO_COLOR -environmental variable, when present (regardless of its value), prevents the addition of ANSI color. +environmental variable, when present (regardless of its value), prevents the addition of +.Tn ANSI +color. When the configuration value .Ic use_color is explicitly set to true by the user, .Ev NO_COLOR is ignored. .El -.sp -In this mode, cursor locations (i.e., currently selected entries/items) will use the "reverse video" ANSI attribute to invert the terminal's default foreground/background colors. +.Pp +In this mode, cursor locations (i.e., currently selected entries/items) will use the +.Ql reverse video +.Tn ANSI +attribute to invert the terminal's default foreground/background colors. .Sh VALID KEYS -.Bl -bullet -compact +.Bl -dash -compact .It theme_default .It @@ -312,7 +324,7 @@ pager.highlight_search_current allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da Aqua:14:_:Black:0 Aquamarine1:122:_:Maroon:1 Aquamarine2:86:_:Green:2 @@ -348,7 +360,7 @@ DarkMagenta1:91:_:SpringGreen6:29 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da DarkOliveGreen1:192:_:Turquoise4:30 DarkOliveGreen2:155:_:DeepSkyBlue3:31 DarkOliveGreen3:191:_:DeepSkyBlue4:32 @@ -384,7 +396,7 @@ DeepPink4:125:_:Grey37:59 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da DeepPink6:162:_:MediumPurple6:60 DeepPink7:89:_:SlateBlue2:61 DeepPink8:53:_:SlateBlue3:62 @@ -420,7 +432,7 @@ Grey19:236:_:DeepPink7:89 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da Grey23:237:_:DarkMagenta:90 Grey27:238:_:DarkMagenta1:91 Grey3:232:_:DarkViolet1:92 @@ -456,7 +468,7 @@ HotPink2:169:_:LightGreen:119 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da HotPink3:132:_:LightGreen1:120 HotPink4:168:_:PaleGreen1:121 IndianRed:131:_:Aquamarine1:122 @@ -492,7 +504,7 @@ LightSlateGrey:103:_:DarkOliveGreen6:149 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da LightSteelBlue:147:_:DarkSeaGreen6:150 LightSteelBlue1:189:_:DarkSeaGreen3:151 LightSteelBlue3:146:_:LightCyan3:152 @@ -528,7 +540,7 @@ NavajoWhite3:144:_:LightGoldenrod3:179 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da Navy:4:_:Tan:180 NavyBlue:17:_:MistyRose3:181 Olive:3:_:Thistle3:182 @@ -564,7 +576,7 @@ Purple5:55:_:Salmon1:209 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da Red:9:_:LightCoral:210 Red1:196:_:PaleVioletRed1:211 Red2:124:_:Orchid2:212 @@ -600,7 +612,7 @@ Tan:180:_:Grey30:239 allbox tab(:); lb|lb|l|lb|lb l l|l|l l. -name ↓:byte:_:name:byte ↓ +name \(da:byte:_:name:byte \(da Teal:6:_:Grey35:240 Thistle1:225:_:Grey39:241 Thistle3:182:_:Grey42:242 @@ -621,16 +633,34 @@ Yellow6:148:_:Grey93:255 .Sh SEE ALSO .Xr meli 1 , .Xr meli.conf 5 -.Sh CONFORMING TO -TOML Standard v.0.5.0 -.Lk https://toml.io/en/v0.5.0 -.sp -.Lk https://no-color.org/ +.Sh STANDARDS +.Bl -item -compact +.It +.Lk https://toml.io/en/v0.5.0 "TOML Standard v.0.5.0" +.It +.Lk https://no\-color.org/ "NO_COLOR: disabling ANSI color output by default" +.El .Sh AUTHORS -Copyright 2017-2019 -.An Manos Pitsidianakis Aq manos@pitsidianak.is +Copyright 2017\(en2024 +.An Manos Pitsidianakis Aq Mt manos@pitsidianak.is +.Pp Released under the GPL, version 3 or greater. This software carries no warranty of any kind. -(See COPYING for full copyright and warranty notices.) -.sp -.Lk https://meli.delivery +.Po +See +.Pa COPYING +for full copyright and warranty notices. +.Pc +.Ss Links +.Bl -item -compact +.It +.Lk https://meli\-email.org "Website" +.It +.Lk https://git.meli\-email.org/meli/meli "Main\ git\ repository\ and\ issue\ tracker" +.It +.Lk https://codeberg.org/meli/meli "Official\ read-only\ git\ mirror\ on\ codeberg.org" +.It +.Lk https://github.com/meli/meli "Official\ read-only\ git\ mirror\ on\ github.com" +.It +.Lk https://crates.io/crates/meli "meli\ crate\ on\ crates.io" +.El diff --git a/meli/docs/meli.1 b/meli/docs/meli.1 index 0937bbf3..e91e392b 100644 --- a/meli/docs/meli.1 +++ b/meli/docs/meli.1 @@ -17,6 +17,10 @@ .\" You should have received a copy of the GNU General Public License .\" along with meli. If not, see . .\" +.de HorizontalRule +.\"\l'\n(.l\(ru1.25' +.sp +.. .de Shortcut .Sm .Aq \\$1 @@ -40,12 +44,13 @@ .Ed .sp .. -.Dd November 11, 2022 +.\".Dd November 11, 2022 +.Dd March 10, 2024 .Dt MELI 1 .Os .Sh NAME .Nm meli -.Nd terminal e-mail client +.Nd terminal e\-mail client .Em μέλι is the Greek word for honey .Sh SYNOPSIS @@ -71,7 +76,7 @@ Test a configuration file for syntax issues or missing options. Print documentation page and exit (Piping to a pager is recommended). .It Cm install-man Op Ar path Install manual pages to the first location provided by -.Ar MANPATH +.Ev MANPATH or .Xr manpath 1 , unless you specify the directory as an argument. @@ -87,8 +92,8 @@ or Prints help information or the help of the given subcommand(s). .It Cm print-app-directories Print all directories that -.Nm Ns - creates and uses. +.Ns Nm +creates and uses. .It Cm print-config-path Print location of configuration file that will be loaded on normal app startup. .It Cm print-default-theme @@ -102,7 +107,7 @@ View mail from input file. .El .Sh DESCRIPTION .Nm -is a terminal mail client aiming for extensive and user-frendly configurability. +is a terminal mail client aiming for extensive and user-friendly configurability. .Bd -literal ^^ .-=-=-=-. ^^ ^^ (`-=-=-=-=-`) ^^ @@ -136,11 +141,28 @@ At any time, you may press for a searchable list of all available actions and shortcuts, along with every possible setting and command that your version supports. .Pp The main visual navigation tool, the left-side sidebar may be toggled with -.ShortcutPeriod ` listing toggle_menu_visibility +.ShortcutPeriod \(ga listing toggle_menu_visibility \&. .Pp Each mailbox may be viewed in 4 modes: -Plain views each mail individually, Threaded shows their thread relationship visually, Conversations collapses each thread of emails into a single entry, Compact shows one row per thread. +.Bl -dash -compact +.It +.Tg index-style-plain +.Em Plain +views each mail individually, +.It +.Tg index-style-threaded +.Em Threaded +shows their thread relationship visually, +.It +.Tg index-style-conversations +.Em Conversations +collapses each thread of e\-mails into a single entry, +.It +.Tg index-style-compact +.Em Compact +shows one row per thread. +.El .Pp If you're using a light color palette in your terminal, you should set .Em theme = "light" @@ -156,6 +178,10 @@ See for a more detailed tutorial on using .Nm Ns \&. +.Sh SHORTCUTS +See +.Xr meli.conf 5 SHORTCUTS +for shortcuts and their default values. .Sh VIEWING MAIL Open attachments by typing their index in the attachments list and then .ShortcutPeriod a envelope_view open_attachment @@ -181,7 +207,7 @@ If the path provided is a directory, the attachment is saved with its filename s If the 0th index is provided, the entire message is saved. If the path provided is a directory, the message is saved as an eml file with its filename set to the messages message-id. .Sh SEARCH -Each e-mail storage backend has a default search method assigned. +Each e\-mail storage backend has a default search method assigned. .Em IMAP uses the SEARCH command, .Em notmuch @@ -230,9 +256,8 @@ alias: .Pc String keywords with spaces must be quoted. Quotes should always be escaped. -.sp -.Sy Important Notice about IMAP/JMAP -.sp +.Ss Important Notice about IMAP/JMAP +.HorizontalRule To prevent downloading all your messages from your IMAP/JMAP server, don't set .Em search_backend to @@ -243,7 +268,8 @@ will relay your queries to the IMAP server. Expect a delay between query and response. Sqlite3 on the contrary at reasonable mailbox sizes should have a non noticeable delay. .Ss QUERY ABNF SYNTAX -.Bl -bullet +.HorizontalRule +.Bl -dash -compact .It .Li query = \&"(\&" query \&")\&" | from | to | cc | bcc | alladdresses | subject | flags | has_attachments | query \&"or\&" query | query \&"and\&" query | not query .It @@ -276,14 +302,20 @@ Sqlite3 on the contrary at reasonable mailbox sizes should have a non noticeable .Sh FLAGS .Nm supports the basic maildir flags: passed, replied, seen, trashed, draft and flagged. -Flags can be searched with the `flags:` prefix in a search query, and can be modified by +Flags can be searched with the +.Ns Ql flags: +prefix in a search query, and can be modified by .Command flag set FLAG and .Command flag unset FLAG .Sh TAGS .Nm supports tagging in notmuch and IMAP/JMAP backends. -Tags can be searched with the `tags:` or `flags:` prefix in a search query, and can be modified by +Tags can be searched with the +.Ns Ql tags: +or +.Ns Ql flags: +prefix in a search query, and can be modified by .Command tag add TAG and .Command tag remove TAG @@ -304,7 +336,8 @@ To reply to a mail, press \&. Both these actions open the mail composer view in a new tab. .Ss Editing text -.Bl -bullet -compact +.HorizontalRule +.Bl -dash -compact .It Edit the header fields by selecting with the arrow keys and pressing .Shortcut Enter general focus_in_text_field @@ -347,12 +380,14 @@ and to resume editing press the command again. .El .Ss Attachments +.HorizontalRule Attachments may be handled with the .Cm add-attachment Ns , .Cm remove-attachment commands (see below). .Ss Sending +.HorizontalRule Finally, pressing .Shortcut s composing send_mail will send your message according to your settings @@ -370,6 +405,7 @@ On complete failure to save your draft or sent message it will be saved in your .Em tmp directory instead and you will be notified of its location. .Ss Drafts +.HorizontalRule To save your draft without sending it, issue .Em COMMAND .Cm close @@ -381,8 +417,7 @@ To open a draft for further editing, select your draft in the mail listing and p .Sh CONTACTS .Nm supports three kinds of contact backends: -.sp -.Bl -enum -compact -offset indent +.Bl -enum -compact .It an internal format that gets saved under .Pa $XDG_DATA_HOME/meli/account_name/addressbook Ns @@ -404,7 +439,7 @@ compatible alias file in the option .sp See .Xr meli.conf 5 ACCOUNTS -for the complete account configuration values. +for the complete account contact configuration values. .Sh MODES .Bl -tag -compact -width 8n .It NORMAL @@ -424,8 +459,9 @@ captures all input as text input, and is exited with .Cm Esc key. .El -.Ss COMMAND Mode +.Sh COMMAND .Ss Mail listing commands +.HorizontalRule .Bl -tag -width 36n .It Cm set Ar plain | threaded | compact | conversations set the way mailboxes are displayed @@ -469,25 +505,26 @@ Import mail from file into given mailbox. .It Cm copyto, moveto Ar MAILBOX_PATH Copy or move to other mailbox. .It Cm copyto, moveto Ar ACCOUNT Ar MAILBOX_PATH -Copy or move to another account's mailbox. +Copy or move to another account's mailbox. .It Cm delete Delete selected threads. .It Cm export-mbox Ar FILEPATH Export selected threads to mboxcl2 file. -.It Cm create-mailbox Ar ACCOUNT Ar MAILBOX_PATH +.It Cm create\-mailbox Ar ACCOUNT Ar MAILBOX_PATH create mailbox with given path. Be careful with backends and separator sensitivity (eg IMAP) -.It Cm subscribe-mailbox Ar ACCOUNT Ar MAILBOX_PATH +.It Cm subscribe\-mailbox Ar ACCOUNT Ar MAILBOX_PATH subscribe to mailbox with given path -.It Cm unsubscribe-mailbox Ar ACCOUNT Ar MAILBOX_PATH +.It Cm unsubscribe\-mailbox Ar ACCOUNT Ar MAILBOX_PATH unsubscribe to mailbox with given path -.It Cm rename-mailbox Ar ACCOUNT Ar MAILBOX_PATH_SRC Ar MAILBOX_PATH_DEST +.It Cm rename\-mailbox Ar ACCOUNT Ar MAILBOX_PATH_SRC Ar MAILBOX_PATH_DEST rename mailbox -.It Cm delete-mailbox Ar ACCOUNT Ar MAILBOX_PATH +.It Cm delete\-mailbox Ar ACCOUNT Ar MAILBOX_PATH deletes mailbox in the mail backend. -This action is unreversible. +This action is irreversible. .El .Ss Mail view commands +.HorizontalRule .Bl -tag -width 36n .It Cm pipe Ar EXECUTABLE Ar ARGS pipe pager contents to binary @@ -501,7 +538,8 @@ unsubscribe automatically from list of viewed envelope open list archive with .Cm xdg-open .El -.Ss composing mail commands +.Ss Composing mail commands +.HorizontalRule .Bl -tag -width 36n .It Cm mailto Ar MAILTO_ADDRESS Opens a composer tab with initial values parsed from the @@ -536,7 +574,8 @@ for PGP configuration. .It Cm save-draft saves a copy of the draft in the Draft folder .El -.Ss generic commands +.Ss Generic commands +.HorizontalRule .Bl -tag -width 36n .It Cm open-in-tab opens envelope view in new tab @@ -560,10 +599,6 @@ Useful if you want to reload some settings without restarting .Nm Ns \&. .El -.Sh SHORTCUTS -See -.Xr meli.conf 5 SHORTCUTS -for shortcuts and their default values. .Sh EXIT STATUS .Nm exits with 0 on a successful run. @@ -581,7 +616,9 @@ Specifies the editor to use .It Ev MELI_CONFIG Override the configuration file .It Ev NO_COLOR -When present (regardless of its value), prevents the addition of ANSI color. +When defined (regardless of its value), prevents the addition of +.Tn ANSI +color. The configuration value .Ic use_color overrides this. @@ -638,75 +675,265 @@ Mailcap entries are searched for in the following files, in this order: .It .Pa /usr/local/etc/mailcap .El +.Sh STANDARDS +.Bl -dash -compact +.It +.Rs +.%B XDG Base Directory Specification +.%O Version 0.8 +.%A Waldo Bastian +.%A Allison Karlitskaya +.%A Lennart Poettering +.%A Johannes Löthberg +.%U https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +.%D May 08, 2021 +.Re +.It +.Rs +.%B maildir +.%A Daniel J. Bernstein +.%U https://cr.yp.to/proto/maildir.html +.%D 1995 +.Re +.It +.Rs +.%B RFC1524 A User Agent Configuration Mechanism For Multimedia Mail Format Information +.%O mailcap file +.%I Legacy +.%D September 01, 1993 +.%A Dr. Nathaniel S. Borenstein +.%U https://datatracker.ietf.org/doc/rfc1524/ +.Re +.It +.Rs +.%B RFC2047 MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text +.%I IETF +.%D November 01, 1996 +.%A Keith Moore +.%U https://datatracker.ietf.org/doc/rfc2047/ +.Re +.It +.Rs +.%B RFC2183 Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field +.%I Legacy +.%D August 01, 1997 +.%A Rens Troost +.%A Steve Dorner +.%A Keith Moore +.%U https://datatracker.ietf.org/doc/rfc2183/ +.Re +.It +.Rs +.%B RFC2369 The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields +.%I Legacy +.%D July 01, 1998 +.%A Joshua D. Baer +.%A Grant Neufeld +.%U https://datatracker.ietf.org/doc/rfc2369/ +.Re +.It +.Rs +.%B RFC2426 vCard MIME Directory Profile +.%O vCard Version 3 +.%I IETF +.%D September 01, 1998 +.%A Frank Dawson +.%A Tim Howes +.%U https://datatracker.ietf.org/doc/rfc2426/ +.Re +.It +.Rs +.%B RFC3156 MIME Security with OpenPGP +.%I IETF +.%D August 01, 2001 +.%A Thomas Roessler +.%A Michael Elkins +.%A Raph Levien +.%A Dave Del Torto +.%U https://datatracker.ietf.org/doc/rfc3156/ +.Re +.It +.Rs +.%B RFC3461 Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs) +.%I IETF +.%D January 23, 2003 +.%A Keith Moore +.%U https://datatracker.ietf.org/doc/rfc3461/ +.Re +.It +.Rs +.%B RFC3501 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 +.%I IETF +.%D March 18, 2003 +.%A Mark Crispin +.%U https://datatracker.ietf.org/doc/rfc3501/ +.Re +.It +.Rs +.%B RFC3676 The Text/Plain Format and DelSp Parameters +.%I IETF +.%D February 19, 2004 +.%A Randall Gellens +.%U https://datatracker.ietf.org/doc/rfc3676/ +.Re +.It +.Rs +.%B RFC3691 Internet Message Access Protocol (IMAP) UNSELECT command +.%I IETF +.%D February 20, 2004 +.%A Alexey Melnikov +.%U https://datatracker.ietf.org/doc/rfc3691/ +.Re +.It +.Rs +.%B RFC3977 Network News Transfer Protocol (NNTP) +.%I IETF +.%D October 26, 2006 +.%A Clive Feather +.%U https://datatracker.ietf.org/doc/rfc3977/ +.Re +.It +.Rs +.%B RFC4549 Synchronization Operations for Disconnected IMAP4 Clients +.%I IETF +.%D June 16, 2006 +.%A Alexey Melnikov +.%U https://datatracker.ietf.org/doc/rfc4549/ +.Re +.It +.Rs +.%B RFC4616 The PLAIN Simple Authentication and Security Layer (SASL) Mechanism +.%I IETF +.%D August 31, 2006 +.%A Kurt Zeilenga +.%U https://datatracker.ietf.org/doc/rfc4616/ +.Re +.It +.Rs +.%B RFC4954 SMTP Service Extension for Authentication +.%I IETF +.%D July 23, 2007 +.%A Rob Siemborski +.%A Alexey Melnikov +.%U https://datatracker.ietf.org/doc/rfc4954/ +.Re +.It +.Rs +.%B RFC5321 Simple Mail Transfer Protocol +.%I IETF +.%D October 01, 2008 +.%A Dr. John C. Klensin +.%U https://datatracker.ietf.org/doc/rfc5321/ +.Re +.It +.Rs +.%B RFC5322 Internet Message Format +.%I IETF +.%D October 01, 2008 +.%A Pete Resnick +.%U https://datatracker.ietf.org/doc/rfc5322/ +.Re +.It +.Rs +.%B RFC6048 Network News Transfer Protocol (NNTP) Additions to LIST Command +.%I IETF +.%D November 22, 2010 +.%A Julien ÉLIE +.%U https://datatracker.ietf.org/doc/rfc6048/ +.Re +.It +.Rs +.%B RFC6152 SMTP Service Extension for 8-bit MIME Transport +.%I IETF +.%D March 07, 2011 +.%A Dave Crocker +.%A Dr. John C. Klensin +.%A Dr. Marshall T. Rose +.%A Ned Freed +.%U https://datatracker.ietf.org/doc/rfc6152/ +.Re +.It +.Rs +.%B RFC6350 vCard Format Specification +.%O vCard Version 4 +.%I IETF +.%D August 31, 2011 +.%A Simon Perreault +.%U https://datatracker.ietf.org/doc/rfc6350/ +.Re +.It +.Rs +.%B RFC6532 Internationalized Email Headers +.%I IETF +.%D February 17, 2012 +.%A Abel Yang +.%A Shawn Steele +.%A Ned Freed +.%U https://datatracker.ietf.org/doc/rfc6532/ +.Re +.It +.Rs +.%B RFC6868 Parameter Value Encoding in iCalendar and vCard +.%I IETF +.%D February 14, 2013 +.%A Cyrus Daboo +.%U https://datatracker.ietf.org/doc/rfc6868/ +.Re +.It +.Rs +.%B RFC7162 IMAP Extensions: Quick Flag Changes Resynchronization (CONDSTORE) and Quick Mailbox Resynchronization (QRESYNC) +.%I IETF +.%D May 23, 2014 +.%A Alexey Melnikov +.%A Dave Cridland +.%U https://datatracker.ietf.org/doc/rfc7162/ +.Re +.It +.Rs +.%B RFC8620 The JSON Meta Application Protocol (JMAP) +.%I IETF +.%D July 18, 2019 +.%A Neil Jenkins +.%A Chris Newman +.%U https://datatracker.ietf.org/doc/rfc8620/ +.Re +.It +.Rs +.%B RFC8621 The JSON Meta Application Protocol (JMAP) for Mail +.%I IETF +.%D August 08, 2019 +.%A Neil Jenkins +.%A Chris Newman +.%U https://datatracker.ietf.org/doc/rfc8621/ +.Re +.El .Sh SEE ALSO .Xr meli.conf 5 , .Xr meli-themes 5 , .Xr meli 7 , .Xr xdg-open 1 , .Xr mailcap 5 -.Sh CONFORMING TO -.Bl -bullet -compact -.It -XDG Standard -.Lk https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html Ns -\&. -.It -mailcap file, RFC 1524: A User Agent Configuration Mechanism For Multimedia Mail Format Information -.It -RFC 5322: Internet Message Format -.It -RFC 6532: Internationalized Email Headers -.It -RFC 2047: MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text -.It -RFC 3676: The Text/Plain Format and DelSp Parameters -.It -RFC 3156: MIME Security with OpenPGP -.It -RFC 2183: Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field -.It -RFC 2369: The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields -.It -.Li maildir -.Lk https://cr.yp.to/proto/maildir.html Ns -\&. -.It -RFC 5321: Simple Mail Transfer Protocol -.It -RFC 3461: Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs) -.It -RFC 4954: SMTP Service Extension for Authentication -.It -RFC 6152: SMTP Service Extension for 8-bit MIME Transport -.It -RFC 4616: The PLAIN Simple Authentication and Security Layer (SASL) Mechanism -.It -RFC 3501: INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1 -.It -RFC 3691: Internet Message Access Protocol (IMAP) UNSELECT command -.It -RFC 4549: Synch Ops for Disconnected IMAP4 Clients -.It -RFC 7162: IMAP Extensions: Quick Flag Changes Resynchronization (CONDSTORE) and Quick Mailbox Resynchronization (QRESYNC) -.It -RFC 8620: The JSON Meta Application Protocol (JMAP) -.It -RFC 8621: The JSON Meta Application Protocol (JMAP) for Mail +.Sh AUTHORS +Copyright 2017\(en2024 +.An Manos Pitsidianakis Aq Mt manos@pitsidianak.is +.Pp +Released under the GPL, version 3 or greater. +This software carries no warranty of any kind. +.Po +See +.Pa COPYING +for full copyright and warranty notices. +.Pc +.Ss Links +.Bl -item -compact .It -RFC 3977: Network News Transfer Protocol (NNTP) +.Lk https://meli\-email.org "Website" .It -RFC 6048: Network News Transfer Protocol (NNTP) Additions to LIST Command +.Lk https://git.meli\-email.org/meli/meli "Main\ git\ repository\ and\ issue\ tracker" .It -vCard Version 3, RFC 2426: vCard MIME Directory Profile +.Lk https://codeberg.org/meli/meli "Official\ read-only\ git\ mirror\ on\ codeberg.org" .It -vCard Version 4, RFC 6350: vCard Format Specification +.Lk https://github.com/meli/meli "Official\ read-only\ git\ mirror\ on\ github.com" .It -RFC 6868 Parameter Value Encoding in iCalendar and vCard +.Lk https://crates.io/crates/meli "meli\ crate\ on\ crates.io" .El -.Sh AUTHORS -Copyright 2017-2022 -.An Manos Pitsidianakis Aq manos@pitsidianak.is -Released under the GPL, version 3 or greater. -This software carries no warranty of any kind (See COPYING for full copyright and warranty notices). -.Pp -.Lk https://meli.delivery diff --git a/meli/docs/meli.7 b/meli/docs/meli.7 index f1de19ec..61511f07 100644 --- a/meli/docs/meli.7 +++ b/meli/docs/meli.7 @@ -40,22 +40,23 @@ .Pc Ns .. .de Command -.Bd -offset 1n -ragged +.Bd -ragged -offset 1n .Cm \\$* .Ed .. -.Dd November 11, 2022 +.\".Dd November 11, 2022 +.Dd March 10, 2024 .Dt MELI 7 .Os .Sh NAME .Nm meli -.Nd Tutorial for the meli terminal e-mail client +.Nd Tutorial for the meli terminal e\-mail client .Sh SYNOPSIS .Nm .Op ... .Sh DESCRIPTION .Nm -is a terminal mail client aiming for extensive and user-frendly configurability. +is a terminal mail client aiming for extensive and user\-friendly configurability. .Bd -literal -offset center ^^ .-=-=-=-. ^^ ^^ (`-=-=-=-=-`) ^^ @@ -158,9 +159,9 @@ key. .It EMBED This is the mode of the embed terminal emulator. To exit an embedded application, issue -.Aq Ctrl-C +.Aq Ctrl\-C to kill it or -.Aq Ctrl-Z +.Aq Ctrl\-Z to stop the program and follow the instructions on .Nm to exit. @@ -229,7 +230,7 @@ This is the view you will spend more time with in \&. .Pp Press -.Shortcut ` listing toggle_menu_visibility +.Shortcut \(ga listing toggle_menu_visibility to toggle the sidebars visibility. .Pp Press @@ -237,16 +238,16 @@ Press to switch focus on the sidebar menu. Press .Shortcut Right listing focus_left -to switch focus on the e-mail list. +to switch focus on the e\-mail list. .Pp -On the e-mail list, press +On the e\-mail list, press .Shortcut k listing scroll_up to scroll up, and .Shortcut j listing scroll_down to scroll down. Press .Shortcut Enter listing open_entry -to open an e-mail entry and +to open an e\-mail entry and .Shortcut i listing exit_entry to exit it. .Bd -ragged @@ -294,9 +295,9 @@ See for details. .Pp You can increase the sidebar's width with -.Shortcut Ctrl-p listing increase_sidebar +.Shortcut Ctrl\-p listing increase_sidebar and decrease with -.ShortcutPeriod Ctrl-o listing decrease_sidebar +.ShortcutPeriod Ctrl\-o listing decrease_sidebar \&. .Bd -ragged .Sy The status bar. @@ -310,7 +311,7 @@ and decrease with The status bar shows which mode you are, and the status message of the current view. In the pictured example, it shows the status of a mailbox called .Dq Inbox -with lots of e-mails. +with lots of e\-mails. .Bd -ragged .Sy The number modifier buffer. .Ed @@ -330,7 +331,7 @@ entries. Another use of the number buffer is opening URLs inside the pager. See .Sx PAGER -for an explanation of interacting with URLs in e-mails. +for an explanation of interacting with URLs in e\-mails. .Pp Pressing numbers in .Sy NORMAL @@ -343,16 +344,16 @@ There are four different list styles: .Bl -hyphen -compact .It .Qq plain -which shows one line per e-mail. +which shows one line per e\-mail. .It .Qq threaded which shows a threaded view with drawn tree structure. .It .Qq compact -which shows one line per thread which can include multiple e-mails. +which shows one line per thread which can include multiple e\-mails. .It .Qq conversations -which shows more than one line per thread which can include multiple e-mails with more details about the thread. +which shows more than one line per thread which can include multiple e\-mails with more details about the thread. .El .Bd -ragged .Sy Plain view\&. @@ -421,13 +422,13 @@ Simple set operations can be performed on a selection with these shortcut modifi .Bl -hyphen -compact .It Union modifier: -.Shortcut Ctrl-u listing union_modifier +.Shortcut Ctrl\-u listing union_modifier .It Difference modifier: -.Shortcut Ctrl-d listing diff_modifier +.Shortcut Ctrl\-d listing diff_modifier .It Intersection modifier: -.Shortcut Ctrl-i listing intersection_modifier +.Shortcut Ctrl\-i listing intersection_modifier .El .Pp To set an entry as @@ -445,11 +446,11 @@ which also has its complement .sp action. .Pp -For e-mail backends that support flags you can use the following commands on entries and selections to modify them: +For e\-mail backends that support flags you can use the following commands on entries and selections to modify them: .Command flag set FLAG .Command flag unset FLAG .Pp -For e-mail backends that support tags +For e\-mail backends that support tags .Po like .Qq IMAP @@ -471,9 +472,9 @@ You can clear the selection with the .Aq Esc key. .Sh PAGER -You can open an e-mail entry by pressing +You can open an e\-mail entry by pressing .ShortcutPeriod Enter listing open_entry -\&. This brings up the e-mail view with the e-mail content inside a pager. +\&. This brings up the e\-mail view with the e\-mail content inside a pager. .Bd -literal -offset center ┌────────────────────────────────────────────────────────────┐ │Date: Sat, 21 May 2022 16:16:11 +0300 ▀│ @@ -501,14 +502,14 @@ You can open an e-mail entry by pressing └────────────────────────────────────────────────────────────┘ .Ed .Bd -ragged -offset 3n -.Em The\ pager\ displaying\ an\ e-mail\&. +.Em The\ pager\ displaying\ an\ e\-mail\&. .Ed .Pp The pager is simple to use. Scroll with the following: .Bl -hang -width 27n .It Go to next pager page -.Shortcut PageDown pager page_down +.Shortcut PageDown pager page_down .It Go to previous pager page .Shortcut PageUp pager page_up .It Scroll down pager. @@ -523,7 +524,7 @@ which will act as a multiplier. .Pp The pager can enter a special .Em url -mode which will prefix all detected hyperlinks and e-mail addresses with a number inside square brackets +mode which will prefix all detected hyperlinks and e\-mail addresses with a number inside square brackets .ShortcutPeriod u pager toggle_url_mode \&. Writing down a chosen number as a number modifier @@ -554,13 +555,13 @@ for more details .Pc Ns \&. .Sh MAIL VIEW -Other things you can do when viewing e-mail: -.Bl -bullet -compact +Other things you can do when viewing e\-mail: +.Bl -dash -compact .It Most importantly, you can exit the mail view with: .Shortcut i listing exit_entry .It -Add addresses from the e-mail headers to contacts: +Add addresses from the e\-mail headers to contacts: .Shortcut c envelope_view add_addresses_to_contacts .It Open an attachment by entering its index as a number modifier and pressing: @@ -576,39 +577,39 @@ Reply to envelope: .Shortcut R envelope_view reply .It Reply to author: -.Shortcut Ctrl-r envelope_view reply_to_author +.Shortcut Ctrl\-r envelope_view reply_to_author .It Reply to all/Reply to list/Follow up: -.Shortcut Ctrl-g envelope_view reply_to_all +.Shortcut Ctrl\-g envelope_view reply_to_all .It -Forward email: -.Shortcut Ctrl-f envelope_view forward +Forward e\-mail: +.Shortcut Ctrl\-f envelope_view forward .It Expand extra headers: (References and others) .Shortcut h envelope_view toggle_expand_headerk .It View envelope source in a pager: (toggles between raw and decoded source) -.Shortcut M-r envelope_view view_raw_source +.Shortcut M\-r envelope_view view_raw_source .It Return to envelope_view if viewing raw source or attachment: .Shortcut r envelope_view return_to_normal_view .El .Sh COMPOSING -To compose an e-mail, you can either start with an empty draft by pressing +To compose an e\-mail, you can either start with an empty draft by pressing .Shortcut m listing new_mail which opens a composer view in a new tab. -To reply to a specific e-mail, when in envelope view you can select the specific action you want to take: +To reply to a specific e\-mail, when in envelope view you can select the specific action you want to take: .sp -.Bl -bullet -compact +.Bl -dash -compact .It Reply to envelope. .Shortcut R envelope_view reply .It Reply to author. -.Shortcut Ctrl-r envelope_view reply_to_author +.Shortcut Ctrl\-r envelope_view reply_to_author .It Reply to all. -.Shortcut Ctrl-g envelope_view reply_to_all +.Shortcut Ctrl\-g envelope_view reply_to_all .El .sp To launch your editor, press @@ -695,25 +696,25 @@ the\ actual\ embedding\ is\ seamless\&. .Ed .Ss composing mail commands .Bl -tag -width 36n -.It Cm add-attachment Ar PATH +.It Cm add\-attachment Ar PATH in composer, add .Ar PATH as an attachment -.It Cm add-attachment < Ar CMD Ar ARGS +.It Cm add\-attachment < Ar CMD Ar ARGS in composer, pipe .Ar CMD Ar ARGS output into an attachment -.It Cm add-attachment-file-picker +.It Cm add\-attachment\-file\-picker Launch command defined in the configuration value .Ic file_picker_command in .Xr meli.conf 5 TERMINAL -.It Cm add-attachment-file-picker < Ar CMD Ar ARGS +.It Cm add\-attachment\-file\-picker < Ar CMD Ar ARGS Launch command .Ar CMD Ar ARGS Ns \&. The command should print file paths in stderr, separated by NULL bytes. -.It Cm remove-attachment Ar INDEX +.It Cm remove\-attachment Ar INDEX remove attachment with given index .It Cm toggle sign toggle between signing and not signing this message. @@ -721,7 +722,7 @@ If the gpg invocation fails then the mail won't be sent. See .Xr meli.conf 5 PGP for PGP configuration. -.It Cm save-draft +.It Cm save\-draft saves a copy of the draft in the Draft folder .El .\" [ref:TODO]: add contacts section @@ -738,12 +739,26 @@ for documentation on how to theme .Xr xdg-open 1 , .Xr mailcap 5 .Sh AUTHORS -Copyright 2017-2022 -.An Manos Pitsidianakis Aq manos@pitsidianak.is +Copyright 2017\(en2024 +.An Manos Pitsidianakis Aq Mt manos@pitsidianak.is +.Pp Released under the GPL, version 3 or greater. This software carries no warranty of any kind. -(See COPYING for full copyright and warranty notices.) -.Pp -.Lk https://meli.delivery -.Lk https://github.com/meli/meli -.Lk https://crates.io/crates/meli +.Po +See +.Pa COPYING +for full copyright and warranty notices. +.Pc +.Ss Links +.Bl -item -compact +.It +.Lk https://meli\-email.org "Website" +.It +.Lk https://git.meli\-email.org/meli/meli "Main\ git\ repository\ and\ issue\ tracker" +.It +.Lk https://codeberg.org/meli/meli "Official\ read-only\ git\ mirror\ on\ codeberg.org" +.It +.Lk https://github.com/meli/meli "Official\ read-only\ git\ mirror\ on\ github.com" +.It +.Lk https://crates.io/crates/meli "meli\ crate\ on\ crates.io" +.El diff --git a/meli/docs/meli.conf.5 b/meli/docs/meli.conf.5 index c248169a..019c4d32 100644 --- a/meli/docs/meli.conf.5 +++ b/meli/docs/meli.conf.5 @@ -18,7 +18,7 @@ .\" along with meli. If not, see . .\" .de HorizontalRule -\l'\n(.l/1.25' +.\"\l'\n(.l\(ru1.25' .sp .. .de LiteralStringValue @@ -42,7 +42,8 @@ Rendered as: .Bc .Sm .. -.Dd November 11, 2022 +.\".Dd November 11, 2022 +.Dd March 10, 2024 .Dt MELI.CONF 5 .Os .Sh NAME @@ -69,7 +70,7 @@ is written in .Tn TOML which has a few things to consider (quoting the specification): .sp -.Bl -bullet -compact +.Bl -dash -compact .It .Tn TOML is case sensitive. @@ -119,7 +120,7 @@ include macro: .\" .Sh SECTIONS The top level sections of the configuration are: -.Bl -bullet -compact +.Bl -dash -compact .It accounts .It @@ -240,14 +241,6 @@ When replying to an e-mail addressed to one of these identities, the : header will be adjusted to its value instead of the default identity. .El -.TS -allbox tab(:); -lb l. -conversations:shows one entry per thread -compact:shows one row per thread -threaded:shows threads as a tree structure -plain:shows one row per mail, regardless of threading -.TE .Bl -tag -width 36n .It Ic display_name Ar String .Pq Em optional @@ -502,7 +495,7 @@ to generate and request the appropriate data to perform authentication. .sp Steps: -.Bl -bullet -compact +.Bl -dash -compact .It In .Tn Google API Ns @@ -574,7 +567,7 @@ If the preferred format fails, the message is retried with mboxrd and then if it fails again there is a recover attempt, which discards the invalid message. .sp Valid values -.Bl -bullet -compact +.Bl -dash -compact .It .Ar auto .It @@ -706,7 +699,7 @@ Silently insert updates for this mailbox, if any. .Pq Em optional special usage of this mailbox. Valid values are: -.Bl -bullet -compact +.Bl -dash -compact .It .Ar Normal .Pq Em default @@ -859,7 +852,7 @@ This setting is meant to be disabled for non-standard behaviour in .Pq Em optional The attribution line appears above the quoted reply text. The format specifiers for the replied address are: -.Bl -bullet -compact +.Bl -dash -compact .It .Li %+f — the sender's name and email address. @@ -893,8 +886,10 @@ Alternative lists of reply prefixes (etc. ["Re:", "RE:", ...]) to strip. .It Ic reply_prefix Ar String .Pq Em optional The prefix to use in reply subjects. -The default prefix is "Re:". -.Pq Em `Re:` \" default value +The default prefix is +.Ns Ql Re: Ns +\&. +.Pq Ql Re: \" default value .Pp RFC 2822, "Internet Message Format" has this to say on the matter: .\" @@ -936,7 +931,7 @@ compose-hooks run before submitting an e-mail. They perform draft validation and/or transformations. If a hook encounters an error or warning, it will show up as a notification. The currently available hooks are: -.Bl -bullet -compact +.Bl -dash -compact .It .Ic past-date-warn — Warn if @@ -976,7 +971,7 @@ or draft body mention attachments but they are missing. .Ss Values corresponding to keyboard keys, keycodes Shortcuts can take the following values: .sp -.Bl -bullet -compact +.Bl -dash -compact .It .Em Backspace .It @@ -1214,7 +1209,7 @@ current sorting. .Pq Em C-p \" default value .It Ic toggle_menu_visibility Toggle visibility of side menu in mail list. -.Pq Em ` \" default value +.Pq Em \(ga \" default value .It Ic focus_left Switch focus on the left. .Pq Em Left \" default value @@ -1273,7 +1268,7 @@ Go to previous account. .Pq Em L \" default value .It Ic toggle_menu_visibility Toggle visibility of side menu in mail list. -.Pq Em ` \" default value +.Pq Em \(ga \" default value .El .sp .sp @@ -1529,7 +1524,9 @@ Datetime formatting passed verbatim to .Pq Em \&%Y-\&%m-\&%d \&%T \" default value .It Ic recent_dates Ar Boolean .Pq Em optional -Show recent dates as `X {minutes,hours,days} ago`, up to 7 days. +Show recent dates as +.Ns Ql X {minutes,hours,days} ago +.Ns , up to 7 days. .Pq Em true \" default value .It Ic filter Ar Query .Pq Em optional @@ -1552,6 +1549,14 @@ filter = "not flags:seen" # show only unseen messages .\" .It Ic index_style Ar String Sets the way mailboxes are displayed. +.TS +allbox tab(:); +lb l. +conversations:shows one entry per thread +compact:shows one row per thread +threaded:shows threads as a tree structure +plain:shows one row per mail, regardless of threading +.TE .It Ic sidebar_mailbox_tree_has_sibling Ar String .Pq Em optional Sets the string to print in the mailbox tree for a level where its root has a @@ -1750,7 +1755,7 @@ colors = { signed="#Ff6600", replied="DeepSkyBlue4", draft="#f00", replied="8" } \&... [accounts.dummy.mailboxes] # per mailbox override: - "INBOX" = { tags.ignore_tags=["inbox", ] } + "INBOX" = { tags.ignore_tags=["inbox", ] } .Ed .\" .\" @@ -1815,7 +1820,7 @@ Use comma to separate values. .Pq Em Local,WKD \" default value .Pp Possible mechanisms: -.Bl -bullet -compact +.Bl -dash -compact .It .Em cert .It @@ -1875,7 +1880,9 @@ If true, box drawing will be done with ASCII characters. .Pq Em false \" default value .It Ic use_color Ar boolean .Pq Em optional -If false, no ANSI colors are used. +If false, no +.Tn ANSI +colors are used. .Pq Em true \" default value .It Ic window_title Ar String .Pq Em optional @@ -2021,7 +2028,7 @@ All levels less or equal to the .Ic maximum_level will be appended to the log file. Available levels are, in partial order: -.Bl -bullet -compact +.Bl -dash -compact .It .Em OFF .It @@ -2208,16 +2215,35 @@ RFC3461 .Sh SEE ALSO .Xr meli 1 , .Xr meli-themes 5 -.Sh CONFORMING TO +.Sh STANDARDS +.Bl -item -compact +.It .Tn TOML Standard .Li v.0.5.0 .Lk https://toml.io/en/v0.5.0 +.El .Sh AUTHORS -Copyright 2017-2019 -.An Manos Pitsidianakis Aq manos@pitsidianak.is +Copyright 2017\(en2024 +.An Manos Pitsidianakis Aq Mt manos@pitsidianak.is +.Pp Released under the GPL, version 3 or greater. This software carries no warranty of any kind. -(See COPYING for full copyright and warranty notices.) -.Pp -.Lk https://meli.delivery +.Po +See +.Pa COPYING +for full copyright and warranty notices. +.Pc +.Ss Links +.Bl -item -compact +.It +.Lk https://meli\-email.org "Website" +.It +.Lk https://git.meli\-email.org/meli/meli "Main\ git\ repository\ and\ issue\ tracker" +.It +.Lk https://codeberg.org/meli/meli "Official\ read-only\ git\ mirror\ on\ codeberg.org" +.It +.Lk https://github.com/meli/meli "Official\ read-only\ git\ mirror\ on\ github.com" +.It +.Lk https://crates.io/crates/meli "meli\ crate\ on\ crates.io" +.El diff --git a/scripts/make_html_manual_page.py b/scripts/make_html_manual_page.py index e730d445..52a76aaa 100644 --- a/scripts/make_html_manual_page.py +++ b/scripts/make_html_manual_page.py @@ -131,7 +131,7 @@ class ManFixer(HTMLParser): @functools.cache -def give_me_head(url, url_, name, section): +def give_me_head(url_): o = urlparse(url_) conn = http.client.HTTPSConnection(o.hostname, timeout=6) conn.request(HTTPMethod.HEAD, o.path) @@ -148,7 +148,7 @@ def give_me_head(url, url_, name, section): return None if response.getheader("Location"): # print("for ", url_, "following redirect to ", response.getheader("Location")) - return give_me_head(url, response.getheader("Location"), name, section) + return give_me_head(response.getheader("Location")) print("bailout") return None # print("for ", url_, "code is ", response.status) @@ -342,7 +342,7 @@ if __name__ == "__main__": ) url_ = url.replace("%N", name).replace("%S", section) try: - got = give_me_head(url, url_, name, section) + got = give_me_head(url_, name, section) if got: link["href"] = got found = True diff --git a/scripts/rfc_to_rs_mdoc.py b/scripts/rfc_to_rs_mdoc.py new file mode 100644 index 00000000..3e249b11 --- /dev/null +++ b/scripts/rfc_to_rs_mdoc.py @@ -0,0 +1,140 @@ +# meli - scripts/make_html_manual_page.py +# +# Copyright 2023 Manos Pitsidianakis +# +# This file is part of meli. +# +# meli is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# meli is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with meli. If not, see . + +from urllib.parse import urlparse +import json +from datetime import datetime +import http.client +from http import HTTPMethod, HTTPStatus +import functools + + +@functools.cache +def give_me_get(url_): + o = urlparse(url_) + conn = http.client.HTTPSConnection(o.hostname, timeout=6) + conn.request(HTTPMethod.GET, o.path) + response = conn.getresponse() + if response.status in ( + HTTPStatus.FOUND, + HTTPStatus.TEMPORARY_REDIRECT, + HTTPStatus.PERMANENT_REDIRECT, + HTTPStatus.MOVED_PERMANENTLY, + ): + give_me_get.redirects += 1 + if give_me_get.redirects > 3: + return None + if response.getheader("Location"): + return give_me_get(response.getheader("Location")) + return None + give_me_get.redirects = 0 + if response.status == http.HTTPStatus.OK: + return response.read() + return None + + +give_me_get.redirects = 0 + + +@functools.cache +def give_me_head(url_): + o = urlparse(url_) + conn = http.client.HTTPSConnection(o.hostname, timeout=6) + conn.request(HTTPMethod.HEAD, o.path) + response = conn.getresponse() + if response.status in ( + HTTPStatus.FOUND, + HTTPStatus.TEMPORARY_REDIRECT, + HTTPStatus.PERMANENT_REDIRECT, + HTTPStatus.MOVED_PERMANENTLY, + ): + give_me_head.redirects += 1 + if give_me_head.redirects > 3: + return None + if response.getheader("Location"): + return give_me_head(response.getheader("Location")) + return None + give_me_head.redirects = 0 + if response.status == http.HTTPStatus.OK: + return url_ + return None + + +give_me_head.redirects = 0 + + +def fetch_rfc_json(ident: str) -> str: + url = f"https://datatracker.ietf.org/doc/{ident.lower()}/doc.json" + body = give_me_get(url) + response_dict = json.loads(body) + with open(f"/tmp/rfcs/{ident}.json", "a") as f: + f.write(json.dumps(response_dict)) + url_path = f"/doc/{ident}/" + retval = ".Rs\n" + retval += f".%B {response_dict['name'].upper()} {response_dict['title']}\n" + retval += f".%I {response_dict['stream']}\n" + dateval = datetime.strptime(response_dict["time"].split(" ")[0], "%Y-%m-%d") + for rev in response_dict["rev_history"]: + if rev["name"] != ident: + continue + dateval = datetime.strptime(rev["published"].split("T")[0], "%Y-%m-%d") + if "url" in rev: + url_path = rev["url"] + retval += f".%D {dateval.strftime('%B %d, %Y')}\n" + if "authors" in response_dict: + for author in response_dict["authors"]: + if "name" not in author: + continue + retval += f".%A {author['name']}\n" + doc_url = give_me_head(f"https://datatracker.ietf.org{url_path}") + if doc_url: + retval += f".%U {doc_url}\n" + retval += ".Re" + return retval + + +RFCS = [ + "rfc1524", + "rfc2047", + "rfc2183", + "rfc2369", + "rfc2426", + "rfc3156", + "rfc3461", + "rfc3501", + "rfc3676", + "rfc3691", + "rfc3977", + "rfc4549", + "rfc4616", + "rfc4954", + "rfc5321", + "rfc5322", + "rfc6048", + "rfc6152", + "rfc6350", + "rfc6532", + "rfc6868", + "rfc7162", + "rfc8620", + "rfc8621", +] + +for rfc in RFCS: + print(fetch_rfc_json(rfc))