Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
20 changes: 20 additions & 0 deletions src/index/gen_index.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>.
"

def open_index(path, comments):
for line in open(path):
line = line.strip()
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/index/japanese/LICENSE
Original file line number Diff line number Diff line change
@@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>.
8 changes: 8 additions & 0 deletions src/index/korean/LICENSE
Original file line number Diff line number Diff line change
@@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>.
8 changes: 8 additions & 0 deletions src/index/simpchinese/LICENSE
Original file line number Diff line number Diff line change
@@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>.
8 changes: 8 additions & 0 deletions src/index/singlebyte/LICENSE
Original file line number Diff line number Diff line change
@@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>.
8 changes: 8 additions & 0 deletions src/index/tradchinese/LICENSE
Original file line number Diff line number Diff line change
@@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>.