From b9dd6dd455684db6e58f2958fb82a26e766169f3 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Fri, 31 Jul 2020 00:36:11 +0200 Subject: [PATCH] Make pipeline_names.json --- .gitignore | 1 + update_pipeline_details.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9c659b19c7..05e5afc8ce 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ config.ini public_html/pipelines.json +public_html/pipeline_names.json public_html/assets/js/fa-icons.json nfcore_stats.json nfcore_issue_stats.json diff --git a/update_pipeline_details.php b/update_pipeline_details.php index 49b96fcf19..6384403fc7 100644 --- a/update_pipeline_details.php +++ b/update_pipeline_details.php @@ -36,8 +36,9 @@ ] ]); -// Final filename to write JSON to +// Final filenames to write JSON to $results_fn = dirname(__FILE__).'/public_html/pipelines.json'; +$pipeline_names_fn = dirname(__FILE__).'/public_html/pipeline_names.json'; // Load a copy of the existing JSON file, if it exists $old_json = false; @@ -161,14 +162,17 @@ function sort_datestamp($a,$b) { } // Count workflows +$pipeline_names = []; foreach($results['remote_workflows'] as $repo){ $results['pipeline_count']++; if($repo['archived']){ $results['archived_count']++; } else if(count($repo['releases']) > 0){ $results['published_count']++; + $pipeline_names[] = $repo['name']; } else { $results['devel_count']++; + $pipeline_names[] = $repo['name']; } } @@ -176,6 +180,9 @@ function sort_datestamp($a,$b) { $results_json = json_encode($results, JSON_PRETTY_PRINT)."\n"; file_put_contents($results_fn, $results_json); +// Print simple list of pipelines to a file +file_put_contents($pipeline_names_fn, json_encode(array('pipeline' => $pipeline_names))); + ////// Tweet about new releases // Get old releases $old_rel_tags = array();