It seems as though this should be the simplest thing possible. However, I beg you not to outline any procedure unless you have tried and tested it for yourself and can confirm that it actually works.
For example, I can confirm that this does not work:
So, if that doesn't work to create a plain ASCII text file -- and it does not -- then what does?
As far as I'm aware, all the files generated are all ascii text documents: .json, .txt and .htm are all plain text documents that can be viewed and edited in, say Notepad. (Although perhaps images are also included, I haven't tested that, I admit.)
Given the output doesn't meet your needs, I think we need more information about what specifically you are trying to achieve.
To start with, what exactly are you looking for? A single txt file that contains all the topic content, without any supporting images, css or html?
Yes, I could have phrased that better! Thanks for the questions.
What I need to create is a single text file that contains all the topic content as ASCII characters inside the "printable set," but no images and no hypertext tags (or elements) of any kind, including XML, XHTML, or HTML, and including CSS. I even want to avoid Markdown, which technically involves only printable ASCII characters.
Back in the 1980s, simple text files were everywhere, and that's what I'm trying to emulate. Or if you prefer an even older analogy, I'm trying to emulate a "man page." If you are on a Windows computer and open the Command Prompt (on most recent versions, hold down the Windows key and R at the same time, then type "cmd"), then type "help" you will see a primitive man page.
I'm using RoboHelp's <p> and <ul>, <ol>, and <li> elements, but I have deliberately set up all the unordered lists to avoid a bullet character (not printable ASCII) but rather a hyphen character. I would love it if I could get RoboHelp to handle the indenting of the list items, but I can live without it.
In theory, I could just create all these files in a simple text editor. But I need RoboHelp's conditional text, variables, and snippets.
I don't believe there's any way to do this in Robohelp these days. (I have vague memories that maybe it was possible to generate a single page xhtml ~ Adobe RH8 or earlier, but I could also be dreaming this - it was a very long time ago 🙂 )
One way that you could get most of what you want is to generate to Word then Save As *.txt from there. That strips out images, and in my very simple test, changed bullets and numbers to asterisks and plain text numbers.
There are two scripting options I can think of as well, but I don't have the skills to test those so won't mention them further.
Thanks, Amebr! It's a huge time-saver to know that I've been trying to cut away thicket that leads to a dead end.
Your suggestion of creating Word, and using that to create ASCII text is probably the way to go. It's an extra step (not ideal with multiple conditions) but it sure seems like the shortest path from here to there!
If I find any refinements, I'll pop back here to post them for the next person trying to achieve the same thing.
While we're on the topic of text, I cannot figure out what the Microcontent "Text" format is for, since it doesn't produce text.
Alternately, if "Text" does produce text (unencumbered by hypertext tags), could someone detail the precise steps, because I cannot make it work.
Format Specify the desired format for your Microcontent. * HTML5 + CSS3 - Use to generate output in markup language with styling (for example, controlling the size of text, font type, background color, etc.). * HTML5 - Use to generate output in markup language without styling. * JSON - Use to generate output in JSON format. * XML - Use to generate output in XML format. * Text - Use to generate output in text format.
Or you use any number of methods discussed on StackOverflow to convert HTML to ASCII text.
Just curious - what sort of use case do you have that would require plain text to be used? I've never heard of any requirement before for this sort of output in RH.
I had already tried converting from HTML to ASCII text and could not find a good one if the short time I had to investigate. (As you noted, there are a lot of choices!) If you have one you recommend particularly, I'm all ears. The ones I tried were a bit... rudimentary.
As for my use case, it's a README.txt to accompany a Python script, and the README varies a lot depending on the user. For example, I have one version for the people who work with me in the same office, another version for the people who work for the same company in other geographic locations, yet another version for the general public... you get the idea.
The script has to remain agnostic about operating system (absolutely anything that runs Python, not just macOS and Windows and Linux). Since most people have their operating system set up (usually by default or by a system admin) to allow them to double-click on a .txt file and have it open it a text editor, I'm trying to create a file that does not require a tool that the user might not have: Microsoft Word, a web browser (yes, really), and so on.
Did that answer your question?
Sorry, no recommendations - never had to programatically convert HTML to text - I usually just copy/paste via Notepad when I need to.
I've never heard of RH being used to create README docs - my guess is that 99% of them are just fashioned in a text editor like Notepad++ or in whatever editor the developer is authoring in.
You're right; I normally have just one "flavour" of README to create and, therefore, just use Notepad++, BBEdit, Visual Studio Code, or whatever my employer provides and/or allows. It's the way to go when it's a single, simple text file. (My most recent three employers have been very locked down indeed. I'm lucky I get access to Python. But it's taught me not to commit to a specific text editor.)
But that's not going to work this time. I need support for conditions, variables, and snippets. That'd be a nightmare, no matter how good the text editor is.
If you know scripting, RH New UI has scripting built in. There's no documentation beyond an extremely basic pdf of some RH specific functions/properties (and last time I looked 2 versions out of date). But the scripts can use react, electron, fs, cheerio, lodash and who knows what the other common scripting libraries (I've seen samples with all the libraries I named). So maybe you can figure out something with the built in RH scripting functions and standard js libraries?
The scripting guide should be in the appendix of the RH help.
Try going to the US site (or clicking X instead of selecting a region - this is what I do for every page, as annoying as it is). If you can't get the option, you could try deleting your cookies to try to get the prompt to show. Or, it might be enough to delete the ca from the URL, or delete that part of the path completely.
that should be "change the ca part of the URL to us, or delete that part of the url". Not enough coffee yet today 😄
I should have said earlier that I tried going to the US URL and the US site before posting my previous message, but neither worked. However, I found my way there eventually; it's just that getting at the scripting PDF from the RoboHelp menu didn't work for me.