Accordance User Bible equivalent

2»

Comments

  • Kristin
    Kristin Member Posts: 378 ✭✭

    Hi @Graham Criddle,

    Thank you for clarifying. Let me summarize just to make sure I am understanding. First, given that my text does not have footnotes, makes no markers for poetry or quotes or whatever, what I would need is the little html squibble before and after each verse, such as [[@Bible:Jn 1:10]]

    However, the script @Justin Gatlin said of sed -E 's/^([1-3]?[ ]?[A-Za-z]{1,5}\.? [0-9]+(:[0-9]+)?)(.*)$/[[\@Bible:\1]]{{field-on:Bible}}\3{{field-off:Bible}}/' bible.txt > Logos.txt seems to be for fields in order to separate the verse from the text, which seems to also be necessary.

    I understand people mentioned above about this just being run whenever I want to re-upload my TextEdit document, but functionally, it really seems like this is something which would need to be permanently part of it, especially because of the double brackets at the end of the verse. This also seems to be confirmed from what @Fabian just said, if I am understanding correctly.

  • Graham Criddle
    Graham Criddle MVP Posts: 32,877

    Hi @Kristin

    Thank you for clarifying. Let me summarize just to make sure I am understanding. First, given that my text does not have footnotes, makes no markers for poetry or quotes or whatever, what I would need is the little html squibble before and after each verse, such as [[@Bible:Jn 1:10]]

    That is correct

    However, the script  of sed -E 's/^([1-3]?[ ]?[A-Za-z]{1,5}\.? [0-9]+(:[0-9]+)?)(.*)$/[[\@Bible:\1]]{{field-on:Bible}}\3{{field-off:Bible}}/' bible.txt > Logos.txt seems to be for fields in order to separate the verse from the text, which seems to also be necessary.

    I spotted that - I'm not sure the field separators are totally necessary for what you are doing but I'm not an expert in this area.

    I understand people mentioned above about this just being run whenever I want to re-upload my TextEdit document, but functionally, it really seems like this is something which would need to be permanently part of it, especially because of the double brackets at the end of the verse. This also seems to be confirmed from what Fabian just said, if I am understanding correctly.

    I envisage it more as:

    1. You continue to maintain your text file as you have been doing
    2. When you want to update the copy in Logos, run the script on your text file
    3. Upload the result of the script into the Personal Book entry in the Personal Book tile and recompile

  • Kristin
    Kristin Member Posts: 378 ✭✭

    Hi @Graham Criddle,

    Thank you for clarifying. When you wrote, "I envisage it more as:

    1. You continue to maintain your text file as you have been doing
    2. When you want to update the copy in Logos, run the script on your text file
    3. Upload the result of the script into the Personal Book entry in the Personal Book tile and recompile"

    I like that idea (assuming I could be taught how to do the script). However, if I am understanding correctly, there is not really a way to do this because of the double brackets after each verse. Is this correct?

    p.s. - How are you quoting little sections? I just tried to do it, but whenever I try it just quotes the entire prior response.

  • Fabian
    Fabian Member Posts: 1,055 ✭✭✭

    I was also not able to quote snippets.

    Χριστὸς ἐν ὑμῖν, ἡ ἐλπὶς τῆς δόξης· 

  • Graham Criddle
    Graham Criddle MVP Posts: 32,877

    I like that idea (assuming I could be taught how to do the script). However, if I am understanding correctly, there is not really a way to do this because of the double brackets after each verse. Is this correct?

    @Justin Gatlin is much better placed to advise on that than me but, if I understand what he is suggesting, the double brackets will appear in the output from running the script and so will be re-created each time you run the script against your own document.

    p.s. - How are you quoting little sections? I just tried to do it, but whenever I try it just quotes the entire prior response.

    Copy and paste the snippet you want to quote and then enter the character > followed by a space to the left of the first character you have pasted in.

  • Kristin
    Kristin Member Posts: 378 ✭✭

    @Justin Gatlin is much better placed to advise on that than me but, if I understand what he is suggesting, the double brackets will appear in the output from running the script and so will be re-created each time you run the script against your own document.

    Hi @Graham Criddle,

    Ok, thanks for clarifying. It will be interesting to hear what he thinks. Maybe @Fabian would know?

    Copy and paste the snippet you want to quote and then enter the character > followed by a space to the left of the first character you have pasted in.

    Thanks. :) I just tried it, and I think it worked.

  • Fabian
    Fabian Member Posts: 1,055 ✭✭✭

    I found the issue. The file needs to be with LF not with CR which is the standard for Acc.

    @Justin Gatlin Thanks I have learned something new.

    Fabian

    Χριστὸς ἐν ὑμῖν, ἡ ἐλπὶς τῆς δόξης· 

  • Kristin
    Kristin Member Posts: 378 ✭✭

    I found the issue. The file needs to be with LF not with CR which is the standard for Acc.

    Hi @Fabian,
    This sounds like a problem. Is this correct? Also, if it is not, do you agree it is possible to do the 3 steps @Graham Criddle mentioned, or is your impression that this whole process would involve having a separate document being maintained for Logos?

  • Justin Gatlin
    Justin Gatlin Member, MVP Posts: 2,112
    edited January 5

    Kristin, if we can fine tune the script that I'm taking about (I'm out of town on vacation) you will have your studentot.txt and studentnt.txt in a folder and an icon that will run an update script. When you run it, it will create logos.txt, which you will use for your personal book. When you update your current documents just like you always have, you will run the script and it will delete the old logos.txt and make a new one. You will then compile the Logos personal book and you will have a fully functioning Bible.

    The Bible tags are not strictly necessary but they will let you use Logos features like "Bible text only" which hides verse and chapter numbers and will make text comparison work properly. It isn't any more difficult to include it in the script, and if you ever want to add things like footnotes, you will already be on the right track.

    I think the whole thing is much simpler than you think it will be. The script is the simplest solution because TextEdit doesn't have the same powerful features as Pages and Word, and because it will let you simply click to update. When I get back to the office on Tuesday and can do some trial and error, I can get you something working very quickly.

    In the meantime, Aloha from Kīlauea, where God arranged some fireworks for my tenth wedding anniversary.

    There was an error displaying this embed.

  • Kristin
    Kristin Member Posts: 378 ✭✭

    I think the whole thing is much simpler than you think it will be. The script is the simplest solution because TextEdit doesn't have the same powerful features as Pages and Word, and because it will let you simply click to update. When I get back to the office on Tuesday and can do some trial and error, I can get you something working very quickly.

    Hi @Justin Gatlin,

    That is good to hear that it is likely simpler than I am thinking it is, as so far it is pretty complicated and I'm also not even sure where this infamous script is supposed to be run. Thank you for your help with this.

    In the meantime, Aloha from Kīlauea, where God arranged some fireworks for my tenth wedding anniversary.

    Happy Anniversary! 🎊

  • Fabian
    Fabian Member Posts: 1,055 ✭✭✭

    I'm interested in that solution too. Also how to create it for myself.

    Thanks.

    Χριστὸς ἐν ὑμῖν, ἡ ἐλπὶς τῆς δόξης· 

  • John
    John Member Posts: 645 ✭✭✭
    edited January 5

    I found a solution and it works. I will post a step by step workflow later, but for now am explaining why I went the route I did.

    After spending some time trying to get a REGEX script to work in MacOS terminal, I had great difficulty. If Justin can write a script that works, that would be nice, but would still have the limitation that it would only run on MacOS and Windows users would have to find an alternative.

    SED (Stream Editor) is an old Unix command line utility. It is widely used in the Linux world today and is very well known and documented. Unfortunately, the version of SED included by default in MacOS has its roots in POSIX and BSD. Its syntax and compatibility is much different than the vast amount of documentation out there on the internet.

    So for those two reasons, I abandoned SED.

    I wanted a solution that would work both on Windows and MacOS.

    There are basically two steps to the process needed.

    1. Modify the Bible text to the format required by Logos PBB
    2. Save the file in the .DOCX format that the PBB requires

    Microsoft Word is able to meet these requirements. However not everyone wants to pay for Microsoft Word. So adding a third criteria that it must be free.

    There are many free and open source text editors out there that support REGEX. But none of them I am aware of are truly cross-platform. Notepad++ would be a good choice if you were ok with Windows only. It might also be possible to run it on MacOS using WineHQ. But I did not want to require the installation of WineHQ if it was not necessary.

    For these reasons I decided to give LibreOffice Writer a try. I did my test on Windows, but LibreOffice has a MacOS version. It also supports both Intel and Apple Silicon Mac's.

    I will post instructions how to do it. Hope this helps. I realize some might not like this option, so I hope Justin also has success with his script. If the script can do the conversion on MacOS, then Pages should be able to save it in .DOCX format.

    This has been fun, but I have to go back to work tomorrow.

  • John
    John Member Posts: 645 ✭✭✭
    edited January 5

    How to convert Bible text to Logos PBB format using LibreOffice Writer

    1. Open your source file (Bible text) in LibreOffice Writer
    2. Open the Find and Replace Dialog (CTRL-H on Windows)
    3. Make sure that the Regular Expressions option is checked
    4. Cut and Paste the REGEX code which follows these instructions into the Find and Replace fields
    5. Click on "Replace All"
    6. Close the Find and Replace Dialog


    7. Select all text (CTRL-A on Windows)
    8. Change the text font and size in the drop down list box.
    9. Open the "Save As" Dialog (CTRL+SHIFT+S on Windows)
    10. Locate the folder where you want to create the .DOCX file
    11. Optionally change the filename
    12. In the "Save as Type" Drop down, select "Word 2010-365" (*.DOCX)


    13. In Logos, open the "Personal Books" tool.
    14. Click on "Add book"
    15. Type in a Book Title
    16. In the "Type" drop down list, select "Bible"
    17. Other fields are optional, edit any of them you like
    18. Click on "Add file" and select your .DOCX file
    19. Click on "Build Book"
    20. Optional: click on "View log file" and look for errors
    Here is the REGEX code for the Search and Replace
    
    	Find:^([A-Za-z0-9]+)\.?[ ]([0-9]+):([0-9]+)[ ](.*)
    	
    	Replace:[[@Bible:$1 $2:$3]] $3 {{field-on:Bible}}$4{{field-off:Bible}}
    

    Note: I am not sure what font the PBB tool is expecting. It seems to generate the error message every time. I tried Calibi which is the Microsoft Word default. Verdana is among the best fonts for on-screen reading. The PBB seems to leave whatever font you choose. I hope someone with more experience can comment on this. Libre Office Writer has the ability to automate this process further.

  • Fabian
    Fabian Member Posts: 1,055 ✭✭✭

    I am not sure what font the PBB tool is expecting

    Times New Roman

    Χριστὸς ἐν ὑμῖν, ἡ ἐλπὶς τῆς δόξης· 

  • Fabian
    Fabian Member Posts: 1,055 ✭✭✭

    Hint for @Kristin

    Use @BibleESV

    Χριστὸς ἐν ὑμῖν, ἡ ἐλπὶς τῆς δόξης· 

  • Kristin
    Kristin Member Posts: 378 ✭✭

    How to convert Bible text to Logos PBB format using LibreOffice Writer…

    … 20. Optional: click on "View log file" and look for errors

    Hi @John ,

    Thank you very much for the detailed list and screenshots. I think my main concerns are going back to the original issue though of needing to do multiple uploads a week. If, hypothetically, my text was basically done and needed minor edits, that is one thing, but I typically work on my text up until 5 minutes before the class, then click import and it is imported in less than a minute. So I am concerned about how practical this would be. I am also kind of confused about how the code would know to import everything at the end of each verse, but I for sure can't read code. :)

    Hint for @Kristin

    Use @BibleESV

    Hi @Fabian, You somehow knew I would need your help with this. :)

  • John
    John Member Posts: 645 ✭✭✭

    @Kristin

    ... then click import and it is imported in less than a minute. So I am concerned about how practical this would be.

    You are correct, the process with LibreOffice Writer takes more than a minute. It takes 2 or 3 minutes.

    I am also kind of confused about how the code would know to import everything at the end of each verse

    It works. You do not have to understand Regular Expressions to use it.

  • Kristin
    Kristin Member Posts: 378 ✭✭

    You are correct, the process with LibreOffice Writer takes more than a minute. It takes 2 or 3 minutes.

    Hi @John,

    Just to clarify, I had meant that from me going to the menu in Accordance and selecting import to me reading my updated text is all in under a minute. If I am understanding correctly, you are saying step 5 takes 2-3 minutes, so then it is maybe 6-7 minutes to go through the whole 20 steps. Is this correct? That would for sure require uploading it before class earlier than I currently do, but that is thankfully still not much time all things considered.

    It works. You do not have to understand Regular Expressions to use it.

    Ok, that is good to know. :)

  • Jonathan Huber
    Jonathan Huber Member Posts: 152 ✭✭

    This is incredibly helpful. I'm not making a user bible like Kristin is, but I'm still saving this post for future reference. Thanks for putting this together.

  • John
    John Member Posts: 645 ✭✭✭

    Using Microsoft Word …

    I attempted to duplicate what worked in LibreOffice Writer in Microsoft Word.

    What I discovered is that Microsoft Word has a completely non-standard implementation of REGEX and it is very difficult to get it to work.

    If anyone tries using Word and has success, please post your method here, I would like to have it …

  • Justin Gatlin
    Justin Gatlin Member, MVP Posts: 2,112
    edited January 14 Answer ✓

    With John's script, you should be able to go to Automator.app, create a new application and just make it:

    do script "-E 's/^([A-Za-z0-9]+).? :([0-9]+) /[[@Bible:\1 \2:\3]] \3 {{field-on:Bible}}\4{{field-off:Bible}}/' input_file.txt > output_file.txt"

    Just plug in your input file and output file names and it should make an icon that you can click and automatically create a new version for personal books. I think it will be faster than going through LibreOffice, but I can't test it without your Bible file.

  • Donovan R. Palmer
    Donovan R. Palmer Member, MVP Posts: 2,693

    Wow! This has been a very useful thread. I am bookmarking this because there are some nuggets that I can use to improve the PBB that I build every year for the Church of England lectionary. I love this community!

  • Kristin
    Kristin Member Posts: 378 ✭✭

    Hi @Justin Gatlin ,

    Thank you very much for your help. I really appreciate it! I have been talking to Fabian, and after giving a lot of consideration, I am going to hold off on the PB, as it is just too disruptive to my class compared to the Accordance User Bible. Perhaps in the future when my translation is more stable (as in, not a complete work in progress), I would likely do the PB option as it is a very powerful feature. It is just not practical for the specific uses I have for my text at the moment. Hopefully Accordance will be around far longer than I will need it, but if need be, I think my best bet is just putting my text as a PDF on one side of my screen and Logos on the other. Obviously not ideal. Thank you again, and like @Donovan R. Palmer , I of course am bookmarking this thread also. :)

    Hi @Donovan R. Palmer ,

    Thank you for letting me know how helpful this thread has been, I am happy to hear that, and I am grateful to be part of the Logos community also. :)