mirror of
https://github.com/github/choosealicense.com
synced 2025-01-03 10:31:44 +01:00
hack in supported fields
This commit is contained in:
parent
eae239088e
commit
9d6bccda17
@ -26,7 +26,7 @@ limitations:
|
||||
|
||||
---
|
||||
|
||||
Copyright (c) <year> <owner> All rights reserved.
|
||||
Copyright (c) [year] [fullname] All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
|
@ -26,7 +26,7 @@ limitations:
|
||||
---
|
||||
|
||||
The Clear BSD License
|
||||
Copyright (c) [xxxx]-[xxxx] [Owner Organization]
|
||||
Copyright (c) [year] [fullname]
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the disclaimer
|
||||
@ -36,9 +36,9 @@ below) provided that the following conditions are met:
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of [Owner Organization] nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
* Neither the name of [fullname] nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
|
||||
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
|
@ -25,7 +25,7 @@ limitations:
|
||||
|
||||
---
|
||||
|
||||
Copyright (c) <year> <owner>. All rights reserved.
|
||||
Copyright (c) [year] [fullname]. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
|
@ -28,8 +28,7 @@ limitations:
|
||||
---
|
||||
|
||||
ISC License:
|
||||
Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
Copyright (c) [year], [fullname]
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
@ -30,7 +30,7 @@ limitations:
|
||||
---
|
||||
|
||||
MIT License
|
||||
Copyright (c) <year> <copyright holders>
|
||||
Copyright (c) [year] [fullname]
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
|
@ -29,9 +29,8 @@ limitations:
|
||||
---
|
||||
|
||||
University of Illinois/NCSA Open Source License
|
||||
Copyright (c) <Year> <Owner Organization Name>. All rights reserved.
|
||||
Developed by: <Name of Development Group> <Name of Institution> <URL for
|
||||
Development Group/Institution>
|
||||
Copyright (c) [year] [fullname]. All rights reserved.
|
||||
Developed by: [fullname] [project] [project_url]
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
with the Software without restriction, including without limitation the rights
|
||||
@ -43,10 +42,9 @@ furnished to do so, subject to the following conditions:
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimers in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the names of <Name of Development Group, Name of Institution>,
|
||||
nor the names of its contributors may be used to endorse or promote
|
||||
products derived from this Software without specific prior written
|
||||
permission.
|
||||
* Neither the names of [fullname], [project], nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
Software without specific prior written permission.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
@ -17,6 +17,29 @@ site.collections['licenses'].docs.each do |license|
|
||||
puts "Updating the #{license.data['title']}..."
|
||||
text_file = File.join(text_dir, "#{license.data['spdx-id']}.txt")
|
||||
spdx_text = File.read(text_file).gsub(/\s+\n/, "\n")
|
||||
|
||||
license_key = license.data['spdx-id'].downcase
|
||||
|
||||
if ['bsd-2-clause', 'bsd-3-clause'].include? license_key
|
||||
spdx_text = spdx_text.gsub(/<year>/, '[year]')
|
||||
spdx_text = spdx_text.gsub(/<owner>/, '[fullname]')
|
||||
elsif license_key == 'bsd-3-clause-clear'
|
||||
spdx_text = spdx_text.gsub(/\[xxxx\]-\[xxxx\]/, '[year]')
|
||||
spdx_text = spdx_text.gsub(/\[Owner Organization\]/, '[fullname]')
|
||||
elsif license_key == 'isc'
|
||||
spdx_text = spdx_text.gsub(/Copyright.*Consortium/m, 'Copyright (c) [year], [fullname]')
|
||||
elsif license_key == 'mit'
|
||||
spdx_text = spdx_text.gsub(/<year>/, '[year]')
|
||||
spdx_text = spdx_text.gsub(/<copyright holders>/, '[fullname]')
|
||||
elsif license_key == 'ncsa'
|
||||
spdx_text = spdx_text.gsub(/<Year>/, '[year]')
|
||||
spdx_text = spdx_text.gsub(/<Owner Organization Name>/, '[fullname]')
|
||||
spdx_text = spdx_text.gsub(/<Name of Development Group>/, '[fullname]')
|
||||
spdx_text = spdx_text.gsub(/<Name of Institution>/, '[project]')
|
||||
spdx_text = spdx_text.gsub(%r{<URL for Development Group/Institution>}, '[project_url]')
|
||||
spdx_text = spdx_text.gsub(/<Name of Development Group, Name of Institution>/, '[fullname], [project]')
|
||||
end
|
||||
|
||||
license_text = ''
|
||||
|
||||
spdx_text.lines.each do |line|
|
||||
|
Loading…
x
Reference in New Issue
Block a user