Improvements to the analysis publication script