Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"In matrimony, to hesitate is sometimes to be saved." -- Butler


devel / comp.unix.shell / Re: Redirect output from less to text editor

SubjectAuthor
* Redirect output from less to text editorOttavio Caruso
+- Re: Redirect output from less to text editorSpiros Bousbouras
+* Re: Redirect output from less to text editorChris Elvidge
|`* Re: Redirect output from less to text editorOttavio Caruso
| `- Re: Redirect output from less to text editorJanis Papanagnou
+- Re: Redirect output from less to text editorEli the Bearded
+- Re: Redirect output from less to text editorKeith Thompson
`* Re: Redirect output from less to text editorJavier
 +- Re: Redirect output from less to text editorJavier
 `- Re: Redirect output from less to text editorOttavio Caruso

1
Redirect output from less to text editor

<t3rqq6$jfo$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5257&group=comp.unix.shell#5257

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ottavio2...@yahoo.com (Ottavio Caruso)
Newsgroups: comp.unix.shell
Subject: Redirect output from less to text editor
Date: Thu, 21 Apr 2022 15:47:32 +0100
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <t3rqq6$jfo$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 21 Apr 2022 14:47:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="1848d520a6d8dd6c3d4e364c7d59fc1f";
logging-data="19960"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0aiQXQcgfpgno2NJh790fqCvBuxZxssQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.0.3
Cancel-Lock: sha1:jwmJ/UNCPXIFwfcKoj+7v13BN7s=
X-No-Archive: yes
Content-Language: en-GB
 by: Ottavio Caruso - Thu, 21 Apr 2022 14:47 UTC

I can view a simplified version of a pdf file with less:

$ less file.pdf

If I press "v" an editor will open but it will show all the pdf garbage.

I would like to redirect the formatted output from less to a text
editor, for example xed or pluma.

1)Is there a more elegant way than:

$ less file.pdf > /tmp/file.txt && xed /tmp/file.txt

?

and 2)

Any way to clean up unprintable characters before sending them to xed?

--
Ottavio Caruso

Re: Redirect output from less to text editor

<+8PnwmgLNAhJ5TebO@bongo-ra.co>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5258&group=comp.unix.shell#5258

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: Redirect output from less to text editor
Date: Thu, 21 Apr 2022 15:07:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <+8PnwmgLNAhJ5TebO@bongo-ra.co>
References: <t3rqq6$jfo$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 21 Apr 2022 15:07:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c946aed392b0f4002cf40af06a3ccb49";
logging-data="29932"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18s9EpaTsaYL096bje4k0nE"
Cancel-Lock: sha1:LALKFbM4Y7QG61hpRJH3yMxzRVQ=
In-Reply-To: <t3rqq6$jfo$1@dont-email.me>
X-Organisation: Weyland-Yutani
X-Server-Commands: nowebcancel
 by: Spiros Bousbouras - Thu, 21 Apr 2022 15:07 UTC

On Thu, 21 Apr 2022 15:47:32 +0100
Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> wrote:
> I can view a simplified version of a pdf file with less:
>
> $ less file.pdf
>
> If I press "v" an editor will open but it will show all the pdf garbage.
>
> I would like to redirect the formatted output from less to a text
> editor, for example xed or pluma.
>
> 1)Is there a more elegant way than:
>
>
> $ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
>
> ?

If the editors in question support an option to read from stdin then you can
use that through a pipe. Othherwise I can't think of anything. Beyond that ,
I don't think that less really does any formatting , it just wraps lines
and perhaps a bit more. A decent text editor should be able to do this on its
own so I'm not clear why you want to involve less .Note that there is also
the fmt utility to wrap lines.

> and 2)
>
> Any way to clean up unprintable characters before sending them to xed?

As long as you have a clear idea what the unprintable characters are , then
you can use sed .For example
sed -e 's/\o000//g' -e 's/\o001//g' file.pdf

will omit octets with value 0 or 1. I think the \o000 syntax is GNU
specific.

--
vlaho.ninja/prog

Re: Redirect output from less to text editor

