Re: [sword-devel] osis.py

2010-05-11 Thread Weston Ruter
I'm working on a Python module for representing osisIDs (works, passages,
IDs, and refs). I think I've got the OsisWork class baked pretty well (at
least for reading/parsing), and I would appreciate your thoughts:
http://github.com/openscriptures/api/blob/master/osis.py#L122

It supports osisID works like those listed here (you can run these tests via
`python osis.py`):
http://github.com/openscriptures/api/blob/master/osis.py#L474

   - Bible
   - KJV
   - Bible.en
   - Bible.en.KJV
   - Bible.en.KJV.1611
   - Bible.en.ChurchOfEngland.KJV.1611
   - KJV.1611.06.07
   - KJV.1611.06.07.235930

In the last two examples, the month and day are also provided (if they
aren't, then they default to 1); and in the very last example, the time is
also included (HHMMSS).

An OsisWork then has the following members:

   - segments (each of the period-delimited segments in the osisID)
   - type (one of the strings enumerated in TYPES)
   - publisher (a string, the first of two segment slugs listed in the
   osisID)
   - name (a string, the single slug listed or the second of two)
   - pub_date (a datetime object; is “pub_date” the best name?)

Are there other pieces of information that should be parsed out? What about
revision, version, or edition like:

   - Bible.Example.2010.r231239921
   - Bible.Example.2010.v2
   - Bible.Example.2010.ed3

Currently if anything is included which isn't recognized, then it will raise
an exception; instead it should probably glob the unrecognized segments into
a etc or splat list.

Thoughts? I'd love to get this implementation fully built out to be a
reference implementation for ports into PHP, JavaScript, etc.

Weston


On Tue, May 4, 2010 at 12:52 AM, Weston Ruter westonru...@gmail.com wrote:

 Hello all,
 Things have been a bit quiet on my end the past few weeks, so I wanted to
 update you on where I am at and what I see as coming next for the API
 development.

 I've been working on a standalone Python module for representing and
 working with OsisWork, OsisPassage, OsisID, and OsisRef objects. Since OSIS
 identifiers form such an integral part of the URI space for the RESTful API
 as it is currently designed, having a solid OSIS library seemed like a good
 thing to work on. You can see what I have so far here:
 http://github.com/openscriptures/api/blob/master/osis.py (it's not yet at
 an alpha state). Please let me know what you think and fork the code to make
 corrections and improvements.

 Once osis.py is baked, then the Django views can be written to handle the
 various OSIS objects. I hope that the osis.py module could also be ported
 over to JavaScript and PHP and other primary languages to give us a familiar
 interface for working with OSIS identifiers.

 In other news, my wife and I are expecting the birth of our first child, a
 son, in three weeks. I plan to keep involved here as much as possible, but
 will probably be distracted (though hopefully not as much as I have been
 these past few weeks).

 Weston

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] osis.py

2010-05-11 Thread Dmitrijs Ledkovs
On 11 May 2010 17:32, Weston Ruter westonru...@gmail.com wrote:
 I'm working on a Python module for representing osisIDs (works, passages,
 IDs, and refs). I think I've got the OsisWork class baked pretty well (at
 least for reading/parsing), and I would appreciate your thoughts:
 http://github.com/openscriptures/api/blob/master/osis.py#L122


Currently I can only assume that it is proprietary software =)

Please include copyright and license at the top of the file.

Copyright (C)  Name Lastname

and boiler-plate for one of the OSI / FSF approved licenses.

I recommend you to choose between Expat, 3-Clause BSD or LGPL / GPL
licenses depending on how much freedom you would like to grant =)

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] osis.py

2010-05-11 Thread Weston Ruter
Actually, it has to be open source because we don't have a paid GitHub
account :-) But you're right, I added a copyright block:
http://github.com/openscriptures/api/commit/a731bdd68b84415f22d3a2d3a035e6ad827eaf28

Dual licensed MIT/GPL.

Thanks!
Weston


