• [ANN] MHTview 0.3 (view HTML email w/ inline pics)

    From Dario Niedermann@21:1/5 to All on Sat May 27 23:13:54 2017
    MHTview is a Bash script that allows you to view HTML email messages
    with inline attachments using a browser of your choice. Just pipe the
    whole message into `mhtview'.

    Home page: <https://www.darioniedermann.it/sw/mhtview.php>

    Source also posted to <alt.sources> with
    Message-ID: <slrnoijqks.7j6.dario@darioniedermann.it>

    --
    Dario Niedermann. Also on the Internet at:

    gopher://darioniedermann.it/ <> https://www.darioniedermann.it/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Mon Jun 5 22:24:43 2017
    * Dario Niedermann, 2017-05-27 21:13 UTC:
    MHTview is a Bash script that allows you to view HTML email messages

    I took a quick glance at the code, two remarks:

    The canonical Unix environment variable name for the temporary directory
    is TMPDIR, not TMP.

    Creating temporary file names using `date +%s` creates a race condition.
    Use the mktemp command instead.

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Care about Free Software, support the FSFE https://fsfe.org/support/?erack
    Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dario Niedermann@21:1/5 to Eike Rathke on Wed Jun 7 22:43:30 2017
    Eike Rathke <erack-nutznetz.n@posteo.de> wrote:

    The canonical Unix environment variable name for the temporary
    directory is TMPDIR, not TMP.

    Do you have a source for this? Preferrably with other best-practice
    tips, but not necessarily.

    Creating temporary file names using `date +%s` creates a race
    condition. Use the mktemp command instead.

    I know `mktemp' but I've never researched its portability. If it's
    portable enough, I'll probably switch to that technique.

    --
    Dario Niedermann. Also on the Internet at:

    gopher://darioniedermann.it/ <> https://www.darioniedermann.it/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Wed Jun 7 22:50:43 2017
    * Dario Niedermann, 2017-06-07 20:43 UTC:
    Eike Rathke <erack-nutznetz.n@posteo.de> wrote:
    The canonical Unix environment variable name for the temporary
    directory is TMPDIR, not TMP.

    Do you have a source for this? Preferrably with other best-practice
    tips, but not necessarily.

    See References section of https://en.wikipedia.org/wiki/TMPDIR


    Creating temporary file names using `date +%s` creates a race
    condition. Use the mktemp command instead.

    I know `mktemp' but I've never researched its portability. If it's
    portable enough, I'll probably switch to that technique.

    https://stackoverflow.com/questions/2792675/how-portable-is-mktemp1

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Care about Free Software, support the FSFE https://fsfe.org/support/?erack
    Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dario Niedermann@21:1/5 to Eike Rathke on Thu Jun 8 07:53:22 2017
    Eike Rathke <erack-nutznetz.n@posteo.de> wrote:

    The canonical Unix environment variable name for the temporary
    directory is TMPDIR, not TMP.

    See References section of https://en.wikipedia.org/wiki/TMPDIR

    Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:

    Or the Linux environ(7) manual page.

    Creating temporary file names using `date +%s` creates a race
    condition. Use the mktemp command instead.

    https://stackoverflow.com/questions/2792675/how-portable-is-mktemp1

    Thank you! I'll use TMPDIR and `mktemp' in the next version.

    --
    Dario Niedermann. Also on the Internet at:

    gopher://darioniedermann.it/ <> https://www.darioniedermann.it/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jorgen Grahn@21:1/5 to Eike Rathke on Thu Jun 8 05:23:37 2017
    On Wed, 2017-06-07, Eike Rathke wrote:
    * Dario Niedermann, 2017-06-07 20:43 UTC:
    Eike Rathke <erack-nutznetz.n@posteo.de> wrote:
    The canonical Unix environment variable name for the temporary
    directory is TMPDIR, not TMP.

    Do you have a source for this? Preferrably with other best-practice
    tips, but not necessarily.

    See References section of https://en.wikipedia.org/wiki/TMPDIR

    Or the Linux environ(7) manual page.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)