Skip to content

Commit

Permalink
change html_to_text_cmd to be called with input file path instead of …
Browse files Browse the repository at this point in the history
…reading from stdin
  • Loading branch information
d99kris committed Jun 29, 2024
1 parent 92d761d commit c7d7f8d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ available on the system (in that order), and uses the first found. The exact
command used is one of:
- `pandoc -f html -t plain+literate_haskell --wrap=preserve`
- `w3m -T text/html -I utf-8 -dump`
- `lynx -assume_charset=utf-8 -display_charset=utf-8 -nomargins -dump -stdin`
- `lynx -assume_charset=utf-8 -display_charset=utf-8 -nomargins -dump`
- `elinks -dump-charset utf-8 -dump`

Note that while pandoc generally produces a better text-equivalent to an
Expand Down
2 changes: 1 addition & 1 deletion src/body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void Body::ParseHtml()
const std::string& textHtmlPath = Util::GetTempFilename(".html");
Util::WriteFile(textHtmlPath, partHtml);

const std::string& cmd = "cat " + textHtmlPath + " | " + Util::GetHtmlToTextConvertCmd();
const std::string cmd = Util::GetHtmlToTextConvertCmd() + " " + textHtmlPath;
m_TextHtml = Util::RunCommand(cmd);

Util::DeleteFile(textHtmlPath);
Expand Down
2 changes: 1 addition & 1 deletion src/nmail.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
.TH NMAIL "1" "June 2024" "nmail v4.68" "User Commands"
.TH NMAIL "1" "June 2024" "nmail v4.69" "User Commands"
.SH NAME
nmail \- ncurses mail
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ std::string Util::GetDefaultHtmlToTextConvertCmd()
}
else if (output.find("/lynx") != std::string::npos)
{
result = "lynx -assume_charset=utf-8 -display_charset=utf-8 -nomargins -dump -stdin";
result = "lynx -assume_charset=utf-8 -display_charset=utf-8 -nomargins -dump";
}
else if (output.find("/elinks") != std::string::npos)
{
Expand Down
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "version.h"

#define NMAIL_VERSION "4.68"
#define NMAIL_VERSION "4.69"

std::string Version::GetBuildOs()
{
Expand Down

0 comments on commit c7d7f8d

Please sign in to comment.