On Tue, May 11, 2010 at 11:23 AM, Dmitrijs Ledkovs 
dmitrij.led...@ubuntu.com wrote:

 On 11 May 2010 17:32, Weston Ruter westonru...@gmail.com wrote:
  I'm working on a Python module for representing osisIDs (works, passages,
  IDs, and refs). I think I've got the OsisWork class baked pretty well (at
  least for reading/parsing), and I would appreciate your thoughts:
  http://github.com/openscriptures/api/blob/master/osis.py#L122
 

 Currently I can only assume that it is proprietary software =)

 Please include copyright and license at the top of the file.

 Copyright (C)  Name Lastname

 and boiler-plate for one of the OSI / FSF approved licenses.

 I recommend you to choose between Expat, 3-Clause BSD or LGPL / GPL
 licenses depending on how much freedom you would like to grant =)

 ___
 sword-devel mailing list: sword-devel@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@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] osis.py

2010-05-11 Thread Dmitrijs Ledkovs
On 11 May 2010 19:58, Weston Ruter westonru...@gmail.com wrote:
 Actually, it has to be open source because we don't have a paid GitHub
 account :-) But you're right, I added a copyright block:
 http://github.com/openscriptures/api/commit/a731bdd68b84415f22d3a2d3a035e6ad827eaf28

 Dual licensed MIT/GPL.


Kind of pointless =) MIT is compatible with GPL and MIT is less
restrictive =) so *everyone* will choose MIT =)

Plus you need to think about people without internet access who might
receive your software. (or have internet access but live in a
prosecuted country and get your software e.g. via printout in a
letter).

So actually it would have been absolutely amazing to have this header
(taken from http://opensource.org/licenses/mit-license.php)


8-

Copyright (C) 2010 OpenScriptures.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the Software), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


8--

 Thanks!
 Weston


 On Tue, May 11, 2010 at 11:23 AM, Dmitrijs Ledkovs
 dmitrij.led...@ubuntu.com wrote:

 On 11 May 2010 17:32, Weston Ruter westonru...@gmail.com wrote:
  I'm working on a Python module for representing osisIDs (works,
  passages,
  IDs, and refs). I think I've got the OsisWork class baked pretty well
  (at
  least for reading/parsing), and I would appreciate your thoughts:
  http://github.com/openscriptures/api/blob/master/osis.py#L122
 

 Currently I can only assume that it is proprietary software =)

 Please include copyright and license at the top of the file.

 Copyright (C)  Name Lastname

 and boiler-plate for one of the OSI / FSF approved licenses.

 I recommend you to choose between Expat, 3-Clause BSD or LGPL / GPL
 licenses depending on how much freedom you would like to grant =)

 ___
 sword-devel mailing list: sword-devel@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@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@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


[sword-devel] zLD modules have troubles near the end of content

2010-05-11 Thread Karl Kleinpaste
It was pointed out to me that the last half dozen or more entries in my
StrongsRealGreek module didn't work.  The simple and blunt test was
simply mod2imp StrongsRealGreek, and sure enough, it gets near the
end, whereupon I get an error along the lines of Error - no buffer to
uncompress, and those last entries are all empty.

For the moment, since the misbehavior is consistent for myself and
others on several platforms, I've put out an updated RawLD4 instance of
StrongsRealGreek, but I would like to know if anyone else is aware of
decompression bugs near the end of zLD modules.

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] zLD modules have troubles near the end of content

2010-05-11 Thread Karl Kleinpaste
I meant to mention that the flaw is not limited to StrongsRealGreek.  It
happens in several other of modules, notably my WebstersLinked, but I'm
averse to re-issuing that in RawLD4 form because even the zLD form is
20Mbytes; uncompressed, it's 52Mbytes.

Bug also seen in Autenrieth, LewisElem, LewisShort, UDHR, Swe1917Of, ...

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] osis.py

