Skip to content

Commit

Permalink
Version 1.1 change default Wiki Page Title Date format to be compatib…
Browse files Browse the repository at this point in the history
…le with slug url
  • Loading branch information
DABURON Vincent committed May 10, 2023
1 parent 533b0af commit 0e5fe0f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,19 @@ See the LICENSE file Apache 2 [https://www.apache.org/licenses/LICENSE-2.0](http
## The wiki page generated
Gitlab wiki page extract example 1 :

![wiki_page extract](doc/images/wiki_page_extract.png)
![wiki_page extract 1](doc/images/wiki_page_extract.png)

Gitlab wiki page extract example 2 :
![wiki_page extract](doc/images/wiki_page_extract2.png)
![wiki_page extract 2](doc/images/wiki_page_extract2.png)


## Usage Maven

The maven groupId, artifactId and version, this plugin is in the **Maven Central Repository**

```xml
<groupId>io.github.vdaburon</groupId>
<artifactId>create-gitlab-wiki-page-for-files-in-directory</artifactId>
<version>1.0</version>
<version>1.1</version>
```
Just include the plugin in your `pom.xml` and execute `mvn verify` <br>
or with parameters overwriting properties `mvn -DgitlabUrl=https://mygitlab.com -DprojectId=12344 -DaccessToken=SLKJtokenLMJI -DpageTitle="Load test 05_03_2023" verify`<br>
Expand All @@ -68,7 +67,7 @@ or individual launch `mvn -DaccessToken=mytokenLMJI exec:java@create_gitlab_wiki
<dependency>
<groupId>io.github.vdaburon</groupId>
<artifactId>create-gitlab-wiki-page-for-files-in-directory</artifactId>
<version>1.0</version>
<version>1.1</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -116,13 +115,12 @@ java -jar create-gitlab-wiki-page-for-files-in-directory-&lt;version&gt;.jar -gi
</pre>

## Link to others projects
Usally this plugin is use with [jmeter-graph-tool-maven-plugin](https://github.com/vdaburon/jmeter-graph-tool-maven-plugin)

Usally this plugin is use with [jmeter-graph-tool-maven-plugin](https://github.com/vdaburon/jmeter-graph-tool-maven-plugin)<br>
and this plugin [csv-report-to-html](https://github.com/vdaburon/JMReportCsvToHtml)

1) The **jmeter-graph-tool-maven-plugin** create the report csv files and graphs
2) The **csv-report-to-html** create the **html table report** from the csv file

## Versions
Version 1.1 change default Wiki Page Title and the Date Format to be more compatible with slug link (remove ':')<br>
Version 1.0 initial version test with Gitlab version 15.10

Binary file modified doc/images/wiki_page_extract.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.vdaburon</groupId>
<artifactId>create-gitlab-wiki-page-for-files-in-directory</artifactId>
<version>1.0</version>
<version>1.1</version>
<packaging>jar</packaging>
<name>Create Gitlab Wiki Page for files in directory</name>
<description>A tool that creates a new Gitlab Wiki Page for files in the directory to display graphics and link files</description>
Expand Down
2 changes: 1 addition & 1 deletion shell/lance_genere_wiki_page_no_param.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set ACCESS_TOKEN=WetokenE7
set DIR_WITH_FILE=C:/result
set IMAGE_WIDTH=950
rem set PAGE_TITLE="load test 05_03_2023 13h25m12s"
%JAVA_HOME%\bin\java.exe -jar ../target/create-gitlab-wiki-page-for-files-in-directory-1.0-jar-with-dependencies.jar -gitlabUrl %GITLAB_URL% -projectId %PROJECT_ID% -accessToken %ACCESS_TOKEN% -dirWithFile %DIR_WITH_FILE% -imageWidth %IMAGE_WIDTH%
%JAVA_HOME%\bin\java.exe -jar ../target/create-gitlab-wiki-page-for-files-in-directory-1.1-jar-with-dependencies.jar -gitlabUrl %GITLAB_URL% -projectId %PROJECT_ID% -accessToken %ACCESS_TOKEN% -dirWithFile %DIR_WITH_FILE% -imageWidth %IMAGE_WIDTH%
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ public static String createWikiPage(GitlabWikiApi gitlabWikiApi, String pageTitl
try {
LOGGER.info("Generating gitlab wiki page ...");

SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault());
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH'h'mm'm'ss's'", Locale.getDefault());
String sDate = dateFormat.format(new Date());

sb.append("<h1> Generated date " + sDate + "</h1><br/>");
sb.append(LINE_SEP);

String pageTitleWikiPage = "Page wiki generated " + sDate;
String pageTitleWikiPage = sDate + " Page Wiki Generated";
if (pageTitle != null && pageTitle.length() > 1) {
pageTitleWikiPage = pageTitle;
}
Expand Down

0 comments on commit 0e5fe0f

Please sign in to comment.