Skip to content

Commit

Permalink
Add extra copyright, links in the copyright owner and year range
Browse files Browse the repository at this point in the history
  • Loading branch information
Richienb committed May 31, 2019
1 parent 549dbb9 commit cd4dcaa
Show file tree
Hide file tree
Showing 19 changed files with 186 additions and 93 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ before_install: npm i -g yarn

install: yarn install

script: yarn test
script:
- yarn test
- yarn lint
- yarn build
52 changes: 19 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Available fields:
- email
- format
- gravatar
- version
- theme

### copyright
Expand All @@ -59,13 +58,29 @@ You can also use an array to hold multiple copyright holders:

```json
{
"copyright": ["Remy Sharp (http://remysharp.com)", "Richie Bendall (https://richienb.github.io)"]
"copyright": ["Remy Sharp", "Richie Bendall"]
}
```

Which will be formatted as:

Remy Sharp (http://remysharp.com) and Richie Bendall (https://richienb.github.io)
Remy Sharp and Richie Bendall

If you additionally want to include a URL and email with each copyright holder, use objects in the array:

```json
{
"copyright": [{
"name": "Remy Sharp, https://remysharp.com",
"url": "https://remysharp.com",
"email": "remy@remysharp.com"
}, {
"name": "Richie Bendall, https://www.richie-bendall.ml",
"url": "https://www.richie-bendall.ml",
"email": "richiebendall@gmail.com"
}]
}
```

### url

Expand Down Expand Up @@ -117,28 +132,6 @@ And if you want to show your gravatar, just add the `gravatar` boolean property:

Note that the gravatar requires the email property. You also need to check the compatibility of the chosen theme. Currently, only the default theme supports Gravatar.

### License version targeting

License version targeting allows you to link your MIT license to a specific revision in this project - therefore fixing it permanently to a specific license text.

Though I don't expect the license text to change ever, this is just some extra assurance for you.

Targeting requires the [sha from the license commit](https://github.com/remy/mit-license/commits/master/LICENSE.html). This can be specified on the URL (in your permalink) or in the JSON file.

For example: <http://rem.mit-license.org/a526bf7ad1> (make sure to view-source) shows an older version of the LICENSE.html file (compared to the [latest version](http://rem.mit-license.org) - the older version didn't have the new themes).

This can also be targeted in my JSON file:

```json
{
"copyright": "Remy Sharp, http://remysharp.com",
"url": "http://remysharp.com",
"version": "a526rbf7"
}
```

Note that if no version is supplied, the latest copy of the LICENSE.html will be displayed with your information included.

### Themes

If you've got an eye for design (or like me: not): you can contribute a theme by adding a CSS file to the `themes` directory. You can use the latest CSS technologies since they are automatically polyfilled. The default theme is simple and clean, but you can add your own as you like.
Expand Down Expand Up @@ -198,21 +191,14 @@ The following types of requests can be made to this project:
the json file (currently none specified on `rem`)
- <http://rem.mit-license.org/license.html> HTML
- <http://rem.mit-license.org/license.txt> Text
- <http://rem.mit-license.org/a526bf7ad1> a526bf7ad1 version, HTML, or the
default format specified in the json file (again, none specified for
`rem` so defaults to HTML)
- <http://rem.mit-license.org/a526bf7ad1/license.html> a526bf7ad1 version,
HTML
- <http://rem.mit-license.org/a526bf7ad1/license.txt> a526bf7ad1 version,
text

The url also supports including a start year:

- <http://rem.mit-license.org/2009/> will
show a license year range of 2009-2016 (2016 being the current year)
- [http://rem.mit-license.org/2009-2010](http://rem.mit-license.org/2009-2010/)
allows me to force the year range
- <http://rem.mit-license.org/a526bf7ad1/2009-2010/license.txt> a526bf7ad1 version, with year range of 2009-2010 in plain text
- <http://rem.mit-license.org/2009-2010/license.txt> year range of 2009-2010 in plain text

Finally, the url also supports pinning the year

Expand Down
2 changes: 1 addition & 1 deletion licenses/0BSD.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>BSD Zero Clause License (0BSD)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.</p>
Expand Down
2 changes: 1 addition & 1 deletion licenses/AFL-3-0.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>Academic Free License v3.0 (AFL-3.0)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>This Academic Free License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
Expand Down
4 changes: 2 additions & 2 deletions licenses/AGPL-3-0.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>GNU Affero General Public License (AGPL-3.0)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p> <p> Preamble</p>

Expand Down Expand Up @@ -634,7 +634,7 @@
the "copyright" line and a pointer to where the full notice is found.</p>

<p> &lt;one line to give the program's name and a brief idea of what it does.&gt;
Copyright © <%= info %></p>
Copyright © <%- info %></p>

<p> This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
Expand Down
2 changes: 1 addition & 1 deletion licenses/ISC.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>The ISC License (ISC)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion licenses/MIT.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>The MIT License (MIT)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand Down
2 changes: 1 addition & 1 deletion licenses/NCSA.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>NCSA Open Source License (NCSA)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
Expand Down
2 changes: 1 addition & 1 deletion licenses/OFL.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>The SIL Open Font License (OFL)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
Expand Down
2 changes: 1 addition & 1 deletion licenses/UPL.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<article>
<%- gravatar %>
<h1>The Universal Permissive License (UPL)</h1>
<p>Copyright © <%= info %></p>
<p>Copyright © <%- info %></p>

<p>Subject to the condition set forth below, permission is hereby granted to any
person obtaining a copy of this software, associated documentation and/or data
Expand Down
2 changes: 1 addition & 1 deletion licenses/components/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<footer>
<p><a href="https://github.com/remy/mit-license">Fork this project to create your own MIT license that you can always link to.</a></p>
<p><a target="_blank" rel="noopener" href="https://github.com/remy/mit-license">Fork this project to create your own MIT license that you can always link to.</a></p>
</footer>
7 changes: 5 additions & 2 deletions licenses/components/header.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<head>
<title>MIT License</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.7">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description"
content="The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology. As a permissive license, it puts only very limited restriction on reuse and has, therefore, an excellent license compatibility.">
<!--
Welcome fellow open source developer. This project is here for you to
link to if you're like me and keep forgetting to include the
Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
"author": "Remy Sharp <remy@leftlogic.com> (http://remysharp.com/)",
"name": "mit-licence",
"description": "Hosted MIT License with details controlled through this repo",
"private": true,
"version": "1.0.0",
"repository": {
"type": "git",
"url": "git@github.com:remy/mit-license.git"
},
"scripts": {
"build": "tsc server.ts",
"start": "ts-node-dev --respawn --transpileOnly --no-notify server.ts",
"serve": "tsc server.ts && node server.js",
"serve": "yarn build && node server.js",
"test": "node test.js",
"lint": "eslint server.ts util.ts test.js --color --fix"
"lint": "eslint server.ts util.ts test.js --color"
},
"bugs": {
"url": "https://github.com/remy/mit-license/issues"
},
"license": "SEE LICENSE IN LICENSE",
"license": "MIT",
"dependencies": {
"@octokit/rest": "^16.27.3",
"btoa": "^1.2.1",
Expand All @@ -25,6 +27,7 @@
"ejs": "^2.6.1",
"express": "^4.17.1",
"express-minify": "^1.0.0",
"git-pull": "^0.1.0",
"humanize-list": "^1.0.1",
"md5": "^2.2.1",
"node-html-parser": "^1.1.15",
Expand All @@ -34,8 +37,10 @@
"typescript": "^3.4.5"
},
"devDependencies": {
"@types/btoa": "^1.2.3",
"@types/compression": "^0.0.36",
"@types/css": "^0.0.31",
"@types/ejs": "^2.6.3",
"@types/express": "^4.16.1",
"@types/express-minify": "^0.1.34",
"@types/md5": "^2.1.33",
Expand Down
2 changes: 2 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow:
Loading

0 comments on commit cd4dcaa

Please sign in to comment.