<t3s2i7$nik$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5261&group=comp.unix.shell#5261

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: comp.unix.shell
Subject: Re: Redirect output from less to text editor
Date: Thu, 21 Apr 2022 17:59:33 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <t3s2i7$nik$1@dont-email.me>
References: <t3rqq6$jfo$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 21 Apr 2022 16:59:52 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="912cfb6521134bade0ea2e4b83e5ef2c";
logging-data="24148"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Us5sB0AfDDnPLvRFNUJDhRG0FJEb6toE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:psPFulkCg4+T337842k+XNxCOuc=
In-Reply-To: <t3rqq6$jfo$1@dont-email.me>
Content-Language: en-GB
 by: Chris Elvidge - Thu, 21 Apr 2022 16:59 UTC

On 21/04/2022 15:47, Ottavio Caruso wrote:
> I can view a simplified version of a pdf file with less:
>
> $ less file.pdf
>
> If I press "v" an editor will open but it will show all the pdf garbage.
>
> I would like to redirect the formatted output from less to a text
> editor, for example xed or pluma.
>
> 1)Is there a more elegant way than:
>
>
> $ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
>
> ?
>
> and 2)
>
> Any way to clean up unprintable characters before sending them to xed?
>

without using less : pdftotext?

--
Chris Elvidge
England

Re: Redirect output from less to text editor

<eli$2204211350@qaz.wtf>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5262&group=comp.unix.shell#5262

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.unix.shell
Subject: Re: Redirect output from less to text editor
Date: Thu, 21 Apr 2022 17:55:05 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2204211350@qaz.wtf>
References: <t3rqq6$jfo$1@dont-email.me>
Injection-Date: Thu, 21 Apr 2022 17:55:05 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="1795"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Thu, 21 Apr 2022 17:55 UTC

In comp.unix.shell, Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> wrote:
> I can view a simplified version of a pdf file with less:
>
> $ less file.pdf
>
> If I press "v" an editor will open but it will
> show all the pdf garbage.

pdftotext is the typical tool for turning a PDF into text (but it
doesn't OCR images, so it's not always an ideal tool). It sounds like
you are getting a 'strings' like output from less. That's probably less
useful, unless you really do want the comments in the PDF.

Elijah
------
"views" binary files in vim sometimes

Re: Redirect output from less to text editor

<87tuamcntr.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5263&group=comp.unix.shell#5263

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: Redirect output from less to text editor
Date: Thu, 21 Apr 2022 11:07:28 -0700
Organization: None to speak of
Lines: 30
Message-ID: <87tuamcntr.fsf@nosuchdomain.example.com>
References: <t3rqq6$jfo$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="b2543598fb29db122071009eef06e5da";
logging-data="25020"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++LfI2QJkFtUlbOoS5OaS3"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:JU27MlxfT0FLd9s9+KlNl3LlV4U=
sha1:akvqVcTgDvri1D2lpXlL6UN7fc4=
 by: Keith Thompson - Thu, 21 Apr 2022 18:07 UTC

Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> writes:
> I can view a simplified version of a pdf file with less:
>
> $ less file.pdf

If that works (it doesn't for me) then you probably have less configured
to use an input preprocessor via $LESSOPEN. "man less" for details.

> If I press "v" an editor will open but it will show all the pdf garbage.
>
> I would like to redirect the formatted output from less to a text
> editor, for example xed or pluma.
>
> 1)Is there a more elegant way than:
>
>
> $ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
>
> ?
>
> and 2)
>
> Any way to clean up unprintable characters before sending them to xed?

You can probably use the same filter used by LESSOPEN.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: Redirect output from less to text editor

<nsGdnWJM66wDYfz_nZ2dnUU7-anNnZ2d@brightview.co.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5264&group=comp.unix.shell#5264

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 21 Apr 2022 19:53:50 -0500
From: inva...@invalid.invalid (Javier)
Subject: Re: Redirect output from less to text editor
Newsgroups: comp.unix.shell
References: <t3rqq6$jfo$1@dont-email.me>
Message-ID: <nsGdnWJM66wDYfz_nZ2dnUU7-anNnZ2d@brightview.co.uk>
Date: Thu, 21 Apr 2022 19:53:50 -0500
Lines: 36
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-baIWH8/4JQKWsLrqknOCCzuxbKUYKK5KTdLvCDvPCMPhumbZHhWtaE9nx6oznT94IoMxFQNA6QVU9T2!B0doBCS/HOx/npvSuwNG9JzS2KZW1F34am7xsX6b5gBzY9wX7VHP9ZMt8i2dlZEfyTdMFkrB61Gp!BFrqnGycmIs4y6VEcAb36ASiEc0=
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1913
 by: Javier - Fri, 22 Apr 2022 00:53 UTC

Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> wrote:
> I can view a simplified version of a pdf file with less:
>
> $ less file.pdf
>
> If I press "v" an editor will open but it will show all the pdf garbage.
>
> I would like to redirect the formatted output from less to a text
> editor, for example xed or pluma.
>
> 1)Is there a more elegant way than:
>
> $ less file.pdf > /tmp/file.txt && xed /tmp/file.txt

