0 votes

Is there any way to generate a list that shows how many notes are in each chapter? I can find out by clicking through each chapter at a time, but I’d like to see the number of notes in one glance. If not, perhaps it can be added as a feature? It’s not a big deal, but it’d save me time in doing things like planning how many chapters I should check per day.

Paratext by (216 points)

2 Answers

0 votes
Best answer

I can’t think of a way to do that. Can you tell me why you want to do that? I’m having a hard time understanding what you are trying to accomplish by looking at the count of notes in a chapter. Are you only looking at the unread notes? Or are you looking at the progress of the team by how many notes are left in a chapter?

by [Expert]
(16.2k points)

Yes, as a consultant, I like to know how many unresolved notes I have left to clear so that I can make a schedule. Knowing how many notes are left in each chapter makes it easier to divide the work: e.g. work on 5 chapters on Monday, 4 chapters on Tue… I can already do this, but since the info is already there, I was just wondering if there’s a way for me to see the info more quickly. My work as a consultant is a bit unusual in that I work in the same office as the translators and I manage various aspects of their work besides consultant checking. So I make a daily/weekly/monthly schedule with goals for various types of work: checking with me, back translation, drafting, etc. And so I’m often wondering how to divide a book into x number of days.

First filter your notes to what you want to see (Unresolved, All Books or Current Book, etc).
You can then Edit-->Copy All Notes and paste the notes into an external program. I use Notepad++.
You can then delete all non-reference lines with a regex search like “find ^(?!([A-Z]{3} \d)).*?$\r\n” and then replace it with nothing. This won’t give you a count of notes per chapter, but you can quickly skim through that list seeing how many there are.

Counting notes seems like the sort of thing that someone could code a script for in 10 or 20 minutes, adding it to the Python menu using the new API or the old cms folder system. That’s one of those skills that’s been on my to-learn list for 4 or 5 years.

[Edit] My first post had a regex which didn’t catch all references. This version should at least be better, but it can probably also be improved upon.
^(?!([A-Z1-4]{3} \d+:\d+)$).*?$

0 votes

Bother. I misunderstood the question!
Anyway, if you happened to want to count footnotes, and are using something with unix command-line tools available (e.g. linux / mac / unix-tools for windows), then you can do something like this:

cat FILENAME | tr '\\' '\n'  | awk '/^f /{footnote++;}/^x /{xref++;}/^c /{print chapter, footnote, xref ; chapter=0+$2; footnote=0;xref=0;}END{print chapter, footnote, xref; }'

What it does is make sure that every new SFM starts a new line, and then counts the footnotes, xrefs and when there’s a chapter number (or the end) it prints the counts. I don’t speak python though, and notes are in an XML file which is quite a bit too nasty to decode with awk.

by (294 points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
There is neither Jew nor Gentile, neither slave nor free, nor is there male and female, for you are all one in Christ Jesus.
Galatians 3:28
2,648 questions
5,397 answers
5,069 comments
1,449 users