From 5f8ebcdfc33256ab14a9b370a3defb13c3ffcfb0 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Mon, 5 Nov 2018 16:39:22 -0800 Subject: [PATCH] Add CC0 license files to subcrates --- LICENSE.txt => LICENSE | 0 src/index/gen_index.py | 20 ++++++++++++++++++++ src/index/japanese/LICENSE | 8 ++++++++ src/index/korean/LICENSE | 8 ++++++++ src/index/simpchinese/LICENSE | 8 ++++++++ src/index/singlebyte/LICENSE | 8 ++++++++ src/index/tradchinese/LICENSE | 8 ++++++++ 7 files changed, 60 insertions(+) rename LICENSE.txt => LICENSE (100%) mode change 100644 => 100755 src/index/gen_index.py create mode 100644 src/index/japanese/LICENSE create mode 100644 src/index/korean/LICENSE create mode 100644 src/index/simpchinese/LICENSE create mode 100644 src/index/singlebyte/LICENSE create mode 100644 src/index/tradchinese/LICENSE diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE diff --git a/src/index/gen_index.py b/src/index/gen_index.py old mode 100644 new mode 100755 index 5bd847d9..c4e55bca --- a/src/index/gen_index.py +++ b/src/index/gen_index.py @@ -9,6 +9,16 @@ import heapq import argparse +CC0_LICENSE = "rust-encoding by Kang Seonghoon + +To the extent possible under law, the person who associated CC0 with +rust-encoding has waived all copyright and related or neighboring rights +to rust-encoding. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see . +" + def open_index(path, comments): for line in open(path): line = line.strip() @@ -42,6 +52,15 @@ def read_index(opts, crate, name, comments): return open_index(cached_path, comments) +def write_license_file(crate); + dirname = os.path.join(os.path.dirname(__file__), crate) + try: + os.mkdir(dirname) + except Exception: + pass + with open(os.path.join(dirname, "LICENSE")) as f: + f.write(CC0_LICENSE) + def mkdir_and_open(crate, name): dirname = os.path.join(os.path.dirname(__file__), crate) try: @@ -974,6 +993,7 @@ def main(): if opts.filters and all(s not in index for s in opts.filters): continue if opts.func_filter and generate is not opts.func_filter: continue print >>sys.stderr, 'generating index %s...' % index, + write_license_file(crate) forwardsz, backwardsz, backwardszslow = generate(opts, crate, index) totalsz += forwardsz + backwardsz totalszslow += forwardsz + backwardszslow diff --git a/src/index/japanese/LICENSE b/src/index/japanese/LICENSE new file mode 100644 index 00000000..9e376470 --- /dev/null +++ b/src/index/japanese/LICENSE @@ -0,0 +1,8 @@ +rust-encoding by Kang Seonghoon + +To the extent possible under law, the person who associated CC0 with +rust-encoding has waived all copyright and related or neighboring rights +to rust-encoding. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see . diff --git a/src/index/korean/LICENSE b/src/index/korean/LICENSE new file mode 100644 index 00000000..9e376470 --- /dev/null +++ b/src/index/korean/LICENSE @@ -0,0 +1,8 @@ +rust-encoding by Kang Seonghoon + +To the extent possible under law, the person who associated CC0 with +rust-encoding has waived all copyright and related or neighboring rights +to rust-encoding. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see . diff --git a/src/index/simpchinese/LICENSE b/src/index/simpchinese/LICENSE new file mode 100644 index 00000000..9e376470 --- /dev/null +++ b/src/index/simpchinese/LICENSE @@ -0,0 +1,8 @@ +rust-encoding by Kang Seonghoon + +To the extent possible under law, the person who associated CC0 with +rust-encoding has waived all copyright and related or neighboring rights +to rust-encoding. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see . diff --git a/src/index/singlebyte/LICENSE b/src/index/singlebyte/LICENSE new file mode 100644 index 00000000..9e376470 --- /dev/null +++ b/src/index/singlebyte/LICENSE @@ -0,0 +1,8 @@ +rust-encoding by Kang Seonghoon + +To the extent possible under law, the person who associated CC0 with +rust-encoding has waived all copyright and related or neighboring rights +to rust-encoding. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see . diff --git a/src/index/tradchinese/LICENSE b/src/index/tradchinese/LICENSE new file mode 100644 index 00000000..9e376470 --- /dev/null +++ b/src/index/tradchinese/LICENSE @@ -0,0 +1,8 @@ +rust-encoding by Kang Seonghoon + +To the extent possible under law, the person who associated CC0 with +rust-encoding has waived all copyright and related or neighboring rights +to rust-encoding. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see .