Request for exception to GPL license

Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Request for exception to GPL license

Robert Pyron
I have a few other issues that I will address in separate messages, but first an introduction:

I'm implementing a CHM reader in Python, based on Jed Wing's libchm, and guided by chmspec. So far I am able to read (and extract useful information from) #STRINGS, #SYSTEM, #TOCIDX, #TOPICS, #URLSTR, and #URLTBL. There is enough functionality already implemented to be useful to others, and I am almost ready to make an initial source release.

I need to decide on a license for my code. Since I connect to libchm (which is LGPL), and since this code is not intended to be stand-alone, I would like to release it under LGPL. My problem is that comments in my code quote liberally from chmspec, which is GPL.

Is it possible to get an exception to GPL in this case, as long as the quoted text remains as part of my source file (or files)?

Here is a sample comment:

#-----------------------------------------------------------------------------
# /#TOCIDX
#
# From chmspec:
#
#   5.3.7. #TOCIDX
#
#   Present in files with a non-empty contents file, when Binary TOC is on
#   and Compatibility is set to 1.1 or later.
#
#   This file is made up of 0x1000 byte blocks, but this is only apparent
#   because of extra bytes interrupting what would otherwise be a stream
#   of 20/28 byte structs. If the other parts (DWORDs & 16 byte structs)
#   didn't fit into these blocks then presumably this would show up in
#   the other parts too.
#
#   The first block is the header:
#
#   Table 5.9. The format of the #TOCIDX header.
#   Offset  Type    Comment/Value
#   ------  ----    -------------
#   0       DWORD   4096/header length/offset of no. 1 below
#   4       DWORD   offset of no. 3 below
#   8       DWORD   number of no. 3 below
#   0xC     DWORD   offset of no. 2 below
#   0x10    BYTE[4080]  0 (unknown)
#
#   The header is followed by the following different types of structs
#   in the specified order:
#
#      1.   20/28 byte structs (pages/books)
#      2.   list of DWORDs pointing into the #TOPICS file   [rlp = these are indices, not offsets]
#      3.   16 byte structs - links above stuff
#
#   First all the top level books/pages, then the next level, then the next & so on
#
#   Table 5.10. 20/28 byte structures
#   Offset  Type    Comment/Value
#   ------  ----    -------------
#   0       WORD    0 (unknown)
#   2       WORD    Unknown
#   4       DWORD   Seems to be a bit field:
#                       0x2 is whether or not New is turned on,
#                       0x4 is set when the entry is a book/has children and
#                       0x8 is set when the entry has a Local value.
#                       The other bits are unknown (0x1, 0x40, 0x100 are sometimes set on books).
#   8       DWORD   Unknown. In some cases it is an index into the #TOPICS file of the entry containing offsets to the title & filename.
#   0x0C    DWORD   Offset to the parent book.
#   0x10    DWORD   Offset to the next book/page in the current book/page.
#
#   The next two DWORDs are only present in books (28 byte structs)
#   0x14    DWORD   Offset to the first child of the book.
#   0x18    DWORD   0 (unknown)
#
#   Table 5.11. 16 byte structures
#   Offset  Type    Comment/Value
#   ------  ----    -------------
#   0       DWORD   Offset into no. 1 above.
#   4       DWORD   Some kind of sequence number that is incremented by one and starts at 666. I swear :)
#   8       DWORD   Offset into no. 2 above. Can contain RAM litter.
#   0xC     DWORD   Index in #TOPICS file of the entry containing offsets to the title & filename. Can contain RAM litter.
#
# rlp - comments on "Table 5.10. 20/28 byte structures", offset 0x8
#
#   Check the bitflags at offset 0x04. If this node has children (bit 0x4 is set)
#   but has no Local value (bit 0x8 is clear), then the DWORD at offset 0x08
#   is an offset into the #STRINGS file. Otherwise, the DWORD at offset 0x08
#   is an index into the #TOPICS file.
#
# rlp - I save the information extracted from this section in class TOCIDX:
#   class TOCIDX:
#       def __init__(self):
#           self.nodeTable = {}     # currentOffset : (nodeFlags, indexTOPICS, offsetParent, offsetNext, offsetFirstChild)
#           self.miscTable = {}     # currentOffset : (offset_into_nodeTable, offset_into_topicsTable, indexTOPICS)
#           self.topicsTable = {}   # currentOffset : indexTOPICS
#


_______________________________________________
chmspec-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/chmspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: Request for exception to GPL license

Paul Wise-2
Apologies for the lateness of this reply.

On Sat, 2010-09-11 at 13:40 -0400, Robert Pyron wrote:

> I'm implementing a CHM reader in Python, based on Jed Wing's libchm,
> and guided by chmspec. So far I am able to read (and extract useful
> information from) #STRINGS, #SYSTEM, #TOCIDX, #TOPICS, #URLSTR, and
> #URLTBL. There is enough functionality already implemented to be
> useful to others, and I am almost ready to make an initial source
> release.

Is there any particular reason you are starting from scratch instead of
just using one of the many existing readers?

> I need to decide on a license for my code. Since I connect to libchm
> (which is LGPL), and since this code is not intended to be
> stand-alone, I would like to release it under LGPL. My problem is that
> comments in my code quote liberally from chmspec, which is GPL.
>
> Is it possible to get an exception to GPL in this case, as long as the
> quoted text remains as part of my source file (or files)?

Regardless of the licensing question I would prefer that you refer to
the spec itself rather than duplicating part of it in your project.

