-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v2' of github.com:aaronland/dogeared-extruder into main
- Loading branch information
Showing
16 changed files
with
157 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# Generated automatically at Tue Feb 15 22:45:38 PST 2022 | ||
# Generated automatically at Fri Feb 18 17:32:35 PST 2022 | ||
|
||
./src/main/java/info/aaronland/extruder/ExtruderService.java:30: // TODO: put me in the config file... (20130908/straup) | ||
./src/main/java/info/aaronland/extruder/JavaReadabilityResource.java:54: // TODO: trap MalformedURLExceptions and return NOT_ACCEPTABLE here (20130901/straup) | ||
./src/main/java/info/aaronland/extruder/ExtruderApplication.java~:30: // TODO: put me in the config file... (20130908/straup) | ||
./src/main/java/info/aaronland/extruder/BoilerpipeResource.java:52: // TODO: trap MalformedURLExceptions and return NOT_ACCEPTABLE here (20130901/straup) | ||
./src/main/java/info/aaronland/extruder/ExtruderApplication.java:40: // TODO: put me in the config file... (20130908/straup) | ||
./src/main/java/com/basistech/readability/Readability.java:93: // TODO: reset the results. | ||
./src/main/java/com/basistech/readability/Readability.java:368: * http://www.peachpit.com/articles/article.aspx?p=31567&seqNum=5 TODO: Shouldn't this be a reverse | ||
./src/main/java/com/basistech/readability/Readability.java:686: * at the same time without effecting the traversal. TODO: Consider taking into account original | ||
./src/main/java/info/aaronland/extruder/TikaResource.java:140: // TO DO: figure out how to make this return HTML instead of text | ||
./src/main/java/info/aaronland/extruder/TikaResource.java:139: // TO DO: figure out how to make this return HTML instead of text | ||
./src/main/java/info/aaronland/extruder/Upload.java:20: // TO DO: sort out file extensions etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
logging: | ||
level: INFO | ||
loggers: | ||
info.aaronland.extruder: DEBUG | ||
viewRendererConfiguration: | ||
freemarker: | ||
strict_syntax: yes | ||
whitespace_stripping: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/info/aaronland/extruder/ExtruderApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package info.aaronland.extruder; | ||
|
||
import io.dropwizard.Application; | ||
import io.dropwizard.setup.Bootstrap; | ||
import io.dropwizard.setup.Environment; | ||
import io.dropwizard.views.ViewBundle; | ||
import io.dropwizard.forms.MultiPartBundle; | ||
|
||
import info.aaronland.extruder.ExtruderConfiguration; | ||
|
||
import java.net.URL; | ||
import java.util.Map; | ||
|
||
public class ExtruderApplication extends Application<ExtruderConfiguration> { | ||
|
||
public static void main(String[] args) throws Exception { | ||
new ExtruderApplication().run(args); | ||
} | ||
|
||
public void initialize(Bootstrap<ExtruderConfiguration> bootstrap) { | ||
|
||
bootstrap.addBundle(new MultiPartBundle()); | ||
|
||
bootstrap.addBundle(new ViewBundle<ExtruderConfiguration>(){ | ||
|
||
@Override | ||
public Map<String, Map<String, String>> getViewConfiguration(ExtruderConfiguration config) { | ||
return config.getViewRendererConfiguration(); | ||
} | ||
}); | ||
} | ||
|
||
@Override | ||
public void run(ExtruderConfiguration conf, Environment env) throws Exception { | ||
|
||
env.jersey().register(new BoilerpipeResource()); | ||
env.jersey().register(new TikaResource()); | ||
env.jersey().register(new JavaReadabilityResource()); | ||
|
||
// TODO: put me in the config file... (20130908/straup) | ||
URL healthcheck_url = new URL("https://github.com/aaronland/dogeared-extruder/"); | ||
|
||
env.healthChecks().register("internets", new InternetsHealthCheck(healthcheck_url)); | ||
} | ||
|
||
} |
20 changes: 19 additions & 1 deletion
20
src/main/java/info/aaronland/extruder/ExtruderConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
package info.aaronland.extruder; | ||
|
||
import com.yammer.dropwizard.config.Configuration; | ||
import io.dropwizard.Configuration; | ||
|
||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
|
||
import java.util.Collections; | ||
import java.util.Map; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class ExtruderConfiguration extends Configuration { | ||
|
||
@NotNull | ||
private Map<String, Map<String, String>> viewRendererConfiguration = Collections.emptyMap(); | ||
|
||
@JsonProperty("viewRendererConfiguration") | ||
public Map<String, Map<String, String>> getViewRendererConfiguration() { | ||
return viewRendererConfiguration; | ||
} | ||
|
||
@JsonProperty("viewRendererConfiguration") | ||
public void setViewRendererConfiguration(Map<String, Map<String, String>> viewRendererConfiguration) { | ||
this.viewRendererConfiguration = viewRendererConfiguration; | ||
} | ||
} |
35 changes: 0 additions & 35 deletions
35
src/main/java/info/aaronland/extruder/ExtruderService.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.