Re: [sword-devel] usfm to osis converter...

2015-08-04 Thread Ryan
On Tue, 2015-08-04 at 06:03 -0700, David Haslam wrote: > Thanks Ryan, > > I imagine some SWORD developers are competent in using Python under CygWin > as well as on Linux. > > When I tried u2o.py last week, it bombed out at the first line: > > #!/usr/bin/python3 > > This line seems to be partic

Re: [sword-devel] usfm to osis converter...

2015-08-04 Thread Greg Hellings
That path is correct, you'll just need to use your package manager to install Python 3.x instead of the default Python, which is typically still on the 2.7 series. On Aug 4, 2015 8:06 AM, "David Haslam" wrote: > Thanks Ryan, > > I imagine some SWORD developers are competent in using Python under

Re: [sword-devel] usfm to osis converter...

2015-08-04 Thread Fred Smith
On Tue, Aug 04, 2015 at 06:03:09AM -0700, David Haslam wrote: > Thanks Ryan, > > I imagine some SWORD developers are competent in using Python under CygWin > as well as on Linux. > > When I tried u2o.py last week, it bombed out at the first line: > > #!/usr/bin/python3 > > This line seems to be

Re: [sword-devel] usfm to osis converter...

2015-08-04 Thread David Haslam
Thanks Ryan, I imagine some SWORD developers are competent in using Python under CygWin as well as on Linux. When I tried u2o.py last week, it bombed out at the first line: #!/usr/bin/python3 This line seems to be particular to your current Linux system and chosen Python interpreter. Should I j

Re: [sword-devel] usfm to osis converter...

2015-08-03 Thread Ryan
On Mon, 2015-08-03 at 08:00 -0700, David Haslam wrote: > What would it take to run u2o.py under CygWin ? > > (Assume Python 2.7 is installed with CygWin.) > I don't really know anything about using CygWin, I didn't use anything special in the u2o.py script though. So as far as I know it wouldn't

Re: [sword-devel] usfm to osis converter...

2015-08-03 Thread Peter Von Kaehne
Peter   In short you will not find anyone willing to create Gesendet: Montag, 03. August 2015 um 16:50 Uhr Von: "Peter Von Kaehne" An: sword-devel@crosswire.org Betreff: Re: [sword-devel] usfm to osis converter...   It is both correct USFM and it it is what we get to work

Re: [sword-devel] usfm to osis converter...

2015-08-03 Thread Peter Von Kaehne
  It is both correct USFM and it it is what we get to work with.   Peter Gesendet: Montag, 03. August 2015 um 16:47 Uhr Von: "Michael H" An: "SWORD Developers' Collaboration Forum" Betreff: Re: [sword-devel] usfm to osis converter... I was previously aware of mul

Re: [sword-devel] usfm to osis converter...

2015-08-03 Thread Michael H
I was previously aware of multiple untagged references in \r's but not \x's, but I do see it in the manual. It seems poor markup to include multiple references per \xt tag. USFM does support multiple \xt tags per \x ... \x* tag. On Sat, Aug 1, 2015 at 1:57 PM, Peter von Kaehne wrote: > On Fri,

Re: [sword-devel] usfm to osis converter...

2015-08-03 Thread David Haslam
What would it take to run u2o.py under CygWin ? (Assume Python 2.7 is installed with CygWin.) Best regards. David (not a Python programmer) Haslam -- View this message in context: http://sword-dev.350566.n4.nabble.com/usfm-to-osis-converter-tp4654838p4654872.html Sent from the SWORD Dev mail

Re: [sword-devel] usfm to osis converter...

2015-08-01 Thread Peter von Kaehne
On Fri, 2015-07-31 at 14:44 -0500, Michael H wrote: > > I haven't worked on it myself, And I think this is the problem. Xrefs can take any number of complicated forms. lists, ranges, etc. They are context dependent - sometimes the xref is only to a verse or a chapter/verse combo. Without underst

Re: [sword-devel] usfm to osis converter...

2015-07-31 Thread Michael H
I'm missing at a minimum the case of sub-verse ranges: references to Matthew 7:23b and the like. I submit that for clicking through, I don't think this level of accuracy is necessary. Even on tiny phones, in most cases you land on the screen with the intended target point. A very few longer verses