There is vipe from the moreutils package to edit/view in an external
program the content of stdout inside a pipeline.

https://joeyh.name/code/moreutils/

$ less file.pdf | EDITOR=xed vipe

> and 2)
>
> Any way to clean up unprintable characters before sending them to xed?

For that you have GNU strings.

$ less file.pdf | strings | EDITOR=xed vipe

But being pdf files I would rather use dedicated tools like pdftotext
from poppler or pdf2txt from pdfminer

http://www.unixuser.org/~euske/python/pdfminer/

lesspipe.sh (as Keith Thompson suggested to look at) uses pdftotext for
pdf files.

Re: Redirect output from less to text editor

<UsWdnWmzkNCLmf__nZ2dnUU7-UXNnZ2d@brightview.co.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5266&group=comp.unix.shell#5266

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 21 Apr 2022 20:25:42 -0500
From: inva...@invalid.invalid (Javier)
Subject: Re: Redirect output from less to text editor
Newsgroups: comp.unix.shell
References: <t3rqq6$jfo$1@dont-email.me> <nsGdnWJM66wDYfz_nZ2dnUU7-anNnZ2d@brightview.co.uk>
Message-ID: <UsWdnWmzkNCLmf__nZ2dnUU7-UXNnZ2d@brightview.co.uk>
Date: Thu, 21 Apr 2022 20:25:42 -0500
Lines: 7
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-mnABeBfFbMM0bPnTRfB2zcwXmEE80bQT0NyPt8+xPaH7yXw9sniKc85s+O57XZr1NnByE0BP3MOM4yI!TQ1O6e8/AWi24Ul02K28aW3O13Y/XPTFDbA/GitT+SAc8C1gsQhTjoPGhkBbz9MrrTjmKzjdomlD!MrkEzNByICDEjHqLO+IC4E5PQHQ=
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1145
 by: Javier - Fri, 22 Apr 2022 01:25 UTC

Javier <invalid@invalid.invalid> wrote:
> or pdf2txt from pdfminer
>
> http://www.unixuser.org/~euske/python/pdfminer/

Unfortunately pdf2txt is extremely hard to make it work inside a
pipeline as it asks for seekable output.

Re: Redirect output from less to text editor

<t3tu1o$dr2$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5268&group=comp.unix.shell#5268

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ottavio2...@yahoo.com (Ottavio Caruso)
Newsgroups: comp.unix.shell
Subject: Re: Redirect output from less to text editor
Date: Fri, 22 Apr 2022 10:55:04 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <t3tu1o$dr2$1@dont-email.me>
References: <t3rqq6$jfo$1@dont-email.me> <t3s2i7$nik$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Apr 2022 09:55:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="63b7eca8c70b276be07bdb2398e703c4";
logging-data="14178"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BvMEDK11b3NldOOy9FL5mHDpth3Cqp28="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.0.3
Cancel-Lock: sha1:WhcLuHmcpVk2+xxMK5Bdht6vMvk=
X-No-Archive: yes
In-Reply-To: <t3s2i7$nik$1@dont-email.me>
Content-Language: en-GB
 by: Ottavio Caruso - Fri, 22 Apr 2022 09:55 UTC

On 21/04/2022 17:59, Chris Elvidge wrote:
> On 21/04/2022 15:47, Ottavio Caruso wrote:
>> I can view a simplified version of a pdf file with less:
>>
>> $ less file.pdf
>>
>> If I press "v" an editor will open but it will show all the pdf garbage.
>>
>> I would like to redirect the formatted output from less to a text
>> editor, for example xed or pluma.
>>
>> 1)Is there a more elegant way than:
>>
>>
>> $ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
>>
>> ?
>>
>> and 2)
>>
>> Any way to clean up unprintable characters before sending them to xed?
>>
>
> without using less : pdftotext?
>

