ASCII text with formatting commands into Writer

I am trying to find documentation on pasting plain ASCII text that a couple of formatting commands such as line break, paragraph break, bold on, bold off.

What I am looking to do is create text with another app and then copy/paste the plain text into Writer. So the input would look like:

CB-Z/Return/B On1/4"-20 1-1/2"/B Of/Return256

Would produce on pasting into Writer:

CB-Z
1/4"-20 1-1/2"
256

In case the formatting does not come through, the 1/4"-20 1-1/2" should be in bold

Is there a list? I have read the working with Text and import and not found what I am looking for.

Thanks for any suggestions
Glenn

This is indeed a job for an input filter. Are your “formatting commands” standardised or specified in some "normative document?

Other than that, if the sole role of the other app is only to prepare a text annotated with formatting directive (something like an oversimplified TeX source), you could as well type directly in LO and apply styles to format the text. Styles are just that: formatting directives collected under a name. It is much more reliable and versatile than direct formatting.

Thank you for your reply.

The formatting commands can be anything, I would prefer to use standardized, even to the level of what Writer understands/expects.

I looked for input filters and find plenty about them related to Calc but not Writer. Do Input Filters apply to Writer as well?

The text is generated via a python program pulling data from an SQL database and generating text for sheets of labels. The label template I have is in Writer, works well, would like to get to a import/mail merge kind of thing for the labels but looking to walk before running.

Thank you for your time

Yes. You already have ones for DOC, DOCX and several other suite formats, but nothing for your kind of formatting directives.

Then you should try to work

  • either in Base, the LO front-end application interfacing with databases, with the report generator; your queries would be directly written in SQL. Formatting directives can be defined when you design the report (such field will be bold, this one red, that other, italics, …).
  • or in Writer with mail/merge or label wizard (not sure this second one would fit your needs) and you applystyles where you need