Permalink
Browse files

updated readme for automated user creation

  • Loading branch information...
remy committed Oct 20, 2011
1 parent 060b709 commit 0ef1a83a1d4463202beb5e3741c0322361fdeaf8
Showing with 34 additions and 10 deletions.
  1. +34 −10 README.md
View
@@ -4,18 +4,41 @@ I always forget to add an MIT-license.txt file to my projects, so I
wanted to link to a single resource that would always be up to date and
would always have my details online.
-But why keep this to myself, so it's on github for your fork and pulling
-pleasure.
+But why keep this to myself, there's two ways to create your *own* MIT
+license page:
+
+1. Make a request to the API (details below)
+2. Fork this project and send a pull request
Now I can always include http://rem.mit-license.org in all my projects
which links `rem` (the cname) against my copyright holder name `Remy
Sharp` - all stored in the `users` directory.
-## Example
+## Requesting your own MIT license page
+
+You can fork this project, send me a pull request and wait for me to
+pull (which I'll do as quickly as possible) or if the user is still
+available you can do it yourself from the command line:
+
+ curl -d'{ "copyright": "Remy Sharp" }' http://rem.mit-license.org
+
+If the `rem` user isn't taken already, then this will create the new
+user file on the fly and the url will be immediately available.
+
+If there's any problems in the automated creation, send me a pull
+request and it'll go live soon after.
+
+Equally if you need to update the user file to include more details that
+you didn't initially include (extra fields in the next section) you will
+need to send a pull request on that `user.json` file via GitHub.
+
+## The user.json file
The `users` directory contains a list of files, each representing a host
-on mit-license.org. As present the file format is very simple, but can
-be upgraded in future.
+on mit-license.org. The minimum requirement for the JSON is that is
+contains a `copyright` field - everything else is optional.
+
+### copyright
Create a new file and give it the name of the CNAME you want (in my case
it's `rem.json`). This file contains a JSON object containing at least a
@@ -28,6 +51,8 @@ it's `rem.json`). This file contains a JSON object containing at least a
Means I can now link to: http://rem.mit-license.org and it will show my
license name (note that the date will always show the current year).
+### url
+
In addition to the `copyright` property, if you want to make a link from
the copyright text, you can include a `url` property:
@@ -36,6 +61,8 @@ the copyright text, you can include a `url` property:
"url": "http://remysharp.com"
}
+### format
+
And if you want your license to appear as plain text, just add the
`format` property (currently only `txt` and `html` are supported):
@@ -45,10 +72,7 @@ And if you want your license to appear as plain text, just add the
"format": "txt"
}
-Finally you can also include a license version target in the JSON file
-as explained in the next section.
-
-## License version targeting
+### 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
@@ -73,7 +97,7 @@ This can also be targeted in my JSON file:
Note that if no version is supplied, the latest copy of the LICENSE.html
will be displayed with your information included.
-## Themes
+### 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. The default theme

0 comments on commit 0ef1a83

Please sign in to comment.