zeio commited on
Commit
e17516b
1 Parent(s): 7bb5f4d

fix(index): updated folders in index, added collection script

Browse files
Files changed (2) hide show
  1. collect.sh +25 -0
  2. index.tsv +2 -2
collect.sh ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ keyphrase=$1
6
+ folder=$2
7
+
8
+ if test -z "$keyphrase"; then
9
+ echo 'Keyphrase must not be empty'
10
+ exit
11
+ fi
12
+
13
+ if test -z "$folder"; then
14
+ echo 'Target folder name must not be empty'
15
+ exit
16
+ fi
17
+
18
+ i=0
19
+
20
+ mkdir -p "$folder"
21
+
22
+ for file in $(cat index.tsv | grep "$keyphrase" | awk '{printf("threads/%s/%08d.txt\n", $NF, $1)}'); do
23
+ cp $file $folder/$(printf "%04d" "$i").txt
24
+ i=$((i + 1))
25
+ done
index.tsv CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f1e6c8d54592754c8536ebaa5385561f11fb1d88b1356e564534c8c9f20abca8
3
- size 554332111
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ab6c5b6af3f5fc5212b36c7b9d5d106652d0ea30bd321f251c7760b7c9da923
3
+ size 546745427