Commit graph

19 commits

Author SHA1 Message Date
thufie
a3dbbdb0ee Just removing my old librepay link 2024-05-30 04:45:46 +02:00
thufie
7ee4329d27 Merge pull request 'Clean-up and fix for empty-titled sections in Markdown and PDFs' (#7) from Endo/npl-builder:endo-cleanup into main
Reviewed-on: https://git.pixie.town/thufie/npl-builder/pulls/7
2023-01-24 22:06:10 +01:00
Endo
bfa8363f8c Merged ghost sections without title while preserving role=restriction*
When exporting the DocBook template to Markdown or PDF (there might be more cases in formats not tested), Pandoc still includes a section into the exported format even when it doesn't have a title.

In the Markdown files, this means added lines `##` in-between ```Any use by a business that is privately owned and managed, and that seeks to generate profit from the labor of employees paid by salary or other wages, is not permitted under this license.``` and ```You may exercise the rights granted in the license grant for any purposes only if:```.

When the license doesn't strip out elements with `role=restriction-attribution` (for the no-attribution licenses), there's another empty section title between ```You do not use the Work to either Discriminate or spread Hate Speech on the basis of sex, sexual orientation, gender identity, race, age, disability, color, national origin, religion, caste, or lower economic status.``` and ```If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made by any Licensor to remove credit from a Collection or Adaptation, keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing:```

This is an issue when exporting the Markdown license files to PDFs, because these ghost sections will be visible in the outline viewer of a PDF reader. Might also be a potential issue if users want to generate a table of contents or index along with their PDF — it might put these ghost section in, too.

To fix this, DocBook doesn't have a special "ghost section" type (closest is a `<bridgehead>`, but that completely screws over formatting), so the contents of the ghost sections were merged into its parent with the `role` of the ghost section in mind.

Output was sanity-tested with these commands:
```sh
$ xml ed -d "/article/info" template.xml | xml ed -d "*/*/*[@role='restriction']" | pandoc -f docbook -t markdown -s -o test-modified.md
$ xml ed -d "/article/info" template-original.xml | xml ed -d "*/*/*[@role='restriction']" | pandoc -f docbook -t markdown -s -o test-original.md
$ diff test-original.md test-modified.md
215,216d214
< ## 
<``` `template-original.xml` is the file from this branch's last commit, c706fa6efc5ecd7217342fa5f7e23fdc613fb07b.
2022-10-03 12:10:09 +02:00
Endo
43901c4dd1 Fixed XML indentation in the Restrictions section 2022-10-03 12:10:09 +02:00
thufie
ab8582d3fe Merge pull request 'Fix for thufie/npl-builder#5' (#6) from Endo/npl-builder:endo-patch-issue-5 into main
Reviewed-on: https://git.pixie.town/thufie/npl-builder/pulls/6
2022-09-30 05:37:11 +02:00
Endo
927d9dee20 Fix for thufie/npl-builder#5
Definition for Source Code now reads: `Source Code is the human-readable form of Software through which the Original Author and/or Distributor originally created, derived, and/or modified it.`

Signed-off-by: Endo <endo@noreply.git.pixie.town>
2022-09-28 15:28:52 +02:00
Thufie
0d451920c6 regenerated license texts with fixed typos 2022-05-23 15:03:21 -05:00
thufie
f0c4a285b9 fixed typos pointed out in #3
This was a funny typo from refactoring into npl-builder.
2022-05-14 20:43:26 +02:00
Caden Haustein
06ed45c19c Create LICENSE 2021-09-04 18:36:46 -05:00
thufie
c966a0fbba Added donation link to readme 2021-07-27 01:34:14 +02:00
BuildTools
cecc48af0e new output files 2021-07-26 18:09:20 -05:00
BuildTools
662f29861c fixes to makefile 2021-07-26 18:08:51 -05:00
BuildTools
25285169bd renamed NPL to NVPL and NPL-NA to NVPL-NA 2021-07-26 18:02:56 -05:00
thufie
2f6a3144b0 updated link in license header example 2021-07-25 08:54:39 +02:00
BuildTools
20278ee371 rebuilt files with space fix 2021-07-25 01:45:16 -05:00
thufie
2eef20e50f found a missing space 2021-07-25 08:42:50 +02:00
thufie
d0d24dd0ad updated readme with examples 2021-07-25 08:41:27 +02:00
thufie
48da3b4240 Updated README to clarify people don't have to download the builder to get the licenses. 2021-07-25 07:01:14 +02:00
Thufie
87ba3c0fee initial commit 2021-07-24 23:49:44 -05:00