This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch branch_1x
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/branch_1x by this push:
new 90fd5d4 TIKA-3044 -- swap -C --content for -A and --text-all
90fd5d4 is described below
commit 90fd5d43485452fe0b235a59a39c53be37deeed9
Author: tallison <[email protected]>
AuthorDate: Wed Oct 7 13:54:23 2020 -0400
TIKA-3044 -- swap -C --content for -A and --text-all
---
tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java | 12 ++++++------
tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
index 4357add..4b6c164 100644
--- a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
+++ b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
@@ -266,7 +266,7 @@ public class TikaCLI {
}
};
- private final OutputType CONTENT = new OutputType() {
+ private final OutputType TEXT_ALL = new OutputType() {
@Override
protected ContentHandler getContentHandler(
OutputStream output, Metadata metadata) throws Exception {
@@ -449,8 +449,8 @@ public class TikaCLI {
type = TEXT;
} else if (arg.equals("-T") || arg.equals("--text-main")) {
type = TEXT_MAIN;
- } else if (arg.equals("-C") || arg.equals("--content")) {
- type = CONTENT;
+ } else if (arg.equals("-A") || arg.equals("--text-all")) {
+ type = TEXT_ALL;
} else if (arg.equals("-m") || arg.equals("--metadata")) {
type = METADATA;
} else if (arg.equals("-l") || arg.equals("--language")) {
@@ -576,9 +576,9 @@ public class TikaCLI {
out.println("");
out.println(" -x or --xml Output XHTML content
(default)");
out.println(" -h or --html Output HTML content");
- out.println(" -t or --text Output plain text content");
- out.println(" -T or --text-main Output plain text content
(main content only)");
- out.println(" -C or --content Output all text content");
+ out.println(" -t or --text Output plain text content
(body)");
+ out.println(" -T or --text-main Output plain text content
(main content only via boilerpipe handler)");
+ out.println(" -A or --text-all Output all text content");
out.println(" -m or --metadata Output only metadata");
out.println(" -j or --json Output metadata in JSON");
out.println(" -y or --xmp Output metadata in XMP");
diff --git a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
index 1878ed6..ede3e95 100644
--- a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
+++ b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
@@ -142,13 +142,13 @@ public class TikaCLITest {
}
/**
- * Tests -C option of the cli
+ * Tests -A option of the cli
*
* @throws Exception
*/
@Test
- public void testContentOutput() throws Exception{
- String[] params = {"-C", resourcePrefix + "testJsonMultipleInts.html"};
+ public void testContentAllOutput() throws Exception{
+ String[] params = {"-A", resourcePrefix + "testJsonMultipleInts.html"};
TikaCLI.main(params);
String out = outContent.toString(UTF_8.name());
assertTrue(out.contains("this is a title"));