Skip to content

Commit 65242c7

Browse files
committed
Interactive Mode and Docker
1 parent ce06b35 commit 65242c7

File tree

7 files changed

+920
-834
lines changed

7 files changed

+920
-834
lines changed

KinanCity-core/.gitignore

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
/target/
2-
3-
config.properties
4-
accounts.csv
5-
6-
dependency-reduced-pom.xml
7-
debug.html
8-
result.csv
9-
/dump
1+
/target/
2+
3+
config.properties
4+
accounts.csv
5+
6+
dependency-reduced-pom.xml
7+
debug.html
8+
result.csv
9+
/dump
10+
11+
/test

KinanCity-core/Dockerfile

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
FROM openjdk:8
2-
MAINTAINER drallieiv
3-
4-
VOLUME ["/opt/data"]
5-
6-
RUN apt-get update && apt-get install -y --no-install-recommends curl wget && rm -rf /var/lib/apt/lists/*
7-
8-
# Download last KinanCity core jar
9-
RUN curl -s https://api.github.com/repos/drallieiv/KinanCity/releases/latest | grep "browser_download_url" | grep "kinancity-core" | head -n 1 | cut -d '"' -f 4 | xargs wget -O kinancity-core.jar
10-
11-
COPY scripts/run.sh /run.sh
12-
RUN chmod +x /run.sh
13-
14-
ENTRYPOINT ["/run.sh"]
1+
FROM openjdk:8
2+
MAINTAINER drallieiv
3+
4+
RUN mkdir -p /kinan/bin && mkdir -p /kinan/data
5+
RUN apt-get update && apt-get install -y --no-install-recommends curl wget && rm -rf /var/lib/apt/lists/*
6+
7+
# Download last KinanCity core jar
8+
ARG CACHEBUST=1
9+
RUN curl -s https://api.github.com/repos/drallieiv/KinanCity/releases/latest | grep "browser_download_url" | grep "kinancity-core" | head -n 1 | cut -d '"' -f 4 | xargs wget -O /kinan/bin/kinancity-core.jar
10+
11+
COPY config.example.properties /kinan/bin/
12+
COPY scripts/run.sh /run.sh
13+
RUN chmod +x /run.sh
14+
15+
VOLUME /kinan
16+
17+
ENTRYPOINT ["/run.sh"]

KinanCity-core/pom.xml

+168-162
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,169 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
4-
<parent>
5-
<groupId>com.kinancity</groupId>
6-
<artifactId>kinancity-parent</artifactId>
7-
<version>1.5.0-SNAPSHOT</version>
8-
</parent>
9-
10-
<artifactId>kinancity-core</artifactId>
11-
<description>Core module for KinanCity</description>
12-
13-
<repositories>
14-
<repository>
15-
<id>jitpack.io</id>
16-
<url>https://jitpack.io</url>
17-
</repository>
18-
</repositories>
19-
20-
<dependencies>
21-
22-
<dependency>
23-
<groupId>com.kinancity</groupId>
24-
<artifactId>kinancity-utils</artifactId>
25-
<version>1.5.0-SNAPSHOT</version>
26-
</dependency>
27-
28-
<dependency>
29-
<groupId>com.kinancity</groupId>
30-
<artifactId>kinancity-captcha-2captcha</artifactId>
31-
<version>1.5.0-SNAPSHOT</version>
32-
</dependency>
33-
34-
<dependency>
35-
<groupId>com.kinancity</groupId>
36-
<artifactId>kinancity-captcha-imagetypers</artifactId>
37-
<version>1.5.0-SNAPSHOT</version>
38-
</dependency>
39-
40-
<dependency>
41-
<groupId>com.kinancity</groupId>
42-
<artifactId>kinancity-captcha-anticaptcha</artifactId>
43-
<version>1.5.0-SNAPSHOT</version>
44-
</dependency>
45-
46-
<dependency>
47-
<groupId>com.kinancity</groupId>
48-
<artifactId>kinancity-captcha-client</artifactId>
49-
<version>1.5.0-SNAPSHOT</version>
50-
</dependency>
51-
52-
<dependency>
53-
<groupId>com.kinancity</groupId>
54-
<artifactId>ptc-api</artifactId>
55-
<version>${project.version}</version>
56-
</dependency>
57-
58-
<dependency>
59-
<groupId>org.jsoup</groupId>
60-
<artifactId>jsoup</artifactId>
61-
<version>1.7.2</version>
62-
</dependency>
63-
64-
<dependency>
65-
<groupId>com.squareup.okhttp3</groupId>
66-
<artifactId>okhttp</artifactId>
67-
<version>3.6.0</version>
68-
</dependency>
69-
70-
<!-- Json Management -->
71-
<dependency>
72-
<groupId>org.glassfish</groupId>
73-
<artifactId>javax.json</artifactId>
74-
<version>1.0.4</version>
75-
</dependency>
76-
77-
<!-- Apache Commons -->
78-
<dependency>
79-
<groupId>commons-io</groupId>
80-
<artifactId>commons-io</artifactId>
81-
<version>2.7</version>
82-
</dependency>
83-
<dependency>
84-
<groupId>commons-lang</groupId>
85-
<artifactId>commons-lang</artifactId>
86-
<version>2.6</version>
87-
</dependency>
88-
<dependency>
89-
<groupId>commons-cli</groupId>
90-
<artifactId>commons-cli</artifactId>
91-
<version>1.4</version>
92-
</dependency>
93-
94-
<!-- Lombok -->
95-
<dependency>
96-
<groupId>org.projectlombok</groupId>
97-
<artifactId>lombok</artifactId>
98-
<version>1.16.14</version>
99-
<scope>provided</scope>
100-
</dependency>
101-
102-
<dependency>
103-
<groupId>junit</groupId>
104-
<artifactId>junit</artifactId>
105-
<version>4.13.1</version>
106-
<scope>test</scope>
107-
</dependency>
108-
109-
<dependency>
110-
<groupId>org.assertj</groupId>
111-
<artifactId>assertj-core</artifactId>
112-
<version>3.6.2</version>
113-
<scope>test</scope>
114-
</dependency>
115-
116-
</dependencies>
117-
118-
<build>
119-
<plugins>
120-
<plugin>
121-
<groupId>org.apache.maven.plugins</groupId>
122-
<artifactId>maven-shade-plugin</artifactId>
123-
<version>3.0.0</version>
124-
<executions>
125-
<execution>
126-
<phase>package</phase>
127-
<goals>
128-
<goal>shade</goal>
129-
</goals>
130-
<configuration>
131-
<transformers>
132-
<transformer
133-
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
134-
<mainClass>com.kinancity.core.KinanCityCli</mainClass>
135-
</transformer>
136-
</transformers>
137-
</configuration>
138-
</execution>
139-
</executions>
140-
</plugin>
141-
142-
<plugin>
143-
<artifactId>maven-assembly-plugin</artifactId>
144-
<version>3.0.0</version>
145-
<configuration>
146-
<appendAssemblyId>false</appendAssemblyId>
147-
<descriptors>
148-
<descriptor>assembly/src.xml</descriptor>
149-
</descriptors>
150-
</configuration>
151-
<executions>
152-
<execution>
153-
<id>make-assembly</id>
154-
<phase>package</phase>
155-
<goals>
156-
<goal>single</goal>
157-
</goals>
158-
</execution>
159-
</executions>
160-
</plugin>
161-
</plugins>
162-
</build>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>com.kinancity</groupId>
6+
<artifactId>kinancity-parent</artifactId>
7+
<version>1.5.0-SNAPSHOT</version>
8+
</parent>
9+
10+
<artifactId>kinancity-core</artifactId>
11+
<description>Core module for KinanCity</description>
12+
13+
<repositories>
14+
<repository>
15+
<id>jitpack.io</id>
16+
<url>https://jitpack.io</url>
17+
</repository>
18+
</repositories>
19+
20+
<dependencies>
21+
22+
<dependency>
23+
<groupId>com.kinancity</groupId>
24+
<artifactId>kinancity-utils</artifactId>
25+
<version>1.5.0-SNAPSHOT</version>
26+
</dependency>
27+
28+
<dependency>
29+
<groupId>com.kinancity</groupId>
30+
<artifactId>kinancity-captcha-2captcha</artifactId>
31+
<version>1.5.0-SNAPSHOT</version>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>com.kinancity</groupId>
36+
<artifactId>kinancity-captcha-imagetypers</artifactId>
37+
<version>1.5.0-SNAPSHOT</version>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>com.kinancity</groupId>
42+
<artifactId>kinancity-captcha-anticaptcha</artifactId>
43+
<version>1.5.0-SNAPSHOT</version>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>com.kinancity</groupId>
48+
<artifactId>kinancity-captcha-client</artifactId>
49+
<version>1.5.0-SNAPSHOT</version>
50+
</dependency>
51+
52+
<dependency>
53+
<groupId>com.kinancity</groupId>
54+
<artifactId>ptc-api</artifactId>
55+
<version>1.5.0-SNAPSHOT</version>
56+
</dependency>
57+
58+
<dependency>
59+
<groupId>org.jsoup</groupId>
60+
<artifactId>jsoup</artifactId>
61+
<version>1.7.2</version>
62+
</dependency>
63+
64+
<dependency>
65+
<groupId>com.squareup.okhttp3</groupId>
66+
<artifactId>okhttp</artifactId>
67+
<version>3.6.0</version>
68+
</dependency>
69+
70+
<dependency>
71+
<groupId>org.beryx</groupId>
72+
<artifactId>text-io</artifactId>
73+
<version>3.4.1</version>
74+
</dependency>
75+
76+
<!-- Json Management -->
77+
<dependency>
78+
<groupId>org.glassfish</groupId>
79+
<artifactId>javax.json</artifactId>
80+
<version>1.0.4</version>
81+
</dependency>
82+
83+
<!-- Apache Commons -->
84+
<dependency>
85+
<groupId>commons-io</groupId>
86+
<artifactId>commons-io</artifactId>
87+
<version>2.7</version>
88+
</dependency>
89+
<dependency>
90+
<groupId>commons-lang</groupId>
91+
<artifactId>commons-lang</artifactId>
92+
<version>2.6</version>
93+
</dependency>
94+
<dependency>
95+
<groupId>commons-cli</groupId>
96+
<artifactId>commons-cli</artifactId>
97+
<version>1.4</version>
98+
</dependency>
99+
100+
<!-- Lombok -->
101+
<dependency>
102+
<groupId>org.projectlombok</groupId>
103+
<artifactId>lombok</artifactId>
104+
<version>1.16.14</version>
105+
<scope>provided</scope>
106+
</dependency>
107+
108+
<dependency>
109+
<groupId>junit</groupId>
110+
<artifactId>junit</artifactId>
111+
<version>4.13.1</version>
112+
<scope>test</scope>
113+
</dependency>
114+
115+
<dependency>
116+
<groupId>org.assertj</groupId>
117+
<artifactId>assertj-core</artifactId>
118+
<version>3.6.2</version>
119+
<scope>test</scope>
120+
</dependency>
121+
122+
</dependencies>
123+
124+
<build>
125+
<plugins>
126+
<plugin>
127+
<groupId>org.apache.maven.plugins</groupId>
128+
<artifactId>maven-shade-plugin</artifactId>
129+
<version>3.0.0</version>
130+
<executions>
131+
<execution>
132+
<phase>package</phase>
133+
<goals>
134+
<goal>shade</goal>
135+
</goals>
136+
<configuration>
137+
<transformers>
138+
<transformer
139+
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
140+
<mainClass>com.kinancity.core.KinanCityCli</mainClass>
141+
</transformer>
142+
</transformers>
143+
</configuration>
144+
</execution>
145+
</executions>
146+
</plugin>
147+
148+
<plugin>
149+
<artifactId>maven-assembly-plugin</artifactId>
150+
<version>3.0.0</version>
151+
<configuration>
152+
<appendAssemblyId>false</appendAssemblyId>
153+
<descriptors>
154+
<descriptor>assembly/src.xml</descriptor>
155+
</descriptors>
156+
</configuration>
157+
<executions>
158+
<execution>
159+
<id>make-assembly</id>
160+
<phase>package</phase>
161+
<goals>
162+
<goal>single</goal>
163+
</goals>
164+
</execution>
165+
</executions>
166+
</plugin>
167+
</plugins>
168+
</build>
163169
</project>

KinanCity-core/scripts/run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/bin/sh
2-
java -jar kinancity-core.jar -o /opt/data/result.csv
1+
#!/bin/bash
2+
java -jar /kinan/bin/kinancity-core.jar -o /kinan/data/result.csv -i

0 commit comments

Comments
 (0)