Evening M. Sarmat89,
I should re-explain again that my idea is to tab-delimit all the lines in output4 that have a word that begins the line followed by a space and then a "[". All the text that follows this,the lines that follow this, is definition for that headword until the next line that has a word that begins the line with a space after this word and then the bracket "[". So it's;
Headword(word beginning a line with any type of consecutive characters)then space then beginning [. All that follows goes on one line until the next headword defined above.
This may not be perfect but I think that I should see most of the headwords.
I assume that you only tab-delimit the headwords for pyglossary to set up a searchable stardict file.
May I trouble you to list the code that I can paste that would unfold the line and tab-delimit the headword as explained above. I know that you have listed some code in previous messages but it would be easier for me if you could list the codes here in one place. Also, I think that you may be changing your code given the above.
I need the code that uses the <BR> function that eliminates the spaces in certain long defintions. Or can these spaces remain in the unfolded line of definition?
Thus, I am asking if you would kindly list the codes for this and I suppose I should see output4 somewhere in the code, otherwise, how does the code know what file to work on?
Is the code Perl code to be used in linux terminal? Stupid question perhaps, but I wanted to confirm this. I don't know Perl code so I can only cut and paste what you give me.
Thank you again for taking the time to help me with this file conversion.
Cordially,
pz
Last edited by pzack; 09-15-2022 at 10:36 PM.
|