1. These forums have been archived.
    Please switch to using our new GitHub Discussions and Issue Tracker.

Automating Equipd from Editorial

Discussion in 'Tips & Tricks' started by Jonathan Markevich, Jun 27, 2015.

  1. Carlos

    Carlos Member

    Joined:
    Jul 6, 2015
    Messages:
    35
    Likes Received:
    19
    No need to receive any credit. Happy some of you found it useful. If I can help you with anything, just let me know.
     
  2. Jonathan Markevich

    Jonathan Markevich New Member

    Joined:
    Jun 27, 2015
    Messages:
    25
    Likes Received:
    9
    Do you have any idea why it fails to replace "1 Corinthians"? I had the workflow list out all of the references it found from the first regex and it was included, but something in the Python strips it out. It also ignores the number in "1 John" and links "John" by itself... (that one might be solved by moving 1 John higher in the list, though it wouldn't be in order of course)...
     
  3. Carlos

    Carlos Member

    Joined:
    Jul 6, 2015
    Messages:
    35
    Likes Received:
    19
    The bible array in the python script contains elements that are lists of variations of how each book of the bible might be abbreviated or found in your notes. The first element in each list is the full name of the book as it would be replaced in your notes, the second is the NWT abbreviation of the book and from that point on you can add as many variations as you would like. For Spanish this works ['1 Corintios', '1Co', '1 Cor', '1 Co']. You could add more abbreviations separated by comma. I hope this helps but let me know if it doesn't and I will look at your script... I have made other modifications that I am still testing to also detect the scriptures that don't have a book name.
     
  4. Jonathan Markevich

    Jonathan Markevich New Member

    Joined:
    Jun 27, 2015
    Messages:
    25
    Likes Received:
    9
    I discovered that, and I rearranged the order of each book's abbreviations in the list. The Corinthians books are like this:

    ['1 Corinthians', '1Co', '1 Cor', '1Cor'],
    ['2 Corinthians', '2Co', '2 Cor', '2Cor'],

    So it's really very similar, which really puzzles me.
     
  5. Carlos

    Carlos Member

    Joined:
    Jul 6, 2015
    Messages:
    35
    Likes Received:
    19
    Hi Jonathan:
    Hi Jonathan:

    I made some changes to the regex and the script to be able to handle single chapter books as well as scriptures from the same book separated by ( ; ). I tried it a few times and seems to be working. Let me know if you find any issues with it. Take care;

    Here is the link: http://www.editorial-workflows.com/workflow/5838072876892160/XLXVelsmciQ

    CD
     
  6. Jonathan Markevich

    Jonathan Markevich New Member

    Joined:
    Jun 27, 2015
    Messages:
    25
    Likes Received:
    9
    Wow, that's really good. Thanks for your work on that. I still notice that it won't identify 1 John, but maybe that can be solved by reordering.

    I also misspelled Philippians in mine, you can change that if you like.
     
  7. Gabriel

    Gabriel Active Member

    Joined:
    Jun 26, 2015
    Messages:
    190
    Likes Received:
    38
    Last edited: Apr 2, 2016
  8. Carlos

    Carlos Member

    Joined:
    Jul 6, 2015
    Messages:
    35
    Likes Received:
    19
    Hi Gabriel:

    Let me see if I can help you with the workflow. I don't use it often but it has worked for me when parsing documents in Spanish. Give me some time to review it. Sometimes going over old code helps you see the flaws and fix it to better and more efficiently accomplish the same task. Take care;

    CD
     
  9. Gabriel

    Gabriel Active Member

    Joined:
    Jun 26, 2015
    Messages:
    190
    Likes Received:
    38
    Hi Carlos,

    Thank you to try to help me with this. I hope you succeed! )))

    Also, I was able to make the workflow to create a link to reference available on wol.jw.org. When I select reference like (it-1 422, g05 6/8 10), my workflow generate a link to the WOL! Practice with the outline of public talk!))
    image.png image.png

    Link WOL
    http://www.editorial-workflows.com/workflow/5865143250452480/nIcT2BQUxxo
     
    Last edited: Apr 7, 2016
  10. Gabriel

    Gabriel Active Member

    Joined:
    Jun 26, 2015
    Messages:
    190
    Likes Received:
    38

Share This Page

Loading...