[sword-devel] Using Perl script usfm2osos.pl in Windows?

Greg Hellings greg.hellings at gmail.com
Mon Apr 11 07:24:35 MST 2011


If the cmd.exe environment does not expand GLOB expressions for you, I
suggest you upgrade to a fully-featured shell environment and file a
bug against it with Microsoft.  While you're waiting for them to
complete basic functionality in their shell environment, try Cygwin or
Linux or a BSD or Mac OS or Solaris or... well, you get the idea.

--Greg

On Mon, Apr 11, 2011 at 8:50 AM, Daniel Owens <dhowens at pmbx.net> wrote:
> It is capable of handling multiple files. Typically Paratext has one file
> for each book of the Bible, so that is why it handles those files that way.
>
> I remember running into this problem in Windows, but I don't remember how I
> solved it. I think I switched my OS. :) I agree this utility should be more
> Windows-friendly. I just don't know how to do it.
>
> Daniel
>
> On 04/11/2011 08:21 AM, Greg Hellings wrote:
>>
>> David,
>>
>> I haven't used usfm2osis.pl, but are you sure it is capable of
>> handling multiple files at one time anywhere? Usually the file glob is
>> expanded by the shell (at least in the Unix world) so the program will
>> actually receive multiple distinct arguments expanded out to match
>> each file in the glob. I thought Windows operated the same way.
>> Perhaps usfm2osis.pl is designed to be executed in a loop? From bash
>> they are very easy to write:
>> for file in $(ls *.usfm); do usfm2osis.pl $file; done
>>
>> Additionally, if you operate in Windows and are actually doing
>> anything of consequence on the command line with Perl programs, you
>> should probably switch to using Cygwin or MSYS as they will behave
>> more reasonably than cmd.exe does. Cygwin will also have its own
>> version of Perl available for your use and should behave the same as
>> usfm2osis.pl.
>>
>> --Greg
>>
>> On Mon, Apr 11, 2011 at 7:01 AM, David Haslam<dfhmch at googlemail.com>
>>  wrote:
>>>
>>> Can anyone help?
>>>
>>> CrossWire utilities written as Perl scripts such as usfm2osis.pl seem to
>>> be
>>> designed for Unix users only!
>>>
>>> This utility does not work when given with a wildcard to specify the USFM
>>> files.
>>>
>>> It does work, however, for each individual USFM file when each
>>> case-sensitive filename is specified exactly.
>>>
>>> I suspect that all such Perl scripts do not contain any code for
>>> http://en.wikipedia.org/wiki/Glob_%28programming%29 globbing  Windows
>>> filename wildcard patterns.
>>>
>>> I'm not a Perl programmer. What is needed is for someone who is both a
>>> Perl
>>> programmer and familiar with using Perl in the Windows environment to
>>> improve all such scripts such that they are no longer a stumbling block
>>> for
>>> users who prefer Windows.
>>>
>>> btw. I have ActivePerl installed in my PC.
>>>
>>> David Haslam
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://sword-dev.350566.n4.nabble.com/Using-Perl-script-usfm2osos-pl-in-Windows-tp3441764p3441764.html
>>> Sent from the SWORD Dev mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>



More information about the sword-devel mailing list