pdftotext is horrible. It doesn't remove odd characters and messes up
with formatting.

--
Ottavio Caruso

Re: Redirect output from less to text editor

<t3tu9l$gpv$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5269&group=comp.unix.shell#5269

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ottavio2...@yahoo.com (Ottavio Caruso)
Newsgroups: comp.unix.shell
Subject: Re: Redirect output from less to text editor
Date: Fri, 22 Apr 2022 10:59:16 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <t3tu9l$gpv$1@dont-email.me>
References: <t3rqq6$jfo$1@dont-email.me>
<nsGdnWJM66wDYfz_nZ2dnUU7-anNnZ2d@brightview.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Apr 2022 09:59:17 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="63b7eca8c70b276be07bdb2398e703c4";
logging-data="17215"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18aGCh2hDKiA2yHXJV7t4qKuSwxPiXO6hI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.0.3
Cancel-Lock: sha1:2ieMdq37If9xGUcrOvMPwIJxUQ0=
X-No-Archive: yes
In-Reply-To: <nsGdnWJM66wDYfz_nZ2dnUU7-anNnZ2d@brightview.co.uk>
Content-Language: en-GB
 by: Ottavio Caruso - Fri, 22 Apr 2022 09:59 UTC

On 22/04/2022 01:53, Javier wrote:
> Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> wrote:
>> I can view a simplified version of a pdf file with less:
>>
>> $ less file.pdf
>>
>> If I press "v" an editor will open but it will show all the pdf garbage.
>>
>> I would like to redirect the formatted output from less to a text
>> editor, for example xed or pluma.
>>
>> 1)Is there a more elegant way than:
>>
>> $ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
>
> There is vipe from the moreutils package to edit/view in an external
> program the content of stdout inside a pipeline.
>
> https://joeyh.name/code/moreutils/
>
> $ less file.pdf | EDITOR=xed vipe
>
>> and 2)
>>
>> Any way to clean up unprintable characters before sending them to xed?
>
> For that you have GNU strings.
>
> $ less file.pdf | strings | EDITOR=xed vipe
>

Fantastic. This one does the job. Thanks!

--
Ottavio Caruso

Re: Redirect output from less to text editor

<t3u7gi$q5q$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5272&group=comp.unix.shell#5272

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Redirect output from less to text editor
Date: Fri, 22 Apr 2022 14:36:34 +0200
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <t3u7gi$q5q$1@dont-email.me>
References: <t3rqq6$jfo$1@dont-email.me> <t3s2i7$nik$1@dont-email.me>
<t3tu1o$dr2$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Apr 2022 12:36:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c7708e91380f139b7d81cd5bd7b6e2ad";
logging-data="26810"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zz5nI0NXhUlnedSBPSXFG"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:IEJBK9ognZiZo932xpyBWJxmWg8=
In-Reply-To: <t3tu1o$dr2$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Fri, 22 Apr 2022 12:36 UTC

On 22.04.2022 11:55, Ottavio Caruso wrote:
> On 21/04/2022 17:59, Chris Elvidge wrote:
>> On 21/04/2022 15:47, Ottavio Caruso wrote:
>>> I can view a simplified version of a pdf file with less:
>>>
>>> $ less file.pdf
>>>
>>> If I press "v" an editor will open but it will show all the pdf garbage.
>>>
>>> I would like to redirect the formatted output from less to a text
>>> editor, for example xed or pluma.
>>>
>>> 1)Is there a more elegant way than:
>>>
>>>
>>> $ less file.pdf > /tmp/file.txt && xed /tmp/file.txt
>>>
>>> ?
>>>
>>> and 2)
>>>
>>> Any way to clean up unprintable characters before sending them to xed?
>>>
>>
>> without using less : pdftotext?
>>
>
> pdftotext is horrible. It doesn't remove odd characters and messes up
> with formatting.
>

Interesting. - I just tried it on a letter written in German and one
written in Greek - with certainly a lot of "odd" characters (from an
ASCII point of view) -; both perfectly readable. - I'm curious what
the characters are that mess up the formatting in your environment.

Janis

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor