* Handling binary format of an old word processor @ 2023-07-13 13:10 Trevor Jenkins [not found] ` <6019A3AE-5A17-4857-A428-5B2C5F7AB879-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Trevor Jenkins @ 2023-07-13 13:10 UTC (permalink / raw) To: pandoc-discuss I have a group of files created long ago with a word processor for the BBC Micro. The word processor(WordWide/WordWisePlus), which originated in the late 1980s, saved documents in a sort of binary format in that some 7-bit printable characters have the eighth bit set to indicate that the character was preceded on screen by a carriage return. Other old ASCII control codes such as SI and SO were used for italics (I think). There are also encapsulated Epson dot-matrix setup sequences at the start of the files. Had a few read throughs of the Pandoc/Lua filter documentation but simply cannot get my head around how these documents could be processed using a Lua filter for pandoc to convert what is essentially a stream of 8-bit bytes into a form that can be used to convert to a modern format. Would appreciate some pointers to how to handle this task using pandoc and Lua? Otherwise I will have write some one-off throw away C code that does not help me in using Lua for future tasks. Regards, Trevor. <>< Re: deemed! -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6019A3AE-5A17-4857-A428-5B2C5F7AB879%40gmail.com. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <6019A3AE-5A17-4857-A428-5B2C5F7AB879-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Handling binary format of an old word processor [not found] ` <6019A3AE-5A17-4857-A428-5B2C5F7AB879-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2023-07-13 18:28 ` 'William Lupton' via pandoc-discuss [not found] ` <CAEe_xxgArqRo2zf5+QDvhhT7U3ZLz8gH4me9LXBiN_di2qF2DQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: 'William Lupton' via pandoc-discuss @ 2023-07-13 18:28 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1: Type: text/plain, Size: 2173 bytes --] I think you need to use a custom reader. Here's a link to the appropriate bit of the appropriate page. https://pandoc.org/custom-readers.html#bytestring-readers On Thu, 13 Jul 2023, 14:11 Trevor Jenkins, <bslwannabe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I have a group of files created long ago with a word processor for the BBC > Micro. The word processor(WordWide/WordWisePlus), which originated in the > late 1980s, saved documents in a sort of binary format in that some 7-bit > printable characters have the eighth bit set to indicate that the character > was preceded on screen by a carriage return. Other old ASCII control codes > such as SI and SO were used for italics (I think). There are also > encapsulated Epson dot-matrix setup sequences at the start of the files. > Had a few read throughs of the Pandoc/Lua filter documentation but simply > cannot get my head around how these documents could be processed using a > Lua filter for pandoc to convert what is essentially a stream of 8-bit > bytes into a form that can be used to convert to a modern format. > > Would appreciate some pointers to how to handle this task using pandoc and > Lua? Otherwise I will have write some one-off throw away C code that does > not help me in using Lua for future tasks. > > Regards, Trevor. > > <>< Re: deemed! > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/6019A3AE-5A17-4857-A428-5B2C5F7AB879%40gmail.com > . > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxgArqRo2zf5%2BQDvhhT7U3ZLz8gH4me9LXBiN_di2qF2DQ%40mail.gmail.com. [-- Attachment #2: Type: text/html, Size: 3111 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CAEe_xxgArqRo2zf5+QDvhhT7U3ZLz8gH4me9LXBiN_di2qF2DQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Handling binary format of an old word processor [not found] ` <CAEe_xxgArqRo2zf5+QDvhhT7U3ZLz8gH4me9LXBiN_di2qF2DQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2023-07-15 8:38 ` Trevor Jenkins [not found] ` <D9A14D6A-896B-4B36-BFF3-002AEFC083EB-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Trevor Jenkins @ 2023-07-15 8:38 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1: Type: text/plain, Size: 959 bytes --] > On 13 Jul 2023, at 19:28, 'William Lupton' via pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote: > > I think you need to use a custom reader. Here's a link to the appropriate bit of the appropriate page. https://pandoc.org/custom-readers.html#bytestring-readers <https://pandoc.org/custom-readers.html#bytestring-readers> Thanks. I had stumbled across that and caused me to post my original email. I wish there were a worked example of how to use that to process arbitrary binary data. Regards, Trevor. <>< Re: deemed! -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/D9A14D6A-896B-4B36-BFF3-002AEFC083EB%40gmail.com. [-- Attachment #2: Type: text/html, Size: 1924 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <D9A14D6A-896B-4B36-BFF3-002AEFC083EB-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Handling binary format of an old word processor [not found] ` <D9A14D6A-896B-4B36-BFF3-002AEFC083EB-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2023-07-16 9:17 ` 'William Lupton' via pandoc-discuss 0 siblings, 0 replies; 4+ messages in thread From: 'William Lupton' via pandoc-discuss @ 2023-07-16 9:17 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1: Type: text/plain, Size: 1840 bytes --] I can't speak from experience here, but it seems that you can probably use lpeg (illustrated in the example in the docs) to process binary data. This is suggested by https://github.com/spc476/LPeg-Parsers. It would be fun to try! On Sat, 15 Jul 2023, 09:38 Trevor Jenkins, <bslwannabe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 13 Jul 2023, at 19:28, 'William Lupton' via pandoc-discuss < > pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote: > > I think you need to use a custom reader. Here's a link to the appropriate > bit of the appropriate page. > https://pandoc.org/custom-readers.html#bytestring-readers > > > Thanks. I had stumbled across that and caused me to post my original email. > > I wish there were a worked example of how to use that to process arbitrary > binary data. > > Regards, Trevor. > > <>< Re: deemed! > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/D9A14D6A-896B-4B36-BFF3-002AEFC083EB%40gmail.com > <https://groups.google.com/d/msgid/pandoc-discuss/D9A14D6A-896B-4B36-BFF3-002AEFC083EB%40gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxi3WnRVJ0ry0bButBhWsdYov6XwgUJJ5TSmp-%3DFpGXpwA%40mail.gmail.com. [-- Attachment #2: Type: text/html, Size: 3148 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-16 9:17 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-07-13 13:10 Handling binary format of an old word processor Trevor Jenkins [not found] ` <6019A3AE-5A17-4857-A428-5B2C5F7AB879-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2023-07-13 18:28 ` 'William Lupton' via pandoc-discuss [not found] ` <CAEe_xxgArqRo2zf5+QDvhhT7U3ZLz8gH4me9LXBiN_di2qF2DQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2023-07-15 8:38 ` Trevor Jenkins [not found] ` <D9A14D6A-896B-4B36-BFF3-002AEFC083EB-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2023-07-16 9:17 ` 'William Lupton' via pandoc-discuss
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).