Re: [sword-devel] usfm to osis converter...

2015-07-31 Thread Michael H
Properly coded USFM has the book names for cross references listed in the header info of each book (/toc1, /toc2, /toc3, or /h). That info, added back to a well formed AV11N, should allow for easy to parse xrefs. I haven't worked on it myself, but it should be easier to deal with digits only to d

Re: [sword-devel] usfm to osis converter...

2015-07-31 Thread Peter Von Kaehne
> Von: "Healing Advisor" > On 31/07/15 16:09, Ryan wrote: > > > This would be why I haven't done anything with xrefs. I am sure I don't > > possess the knowledge required to handle them properly. :) > > In the original, they don't quite work properly. They worked never anywhere. The reason is

Re: [sword-devel] usfm to osis converter...

2015-07-31 Thread Healing Advisor
On 31/07/15 16:09, Ryan wrote: This would be why I haven't done anything with xrefs. I am sure I don't possess the knowledge required to handle them properly. :) In the original, they don't quite work properly. I've suspended work on the Brenton Septuagint module until we have a fix. The fo

Re: [sword-devel] usfm to osis converter...

2015-07-31 Thread Ryan
On Fri, 2015-07-31 at 08:19 +0100, Peter von Kaehne wrote: > The pitfalls of all scripts I have seen so far are around the > recognition of "end of construct" in USFM - end of verse, section etc. > which is not explicit. This, combined with OSIS milestones has caused > a lot of grief over the yea

Re: [sword-devel] usfm to osis converter...

2015-07-31 Thread Peter von Kaehne
On Thu, 2015-07-30 at 14:06 -0400, Ryan wrote: > but perhaps someone else may find it useful I have tested it right now very shortly on a couple of my more complicated USFM texts 1) it is fast. Roughly as fast as usfm2osis.pl. Also it does not heat my computer up, that is nice. 2) Various USFM t

Re: [sword-devel] usfm to osis converter...

2015-07-30 Thread Ryan Hiebert
This seems like very good work, Ryan. I took a look at the coverter before, as I'm a Python dev, and couldn't hack it. I tried to start wrting a OSFM parser, but I had some difficulty fully understanding what the spec was saying. Anyway, if you were interested in continuing to work on it, I'd be

Re: [sword-devel] usfm to osis converter...

2015-07-30 Thread David Haslam
I've been browsing the script, and yes - it does support nested tags. David -- View this message in context: http://sword-dev.350566.n4.nabble.com/usfm-to-osis-converter-tp4654838p4654845.html Sent from the SWORD Dev mailing list archive at Nabble.com.

Re: [sword-devel] usfm to osis converter...

2015-07-30 Thread Ryan
> Among other clean-up, usfm2osis.py avoided this problem by using > Python's XML libraries to ensure that any output was, at the least, > well-formed. It might even include the schema in order to enforce > validity. > My script includes the osis 2.1.1 schema and uses the same XML libraries (lxml

Re: [sword-devel] usfm to osis converter...

2015-07-30 Thread Greg Hellings
I can't help but wonder if the speed boosts this boasts come at the expense of one of usfm2osis.py's main benefits - its change from raw text manipulation to proper XML construction. We previously had a very fast usfm2osis.pl that used Perl's raw regular expressions to brute force its way to very f

Re: [sword-devel] usfm to osis converter...

2015-07-30 Thread Chris Burrell
Does it supported nested tags? On a related note, if people want a usx converter to osis, please let me know. Cheers Chris -Original Message- From: "David Haslam" Sent: ‎30/‎07/‎2015 20:07 To: "sword-devel@crosswire.org" Subject: Re: [sword-devel] usfm to osis

Re: [sword-devel] usfm to osis converter...

2015-07-30 Thread David Haslam
Thanks, Ryan. This looks very interesting. I expect that John Austin and others would also find it useful. Your description (qv) of the project should grab our attention. I wrote my own USFM to OSIS converter in python. There are several reasons for this: The usfm2osis.py converter mentioned

[sword-devel] usfm to osis converter...

2015-07-30 Thread Ryan
In case anyone is interested, I've written a new fast usfm to osis converter. I mainly wrote it as a personal challenge to see how difficult it would be... but perhaps someone else may find it useful as well. You can find it at http://sites.google.com/site/adyeths/theswordproject __