I am working on a port of a codebase (Java) to another language (Python), with some modifications. The Java codebase is licensed under CC BY-NC-SA. Understandably, the Python codebase will also be CC BY-NC-SA, but what's not clear to me is whether I can write a book that goes into the implementation details and theory, and sell that for commercial purposes, assuming the Python codebase is published on Github or something like that.
1 Answer
If your book does not contain any actual code snippets or transliterations of the code into English (i.e. code translated to sufficiently descriptive pseudo-code), but it only describes the ideas contained in the code, then your book is not a derived work in the sense of copyrights and you are not constrained in how you publish and license the book.
If the book does contain snippets of code, then it becomes a question if your use of the code in the book falls under a copyright exemption, like fair use, or not. In many countries, copyright law contains exemptions of copyright protection, allowing small portions of a copyrighted work to be copied to, for example, provide context in a critique about the work. If your code snippets fall within the criteria of such an exemption can only be definitively be determined in a court of law.
-
3To be clear, if the book contains snippets of the translated code (which OP holds the copyright to) and not the original code, then what matters is whether OP's use of snippets the translated code would violate the copyright of the original code. The OP's book would be a transformative use of the original code, which greatly strengthens the case for a fair use defense in most jurisdictions, but it's probably still best to consult a copyright lawyer for advice.– kaya3Jul 19, 2021 at 11:22
-
@kaya3 But as I understand the concept of the book, it would be quite likely to show some "before"/"after". The "after" would likely fall into "transformative use" and be fine. But the "before" would have to rely on "fair use" and is the really tricky (lawyer...) part. Jul 19, 2021 at 16:14
-
@kaya3, the OP does not have an exclusive copyright claim on the translated code. As it is a translation, the copyrights are at least shared with the authors of the original Java code. Jul 19, 2021 at 17:22