0 votes

I’ve been asked by a team to delete all the notes in a few selected chapters of their translation project. They have several hundreds of such notes, so resolving them manually is going to take a while. Is there a way that I could do a bulk operation to resolve these notes?

Paratext by (229 points)

8 Answers

+2 votes
Best answer

There is not a command in Paratext for this. But I think you could do it in a manual edit if you are willing and able to edit XML files.

My suggestion:

  1. Make a copy of the project so you can try out your note editing in the copy, without affecting the regular project until you know your changes are what you want. You can do this by making a backup to file of the existing project (In Paratext, go to the main menu, Advanced , Backup project to file. )

  2. Restore from the backup file to a new project. (In Paratext, go to the main menu, Advanced, Restore project from file). Select the zip file you just made, then click “New” at the top right of the restore dialog to create a new project. Name the new project what you want. You can ignore the warning about doing this in a shared project. The new project will not be shared with anyone.

  3. Now close Paratext. In the new project folder, find the notes files and open them in Notepad or another text editor.
    image

  4. An individual note looks like this:

  5. Search for the desired chapter you want to resolve by typing the three letter book code, space, then the chapter number. (In our example, EXO 2 for Exodus chapter 2).

  6. When you find a note, to resolve it type “deleted” in the status field (as in the orange rectangle, between <Status> and </Status>)

  7. repeat search and edit for the other chapter numbers

  8. save your edits.

  9. if needed, edit other notes files. There is a note file for each user. But if several users comment on the same note, if the status is set to “deleted” in anyone of those user files, the note should be resolved.

Open Paratext and check if the notes in this new project work as desired. If Paratext says the notes file was corrupted, and renamed notes_user name.corrupt, you know you corrupted some of the XML markers. You should not remove any < or > or </ in the file.

by [Expert]
(3.1k points)

reshown

This is still a lot of manual work, one cannot do a simple Find/Replace. It would be really useful if there was a “Bulk Resolve” feature within Paratext, since then one could first filter the notes and then resolve only those that match the filter.

0 votes

Thank you @sewhite for the detailed instruction. I’ll try it and update you here.

by (229 points)
0 votes

@sewhite I’ve followed your instructions and managed to resolved all the notes. Thanks a lot for your help. There were about 1800 notes to be resolved. So your tip has saved a lot of time for me.

by (229 points)
0 votes

@MatjazCrnivec @anon649716

If you would like to request this feature, you can follow the instructions to “Make a Suggestion” here: https://paratext.org/paratext-help-and-support/

by [Moderator]
(2.0k points)
+1 vote

I found myself needing to do this, and created a Regular Expression that allows me to change all of the Status fields from “todo” to “deleted” on a book by book basis. I noticed that the format/order of the fields in the XML file was always consistent:

So I was able to create an expression that finds a VerseRef in a particular book, ignores the rest of that line, then skips over any number of lines that begin with spaces and then a <S or <C, then looks for a line that starts with spaces and then <Status>todo. It will change that “todo” to “deleted”. Here is the expression:

Find: (VerseRef="\dJN .+\r\n(\s+<[SC].+\r\n)*?\s+<Status>)todo
Replace: \1deleted

So in a text editor that can work with Regular Expressions (Notepad++ if you don’t have a favorite), use those find and replace strings to find all of the notes that are not resolved in 1JN, 2JN, 3JN, and change them to resolved.

The \dJN in the find expression uses a further RegEx to find notes in all books that start with a digit and then JN. You can replace that string with another book code to find the notes in that book, e.g. MAT, ISA, or things like \dCO for 1CO and 2CO.

Hope that helps someone out there (and might help me if I have to do it again… :slight_smile:)

by (1.3k points)
0 votes

Well, I’m finding that I need to process multiple books at a time, since I also need to process notes from multiple users. The way to do that in Regular Expressions is parentheses around a list of book names separated by vertical bars |.

So this is the expression for changing notes in all the gospels:

Find: (VerseRef="(MAT|MRK|LUK|JHN) .+\r\n(\s+<[SC].+\r\n)*?\s+<Status>)todo

For the entire NT (what I needed in my case):

Find: (VerseRef="(MAT|MRK|LUK|JHN|ACT|ROM|\dCO|GAL|EPH|PHP|COL|\dTH|\dTI|TIT|PHM|HEB|JAS|\dPE|\dJN|JUD|REV) .+\r\n(\s+<[SC].+\r\n)*?\s+<Status>)todo

If you want to mark notes as resolved in all books, you can just get rid of the book code (and the space afterwards), or if you want to make sure that there is SOME 3-letter code there (a bit of a sanity check), then you can use:

Find: (VerseRef="\w\w\w .+\r\n(\s+<[SC].+\r\n)*?\s+<Status>)todo
by (1.3k points)
0 votes

Alright, here’s one more bonus comment. I was finding a number of Notes that had an empty <Status></Status> field. It turns out I just want to get rid of all of these notes, so I created another RegEx that deletes entire Comments for the specified books.

 +<Comment .+?(VerseRef="(MAT|MRK|LUK|JHN|ACT|ROM|\dCO|GAL|EPH|PHP|COL|\dTH|\dTI|TIT|PHM|HEB|JAS|\dPE|\dJN|JUD|REV) .+\r\n(\s+<.+\r\n)*?\s+</Comment>\r\n)

Note that there is a space before that first + sign. I needed to use a space rather than \s, because that seemed to slurp up the line break before it and mess up the line breaking in the file.

by (1.3k points)
+1 vote

Beware that you may get unexpected behavior doing this to your notes file(s). Paratext is not expecting the first comment in a thread to already be “deleted”. Unless you know that the notes file you’re editing is for users who never create notes, I would strongly suggest not doing this.

You should be very careful editing any Paratext file directly!

by [Expert]
(16.2k points)

Related questions

0 votes
5 answers
Paratext Dec 2, 2020 asked by jeffh (1.3k points)
0 votes
5 answers
Paratext Aug 29, 2022 asked by anon062569 (184 points)
0 votes
2 answers
0 votes
1 answer
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.
1 John 1:7
2,645 questions
5,394 answers
5,065 comments
1,437 users