2010-05-11 Thread Weston Ruter
Thanks for the feedback, Dmitrijs. I'm actually taking my cues from jQuery
which is dual licensed MIT/GPL and merely says:

 /*!
  * jQuery JavaScript Library v1.4.2
  * http://jquery.com/
  *
  * Copyright 2010, John Resig
  * Dual licensed under the MIT or GPL Version 2 licenses.
  * http://jquery.org/license

 http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js

However, I just added the MIT license block in addition to the GPL and MIT
license URLs. Good that you thought of those without Internet access.

More on why dual licensing is a good idea:
http://benalman.com/news/2010/02/on-licensing-my-code/

Thanks!
Weston

On Tue, May 11, 2010 at 1:45 PM, Dmitrijs Ledkovs dmitrij.led...@ubuntu.com
 wrote:

 On 11 May 2010 19:58, Weston Ruter westonru...@gmail.com wrote:
  Actually, it has to be open source because we don't have a paid GitHub
  account :-) But you're right, I added a copyright block:
 
 http://github.com/openscriptures/api/commit/a731bdd68b84415f22d3a2d3a035e6ad827eaf28
 
  Dual licensed MIT/GPL.
 

 Kind of pointless =) MIT is compatible with GPL and MIT is less
 restrictive =) so *everyone* will choose MIT =)

 Plus you need to think about people without internet access who might
 receive your software. (or have internet access but live in a
 prosecuted country and get your software e.g. via printout in a
 letter).

 So actually it would have been absolutely amazing to have this header
 (taken from http://opensource.org/licenses/mit-license.php)


 8-

 Copyright (C) 2010 OpenScriptures.org

 Permission is hereby granted, free of charge, to any person obtaining a
 copy
 of this software and associated documentation files (the Software), to
 deal
 in the Software without restriction, including without limitation the
 rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.


 8--

  Thanks!
  Weston
 
 
  On Tue, May 11, 2010 at 11:23 AM, Dmitrijs Ledkovs
  dmitrij.led...@ubuntu.com wrote:
 
  On 11 May 2010 17:32, Weston Ruter westonru...@gmail.com wrote:
   I'm working on a Python module for representing osisIDs (works,
   passages,
   IDs, and refs). I think I've got the OsisWork class baked pretty well
   (at
   least for reading/parsing), and I would appreciate your thoughts:
   http://github.com/openscriptures/api/blob/master/osis.py#L122
  
 
  Currently I can only assume that it is proprietary software =)
 
  Please include copyright and license at the top of the file.
 
  Copyright (C)  Name Lastname
 
  and boiler-plate for one of the OSI / FSF approved licenses.
 
  I recommend you to choose between Expat, 3-Clause BSD or LGPL / GPL
  licenses depending on how much freedom you would like to grant =)
 
  ___
  sword-devel mailing list: sword-devel@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@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@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@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] osis.py

2010-05-11 Thread Dmitrijs Ledkovs
On 11 May 2010 22:16, Weston Ruter westonru...@gmail.com wrote:
 Thanks for the feedback, Dmitrijs. I'm actually taking my cues from jQuery
 which is dual licensed MIT/GPL and merely says:

 /*!
  * jQuery JavaScript Library v1.4.2
  * http://jquery.com/
  *
  * Copyright 2010, John Resig
  * Dual licensed under the MIT or GPL Version 2 licenses.

  * http://jquery.org/license

 http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js

 However, I just added the MIT license block in addition to the GPL and MIT
 license URLs. Good that you thought of those without Internet access.

 More on why dual licensing is a good idea:
 http://benalman.com/news/2010/02/on-licensing-my-code/


Dual licensing is a bad idea cause it further spreads license profiliation =)

and they couldn't actually use it is a false argument and there is
comment about that in the blogpost already =)

See the source:

http://www.gnu.org/licenses/license-list.html

And better diagram from:

http://www.gnu.org/licenses/quick-guide-gplv3.html

About GPL compatability =) and MIT license gives you that (although a
few different licenses are called that)

You can take any MIT license code, change it combined it with GPL code
and release as GPL.

Infact MIT code can be combined with any code out there as long as
attributions are given.

On the other hand GPL can only be extended  re-released as GPL.

So doing permissive  GPL dual license for the whole thing doesn't make sence =)

Mozilla does triple-license because it is not actually licensing the
whole thing under all three licenses. They still keep artwork and have
levarage in telling a couple of distributions what they can / cannot
include in their releases.

This is a fun topic but more appropriate for debian-le...@l.d.o =) and
I think I bore sword-devel enough with licensing issues already =)

 Thanks!
 Weston


Thank you for adding license information pkgcrosswire can include this
software in Debian  Ubuntu when your software is stable enough ;-)


 On Tue, May 11, 2010 at 1:45 PM, Dmitrijs Ledkovs
 dmitrij.led...@ubuntu.com wrote:

 On 11 May 2010 19:58, Weston Ruter westonru...@gmail.com wrote:
  Actually, it has to be open source because we don't have a paid GitHub
  account :-) But you're right, I added a copyright block:
 
  http://github.com/openscriptures/api/commit/a731bdd68b84415f22d3a2d3a035e6ad827eaf28
 
  Dual licensed MIT/GPL.
 

 Kind of pointless =) MIT is compatible with GPL and MIT is less
 restrictive =) so *everyone* will choose MIT =)

 Plus you need to think about people without internet access who might
 receive your software. (or have internet access but live in a
 prosecuted country and get your software e.g. via printout in a
 letter).

 So actually it would have been absolutely amazing to have this header
 (taken from http://opensource.org/licenses/mit-license.php)


 8-

 Copyright (C) 2010 OpenScriptures.org

 Permission is hereby granted, free of charge, to any person obtaining a
 copy
 of this software and associated documentation files (the Software), to
 deal
 in the Software without restriction, including without limitation the
 rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.


 8--

  Thanks!
  Weston
 
 
  On Tue, May 11, 2010 at 11:23 AM, Dmitrijs Ledkovs
  dmitrij.led...@ubuntu.com wrote:
 
  On 11 May 2010 17:32, Weston Ruter westonru...@gmail.com wrote:
   I'm working on a Python module for representing osisIDs (works,
   passages,
   IDs, and refs). I think I've got the OsisWork class baked pretty well
   (at
   least for reading/parsing), and I would appreciate your thoughts:
   http://github.com/openscriptures/api/blob/master/osis.py#L122
  
 
  Currently I can only assume that it is proprietary software =)
 
  Please include copyright and license at the top of the file.
 
  Copyright (C)  Name Lastname
 
  and boiler-plate for one of the OSI / FSF approved licenses.
 
  I recommend you to choose between Expat, 3-Clause BSD or LGPL / GPL
  licenses depending on how much freedom you would like to grant =)
 
  ___
  sword-devel mailing list: sword-devel@crosswire.org
  http://www.crosswire.org/mailman/listinfo/sword-devel
  

Re: [sword-devel] osis.py

2010-05-11 Thread Greg Hellings
On Tue, May 11, 2010 at 6:32 PM, Dmitrijs Ledkovs
dmitrij.led...@ubuntu.com wrote:
 On 11 May 2010 22:16, Weston Ruter westonru...@gmail.com wrote:
- Snip -
 More on why dual licensing is a good idea:
 http://benalman.com/news/2010/02/on-licensing-my-code/


 Dual licensing is a bad idea cause it further spreads license profiliation =)

Not true - it prevents many people from taking a license, modifying a
single clause or small set of them, and creating a whole new license.

Additionally, by dual-licensing a work, I am thereby free to create my
own GPL projects and products in my own spare time under the GPL (more
well known) but still offer the work under a weaker license like MIT
(less well known) when I'm working on products that are not always
suitable for GPL'd software, e.g. part of my job.

Can I still use the MIT code under my GPL code? Yes.  But I may not
know that provision of the GPL or I might not be aware of the
provisions of the MIT license.  Offering under the GPL as well as the
MIT is not a bad thing - unless you really don't want to allow non-OSS
distribution of your work ever.  But for some people who don't care as
strongly about that, there is only the convenience of knowing that
this is, for sure, under the GPL and if later versions of the GPL
become incompatible with MIT licenses, there is a much stronger chance
they will allow incorporation of the GPL'd work into them (and a
guarantee if the and later versions clause of GPL licensing is
maintained).

--Greg

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page