Hi guys,
I'm working with a text that has tons of scripture references in roman numeral form (for example john iii.16). Is there a quick way to convert the roman numerals into regular numbers that can be tooltiped, or do i need to do each one manually? I don't think the tooltip tool recognizes Roman numerals...
Thanks,
Josh
Is there a quick way to convert scriptures in roman numerals to regular numbers?
Started by Josh H, Jun 07 2012 10:36 PM
6 replies to this topic
#1
Posted 07 June 2012 - 10:36 PM
#2
Posted 07 June 2012 - 11:24 PM
Select the document, or a portion. Click Edit in ToolTip NT. At the bottom of the menu, choose the Roman numeral type that matches your text. And the conversion happens!
#3
Posted 07 June 2012 - 11:31 PM
Thanks a bunch...that's a relief, the thought of changing each verse one by one was giving me a headache!
#4
Posted 08 June 2012 - 08:58 AM
the thought of changing each verse one by one was giving me a headache!
It is pretty easy to whip up a python script that converts Roman numerals to Arabic numberals.
def RomanNumeralsToDecimal(roman_string): import string check_point = exclude_non_roman_numerals( roman_string ) # print roman_string, " is being checked prior to RN2D" # print check_point, " is the value of check_point " if check_point > 0: num = 0 elif check_point < -1 : num = 0 else: temp_roman_string= string.upper(roman_string) exp = "" if iv.search(temp_roman_string) != None: temp_roman_string= iv.sub("+4", temp_roman_string) if ix.search(temp_roman_string) != None: temp_roman_string= ix.sub("+9", temp_roman_string) if xl.search(temp_roman_string) != None: temp_roman_string= xl.sub("+40", temp_roman_string) if xc.search(temp_roman_string) != None: temp_roman_string= xc.sub("+90", temp_roman_string) if cd.search(temp_roman_string) != None: temp_roman_string= cd.sub("+400", temp_roman_string) if cm.search(temp_roman_string) != None: temp_roman_string= cm.sub("+900", temp_roman_string) if i.search(temp_roman_string) != None: temp_roman_string= i.sub("+1", temp_roman_string) if v.search(temp_roman_string) != None: temp_roman_string= v.sub("+5", temp_roman_string) if x.search(temp_roman_string) != None: temp_roman_string= x.sub("+10", temp_roman_string) if l.search(temp_roman_string) != None: temp_roman_string= l.sub("+50", temp_roman_string) if c.search(temp_roman_string) != None: temp_roman_string= c.sub("+100", temp_roman_string) if d.search(temp_roman_string) != None: temp_roman_string= d.sub("+500", temp_roman_string) if m.search(temp_roman_string) != None: temp_roman_string= m.sub("+1000", temp_roman_string) # The following were added in a futile attempt # to prevent crashes, when attempting to convert # non-roman numerals to latin numerals. if a.search(temp_roman_string) != None: temp_roman_string= a.sub("+0", temp_roman_string) if b.search(temp_roman_string) != None: temp_roman_string= b.sub("+0", temp_roman_string) if e.search(temp_roman_string) != None: temp_roman_string= e.sub("+0", temp_roman_string) if f.search(temp_roman_string) != None: temp_roman_string= f.sub("+0", temp_roman_string) if g.search(temp_roman_string) != None: temp_roman_string= g.sub("+0", temp_roman_string) if j.search(temp_roman_string) != None: temp_roman_string= j.sub("+0", temp_roman_string) if k.search(temp_roman_string) != None: temp_roman_string= k.sub("+0", temp_roman_string) if n.search(temp_roman_string) != None: temp_roman_string= n.sub("+0", temp_roman_string) if o.search(temp_roman_string) != None: temp_roman_string= o.sub("+0", temp_roman_string) if p.search(temp_roman_string) != None: temp_roman_string= p.sub("+0", temp_roman_string) if q.search(temp_roman_string) != None: temp_roman_string= q.sub("+0", temp_roman_string) if r.search(temp_roman_string) != None: temp_roman_string= r.sub("+0", temp_roman_string) if s.search(temp_roman_string) != None: temp_roman_string= s.sub("+0", temp_roman_string) if t.search(temp_roman_string) != None: temp_roman_string= t.sub("+0", temp_roman_string) if u.search(temp_roman_string) != None: temp_roman_string= u.sub("+0", temp_roman_string) if w.search(temp_roman_string) != None: temp_roman_string= w.sub("+0", temp_roman_string) if h.search(temp_roman_string) != None: temp_roman_string= h.sub("+0", temp_roman_string) if y.search(temp_roman_string) != None: temp_roman_string= y.sub("+0", temp_roman_string) if z.search(temp_roman_string) != None: temp_roman_string= z.sub("+0", temp_roman_string) exec "num = " + temp_roman_string return num
It usually is simpler to use the built in library.
jonathon
#5
Posted 01 December 2012 - 09:38 AM
I accidentally posted this in the review of the User Guide, so I'll repost my issue here:
A question regarding "Converting Roman Numerals to Digits"
It will not work for me.
Here is an example of my text: "Kiss the Son (Ps ii 12) and embrace the tenders of mercy; touch His sceptre and live; for why will ye die? I do not beg for myself, but would have you happy: this is the prize I run for. My soul's desire and prayer for you is, that you may be saved (Rom x 1)."
I highlight it, go to Edit-->Roman 3 (or 1 or 2) and nothing happens...am I doing it correctly?
A question regarding "Converting Roman Numerals to Digits"
It will not work for me.
Here is an example of my text: "Kiss the Son (Ps ii 12) and embrace the tenders of mercy; touch His sceptre and live; for why will ye die? I do not beg for myself, but would have you happy: this is the prize I run for. My soul's desire and prayer for you is, that you may be saved (Rom x 1)."
I highlight it, go to Edit-->Roman 3 (or 1 or 2) and nothing happens...am I doing it correctly?
Interesting stuff....http://knomyself.blogspot.com/
#6
Posted 01 December 2012 - 09:44 AM
T4 expects there to be punctuation between the roman numerals:
Ps ii. 12
Ps ii, 12
Ps ii: 12
Ps ii. 12
Ps ii, 12
Ps ii: 12
#7
Posted 01 December 2012 - 10:49 AM
seems like I should have figured that out on my own...thanks...
Interesting stuff....http://knomyself.blogspot.com/
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users
Tweets by @biblesupport
Similar Topics
Perl scripts to convert e-Sword 9 bblx and cmtx modules to myswordStarted by Guest_Atheist Rob_* , 11 Sep 2011 |
Convert a Droid version to PC.Started by Guest_pekuiper_* , 29 Mar 2024 |
Creating Bible Modules with Strong's NumbersStarted by Guest_Tj Higgins_* , 24 Jan 2024 |
Regular Expressions and Westcott Hort Greek NTStarted by Guest_Phoenix2009_* , 09 Nov 2023 |
Help convert an ontx.exe bible to bbli for iPadStarted by Guest_teris2212_* , 07 Oct 2023 |
Frequently Asked Questions
Latest Blogs
- 10 justifications for Bible reading
by SarahSherrill, Jun 27 2022 02:53 AM
According to the experts from Astros DigitalHere are ten reaso... - How can I fix the Cash App if it isn't Working?
by cashcardhelps, Jun 07 2022 01:12 AM
First, you must keep the app up to date with the most recent v... - How can an app benefit your pharmacy in growing business earnings
by Alteza, Jun 06 2022 03:14 AM
Apps comprise a large portion of the tech-driven society that... - What Is a Satire Essay Anyway?
by Caleb9, Jun 04 2022 08:22 AM
What Is a Satire Essay Anyway?A large number of professional w... - 25% OFF on Mauli Thread Rakhi Online for Brother
by giftsvalla, Jun 03 2022 02:02 AM
Mauli Rakhi are generally red. The red colour symbolizes stren...