Skip to content

Commit

Permalink
fix wrong json merging
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzierep committed Jun 13, 2024
1 parent eae349d commit 7b65bef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/fetch_all_tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ jobs:
python -m pip install -r requirements.txt
sudo apt-get install jq
- name: Merge all tools
run: | #merge files with only one header -> https://stackoverflow.com/questions/16890582/unixmerge-multiple-csv-files-with-same-header-by-keeping-the-header-of-the-firs
run: | #merge files with only one header -> https://stackoverflow.com/questions/16890582/unixmerge-multiple-csv-files-with-same-header-by-keeping-the-header-of-the-firs; map(.[]) -> https://stackoverflow.com/questions/42011086/merge-arrays-of-json (get flat array, one tool per entry)
awk 'FNR==1 && NR!=1{next;}{print}' results/repositories*.list_tools.tsv > results/all_tools.tsv
jq -s '.' results/repositories*.list_tools.json > results/all_tools.json
jq -s 'map(.[])' results/repositories*.list_tools.json > results/all_tools.json
- name: Wordcloud and interactive table
run: |
bash ./bin/extract_all_tools_downstream.sh
Expand Down
2 changes: 2 additions & 0 deletions bin/get_community_tools.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# stop on error
set -e

for com_data_fp in data/communities/* ; do
if [[ -d "$com_data_fp" && ! -L "$com_data_fp" ]]; then
Expand Down

0 comments on commit 7b65bef

Please sign in to comment.