Skip to content

Commit

Permalink
Merge pull request #8 from iamsad5566/dev
Browse files Browse the repository at this point in the history
update: update 2022/09/16 for readme and output folder
  • Loading branch information
iamsad5566 authored Sep 16, 2022
2 parents 0243f9b + f040639 commit 77d3ea7
Show file tree
Hide file tree
Showing 15 changed files with 83 additions and 94 deletions.
160 changes: 72 additions & 88 deletions .idea/artifacts/Crawler_jar.xml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Crawler.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_16">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Crawler for NTU BAC lab
===
## Java version: 16
This is an automated crawler for BAC lab.
The crawler will crawl data from the NTU accounting web, after sorting the data, an Xls file will be exported to the /output folder.
The crawler will crawl data from the NTU accounting web, after sorting the data, a Xls file will be exported to the folder where this program is within.

Note
---
Expand All @@ -15,7 +13,8 @@ Note
How to use?
---
1. Package the file with Maven and run the output `.jar` file. The file would be put in `/target` folder (remember to set the main class).
1. Package the file with Maven and run the output `.jar` file (Check out if the main class is included in).
2. Directly run this program through the `main` method under the `Crawler` class.
> / src / main / java / Crawler.java
3. Convert the `.jar` file to `.exe`, open it by simply double clicks. Visited [Launch4J](http://launch4j.sourceforge.net/) to get more details.
3. Convert the `.jar` file to `.exe`, open it by simply double clicks. Visit [launch4j](http://launch4j.sourceforge.net/) for more detail.

Binary file removed output/Sep_16.xls
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/module/ExcelManipulate.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void saveDataInExcel(List<String> list, String path) throws IOException {
StringBuilder sb = new StringBuilder();
String[] date_arr = new Date().toString().split(" ");
sb.append(date_arr[1]).append('_').append(date_arr[2]);
FileOutputStream fileOut = new FileOutputStream(path + "/output/" +sb + ".xls");
FileOutputStream fileOut = new FileOutputStream(path + sb + ".xls");
wb.write(fileOut);
fileOut.close();
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: Crawler

Binary file removed target/classes/Crawler.class
Binary file not shown.
Binary file removed target/classes/config/EnvironmentVariable.class
Binary file not shown.
Binary file removed target/classes/config/GetDriver.class
Binary file not shown.
Binary file removed target/classes/module/Browsing.class
Binary file not shown.
Binary file removed target/classes/module/DataProcessor.class
Binary file not shown.
Binary file removed target/classes/module/ExcelManipulate.class
Binary file not shown.
Binary file removed target/classes/module/InputProcessor.class
Binary file not shown.
Binary file removed target/classes/obj/ObjProcessor.class
Binary file not shown.
Binary file removed target/classes/obj/Time.class
Binary file not shown.

0 comments on commit 77d3ea7

Please sign in to comment.