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 .