Merge pull request #705 from broadinstitute/gg_simplify_gatkdocs_templates
Changed the GATKDocs format to PHP
This commit is contained in:
commit
fe86dafc41
|
|
@ -72,7 +72,7 @@ public abstract class DocumentedGATKFeatureHandler {
|
|||
* @return
|
||||
*/
|
||||
public String getDestinationFilename(ClassDoc doc, Class clazz) {
|
||||
return GATKDocUtils.htmlFilenameForClass(clazz);
|
||||
return GATKDocUtils.phpFilenameForClass(clazz);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class GATKDocUtils {
|
|||
public final static String URL_ROOT_FOR_UNSTABLE_GATKDOCS = "http://iwww.broadinstitute.org/gsa/gatkdocs/unstable/";
|
||||
|
||||
/**
|
||||
* Return the filename of the GATKDoc HTML that would be generated for Class. This
|
||||
* Return the filename of the GATKDoc PHP that would be generated for Class. This
|
||||
* does not guarantee that the docs exist, or that docs would actually be generated
|
||||
* for class (might not be annotated for documentation, for example). But if
|
||||
* this class is documented, GATKDocs will write the docs to a file named as returned
|
||||
|
|
@ -49,8 +49,8 @@ public class GATKDocUtils {
|
|||
* @param c
|
||||
* @return
|
||||
*/
|
||||
public static String htmlFilenameForClass(Class c) {
|
||||
return c.getName().replace(".", "_") + ".html";
|
||||
public static String phpFilenameForClass(Class c) {
|
||||
return c.getName().replace(".", "_") + ".php";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -61,7 +61,7 @@ public class GATKDocUtils {
|
|||
* @return
|
||||
*/
|
||||
public static String helpLinksToGATKDocs(Class c) {
|
||||
String classPath = htmlFilenameForClass(c);
|
||||
String classPath = phpFilenameForClass(c);
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(URL_ROOT_FOR_RELEASE_GATKDOCS).append(classPath);
|
||||
//b.append("stable version: ").append(URL_ROOT_FOR_STABLE_GATKDOCS).append(classPath).append("\n");
|
||||
|
|
|
|||
|
|
@ -205,9 +205,6 @@ public class GATKDoclet {
|
|||
try {
|
||||
// basic setup
|
||||
destinationDir.mkdirs();
|
||||
FileUtils.copyFile(new File(settingsDir + "/bootstrap.min.css"), new File(destinationDir + "/bootstrap.min.css"));
|
||||
FileUtils.copyFile(new File(settingsDir + "/bootstrap.min.js"), new File(destinationDir + "/bootstrap.min.js"));
|
||||
FileUtils.copyFile(new File(settingsDir + "/jquery.min.js"), new File(destinationDir + "/jquery.min.js"));
|
||||
// print the Version number
|
||||
FileUtils.writeByteArrayToFile(new File(destinationDir + "/current.version.txt"), getSimpleVersion(absoluteVersion).getBytes());
|
||||
|
||||
|
|
@ -383,7 +380,7 @@ public class GATKDoclet {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create the html index listing all of the GATKDocs features
|
||||
* Create the php index listing all of the GATKDocs features
|
||||
*
|
||||
* @param cfg
|
||||
* @param indexData
|
||||
|
|
@ -394,7 +391,7 @@ public class GATKDoclet {
|
|||
Template temp = cfg.getTemplate("generic.index.template.html");
|
||||
|
||||
/* Merge data-model with template */
|
||||
Writer out = new OutputStreamWriter(new FileOutputStream(new File(destinationDir + "/index.html")));
|
||||
Writer out = new OutputStreamWriter(new FileOutputStream(new File(destinationDir + "/index.php")));
|
||||
try {
|
||||
temp.process(groupIndexData(indexData), out);
|
||||
out.flush();
|
||||
|
|
@ -404,7 +401,7 @@ public class GATKDoclet {
|
|||
}
|
||||
|
||||
/**
|
||||
* Helpful function to create the html index. Given all of the already run GATKDocWorkUnits,
|
||||
* Helpful function to create the php index. Given all of the already run GATKDocWorkUnits,
|
||||
* create the high-level grouping data listing individual features by group.
|
||||
*
|
||||
* @param indexData
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler {
|
|||
// make hashmap of simplename and url
|
||||
final HashMap<String, Object> nugget = new HashMap<String, Object>();
|
||||
nugget.put("name", filter.getSimpleName());
|
||||
nugget.put("filename", GATKDocUtils.htmlFilenameForClass(filter));
|
||||
nugget.put("filename", GATKDocUtils.phpFilenameForClass(filter));
|
||||
bucket.add(nugget);
|
||||
}
|
||||
}
|
||||
|
|
@ -863,7 +863,7 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler {
|
|||
List<String> rodTypes = new ArrayList<String>();
|
||||
for (FeatureManager.FeatureDescriptor descriptor : manager.getByFeature(featureClass)) {
|
||||
rodTypes.add(String.format("<a href=%s>%s</a>",
|
||||
GATKDocUtils.htmlFilenameForClass(descriptor.getCodecClass()),
|
||||
GATKDocUtils.phpFilenameForClass(descriptor.getCodecClass()),
|
||||
descriptor.getName()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ package org.broadinstitute.gatk.utils.help;
|
|||
public class HelpConstants {
|
||||
|
||||
public final static String BASE_GATK_URL = "http://www.broadinstitute.org/gatk";
|
||||
public final static String GATK_DOCS_URL = BASE_GATK_URL + "/gatkdocs/";
|
||||
public final static String GATK_DOCS_URL = BASE_GATK_URL + "/tooldocs/";
|
||||
public final static String GATK_FORUM_URL = "http://gatkforums.broadinstitute.org/";
|
||||
public final static String GATK_FORUM_API_URL = "https://gatkforums.broadinstitute.org/api/v1/";
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ public class HelpConstants {
|
|||
*/
|
||||
public final static String ARG_TREEREDUCIBLE = "-nt";
|
||||
public final static String ARG_NANOSCHEDULABLE = "-nct";
|
||||
public final static String CMDLINE_GATK_URL = GATK_DOCS_URL + "org_broadinstitute_sting_gatk_CommandLineGATK.html";
|
||||
public final static String CMDLINE_GATK_URL = GATK_DOCS_URL + "org_broadinstitute_gatk_engine_CommandLineGATK.php";
|
||||
|
||||
/**
|
||||
* Definition of the group names / categories of tools.
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class HelpUtils {
|
|||
*/
|
||||
public static void listAnnotations() {
|
||||
System.out.println("\nThis is a list of available Variant Annotations for use with tools such as UnifiedGenotyper, HaplotypeCaller and VariantAnnotator. Please see the Technical Documentation for more details about these annotations:");
|
||||
System.out.println("http://www.broadinstitute.org/gatk/gatkdocs/");
|
||||
System.out.println("http://www.broadinstitute.org/gatk/tooldocs/");
|
||||
System.out.println("\nStandard annotations in the list below are marked with a '*'.");
|
||||
List<Class<? extends InfoFieldAnnotation>> infoAnnotationClasses = new PluginManager<InfoFieldAnnotation>(InfoFieldAnnotation.class).getPlugins();
|
||||
System.out.println("\nAvailable annotations for the VCF INFO field:");
|
||||
|
|
|
|||
|
|
@ -32,65 +32,13 @@
|
|||
<#global guideIndex = "http://www.broadinstitute.org/gatk/guide/" />
|
||||
<#global forum = "http://gatkforums.broadinstitute.org/" />
|
||||
|
||||
<#macro makeHeader title isIndex>
|
||||
<?php ob_start(); ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>${title} documentation</title>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
||||
<meta name='description' content=''>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="bootstrap.min.css">
|
||||
<script src="jquery.min.js"></script>
|
||||
<script src="bootstrap.min.js"></script>
|
||||
<style>
|
||||
@media (min-width: 980px) {
|
||||
body {
|
||||
padding-top : 60px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- MathJax / MathML support for displaying equations -->
|
||||
<script type='text/x-mathjax-config'>
|
||||
MathJax.Hub.Config({
|
||||
TeX: { equationNumbers: { autoNumber: 'AMS' } }
|
||||
});
|
||||
</script>
|
||||
<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<a class="brand" href="index.html">GATK | Tool Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<?php
|
||||
// Output Buffering allows for the website to inject a different header
|
||||
ob_clean();
|
||||
include '../include/common.php';
|
||||
printHeader("${title}", "Guides");
|
||||
?>
|
||||
|
||||
<div class="row-fluid">
|
||||
<#if isIndex>
|
||||
<?php printGATKDocsNav(); ?>
|
||||
<div class="span9">
|
||||
</#if>
|
||||
|
||||
</#macro>
|
||||
|
||||
<#macro footerInfo>
|
||||
<hr>
|
||||
<p><a href='#top'><i class='fa fa-chevron-up'></i> Return to top</a></p>
|
||||
<hr>
|
||||
<p class="see-also">See also
|
||||
<a href="${guideIndex}">Guide Index</a> |
|
||||
<a href="index.html">Tool Documentation Index</a> |
|
||||
<a href="index">Tool Documentation Index</a> |
|
||||
<a href="${forum}">Support Forum</a>
|
||||
</p>
|
||||
|
||||
|
|
@ -103,15 +51,6 @@
|
|||
</p>
|
||||
</#macro>
|
||||
|
||||
<#macro pageFooter>
|
||||
</div><!--/.span-->
|
||||
</div><!--/.row-->
|
||||
</body>
|
||||
<?php printFooter();
|
||||
ob_end_flush();
|
||||
?>
|
||||
</#macro>
|
||||
|
||||
<#macro getCategories groups>
|
||||
<style>
|
||||
#sidenav .accordion-body a {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,19 @@
|
|||
~ OTHER DEALINGS IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<?php
|
||||
|
||||
include '../../../include/common.php';
|
||||
$module = modules::GATK;
|
||||
printHeader($module, "GATK | Tool Documentation Index", "Guides");
|
||||
?>
|
||||
|
||||
<div class='row-fluid'>
|
||||
|
||||
<?php printGATKDocsNav($module); ?>
|
||||
|
||||
<div class='span9'>
|
||||
|
||||
<#include "common.html"/>
|
||||
|
||||
<#macro emitGroup group>
|
||||
|
|
@ -53,8 +66,7 @@
|
|||
</div>
|
||||
</#macro>
|
||||
|
||||
<@makeHeader title="GATK | Tool Documentation Index" isIndex=true />
|
||||
<h1>Tool Documentation Index
|
||||
<h1 id="top">Tool Documentation Index
|
||||
<small>${version}</small>
|
||||
</h1>
|
||||
<div class="accordion" id="index">
|
||||
|
|
@ -71,4 +83,11 @@
|
|||
|
||||
<@footerInfo />
|
||||
<@footerClose />
|
||||
<@pageFooter />
|
||||
|
||||
</div></div>
|
||||
|
||||
<?php
|
||||
|
||||
printFooter($module);
|
||||
|
||||
?>
|
||||
|
|
@ -22,6 +22,15 @@
|
|||
~ OTHER DEALINGS IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<?php
|
||||
|
||||
include '../../../include/common.php';
|
||||
$module = modules::GATK;
|
||||
printHeader($module, "GATK | Tool Documentation Index", "Guides");
|
||||
?>
|
||||
|
||||
<div class='row-fluid' id="top">
|
||||
|
||||
<#include "common.html"/>
|
||||
|
||||
<#macro argumentlist name myargs>
|
||||
|
|
@ -113,8 +122,11 @@
|
|||
</#macro>
|
||||
|
||||
<?php $group = '${group}'; ?>
|
||||
<@makeHeader title="GATK | ${name} documentation" isIndex=false />
|
||||
|
||||
<section class="span4">
|
||||
<aside class="well">
|
||||
<a href="index"><h4><i class='fa fa-chevron-left'></i> Back to Tool Docs Index</h4></a>
|
||||
</aside>
|
||||
<aside class="well">
|
||||
<h2>Categories</h2>
|
||||
<@getCategories groups=groups />
|
||||
|
|
@ -300,4 +312,7 @@
|
|||
<small>GTD: ${gotoDev}</small>
|
||||
</#if>
|
||||
<@footerClose />
|
||||
<@pageFooter />
|
||||
|
||||
</div>
|
||||
|
||||
<?php printFooter($module); ?>
|
||||
Loading…
Reference in New Issue