On the licensing stuff, I'm not sure the GPL (or the LGPL) is the best
license for documentation anyway. In your case it would mean you would
have to distribute the DocBook source too. I need to think some more
about the right license.

--
bye,
pabs

http://bonedaddy.net/pabs3/

_______________________________________________
chmspec-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/chmspec-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Request for exception to GPL license

Robert Pyron


On Sun, Oct 10, 2010 at 12:42 AM, Paul Wise <[hidden email]> wrote:
Apologies for the lateness of this reply.

On Sat, 2010-09-11 at 13:40 -0400, Robert Pyron wrote:

> I'm implementing a CHM reader in Python, based on Jed Wing's libchm,
> and guided by chmspec. So far I am able to read (and extract useful
> information from) #STRINGS, #SYSTEM, #TOCIDX, #TOPICS, #URLSTR, and
> #URLTBL. There is enough functionality already implemented to be
> useful to others, and I am almost ready to make an initial source
> release.

Is there any particular reason you are starting from scratch instead of
just using one of the many existing readers?

Oh, the usual reasons:
--  To scratch my own itch
--  None of the existing readers has everything I need, as far as I know.
    I really want multiple tabs, plus the ability to resize text. Also, TOC,
    index, and search.
--  An opportunity to learn a new technology (new to me, at least). My
    current plan is to implement my viewer with Mozilla/XULRunner.
--  Kchmviewer comes very close to what I'm looking for. However, the
    Windows version is built using the Qt HTML viewer, which in some
    ways is seriously broken. For example, various versions of
    Python##.chm are unreadable with kchmviewer.
--  I'm also aware of Ling Li's CHM Reader add-on for Firefox
    ( http://sourceforge.net/projects/chmreader/ ). It does not function as
    a stand-alone viewer. I will probably borrow some code from that project.
 

> I need to decide on a license for my code. Since I connect to libchm
> (which is LGPL), and since this code is not intended to be
> stand-alone, I would like to release it under LGPL. My problem is that
> comments in my code quote liberally from chmspec, which is GPL.
>
> Is it possible to get an exception to GPL in this case, as long as the
> quoted text remains as part of my source file (or files)?

Regardless of the licensing question I would prefer that you refer to
the spec itself rather than duplicating part of it in your project.

I've been thinking about that. I really like having pieces of the spec right
in front of me (i.e., in the source code) while I'm developing. However,
I can write a simple preprocessor to strip these pieces for a release
version.

 

On the licensing stuff, I'm not sure the GPL (or the LGPL) is the best
license for documentation anyway. In your case it would mean you would
have to distribute the DocBook source too. I need to think some more
about the right license.

Ouch. I just wanted to quote the documentation in my source code.
Now I'm definitely thinking the preprocessor idea is the way to go.



_______________________________________________
chmspec-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/chmspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: Request for exception to GPL license

Razvan Cojocaru-3
Hello Robert,


> --  None of the existing readers has everything I need, as far as I know.
>      I really want multiple tabs, plus the ability to resize text. Also,
> TOC,
>      index, and search.

xCHM has had tabbed browsing support for more than 1 year now. It has
also been able to resize text (and change fonts), display the TOC and
index, and fast search since I think 2004.

http://xchm.sourceforge.net


> --  An opportunity to learn a new technology (new to me, at least). My
>      current plan is to implement my viewer with Mozilla/XULRunner.

I would have liked to see that happen with xCHM too, unfortunately I
couldn't find the time to write and test a wxHtmlWidget implemented with
XULRunner or a similar technology. If ever you feel like writing a
wxWidgets-friendly wrapper around XULRunner please let me know.


Best regards,
RC


_______________________________________________
chmspec-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/chmspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: Request for exception to GPL license

Paul Wise-2
In reply to this post by Robert Pyron
On Sun, 2010-10-10 at 05:40 -0400, Robert Pyron wrote:

> --  None of the existing readers has everything I need, as far as I know.
>     I really want multiple tabs, plus the ability to resize text. Also, TOC,
>     index, and search.

xchm sounds like it has most of that.

> --  Kchmviewer comes very close to what I'm looking for. However, the
>     Windows version is built using the Qt HTML viewer, which in some
>     ways is seriously broken. For example, various versions of
>     Python##.chm are unreadable with kchmviewer.

You could send a patch to get it to use WebKit or Gecko.

> --  I'm also aware of Ling Li's CHM Reader add-on for Firefox
>     ( http://sourceforge.net/projects/chmreader/ ). It does not function as
>     a stand-alone viewer. I will probably borrow some code from that project.

I've added a link to that from the chmspec website:

http://chmspec.nongnu.org/

> I've been thinking about that. I really like having pieces of the spec right
> in front of me (i.e., in the source code) while I'm developing. However,
> I can write a simple preprocessor to strip these pieces for a release
> version.

You can use either a window manager with always-on-top functionality
(such as DeskPins on Windows), a tiling window manager or an IDE to keep
the spec in front of you, no need to embed it in the code.

> Ouch. I just wanted to quote the documentation in my source code.
> Now I'm definitely thinking the preprocessor idea is the way to go.

Personally I think that sounds like a painful way to work.

I'm getting the feeling that I made a huge mistake in not making chmdeco
a LGPL-licensed library implemented in C to make it easier for folks to
write GUI viewers for CHM files. Wheel reinvention gives me the
heebie-jeebies!

--
bye,
pabs

http://bonedaddy.net/pabs3/

_______________________________________________
chmspec-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/chmspec-devel

signature.asc (205 bytes) Download Attachment