Skip to content

Commit

Permalink
Write edition into form text
Browse files Browse the repository at this point in the history
  • Loading branch information
kemitchell committed Aug 11, 2017
1 parent c1aeeba commit 2c4f526
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 8 deletions.
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CF=node_modules/.bin/commonform
SPELL=node_modules/.bin/reviewers-edition-spell
OUTPUT=build
GIT_TAG=$(strip $(shell git tag -l --points-at HEAD))
EDITION=$(if $(GIT_TAG),$(GIT_TAG),Development Draft)

FORMS=$(basename $(wildcard *.cform))
DOCX=$(addprefix $(OUTPUT)/,$(addsuffix .docx,$(FORMS)))
Expand All @@ -13,15 +16,22 @@ all: $(TARGETS)
$(OUTPUT):
mkdir -p $@

$(OUTPUT)/%.md: %.cform %.options blanks.json | $(CF) $(OUTPUT)
$(OUTPUT)/%.md: %.form %.options blanks.json | $(CF) $(OUTPUT)
$(CF) render --format markdown $(shell cat $*.options) --blanks blanks.json < $< > $@

$(OUTPUT)/%.docx: %.cform %.options %.json blanks.json | $(CF) $(OUTPUT)
$(OUTPUT)/%.docx: %.form %.options %.json blanks.json | $(CF) $(OUTPUT)
$(CF) render --format docx $(shell cat $*.options) --signatures $*.json --blanks blanks.json < $< > $@

$(OUTPUT)/%.json: %.cform | $(CF) $(OUTPUT)
$(OUTPUT)/%.json: %.form | $(CF) $(OUTPUT)
$(CF) render --format native < $< > $@

%.form: %.cform
ifeq ($(EDITION),Development Draft)
cat $< | sed "s!PUBLICATION!a development draft of the Switchmode Developer Agreement!" > $@
else
cat $< | sed "s!PUBLICATION!the $(shell echo "$(EDITION)" | $(SPELL) | sed 's!draft of!draft of the!') of the Switchmode Developer Agreement!" > $@
endif

%.pdf: %.docx
doc2pdf $<

Expand Down
6 changes: 4 additions & 2 deletions agreement.cform
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
""Company"" and ""Developer"" agree to these terms, the [Agreement Edition] [Agreement Name]:
""Company"" and ""Developer"" agree to these terms:

\Published Form\ This is PUBLICATION. See https://switchmode.kemitchell.com for license terms and other information.

\Purpose\ Open software developers and companies approach intellectual property, confidentiality, and other legal matters differently. The expectations of their user and customer communities differ, too. The purpose of this agreement is to enable <Developer> to bridge the gap and do paid work for <Company> without creating issues either for <Company> or for <Open Software> efforts that <Developer> has participated in, or may participate in later. This agreement achieves that purpose with intellectual property, confidentiality, and other terms that vary, depending on whether open or proprietary expectations apply to specific work.

Expand Down Expand Up @@ -72,7 +74,7 @@

\Approving Open Release Request\ If the <Technical Representative> fails to send a decision in time for a <Proposed Release> that is a <Generic Improvement to Open Source>, and was noted as a <Generic Improvement to Open Source> in the <Open Release Request>, that <Proposed Release> automatically becomes an <Approved Release>. Otherwise, a <Proposed Release> becomes an <Approved Release> only if the <Technical Representative> confirms that decision in writing.

\License to Release\ <Company> licenses <Developed Intellectual Property> in each <Approved Release> to <Developer>. The license permits <Developer> to sublicense the <Approved Release> to the public. For an <Approved Release> that is a <Copyright Derivative> of <Open Software>, the terms of the public license must be the same terms on which the <Open Software> is currently licensed to the public. For other <Developed Intellectual Property>, the terms of the public license must be a <Separate MIT License>. In either case, unless an executive officer gives <Notice> of permission to attribute the <Approved Release> to the <Company> by name, <Developer> must replace the standard copyright notice with a statement that <Developer> sublicenses under the [Agreement Edition] [Agreement Name].
\License to Release\ <Company> licenses <Developed Intellectual Property> in each <Approved Release> to <Developer>. The license permits <Developer> to sublicense the <Approved Release> to the public. For an <Approved Release> that is a <Copyright Derivative> of <Open Software>, the terms of the public license must be the same terms on which the <Open Software> is currently licensed to the public. For other <Developed Intellectual Property>, the terms of the public license must be a <Separate MIT License>. In either case, unless an executive officer gives <Notice> of permission to attribute the <Approved Release> to the <Company> by name, <Developer> must replace the standard copyright notice with a statement that <Developer> sublicenses under PUBLICATION.

\Developer Guarantees\ <Developer> guarantees that all of these statements will be true of <Developed Intellectual Property> when delivered to <Company>:

Expand Down
2 changes: 0 additions & 2 deletions blanks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"Agreement Edition": "First Draft of the First Edition",
"Agreement Name": "Switchmode Developer Agreement",
"Large Expense Payment Deadline": "seven calendar days",
"Payment Deadline":"thirty calendar days",
"Dispute Deadline":"fourteen calendar days",
Expand Down
84 changes: 84 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"devDependencies": {
"commonform-cli": "^0.25.0"
"commonform-cli": "^0.25.0",
"reviewers-edition-spell": "^2.0.0"
}
}

0 comments on commit 2c4f526

Please sign in to comment.