Skip to content

Commit

Permalink
Adding style
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed May 31, 2018
1 parent c372fb3 commit ef66f10
Show file tree
Hide file tree
Showing 16 changed files with 224 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.clebert</groupId>
<artifactId>gitparser</artifactId>
<artifactId>git-release-report</artifactId>
<version>0.1.SNAPSHOT</version>

<name>gitparser</name>
<name>git-release-report</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/redhat/gitparser/ArtemisParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public static void main(String arg[]) {
}

parser.addInterestingfolder("test").addInterestingfolder("docs/").addInterestingfolder("examples/");
PrintStream stream = new PrintStream(new FileOutputStream(arg[1]));
parser.parse(stream, arg[2], arg[3]);
File file = new File(arg[1]);
parser.parse(file, arg[2], arg[3]);

} catch (Exception e) {
e.printStackTrace();
Expand Down
23 changes: 22 additions & 1 deletion src/main/java/org/redhat/gitparser/GitParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import javax.json.JsonObject;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
Expand Down Expand Up @@ -207,8 +208,28 @@ private String getField(JsonObject object, String name) {
return " ";
}
}
private void copy(String name, File directory) throws Exception {
directory.mkdirs();
InputStream stream = this.getClass().getResourceAsStream(name);
File file = new File(directory, name);
copy(stream, new FileOutputStream(file));
}

public void parse(File outputFile, String from, String to) throws Exception {

PrintStream output = new PrintStream(new FileOutputStream(outputFile));

File styleDirectory = new File(outputFile.getParent(), "styles");
File imageDirectory = new File(outputFile.getParent(), "images");

copy("framework.css", styleDirectory);
copy("jquery.dataTables.min.css", styleDirectory);
copy("jquery.dataTables.min.js", styleDirectory);
copy("jquery.min.js", styleDirectory);

public void parse(PrintStream output, String from, String to) throws Exception {
copy("sort_both.png", imageDirectory);
copy("sort_asc.png", imageDirectory);
copy("sort_desc.png", imageDirectory);
Git git = Git.open(folder);
RevWalk walk = new RevWalk(git.getRepository());

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/redhat/gitparser/WildflyParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ public static void main(String arg[]) {
setSourceSuffix(".java", ".md", ".c", ".sh", ".groovy", ".adoc").
setSampleJQL("https://issues.jboss.org/issues/?jql=project%20%3D%20WildFly%20AND%20KEY%20IN");
parser.addInterestingfolder("test").addInterestingfolder("docs/");
PrintStream stream = new PrintStream(new FileOutputStream(arg[1]));

File file = new File(arg[1]);

parser.setRestLocation("https://issues.jboss.org/rest/api/2/issue/");

parser.parse(stream, arg[2], arg[3]);
parser.parse(file, arg[2], arg[3]);

} catch (Exception e) {
e.printStackTrace();
Expand Down
Binary file not shown.
Binary file added src/main/resources/org/redhat/gitparser/favicon.ico
Binary file not shown.
14 changes: 14 additions & 0 deletions src/main/resources/org/redhat/gitparser/framework.css

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions src/main/resources/org/redhat/gitparser/header.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<html>
<head>

<link type="text/css" rel="stylesheet" href="https://assets-cdn.github.com/assets/frameworks-592c4aa40e940d1b0607a3cf272916ff.css"/>
<!-- taken from https://assets-cdn.github.com/assets/frameworks-592c4aa40e940d1b0607a3cf272916ff.css -->
<link type="text/css" rel="stylesheet" href="styles/framework.css"/>

<!-- taken from http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js -->
<script src="styles/jquery.min.js"></script>

<!-- taken from https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css -->
<link rel="stylesheet" type="text/css" href="styles/jquery.dataTables.min.css">

<!-- taken from https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js -->
<script type="text/javascript" charset="utf8" src="styles/jquery.dataTables.min.js"></script>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" class="init">

$(document).ready( function () {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ef66f10

Please sign in to comment.