Copy link to clipboard
Copied
Both lists are separate stories.
Every line of text in its own paragraph.
Each block is already numbered.
It is possible to obtain this result?
Copy link to clipboard
Copied
Are the 1A,2A,1B,2B, etc. in the files or are they just for illustrative purposes?
With a script you should be able to take the 2 stories and split them by the paragraph symbol into 2 arrays. You then just need to loop through the arrays and merging the stories in order.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I feel like you will be missing the second file in the combining. I would think that you would need to push to the combined file: file 1 section, file 1 section body, file 2 section, file 2 section body. The section in that for loop would be just file 1's section and should not be a key for file 2. Right now your groupedFiles are objects of arrays. Personally I would have made them an array of objects. For example you have basically
groupedFile1 = {section1:["line1","line2","line3"],section2:["line1","line2","line3"]}
I think you would have an easier time indexing while combining with
groupedFile1 =[{section:"section 1",text:["line1","line2","line3"]}{section:"section 2",text:["line1","line2","line3"]}]
Techincally you could have already combined the paragraph text in this section to one string since you are already sorting it.
Copy link to clipboard
Copied
John, thanks. Still I have an error (mine).
Hope to work it out.
Let me consult you again.
best regards.
Copy link to clipboard
Copied
Not a problem.
Good luck.
Anytime.
Copy link to clipboard
Copied
No need for a script.
The tricky part would be to convert each part into a single block - cell.
GREP "^^d^u$" -> "#$0" should work.
Then convert to a single column table with "#" as a separator.
Then put both columns together - convert to text with "paragraph" as row & column separator.
Sorry, can't check right now but it should work.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It seems to work but here requires too many cosmetic steps.
The grep mentioned ("^^d^u$") doesn't seem correct.
Perhaps ("^\d+\u$").
Thanks.
Copy link to clipboard
Copied
Right, "\", "^" is for text F&C.
What do you mean by "cosmetic steps"?