Skip to content

Commit 6174b38

Browse files
committed
add readme and things
1 parent 1cd16f1 commit 6174b38

File tree

3 files changed

+43
-11
lines changed

3 files changed

+43
-11
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
config
2+
configs
3+
out
4+
*.swp
5+
installs-cache.json
6+
__pycache__
7+
output
8+
cache*

README.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1-
# eln-repo-split
1+
# eln-repo-split
2+
3+
4+
## Usage
5+
6+
### Step 1: Get configs
7+
8+
First, you'll need configs. You can clone the [github.com/minimization/content-resolver-input](https://github.com/minimization/content-resolver-input) repository and use the `configs` directory.
9+
10+
Or you can put your own configs to a local directory:
11+
12+
```
13+
$ mkdir configs
14+
$ vim configs/config.yml
15+
```
16+
17+
See the [config spec](https://github.com/minimization/content-resolver/blob/master/config_specs/eln-repo-splitter.yaml) for reference.
18+
19+
### Step 2: Run the script
20+
21+
For initial run, the script will download data from [Content Resolver](https://tiny.distro.builders). This can take a minute.
22+
23+
```
24+
$ mkdir output
25+
$ ls configs # <--- this needs to have the configs. You can of course point to a different location.
26+
$ ./eln_repo_split.py ./configs ./output
27+
```
28+
29+
For repetitive runs, you can use the cashed data and save a lot of time.
30+
31+
```
32+
$ ./eln_repo_split.py --use-cache ./configs ./output
33+
```
34+
35+
A summary will be printed on the standard output and text files with the results will be in the `./output` directory.

eln_repo_split.py

-10
Original file line numberDiff line numberDiff line change
@@ -379,23 +379,13 @@ def main():
379379
settings = load_settings()
380380

381381
configs = get_configs(settings)
382-
dump_data("cache_configs.json", configs)
383382

384383
if settings["use_cache"]:
385384
data = load_data("cache_data.json")
386385
else:
387386
data = get_data(settings)
388387
dump_data("cache_data.json", data)
389388

390-
391-
392-
393-
#configs = load_data("cache_configs.json")
394-
395-
#data = get_data(settings)
396-
#dump_data("cache_data.json", data)
397-
data = load_data("cache_data.json")
398-
399389
query = Query(data, configs, settings)
400390

401391

0 commit comments

Comments
 (0)