From f6f4d74f70e88ed5302acc002f2062d998dc982f Mon Sep 17 00:00:00 2001 From: bgruening Date: Fri, 3 Jan 2025 11:29:31 +0000 Subject: [PATCH] deploy: 599f6b4c4145d89a9fab5dede77d88bfff01e751 --- README.md | 8 +- auto-exec-tools-in-docker.html | 5 +- bin/deploy_docs | 11 --- bin/gfm2html | 64 --------------- src/generate_html.py | 142 --------------------------------- 5 files changed, 7 insertions(+), 223 deletions(-) delete mode 100755 bin/deploy_docs delete mode 100755 bin/gfm2html delete mode 100644 src/generate_html.py diff --git a/README.md b/README.md index d3a3ccd1b..82d62c940 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ Documentation ============= -The documentation is automatically generated when the main [`README.md`](../README.md) is changed on the `master` branch. +The documentation is automatically generated when the main [`README.md`](https://github.com/bgruening/docker-galaxy/blob/main/README.md) is changed on the `main` branch. -For information, this automatic generation uses the GitHub API (in [`bin/gfm2html`](bin/gfm2html)) and a [Python script](src/generate_html.py) to transform the markdown in the [`README.md`](../README.md) into the HTML files. -This generation is automatically launched by Travis-CI with [`bin/deploy_docs`](bin/deploy_docs) script. +For information, this automatic generation uses a [Python script](src/generate_docs.py) to transform the markdown in the `README.md` into the HTML files. +This generation is automatically launched by a [GitHub Action Workflow](https://github.com/bgruening/docker-galaxy/actions/workflows/update-site.yml). -So, if you see any error in the [online documentation](http://bgruening.github.io/docker-galaxy-stable), you can first check the [`README.md`](../README.md). If the error does not come from the [`README.md`](../README.md), you can either file an issue or check the [Python](src/generate_html.py) or the [bash](bin/gfm2html) scripts used to generate the HTML files. +So, if you see any error in the [online documentation](http://bgruening.github.io/docker-galaxy), you can first check the `README.md`. If the error does not come from the `README.md`, you can either file an issue or check the [Python](src/generate_docs.py) script used to generate the HTML files. diff --git a/auto-exec-tools-in-docker.html b/auto-exec-tools-in-docker.html index c5686acac..73203d9a0 100644 --- a/auto-exec-tools-in-docker.html +++ b/auto-exec-tools-in-docker.html @@ -121,10 +121,11 @@

This is a very cool feature where Galaxy automatically detects that your tool has an associated docker image, pulls it and runs it for you. These images (when available) have been generated using - + mulled - . To test, install the + . +To test, install the IUC bedtools diff --git a/bin/deploy_docs b/bin/deploy_docs deleted file mode 100755 index 060bb4774..000000000 --- a/bin/deploy_docs +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -git config user.name "Travis-CI" -git config user.email "noreply@travis-ci.org" -git remote rm origin && git remote add origin https://bgruening:${GH_TOKEN}@github.com/bgruening/docker-galaxy-stable -git fetch origin -git checkout master -./docs/bin/gfm2html README.md docs/ -git add docs/ -git commit -m "[ci skip] Update site on `date "+%Y-%m-%d %H:%M:%S"`" -git push origin master diff --git a/bin/gfm2html b/bin/gfm2html deleted file mode 100755 index db293ab0d..000000000 --- a/bin/gfm2html +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -# Convert a Github Flavored Markdown Syntax file to HTML -# -# The MIT License (MIT) -# Copyright © 2012 Evertton de Lima -# http://evertton.mit-license.org/ -# Stylesheet feature by Dan Untenzu -# -# Requirements: cURL (sudo apt-get install curl) -# Input/Output: filename/STDOUT -# -# Usage: gfm2html [stylesheet] > output -# * input: filename of the Github Flavored Markdown (GFM) syntax document -# * stylesheet: optional URI of a custom CSS document to style the output HTML -# if none given the GitHub Markdown Styles are used as fallback -# * output: filename of the HTML document to generate -# -# eg: ./gfm2html README.md http://gist.io/static/css/screen.css > readme.html - -# read markdown file -if [ ! -n "$1" ] -then -echo "No file specified!" -echo " gfm2html " -elif [ -d "$1" ] -then echo "$1 is a directory." -elif [ ! -e "$1" ] -then echo "The file $1 not exist!" -elif [ ! -r "$1" ] -then echo "The $1 file cannot be read! Verify the permissions!" -else -text=$(<"$1") -text=${text//\"/\\\"} -text=${text// /\\\t} -text=${text// -/\\\n} - -# convert markdown to html using Github API v3 -result=$(curl --silent https://api.github.com/markdown -d "{\"text\": \"$text\", \"mode\": \"gfm\", \"context\": \"\"}") - -# output html -printf ' - - - - -' - -# return default css if no stylesheet given -if [ ! -n "$2" ] -then -echo "" -else -printf "" -fi - -printf "\n - -

%s
- -" "$result" - -fi diff --git a/src/generate_html.py b/src/generate_html.py deleted file mode 100644 index c0aafb238..000000000 --- a/src/generate_html.py +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import os -import argparse - -def generate_html_backbone(output_filepath, header, page_content): - string = '\n' - string += '\n' - string += ' \n' - string += ' \n' - string += ' \n' - string += ' Galaxy Docker Image by bgruening\n' - string += '\n' - string += ' \n' - string += ' \n' - string += ' \n' - string += ' \n' - string += '\n' - string += '\n' - string += '
\n' - string += '
\n' - string += '

Galaxy Docker Image

\n' - string += '

Docker Images tracking the stable Galaxy releases

\n' - string += '\n' - string += ' ' + header + '\n' - string += '\n' - string += '

View the Project on GitHub bgruening/docker-galaxy-stable

\n' - string += '\n' - string += ' \n' - string += '
\n' - string += '\n' - string += '
\n' - string += ' ' + page_content + '\n' - string += '\n' - string += '
\n' - string += '\n' - string += '
\n' - string += '

This project is maintained by bgruening

\n' - string += '

Hosted on GitHub Pages — Theme by orderedlist

\n' - string += '
\n' - string += ' \n' - string += '
\n' - string += '\n' - string += '\n' - - with open(output_filepath, "w") as output_file: - output_file.write(string) - -def extract_section_info(line): - to_search = ' ') - section_name = line[4:(id_start-len(to_search))] - section_id = line[id_start:id_stop].lower() - return section_id, section_name - -def extract_html_structure(html_content_filepath): - html_structure = {} - section_id = "header" - section_name = "Header" - section_content = "" - section_order = [] - section_subcontent = [] - with open(html_content_filepath, "r") as html_content: - for line in html_content.readlines(): - if line.find("

") != -1: - html_structure[section_id] = { - "name": section_name, - "content": section_content, - "subcontent": section_subcontent - } - section_order.append(section_id) - - if line.find("

Galaxy Docker Image

") != -1: - section_id = "index" - section_name = "Global description" - else: - section_id, section_name = extract_section_info(line) - section_content = "

" + section_name + "

\n" - - if section_id == "index": - section_content += html_structure["header"]["content"] - - section_subcontent = [] - else: - line = line.replace('[toc]', "") - line = line.replace('\\n', "\\\n") - section_content += line - - if line.find("

") != -1: - subsection_id, subsection_name = extract_section_info(line) - section_subcontent.append({"name": subsection_name, - "id": subsection_id}) - - return html_structure, section_order - -def extract_header(html_structure, section_order): - header = '

Table of content

\n' - header += "