diff --git a/README.md b/README.md index f27423d..deb2411 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,4 @@ All of the streams and topics are visible without logging in. If you like, please join it. We are discussing this project in [`#競プロ > ac-library-rs`](https://rust-lang-jp.zulipchat.com/#narrow/stream/334326-.E7.AB.B6.E3.83.97.E3.83.AD/topic/ac-library-rs). +# puyopuyo-viewer diff --git a/expand.py b/expand.py index 283d6fb..c35829e 100755 --- a/expand.py +++ b/expand.py @@ -4,6 +4,7 @@ import getopt import tempfile import subprocess +import pathlib usage = '''Usage:expand.py [options] Output Modules: @@ -45,7 +46,7 @@ 'scc': ('internal_scc',), 'segtree': ('internal_bit', 'internal_type_traits',), 'twosat': ('internal_scc',), } -src_path = 'src/' +src_path = pathlib.Path(sys.argv[0]).parent.joinpath('src') output_path = None @@ -53,7 +54,7 @@ def output_file(filename): global src_path res = [] - with open(src_path+filename+'.rs', 'r', encoding='utf-8', newline='') as f: + with open(src_path.joinpath(filename+'.rs'), 'r', encoding='utf-8', newline='') as f: res.append('pub mod {} {{'.format(filename)) for line in f: