Skip to content

Commit b032962

Browse files
author
DABURON Vincent
committed
add link (a href) to jtl and xml files
1 parent 44ae5eb commit b032962

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ This program recursively scans a directory looking for files of different types
33

44
The types of files searched are:
55
* csv
6+
* jtl
7+
* xml
68
* gz
79
* zip
810
* log
@@ -13,7 +15,7 @@ The types of files searched are:
1315
* jpeg
1416
* html
1517

16-
The link is "<a ref=" relative for files of type: csv, gz, zip, log (to download it)
18+
The link is "<a ref=" relative for files of type: csv, jtl, xml, gz, zip, log (to download it)
1719

1820
The link is "<img src=" relative for files of type: gif, png, bmp, jpg, jpeg (to view it)
1921

@@ -40,7 +42,7 @@ The maven groupId, artifactId and version, this plugin is in the **Maven Central
4042
```xml
4143
<groupId>io.github.vdaburon</groupId>
4244
<artifactId>create-html-for-files-in-directory</artifactId>
43-
<version>1.0</version>
45+
<version>1.1</version>
4446
```
4547
Just include the plugin in your `pom.xml` and execute `mvn verify`.
4648

@@ -54,7 +56,7 @@ Just include the plugin in your `pom.xml` and execute `mvn verify`.
5456
<dependency>
5557
<groupId>io.github.vdaburon</groupId>
5658
<artifactId>create-html-for-files-in-directory</artifactId>
57-
<version>1.0</version>
59+
<version>1.1</version>
5860
</dependency>
5961
</dependencies>
6062

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.vdaburon</groupId>
88
<artifactId>create-html-for-files-in-directory</artifactId>
9-
<version>1.0</version>
9+
<version>1.1</version>
1010
<packaging>jar</packaging>
1111
<name>Create html page for files in directory</name>
1212
<description>A tool that creates an html page for files in the directory to display graphics and link files</description>

src/main/java/io/github/vdaburon/jmeter/utils/HtmlGraphVisualizationGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ public static void main(String[] args) {
8181
File f = (File) tabFiles[i];
8282

8383
String name = f.getName().toLowerCase();
84-
if (name.endsWith("csv") || name.endsWith("gz") || name.endsWith("zip") || name.endsWith("log") || name.endsWith("gif") ||
85-
name.endsWith("png") || name.endsWith("bmp") || name.endsWith("jpg") || name.endsWith("jpeg") || name.endsWith("html")) {
84+
if (name.endsWith("csv") || name.endsWith("jtl") || name.endsWith("xml") ||name.endsWith("gz") || name.endsWith("zip") || name.endsWith("log")
85+
|| name.endsWith("gif") || name.endsWith("png") || name.endsWith("bmp") || name.endsWith("jpg") || name.endsWith("jpeg") || name.endsWith("html")) {
8686

8787
// folderRead = c:\dir1\dir2\dirIn, f = c:\dir1\dir2\dirIn\logo.gif => nameRelative = logo.gif (remove the folderRead path)
8888
String nameRelative = f.getCanonicalPath().substring(fDirWithFiles.getCanonicalPath().length() + 1);
8989
out.write("<h2>" + nameRelative + "</h2><br/>");
9090
out.write(LINE_SEP);
9191

9292

93-
if (name.endsWith("csv") || name.endsWith("gz") || name.endsWith("zip") || name.endsWith("log")) {
93+
if (name.endsWith("csv") || name.endsWith("jtl") || name.endsWith("xml") ||name.endsWith("gz") || name.endsWith("zip") || name.endsWith("log")) {
9494
// link to the file
9595
out.write("<a href='" + nameRelative + "'>" + nameRelative + "</a><br/><br/>");
9696
}

0 commit comments

Comments
 (0)