Initial commit
This commit is contained in:
39
.gitignore
vendored
Normal file
39
.gitignore
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/libraries/
|
||||||
|
.idea/sonarlint/
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
||||||
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
7
.idea/codeStyles/Project.xml
generated
Normal file
7
.idea/codeStyles/Project.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<ScalaCodeStyleSettings>
|
||||||
|
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
|
||||||
|
</ScalaCodeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
||||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
||||||
20
.idea/encodings.xml
generated
Normal file
20
.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="ISO-8859-1">
|
||||||
|
<file url="file://$PROJECT_DIR$/api/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/api/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/core/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/core/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/ffmpeg/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/ffmpeg/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/fx/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/fx/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/gui/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/gui/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/whisper/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/whisper/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="PROJECT" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
633
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
633
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,633 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="AbstractClassExtendsConcreteClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AbstractClassNeverImplemented" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AbstractMethodOverridesAbstractMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AbstractMethodOverridesConcreteMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AccessToStaticFieldLockedOnInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AlphaUnsortedPropertiesFile" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AmbiguousFieldAccess" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AmbiguousMethodCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AnonymousInnerClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AnonymousInnerClassMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ArrayEquality" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AssertMessageNotString" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AssertsWithoutMessages" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AssignmentToForLoopParameterJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AssignmentToFunctionParameterJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AssignmentToLambdaParameter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AssignmentToNull" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreAssignmentsToFields" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="AssignmentToStaticFieldFromInstanceMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,ch.bger.common.dbhelper.impl.AbstractDatabaseQuerier,connection|internalConnection" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="AutoTupling" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="AwaitWithoutCorrespondingSignal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BadExceptionCaught" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="exceptionsString" value="" />
|
||||||
|
<option name="exceptions">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="BadExceptionDeclared" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="exceptionsString" value="" />
|
||||||
|
<option name="exceptions">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
<option name="ignoreTestCases" value="false" />
|
||||||
|
<option name="ignoreLibraryOverrides" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="BadExceptionThrown" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="exceptionsString" value="" />
|
||||||
|
<option name="exceptions">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="BadOddness" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BigDecimalEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BlockMarkerComments" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BlockStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BooleanExpressionMayBeConditional" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="BooleanMethodNameMustStartWithQuestion" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
|
<option name="ignoreBooleanMethods" value="false" />
|
||||||
|
<option name="ignoreInAnnotationInterface" value="true" />
|
||||||
|
<option name="onlyWarnOnBaseMethods" value="true" />
|
||||||
|
<option name="questionString" value="add,are,can,check,contains,could,endsWith,equals,has,is,matches,must,put,remove,shall,should,startsWith,was,were,will,would" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="BooleanParameter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BreakStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BreakStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BreakStatementWithLabel" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BreakStatementWithLabelJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="BulkFileAttributesRead" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CallToNativeMethodWhileLocked" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CallToSimpleSetterInClass" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreSetterCallsOnOtherObjects" value="false" />
|
||||||
|
<option name="onlyReportPrivateSetter" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="CallToStringConcatCanBeReplacedByOperator" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CastConflictsWithInstanceof" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CastToIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ChainedEqualityJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ChainedFunctionCallJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ChannelResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="insideTryAllowed" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ClassIndependentOfModule" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ClassNameDiffersFromFileName" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ClassNewInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ClassOnlyUsedInOneModule" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ClassOnlyUsedInOnePackage" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ClassReferencesSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ClassUnconnectedToPackage" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ClassWithMultipleLoggers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="loggerNamesString" value="java.util.logging.Logger,org.slf4j.Logger,org.apache.commons.logging.Log,org.apache.log4j.Logger,org.apache.logging.log4j.Logger" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ClassWithOnlyPrivateConstructors" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CloneCallsConstructors" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CloneInNonCloneableClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CloneReturnsClassType" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CloneableImplementsClone" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreCloneableDueToInheritance" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="CollectionsFieldAccessReplaceableByMethodCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ComparableImplementedButEqualsNotOverridden" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ComparatorNotSerializable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CompareToUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ComparisonOfShortAndChar" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConditionSignal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConditionalExpressionWithIdenticalBranchesJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConfusingFloatingPointLiteral" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConfusingOctalEscape" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConfusingPlusesOrMinusesJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConnectionResource" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConstantAssertArgument" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConstantAssertCondition" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConstantJUnitAssertArgument" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ConstantMathCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ContinueStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ContinueStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ContinueStatementWithLabel" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ContinueStatementWithLabelJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CovariantEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="CyclicClassDependency" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DeclareCollectionAsInterface" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreLocalVariables" value="false" />
|
||||||
|
<option name="ignorePrivateMethodsAndFields" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="DeconstructionCanBeUsed" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DefaultNotLastCaseInSwitch" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DefaultNotLastCaseInSwitchJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DisjointPackage" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DivideByZeroJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DocumentWriteJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DollarSignInName" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DoubleLiteralMayBeFloatLiteral" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DriverManagerGetConnection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DuplicateBooleanBranch" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DuplicateConditionJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DuplicatePropertyInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="DynamicallyGeneratedCodeJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="EmptyCatchBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="EmptyClass" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignorableAnnotations">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
<option name="ignoreClassWithParameterization" value="false" />
|
||||||
|
<option name="ignoreThrowables" value="true" />
|
||||||
|
<option name="commentsAreContent" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="EmptyTryBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="EnhancedSwitchBackwardMigration" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="EnumerationCanBeIteration" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="EqualsAndHashcode" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="EqualsCalledOnEnumConstant" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="EqualsUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ErrorRethrown" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExceptionFromCatchWhichDoesntWrap" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreGetMessage" value="true" />
|
||||||
|
<option name="ignoreCantWrap" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ExceptionNameDoesntEndWithException" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExceptionPackage" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExpectedExceptionNeverThrown" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExtendsConcreteCollection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExtendsThread" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExtendsThrowable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExtendsUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ExternalizableWithSerializationMethods" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="FallthruInSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="FieldAccessedSynchronizedAndUnsynchronized" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="countGettersAndSetters" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="FieldHasSetterButNoGetter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="FieldHidesSuperclassField" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreInvisibleFields" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="FieldMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="FilterSetContains" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="Finalize" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreTrivialFinalizers" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="FloatingPointEquality" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="FlowJSCoverage" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="FlowJSError" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ForLoopReplaceableByWhileJS" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreLoopsWithoutConditions" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ForLoopWithMissingComponent" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreCollectionLoops" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="FunctionWithInconsistentReturnsJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="GjsLint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="Guava" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="HibernateResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="insideTryAllowed" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="IOResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredTypesString" value="java.io.ByteArrayOutputStream,java.io.ByteArrayInputStream,java.io.StringBufferInputStream,java.io.CharArrayWriter,java.io.CharArrayReader,java.io.StringWriter,java.io.StringReader" />
|
||||||
|
<option name="insideTryAllowed" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="IfMayBeConditional" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="IgnoredJUnitTest" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="IllegalDependencyOnInternalPackage" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InconsistentLanguageLevel" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="IncorrectFormatting" enabled="false" level="WEAK WARNING" enabled_by_default="false">
|
||||||
|
<scope name="Project Files" level="WEAK WARNING" enabled="false">
|
||||||
|
<option name="reportPerFile" value="true" />
|
||||||
|
</scope>
|
||||||
|
<option name="reportPerFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="InnerClassReferencedViaSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InnerClassVariableHidesOuterClassVariable" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreInvisibleFields" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="InnerHTMLJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InstanceofCatchParameter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InstanceofChain" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreInstanceofOnLibraryClasses" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="InstanceofIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InstanceofThis" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="IntLiteralMayBeLongLiteral" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="InterfaceNeverImplemented" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreInterfacesThatOnlyDeclareConstants" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="IteratorNextDoesNotThrowNoSuchElementException" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JDBCResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="insideTryAllowed" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="JNDIResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="insideTryAllowed" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="JSEqualityComparisonWithCoercion.TS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JSLint" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JUnit5Converter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JUnitDatapoint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JUnitRule" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JavaAnnotator" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<scope name="Tests" level="WARNING" enabled="false">
|
||||||
|
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="package" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="INNER_CLASS_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="package" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="METHOD_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="package" />
|
||||||
|
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="FIELD_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="IGNORE_DEPRECATED" value="false" />
|
||||||
|
<option name="IGNORE_JAVADOC_PERIOD" value="false" />
|
||||||
|
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||||
|
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||||
|
<option name="myAdditionalJavadocTags" value="" />
|
||||||
|
<option name="MODULE_OPTIONS">
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="public" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</option>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="public" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</scope>
|
||||||
|
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="package" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="INNER_CLASS_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="package" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="METHOD_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="package" />
|
||||||
|
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="FIELD_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="IGNORE_DEPRECATED" value="false" />
|
||||||
|
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||||
|
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||||
|
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||||
|
<option name="myAdditionalJavadocTags" value="" />
|
||||||
|
<option name="MODULE_OPTIONS">
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="public" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</option>
|
||||||
|
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="public" />
|
||||||
|
<option name="REQUIRED_TAGS" value="" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="JavaLangImport" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<scope name="Tests" level="WARNING" enabled="false">
|
||||||
|
<option name="IGNORE_PERIOD_PROBLEM" value="false" />
|
||||||
|
</scope>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="JavadocHtmlLint" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="Jscs" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="KeySetIterationMayUseEntrySet" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="KotlinAnnotator" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="LabeledStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="LabeledStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="LambdaParameterHidingMemberVariable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="LegacyStringFormatting" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="LengthOneStringInIndexOf" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ListenerMayUseAdapter" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="checkForEmptyMethods" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="LocalCanBeFinal" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="REPORT_VARIABLES" value="true" />
|
||||||
|
<option name="REPORT_PARAMETERS" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="LoggingConditionDisagreesWithLogStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="LoopWithImplicitTerminationCondition" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MagicNumberJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MalformedRegex" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MalformedSetUpTearDown" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MapGetOrElse" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MapReplaceableByEnumMap" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MarkerInterface" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MethodMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_onlyPrivateOrFinal" value="false" />
|
||||||
|
<option name="m_ignoreEmptyMethods" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="MethodNameSameAsParentName" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MethodOnlyUsedFromInnerClass" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreMethodsAccessedFromAnonymousClass" value="false" />
|
||||||
|
<option name="ignoreStaticMethodsFromNonStaticInnerClass" value="false" />
|
||||||
|
<option name="onlyReportStaticMethods" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="MethodOverridesInaccessibleMethodOfSuper" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MethodOverridesStaticMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MigrateAssertToMatcherAssert" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MisorderedAssertEqualsParameters" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MissingDeprecatedAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MissingJavadoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<scope name="Tests" level="WARNING" enabled="false">
|
||||||
|
<option name="TOP_LEVEL_CLASS_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="MINIMAL_VISIBILITY" value="package" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
<option name="INNER_CLASS_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="MINIMAL_VISIBILITY" value="package" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
<option name="METHOD_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="MINIMAL_VISIBILITY" value="package" />
|
||||||
|
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
<option name="FIELD_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="ENABLED" value="false" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
</scope>
|
||||||
|
<option name="IGNORE_DEPRECATED_ELEMENTS" value="true" />
|
||||||
|
<option name="IGNORE_ACCESSORS" value="true" />
|
||||||
|
<option name="TOP_LEVEL_CLASS_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="MINIMAL_VISIBILITY" value="package" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
<option name="INNER_CLASS_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="MINIMAL_VISIBILITY" value="protected" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
<option name="METHOD_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="MINIMAL_VISIBILITY" value="protected" />
|
||||||
|
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
<option name="FIELD_SETTINGS">
|
||||||
|
<Options>
|
||||||
|
<option name="ENABLED" value="false" />
|
||||||
|
</Options>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_requireAnnotationsFirst" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="MisspelledEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MisspelledMethodName" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="MultipleExceptionsDeclaredOnTestMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NativeMethods" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NegatedConditional" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreNegatedNullComparison" value="false" />
|
||||||
|
<option name="m_ignoreNegatedZeroComparison" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="NegatedConditionalExpression" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NegatedConditionalExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NegatedIfElse" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreNegatedNullComparison" value="false" />
|
||||||
|
<option name="m_ignoreNegatedZeroComparison" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="NegatedIfStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NestedAssignment" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NestedSynchronizedStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NewExceptionWithoutArguments" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonExceptionNameEndsWithException" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonFinalFieldOfException" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonFinalStaticVariableUsedInClassInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonFinalUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonProtectedConstructorInAbstractClass" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreNonPublicClasses" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="NonPublicClone" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonReproducibleMathCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonSerializableFieldInSerializableClass" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignorableAnnotations">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
<option name="ignoreAnonymousInnerClasses" value="false" />
|
||||||
|
<option name="superClassString" value="java.awt.Component" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="NonSerializableObjectBoundToHttpSession" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonSerializableObjectPassedToObjectStream" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonShortCircuitBooleanExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonStaticFinalLogger" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="loggerClassName" value="java.util.logging.Logger,org.slf4j.Logger,org.apache.commons.logging.Log,org.apache.log4j.Logger,org.apache.logging.log4j.Logger" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="NonSynchronizedMethodOverridesSynchronizedMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NonThreadSafeLazyInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="NullThrown" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ObjectInstantiationInEqualsHashCode" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ObjectNotify" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreRequiredObsoleteCollectionTypes" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="OctalAndDecimalIntegersMixed" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="OnDemandImport" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="OptionalContainsCollection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="OverloadedVarargsMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="OverlyStrongTypeCast" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreInMatchingInstanceof" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PackageDotHtmlMayBePackageInfo" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PackageInMultipleModules" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ParameterHidingMemberVariable" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreInvisibleFields" value="true" />
|
||||||
|
<option name="m_ignoreStaticMethodParametersHidingInstanceFields" value="true" />
|
||||||
|
<option name="m_ignoreForConstructors" value="true" />
|
||||||
|
<option name="m_ignoreForPropertySetters" value="true" />
|
||||||
|
<option name="m_ignoreForAbstractMethods" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ParameterNameDiffersFromOverriddenParameter" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreSingleCharacterNames" value="false" />
|
||||||
|
<option name="m_ignoreOverridesOfLibraryMethods" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ParameterTypePreventsOverriding" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ParameterizedParametersStaticCollection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PlatformDetectionJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PostfixMethodCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ProblematicWhitespace" enabled="true" level="WARNING" enabled_by_default="false">
|
||||||
|
<scope name="Project Files" level="WARNING" enabled="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PublicConstructorInNonPublicClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PublicFieldAccessedInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PublicMethodNotExposedInInterface" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignorableAnnotations">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
<option name="onlyWarnIfContainingClassImplementsAnInterface" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="QsUndeclaredPathMimeTypesInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="RandomDoubleForRandomInteger" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ReadObjectAndWriteObjectPrivate" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ReadObjectInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ReadResolveAndWriteReplaceProtected" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="RecordStoreResource" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="RedundantExplicitVariableType" enabled="true" level="WEAK WARNING" enabled_by_default="true" editorAttributes="INFO_ATTRIBUTES" />
|
||||||
|
<inspection_tool class="RedundantFieldInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="RedundantImplements" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreSerializable" value="false" />
|
||||||
|
<option name="ignoreCloneable" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="RegExpAnonymousGroup" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="RelativeImport" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ReplaceAssignmentWithOperatorAssignment" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreLazyOperators" value="true" />
|
||||||
|
<option name="ignoreObscureOperators" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ReplaceAssignmentWithOperatorAssignmentJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ResultSetIndexZero" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ReturnOfInnerClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ReuseOfLocalVariableJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="RuntimeExec" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SafeLock" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SamePackageImport" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ScalaBundledInsRunner" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SerializableInnerClassWithNonSerializableOuterClass" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreAnonymousInnerClasses" value="false" />
|
||||||
|
<option name="superClassString" value="java.awt.Component" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SerializableWithUnconstructableAncestor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SetReplaceableByEnumSet" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SharedThreadLocalRandom" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SideEffectsInMonadicTransformation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SimplifiableAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SimplifiableEqualsExpression" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SleepWhileHoldingLock" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SocketResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="insideTryAllowed" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="StandardJS" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StaticGuardedByInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StaticInheritance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StaticNonFinalField" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StaticPseudoFunctionalStyleMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StringConcatenationArgumentToLogCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StringConcatenationInFormatCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StringConcatenationInMessageFormatCall" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StringConcatenationMissingWhitespace" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StringLiteralBreaksHTMLJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="StringReplaceableByStringBuffer" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="onlyWarnOnLoop" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SubtractionInCompareTo" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SuperTearDownInFinally" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SuppressionAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SuspiciousGetterSetter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SuspiciousLiteralUnderscore" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SuspiciousLocalesLanguages" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SynchronizedMethod" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_includeNativeMethods" value="true" />
|
||||||
|
<option name="ignoreSynchronizedSuperMethods" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SystemExit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreInMainMethod" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SystemGC" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SystemGetenv" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="SystemOutErr" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TailRecursionJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TestCaseInProductCode" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TestCaseWithNoTestMethods" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TestInProductSource" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TestMethodInProductCode" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TestMethodWithoutAssertion" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TestOnlyProblems" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TextBlockBackwardMigration" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="ThisEscapedInConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ThreadDeathRethrown" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ThreadDumpStack" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ThreadLocalNotStaticFinal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ThreadPriority" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ThreadStartInConstruction" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="ThrowCaughtLocally" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreRethrownExceptions" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="TooBroadThrows" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TransientFieldNotInitialized" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="TypeMayBeWeakened" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="useRighthandTypeAsWeakestTypeInAssignments" value="true" />
|
||||||
|
<option name="useParameterizedTypeForCollectionMethods" value="true" />
|
||||||
|
<option name="doNotWeakenToJavaLangObject" value="true" />
|
||||||
|
<option name="onlyWeakentoInterface" value="true" />
|
||||||
|
<option name="doNotWeakenInferredVariableType" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="TypeParameterExtendsFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnconditionalWait" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnnecessaryConstantArrayCreationExpression" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnnecessaryConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnnecessaryExplicitNumericCast" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnnecessaryInheritDoc" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnnecessaryJavaDocLink" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoreInlineLinkToSuper" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="UnstableTypeUsedInSignature" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UnusedCatchParameterJS" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="m_ignoreCatchBlocksWithComments" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="UnusedLibrary" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UpperCaseFieldNameNotConstant" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseEllipsisInPropertyInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseOfAWTPeerClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseOfClone" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseOfJDBCDriverClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseOfObsoleteAssert" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseOfObsoleteDateTimeApi" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseOfPropertiesAsHashtable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UseOfSunClasses" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UtilityClassWithPublicConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="UtilityClassWithoutPrivateConstructor" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignorableAnnotations">
|
||||||
|
<value />
|
||||||
|
</option>
|
||||||
|
<option name="ignoreClassesWithOnlyMain" value="false" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="VarargParameter" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="VariablePatternShadow" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="VariableTypeCanBeExplicit" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="VoidExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="VolatileArrayField" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="WaitCalledOnCondition" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="WaitNotInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="WaitNotifyNotInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="WaitWithoutCorrespondingNotify" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="WeakerAccess" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
|
||||||
|
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="true" />
|
||||||
|
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ZeroLengthArrayInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
17
.idea/misc.xml
generated
Normal file
17
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="NodePackageJsonFileManager">
|
||||||
|
<packageJsonPaths />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="openjdk-21" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
124
.idea/uiDesigner.xml
generated
Normal file
124
.idea/uiDesigner.xml
generated
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Palette2">
|
||||||
|
<group name="Swing">
|
||||||
|
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Button" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="RadioButton" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="CheckBox" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Label" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||||
|
<preferred-size width="-1" height="20" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
</group>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
20
api/pom.xml
Normal file
20
api/pom.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>autosubtitle-api</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
||||||
21
api/src/main/java/com/github/gtache/autosubtitle/Audio.java
Normal file
21
api/src/main/java/com/github/gtache/autosubtitle/Audio.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package com.github.gtache.autosubtitle;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an audio
|
||||||
|
*/
|
||||||
|
public interface Audio {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The audio input stream
|
||||||
|
* @throws IOException If an I/O error occurs
|
||||||
|
*/
|
||||||
|
InputStream getInputStream() throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The audio info
|
||||||
|
*/
|
||||||
|
AudioInfo info();
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.github.gtache.autosubtitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents info about an audio
|
||||||
|
*/
|
||||||
|
public interface AudioInfo {
|
||||||
|
/**
|
||||||
|
* @return The audio extension (mp3, etc.)
|
||||||
|
*/
|
||||||
|
String videoFormat();
|
||||||
|
}
|
||||||
14
api/src/main/java/com/github/gtache/autosubtitle/File.java
Normal file
14
api/src/main/java/com/github/gtache/autosubtitle/File.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.github.gtache.autosubtitle;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
public interface File {
|
||||||
|
default InputStream getInputStream() throws IOException {
|
||||||
|
return Files.newInputStream(path());
|
||||||
|
}
|
||||||
|
|
||||||
|
Path path();
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.github.gtache.autosubtitle;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Subtitle;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public interface Translator {
|
||||||
|
|
||||||
|
String translate(String text, Locale to);
|
||||||
|
|
||||||
|
default String translate(final String text, final String to) {
|
||||||
|
return translate(text, Locale.forLanguageTag(to));
|
||||||
|
}
|
||||||
|
|
||||||
|
Subtitle translate(Subtitle subtitle, Locale to);
|
||||||
|
|
||||||
|
default Subtitle translate(final Subtitle subtitle, final String to) {
|
||||||
|
return translate(subtitle, Locale.forLanguageTag(to));
|
||||||
|
}
|
||||||
|
}
|
||||||
21
api/src/main/java/com/github/gtache/autosubtitle/Video.java
Normal file
21
api/src/main/java/com/github/gtache/autosubtitle/Video.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package com.github.gtache.autosubtitle;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a video
|
||||||
|
*/
|
||||||
|
public interface Video {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The video input stream
|
||||||
|
* @throws IOException If an I/O error occurs
|
||||||
|
*/
|
||||||
|
InputStream getInputStream() throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The video info
|
||||||
|
*/
|
||||||
|
VideoInfo info();
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.github.gtache.autosubtitle;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
public interface VideoConverter {
|
||||||
|
|
||||||
|
Video addSoftSubtitles(final Video video, final Collection<SubtitleCollection> subtitles) throws IOException;
|
||||||
|
|
||||||
|
Video addHardSubtitles(final Video video, final SubtitleCollection subtitles) throws IOException;
|
||||||
|
|
||||||
|
Audio getAudio(final Video video) throws IOException;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.github.gtache.autosubtitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info about a video
|
||||||
|
*/
|
||||||
|
public interface VideoInfo {
|
||||||
|
/**
|
||||||
|
* @return The video extension (mp4, etc.)
|
||||||
|
*/
|
||||||
|
String videoFormat();
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.github.gtache.autosubtitle.process;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the result of running a process
|
||||||
|
*/
|
||||||
|
public interface ProcessResult {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the exit code of the process
|
||||||
|
*/
|
||||||
|
int exitCode();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the output of the process
|
||||||
|
*/
|
||||||
|
List<String> output();
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.github.gtache.autosubtitle.process;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs processes
|
||||||
|
*/
|
||||||
|
public interface ProcessRunner {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs a command
|
||||||
|
*
|
||||||
|
* @param args the command
|
||||||
|
* @return the result
|
||||||
|
* @throws IOException if something goes wrong
|
||||||
|
*/
|
||||||
|
default ProcessResult run(final String... args) throws IOException {
|
||||||
|
return run(Arrays.asList(args));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs a command
|
||||||
|
*
|
||||||
|
* @param args the command
|
||||||
|
* @return the result
|
||||||
|
* @throws IOException if something goes wrong
|
||||||
|
*/
|
||||||
|
ProcessResult run(final List<String> args) throws IOException;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.github.gtache.autosubtitle.setup;
|
||||||
|
|
||||||
|
public class SetupException extends Exception {
|
||||||
|
|
||||||
|
public SetupException(final String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SetupException(final String message, final Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SetupException(final Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.github.gtache.autosubtitle.setup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manages the setup of a component
|
||||||
|
*/
|
||||||
|
public interface SetupManager {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the name of the component
|
||||||
|
*/
|
||||||
|
String name();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the status of the component setup
|
||||||
|
*/
|
||||||
|
SetupStatus status();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether the component is installed
|
||||||
|
* @throws SetupException if an error occurred during the check
|
||||||
|
*/
|
||||||
|
default boolean isInstalled() throws SetupException {
|
||||||
|
return status() != SetupStatus.NOT_INSTALLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installs the component
|
||||||
|
*
|
||||||
|
* @throws SetupException if an error occurred during the installation
|
||||||
|
*/
|
||||||
|
void install() throws SetupException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstalls the component
|
||||||
|
*
|
||||||
|
* @throws SetupException if an error occurred during the uninstallation
|
||||||
|
*/
|
||||||
|
void uninstall() throws SetupException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reinstalls the component
|
||||||
|
*
|
||||||
|
* @throws SetupException if an error occurred during the reinstallation
|
||||||
|
*/
|
||||||
|
default void reinstall() throws SetupException {
|
||||||
|
uninstall();
|
||||||
|
install();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if an update is available for the component
|
||||||
|
*
|
||||||
|
* @return whether an update is available
|
||||||
|
* @throws SetupException if an error occurred during the check
|
||||||
|
*/
|
||||||
|
default boolean isUpdateAvailable() throws SetupException {
|
||||||
|
return status() == SetupStatus.UPDATE_AVAILABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the component
|
||||||
|
*
|
||||||
|
* @throws SetupException if an error occurred during the update
|
||||||
|
*/
|
||||||
|
void update() throws SetupException;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.github.gtache.autosubtitle.setup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The status of a setup
|
||||||
|
*/
|
||||||
|
public enum SetupStatus {
|
||||||
|
NOT_INSTALLED, INSTALLED, UPDATE_AVAILABLE
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the bounds of an object
|
||||||
|
*/
|
||||||
|
public interface Bounds {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the x coordinate
|
||||||
|
*/
|
||||||
|
double x();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the y coordinate
|
||||||
|
*/
|
||||||
|
double y();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the width
|
||||||
|
*/
|
||||||
|
double width();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the height
|
||||||
|
*/
|
||||||
|
double height();
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subtitle that can be edited
|
||||||
|
*/
|
||||||
|
public interface EditableSubtitle extends Subtitle {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the content of the subtitle
|
||||||
|
*
|
||||||
|
* @param content the new content
|
||||||
|
*/
|
||||||
|
void setContent(String content);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the start time of the subtitle
|
||||||
|
*
|
||||||
|
* @param start the new start time (in milliseconds)
|
||||||
|
*/
|
||||||
|
void setStart(final long start);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the end time of the subtitle
|
||||||
|
*
|
||||||
|
* @param end the new end time (in milliseconds)
|
||||||
|
*/
|
||||||
|
void setEnd(final long end);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the font of the subtitle
|
||||||
|
*
|
||||||
|
* @param font the new font
|
||||||
|
*/
|
||||||
|
void setFont(final Font font);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the location of the subtitle
|
||||||
|
*
|
||||||
|
* @param bounds the new location
|
||||||
|
*/
|
||||||
|
void setBounds(final Bounds bounds);
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle;
|
||||||
|
|
||||||
|
public interface Font {
|
||||||
|
|
||||||
|
String name();
|
||||||
|
|
||||||
|
int size();
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a subtitle
|
||||||
|
*/
|
||||||
|
public interface Subtitle {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the content of the subtitle
|
||||||
|
*/
|
||||||
|
String content();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the start time of the subtitle in milliseconds
|
||||||
|
*/
|
||||||
|
long start();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the end time of the subtitle in milliseconds
|
||||||
|
*/
|
||||||
|
long end();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the duration of the subtitle
|
||||||
|
*/
|
||||||
|
default Duration duration() {
|
||||||
|
return Duration.ofMillis(end() - start());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the font of the subtitle
|
||||||
|
*/
|
||||||
|
Font font();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the location and size of the subtitle
|
||||||
|
*/
|
||||||
|
Bounds bounds();
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a collection of {@link Subtitle}
|
||||||
|
*/
|
||||||
|
public interface SubtitleCollection {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The subtitles
|
||||||
|
*/
|
||||||
|
Collection<? extends Subtitle> subtitles();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The language of the subtitles
|
||||||
|
*/
|
||||||
|
String language();
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts subtitles to a specific format (e.g. srt, ssa, ass, ...)
|
||||||
|
*/
|
||||||
|
public interface SubtitleConverter {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the subtitle collection
|
||||||
|
*
|
||||||
|
* @param collection The collection
|
||||||
|
* @return The converted subtitles as the content of a file
|
||||||
|
*/
|
||||||
|
String convert(final SubtitleCollection collection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The name of the format
|
||||||
|
*/
|
||||||
|
String formatName();
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.Audio;
|
||||||
|
import com.github.gtache.autosubtitle.Video;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extracts subtitles from a video or audio
|
||||||
|
*/
|
||||||
|
public interface SubtitleExtractor {
|
||||||
|
|
||||||
|
Collection<EditableSubtitle> extract(final Video in);
|
||||||
|
|
||||||
|
Collection<EditableSubtitle> extract(final Audio in);
|
||||||
|
}
|
||||||
29
core/pom.xml
Normal file
29
core/pom.xml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>autosubtitle-core</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.dagger</groupId>
|
||||||
|
<artifactId>dagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-api</artifactId>
|
||||||
|
<version>2.23.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.github.gtache.autosubtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.AudioInfo;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link AudioInfo}
|
||||||
|
*/
|
||||||
|
public record AudioInfoImpl(String audioFormat) implements AudioInfo {
|
||||||
|
|
||||||
|
public AudioInfoImpl {
|
||||||
|
Objects.requireNonNull(audioFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String videoFormat() {
|
||||||
|
return audioFormat;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.github.gtache.autosubtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.Audio;
|
||||||
|
import com.github.gtache.autosubtitle.AudioInfo;
|
||||||
|
import com.github.gtache.autosubtitle.File;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link Audio} with a {@link File}
|
||||||
|
*/
|
||||||
|
public record FileAudioImpl(Path path, AudioInfo info) implements Audio, File {
|
||||||
|
|
||||||
|
public FileAudioImpl {
|
||||||
|
requireNonNull(path);
|
||||||
|
requireNonNull(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream getInputStream() throws IOException {
|
||||||
|
return File.super.getInputStream();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.github.gtache.autosubtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.File;
|
||||||
|
import com.github.gtache.autosubtitle.Video;
|
||||||
|
import com.github.gtache.autosubtitle.VideoInfo;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link Video} with a {@link File}
|
||||||
|
*/
|
||||||
|
public record FileVideoImpl(Path path, VideoInfo info) implements Video, File {
|
||||||
|
|
||||||
|
public FileVideoImpl {
|
||||||
|
requireNonNull(path);
|
||||||
|
requireNonNull(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream getInputStream() throws IOException {
|
||||||
|
return File.super.getInputStream();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.github.gtache.autosubtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.Audio;
|
||||||
|
import com.github.gtache.autosubtitle.AudioInfo;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In-memory implementation of {@link Audio}
|
||||||
|
*/
|
||||||
|
public record MemoryAudioImpl(Supplier<InputStream> inputStreamSupplier, AudioInfo info) implements Audio {
|
||||||
|
|
||||||
|
public MemoryAudioImpl {
|
||||||
|
requireNonNull(inputStreamSupplier);
|
||||||
|
requireNonNull(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream getInputStream() {
|
||||||
|
return inputStreamSupplier.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.github.gtache.autosubtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.Video;
|
||||||
|
import com.github.gtache.autosubtitle.VideoInfo;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In-memory implementation of {@link Video}
|
||||||
|
*/
|
||||||
|
public record MemoryVideoImpl(Supplier<InputStream> inputStreamSupplier, VideoInfo info) implements Video {
|
||||||
|
|
||||||
|
public MemoryVideoImpl {
|
||||||
|
requireNonNull(inputStreamSupplier);
|
||||||
|
requireNonNull(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream getInputStream() {
|
||||||
|
return inputStreamSupplier.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.github.gtache.autosubtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.VideoInfo;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link VideoInfo}
|
||||||
|
*/
|
||||||
|
public record VideoInfoImpl(String videoFormat) implements VideoInfo {
|
||||||
|
|
||||||
|
public VideoInfoImpl {
|
||||||
|
Objects.requireNonNull(videoFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String videoFormat() {
|
||||||
|
return videoFormat;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.github.gtache.autosubtitle.process.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.process.ProcessResult;
|
||||||
|
import com.github.gtache.autosubtitle.process.ProcessRunner;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base implementation of {@link ProcessRunner}
|
||||||
|
*/
|
||||||
|
public abstract class AbstractProcessRunner implements ProcessRunner {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(AbstractProcessRunner.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProcessResult run(final List<String> args) throws IOException {
|
||||||
|
final var builder = new ProcessBuilder(args);
|
||||||
|
builder.inheritIO();
|
||||||
|
builder.redirectErrorStream(true);
|
||||||
|
final var process = builder.start();
|
||||||
|
final var output = new ArrayList<String>();
|
||||||
|
new Thread(() -> {
|
||||||
|
try (final var in = new BufferedReader(new InputStreamReader(new BufferedInputStream(process.getInputStream()), StandardCharsets.UTF_8))) {
|
||||||
|
while (in.ready()) {
|
||||||
|
output.add(in.readLine());
|
||||||
|
}
|
||||||
|
} catch (final IOException e) {
|
||||||
|
logger.error("Error listening to process output of {}", args, e);
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
try {
|
||||||
|
process.waitFor(1, TimeUnit.HOURS);
|
||||||
|
} catch (final InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
process.destroy();
|
||||||
|
}
|
||||||
|
return new ProcessResultImpl(process.exitValue(), output);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.github.gtache.autosubtitle.process.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.process.ProcessResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link ProcessResult}
|
||||||
|
*/
|
||||||
|
public record ProcessResultImpl(int exitCode, List<String> output) implements ProcessResult {
|
||||||
|
|
||||||
|
public ProcessResultImpl {
|
||||||
|
output = List.copyOf(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.github.gtache.autosubtitle.setup.modules.impl;
|
||||||
|
|
||||||
|
import javax.inject.Qualifier;
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
|
@Qualifier
|
||||||
|
@Documented
|
||||||
|
@Retention(RUNTIME)
|
||||||
|
@Target({ElementType.TYPE_USE, ElementType.METHOD, ElementType.FIELD})
|
||||||
|
public @interface SubtitleExtractor {
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.github.gtache.autosubtitle.setup.modules.impl;
|
||||||
|
|
||||||
|
import javax.inject.Qualifier;
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
|
@Qualifier
|
||||||
|
@Documented
|
||||||
|
@Retention(RUNTIME)
|
||||||
|
@Target({ElementType.TYPE_USE, ElementType.METHOD, ElementType.FIELD})
|
||||||
|
public @interface Translator {
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.github.gtache.autosubtitle.setup.modules.impl;
|
||||||
|
|
||||||
|
import javax.inject.Qualifier;
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
|
@Qualifier
|
||||||
|
@Documented
|
||||||
|
@Retention(RUNTIME)
|
||||||
|
@Target({ElementType.TYPE_USE, ElementType.METHOD, ElementType.FIELD})
|
||||||
|
public @interface VideoConverter {
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Bounds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link Bounds}
|
||||||
|
*/
|
||||||
|
public record BoundsImpl(double x, double y, double width, double height) implements Bounds {
|
||||||
|
|
||||||
|
public BoundsImpl {
|
||||||
|
if (x < 0) {
|
||||||
|
throw new IllegalArgumentException("x must be >= 0 : " + x);
|
||||||
|
}
|
||||||
|
if (y < 0) {
|
||||||
|
throw new IllegalArgumentException("y must be >= 0 : " + y);
|
||||||
|
}
|
||||||
|
if (width < 0) {
|
||||||
|
throw new IllegalArgumentException("width must be >= 0 : " + width);
|
||||||
|
}
|
||||||
|
if (height < 0) {
|
||||||
|
throw new IllegalArgumentException("height must be >= 0 : " + height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Font;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link Font}
|
||||||
|
* @param name
|
||||||
|
* @param size
|
||||||
|
*/
|
||||||
|
public record FontImpl(String name, int size) implements Font {
|
||||||
|
|
||||||
|
public FontImpl {
|
||||||
|
Objects.requireNonNull(name);
|
||||||
|
if (size <= 0) {
|
||||||
|
throw new IllegalArgumentException("Size must be greater than 0 : " + size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleConverter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts subtitles to SRT format
|
||||||
|
*/
|
||||||
|
public class SRTSubtitleConverter implements SubtitleConverter {
|
||||||
|
|
||||||
|
public String convert(final SubtitleCollection collection) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String formatName() {
|
||||||
|
return "srt";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle.impl;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Subtitle;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of {@link SubtitleCollection}
|
||||||
|
*/
|
||||||
|
public record SubtitleCollectionImpl(Collection<? extends Subtitle> subtitles,
|
||||||
|
String language) implements SubtitleCollection {
|
||||||
|
|
||||||
|
public SubtitleCollectionImpl {
|
||||||
|
subtitles = List.copyOf(subtitles);
|
||||||
|
requireNonNull(language);
|
||||||
|
}
|
||||||
|
}
|
||||||
21
ffmpeg/pom.xml
Normal file
21
ffmpeg/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>autosubtitle-ffmpeg</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
package com.github.gtache.autosubtitle.ffmpeg;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.Audio;
|
||||||
|
import com.github.gtache.autosubtitle.File;
|
||||||
|
import com.github.gtache.autosubtitle.Video;
|
||||||
|
import com.github.gtache.autosubtitle.VideoConverter;
|
||||||
|
import com.github.gtache.autosubtitle.impl.AudioInfoImpl;
|
||||||
|
import com.github.gtache.autosubtitle.impl.FileAudioImpl;
|
||||||
|
import com.github.gtache.autosubtitle.impl.FileVideoImpl;
|
||||||
|
import com.github.gtache.autosubtitle.impl.VideoInfoImpl;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleConverter;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.SequencedMap;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FFmpeg implementation of {@link VideoConverter}
|
||||||
|
*/
|
||||||
|
public class FFmpegVideoConverter implements VideoConverter {
|
||||||
|
|
||||||
|
private static final String TEMP_FILE_PREFIX = "autosubtitle";
|
||||||
|
private final Path ffmpegPath;
|
||||||
|
private final SubtitleConverter subtitleConverter;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
FFmpegVideoConverter(final Path ffmpegPath, final SubtitleConverter subtitleConverter) {
|
||||||
|
this.ffmpegPath = requireNonNull(ffmpegPath);
|
||||||
|
this.subtitleConverter = requireNonNull(subtitleConverter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Video addSoftSubtitles(final Video video, final Collection<SubtitleCollection> subtitles) throws IOException {
|
||||||
|
final var videoPath = getPath(video);
|
||||||
|
final var collectionMap = dumpCollections(subtitles);
|
||||||
|
final var out = getTempFile("mkv"); //Soft subtitles are only supported by mkv apparently
|
||||||
|
final var args = new ArrayList<String>();
|
||||||
|
args.add(ffmpegPath.toString());
|
||||||
|
args.add("-i");
|
||||||
|
args.add(videoPath.toString());
|
||||||
|
collectionMap.forEach((c, p) -> {
|
||||||
|
args.add("-i");
|
||||||
|
args.add(p.toString());
|
||||||
|
});
|
||||||
|
args.add("-c");
|
||||||
|
args.add("copy");
|
||||||
|
args.add("-map");
|
||||||
|
args.add("0:v");
|
||||||
|
args.add("-map");
|
||||||
|
args.add("0:a");
|
||||||
|
final var i = new AtomicInteger(1);
|
||||||
|
collectionMap.forEach((c, p) -> {
|
||||||
|
final var n = i.getAndIncrement();
|
||||||
|
args.add("-map");
|
||||||
|
args.add(String.valueOf(n));
|
||||||
|
args.add("-metadata:s:s:" + n);
|
||||||
|
args.add("language=" + c.language());
|
||||||
|
});
|
||||||
|
args.add(out.toString());
|
||||||
|
run(args);
|
||||||
|
return new FileVideoImpl(out, new VideoInfoImpl("mkv"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Video addHardSubtitles(final Video video, final SubtitleCollection subtitles) throws IOException {
|
||||||
|
final var videoPath = getPath(video);
|
||||||
|
final var subtitlesPath = dumpSubtitles(subtitles);
|
||||||
|
final var out = getTempFile(video.info().videoFormat());
|
||||||
|
final var subtitleArg = subtitleConverter.formatName().equalsIgnoreCase("ass") ? "ass=" + subtitlesPath : "subtitles=" + subtitlesPath;
|
||||||
|
final var args = List.of(
|
||||||
|
ffmpegPath.toString(),
|
||||||
|
"-i",
|
||||||
|
videoPath.toString(),
|
||||||
|
"-vf",
|
||||||
|
subtitleArg,
|
||||||
|
out.toString()
|
||||||
|
);
|
||||||
|
run(args);
|
||||||
|
return new FileVideoImpl(out, video.info());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Audio getAudio(final Video video) throws IOException {
|
||||||
|
final var videoPath = getPath(video);
|
||||||
|
final var audioPath = getTempFile(".wav");
|
||||||
|
final var dumpVideoPath = getTempFile("." + video.info().videoFormat());
|
||||||
|
final var args = List.of(
|
||||||
|
ffmpegPath.toString(),
|
||||||
|
"-i",
|
||||||
|
videoPath.toString(),
|
||||||
|
"-map",
|
||||||
|
"0:a",
|
||||||
|
audioPath.toString(),
|
||||||
|
"-map",
|
||||||
|
"0:v",
|
||||||
|
dumpVideoPath.toString()
|
||||||
|
);
|
||||||
|
run(args);
|
||||||
|
Files.deleteIfExists(dumpVideoPath);
|
||||||
|
return new FileAudioImpl(audioPath, new AudioInfoImpl("wav"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Path getPath(final Video video) throws IOException {
|
||||||
|
if (video instanceof final File f) {
|
||||||
|
return f.path();
|
||||||
|
} else {
|
||||||
|
return dumpVideo(video);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Path dumpVideo(final Video video) throws IOException {
|
||||||
|
final var path = getTempFile(video.info().videoFormat());
|
||||||
|
try (final var out = Files.newOutputStream(path)) {
|
||||||
|
video.getInputStream().transferTo(out);
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
private SequencedMap<SubtitleCollection, Path> dumpCollections(final Collection<SubtitleCollection> collections) throws IOException {
|
||||||
|
final var ret = new LinkedHashMap<SubtitleCollection, Path>(collections.size());
|
||||||
|
for (final var subtitles : collections) {
|
||||||
|
ret.put(subtitles, dumpSubtitles(subtitles));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Path dumpSubtitles(final SubtitleCollection subtitles) throws IOException {
|
||||||
|
final var path = getTempFile("ass");
|
||||||
|
Files.writeString(path, subtitleConverter.convert(subtitles));
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Path getTempFile(final String extension) throws IOException {
|
||||||
|
final var path = Files.createTempFile(TEMP_FILE_PREFIX, "." + extension);
|
||||||
|
path.toFile().deleteOnExit();
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void run(final String... args) throws IOException {
|
||||||
|
run(Arrays.asList(args));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void run(final List<String> args) throws IOException {
|
||||||
|
final var builder = new ProcessBuilder(args);
|
||||||
|
builder.inheritIO();
|
||||||
|
builder.redirectErrorStream(true);
|
||||||
|
final var process = builder.start();
|
||||||
|
try {
|
||||||
|
process.waitFor(1, TimeUnit.HOURS);
|
||||||
|
} catch (final InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
process.destroy();
|
||||||
|
}
|
||||||
|
if (process.exitValue() != 0) {
|
||||||
|
throw new IOException("FFmpeg exited with code " + process.exitValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.github.gtache.autosubtitle.setup.ffmpeg;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.setup.SetupException;
|
||||||
|
import com.github.gtache.autosubtitle.setup.SetupManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manager managing the FFmpeg installation
|
||||||
|
*/
|
||||||
|
public class FFmpegSetupManager implements SetupManager {
|
||||||
|
@Override
|
||||||
|
public boolean isInstalled() throws SetupException {
|
||||||
|
return checkSystemFFmpeg() || checkBundledFFmpeg();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void install() throws SetupException {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uninstall() throws SetupException {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isUpdateAvailable() throws SetupException {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update() throws SetupException {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean checkSystemFFmpeg() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean checkBundledFFmpeg() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
39
fx/pom.xml
Normal file
39
fx/pom.xml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>autosubtitle-fx</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-gui</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.dagger</groupId>
|
||||||
|
<artifactId>dagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openjfx</groupId>
|
||||||
|
<artifactId>javafx-media</artifactId>
|
||||||
|
<version>22.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openjfx</groupId>
|
||||||
|
<artifactId>javafx-fxml</artifactId>
|
||||||
|
<version>22.0.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui.fx;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.EditableSubtitle;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Subtitle;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleExtractor;
|
||||||
|
import com.github.gtache.autosubtitle.VideoConverter;
|
||||||
|
import com.github.gtache.autosubtitle.gui.MainController;
|
||||||
|
import com.github.gtache.autosubtitle.impl.FileVideoImpl;
|
||||||
|
import javafx.beans.binding.Bindings;
|
||||||
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
|
import javafx.beans.value.ChangeListener;
|
||||||
|
import javafx.beans.value.ObservableValue;
|
||||||
|
import javafx.event.ActionEvent;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.TableColumn;
|
||||||
|
import javafx.scene.control.TableView;
|
||||||
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.layout.StackPane;
|
||||||
|
import javafx.scene.media.Media;
|
||||||
|
import javafx.scene.media.MediaPlayer;
|
||||||
|
import javafx.scene.media.MediaView;
|
||||||
|
import javafx.stage.FileChooser;
|
||||||
|
import javafx.stage.Window;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FX implementation of {@link MainController}
|
||||||
|
*/
|
||||||
|
public class FXMainController implements MainController {
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private MediaView videoView;
|
||||||
|
@FXML
|
||||||
|
private TextField fileField;
|
||||||
|
@FXML
|
||||||
|
private Button extractButton;
|
||||||
|
@FXML
|
||||||
|
private Button resetButton;
|
||||||
|
@FXML
|
||||||
|
private Button exportButton;
|
||||||
|
@FXML
|
||||||
|
private TableView<EditableSubtitle> subtitlesTable;
|
||||||
|
@FXML
|
||||||
|
private TableColumn<EditableSubtitle, LocalTime> startColumn;
|
||||||
|
@FXML
|
||||||
|
private TableColumn<EditableSubtitle, LocalTime> endColumn;
|
||||||
|
@FXML
|
||||||
|
private TableColumn<EditableSubtitle, String> textColumn;
|
||||||
|
@FXML
|
||||||
|
private StackPane stackPane;
|
||||||
|
|
||||||
|
private final FXMainModel model;
|
||||||
|
private final SubtitleExtractor subtitleExtractor;
|
||||||
|
private final VideoConverter videoConverter;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
FXMainController(final FXMainModel model, final SubtitleExtractor subtitleExtractor, final VideoConverter videoConverter) {
|
||||||
|
this.model = requireNonNull(model);
|
||||||
|
this.subtitleExtractor = requireNonNull(subtitleExtractor);
|
||||||
|
this.videoConverter = requireNonNull(videoConverter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void initialize() {
|
||||||
|
extractButton.disableProperty().bind(model.videoProperty().isNull());
|
||||||
|
resetButton.disableProperty().bind(Bindings.isEmpty(model.subtitles()));
|
||||||
|
exportButton.disableProperty().bind(Bindings.isEmpty(model.subtitles()));
|
||||||
|
|
||||||
|
subtitlesTable.setItems(model.subtitles());
|
||||||
|
startColumn.setCellValueFactory(param -> new SimpleObjectProperty<>(param.getValue() == null ? null : param.getValue().start()));
|
||||||
|
endColumn.setCellValueFactory(param -> new SimpleObjectProperty<>(param.getValue() == null ? null : param.getValue().end()));
|
||||||
|
textColumn.setCellValueFactory(param -> new SimpleObjectProperty<>(param.getValue() == null ? "" : param.getValue().content()));
|
||||||
|
|
||||||
|
model.selectedSubtitleProperty().addListener(new ChangeListener<EditableSubtitle>() {
|
||||||
|
@Override
|
||||||
|
public void changed(final ObservableValue<? extends EditableSubtitle> observable, final EditableSubtitle oldValue, final EditableSubtitle newValue) {
|
||||||
|
if (newValue != null) {
|
||||||
|
videoView.getMediaPlayer().seek(Duration.of(newValue.start().to));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void fileButtonPressed() {
|
||||||
|
final var filePicker = new FileChooser();
|
||||||
|
final var file = filePicker.showOpenDialog(window());
|
||||||
|
if (file != null) {
|
||||||
|
loadVideo(file.toPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void extractSubtitles() {
|
||||||
|
if (model.video() != null) {
|
||||||
|
final var subtitles = subtitleExtractor.extract(model.video());
|
||||||
|
model.subtitles().setAll(subtitles.stream().sorted(Comparator.comparing(Subtitle::start)).toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadVideo(final Path file) {
|
||||||
|
fileField.setText(file.toAbsolutePath().toString());
|
||||||
|
model.videoProperty().set(new FileVideoImpl(file));
|
||||||
|
final var media = new Media(file.toUri().toString());
|
||||||
|
final var player = new MediaPlayer(media);
|
||||||
|
videoView.getMediaPlayer().dispose();
|
||||||
|
videoView.setMediaPlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FXMainModel model() {
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Window window() {
|
||||||
|
return videoView.getScene().getWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void extractPressed(final ActionEvent actionEvent) {
|
||||||
|
extractSubtitles();
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void exportPressed(final ActionEvent actionEvent) {
|
||||||
|
final var filePicker = new FileChooser();
|
||||||
|
final var file = filePicker.showSaveDialog(window());
|
||||||
|
if (file != null) {
|
||||||
|
videoConverter.addSoftSubtitles(model.video(), model.subtitles());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void resetButtonPressed(final ActionEvent actionEvent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui.fx;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.EditableSubtitle;
|
||||||
|
import com.github.gtache.autosubtitle.Video;
|
||||||
|
import com.github.gtache.autosubtitle.gui.MainModel;
|
||||||
|
import javafx.beans.property.ObjectProperty;
|
||||||
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FX implementation of {@link MainModel}
|
||||||
|
*/
|
||||||
|
public class FXMainModel implements MainModel {
|
||||||
|
|
||||||
|
private final ObjectProperty<Video> video;
|
||||||
|
private final ObservableList<EditableSubtitle> subtitles;
|
||||||
|
private final ObjectProperty<EditableSubtitle> subtitle;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
FXMainModel() {
|
||||||
|
video = new SimpleObjectProperty<>();
|
||||||
|
subtitles = FXCollections.observableArrayList();
|
||||||
|
subtitle = new SimpleObjectProperty<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Video video() {
|
||||||
|
return video.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectProperty<Video> videoProperty() {
|
||||||
|
return video;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ObservableList<EditableSubtitle> subtitles() {
|
||||||
|
return subtitles;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EditableSubtitle selectedSubtitle() {
|
||||||
|
return subtitle.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectProperty<EditableSubtitle> selectedSubtitleProperty() {
|
||||||
|
return subtitle;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui.fx;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.gui.SetupController;
|
||||||
|
import com.github.gtache.autosubtitle.setup.SetupManager;
|
||||||
|
import com.github.gtache.autosubtitle.setup.modules.impl.SubtitleExtractor;
|
||||||
|
import com.github.gtache.autosubtitle.setup.modules.impl.Translator;
|
||||||
|
import com.github.gtache.autosubtitle.setup.modules.impl.VideoConverter;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.Label;
|
||||||
|
import javafx.scene.control.MenuButton;
|
||||||
|
import javafx.stage.Window;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FX implementation of {@link SetupController}
|
||||||
|
*/
|
||||||
|
public class FXSetupController implements SetupController {
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private ResourceBundle resources;
|
||||||
|
@FXML
|
||||||
|
private Label converterNameLabel;
|
||||||
|
@FXML
|
||||||
|
private Label converterStatusLabel;
|
||||||
|
@FXML
|
||||||
|
private Label extractorNameLabel;
|
||||||
|
@FXML
|
||||||
|
private Label extractorStatusLabel;
|
||||||
|
@FXML
|
||||||
|
private Label translatorNameLabel;
|
||||||
|
@FXML
|
||||||
|
private Label translatorStatusLabel;
|
||||||
|
@FXML
|
||||||
|
private MenuButton converterButton;
|
||||||
|
@FXML
|
||||||
|
private MenuButton extractorButton;
|
||||||
|
@FXML
|
||||||
|
private MenuButton translatorButton;
|
||||||
|
|
||||||
|
private final FXSetupModel model;
|
||||||
|
private final SetupManager converterManager;
|
||||||
|
private final SetupManager extractorManager;
|
||||||
|
private final SetupManager translatorManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
FXSetupController(final FXSetupModel model, @VideoConverter final SetupManager converterManager,
|
||||||
|
@SubtitleExtractor final SetupManager extractorManager, @Translator final SetupManager translatorManager) {
|
||||||
|
this.model = Objects.requireNonNull(model);
|
||||||
|
this.converterManager = Objects.requireNonNull(converterManager);
|
||||||
|
this.extractorManager = Objects.requireNonNull(extractorManager);
|
||||||
|
this.translatorManager = Objects.requireNonNull(translatorManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private void initialize() {
|
||||||
|
converterNameLabel.setText(converterManager.name());
|
||||||
|
converterStatusLabel.setText(converterManager.status().toString());
|
||||||
|
extractorNameLabel.setText(extractorManager.name());
|
||||||
|
extractorStatusLabel.setText(extractorManager.status().toString());
|
||||||
|
translatorNameLabel.setText(translatorManager.name());
|
||||||
|
translatorStatusLabel.setText(translatorManager.status().toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void installVideoConverter() {
|
||||||
|
converterManager.install();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uninstallVideoConverter() {
|
||||||
|
converterManager.uninstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateVideoConverter() {
|
||||||
|
converterManager.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reinstallVideoConverter() {
|
||||||
|
converterManager.reinstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void installSubtitleExtractor() {
|
||||||
|
extractorManager.install();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uninstallSubtitleExtractor() {
|
||||||
|
extractorManager.uninstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateSubtitleExtractor() {
|
||||||
|
extractorManager.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reinstallSubtitleExtractor() {
|
||||||
|
extractorManager.reinstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void installTranslator() {
|
||||||
|
translatorManager.install();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uninstallTranslator() {
|
||||||
|
translatorManager.uninstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateTranslator() {
|
||||||
|
translatorManager.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reinstallTranslator() {
|
||||||
|
translatorManager.reinstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FXSetupModel model() {
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Window window() {
|
||||||
|
return extractorButton.getScene().getWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui.fx;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.gui.SetupModel;
|
||||||
|
import javafx.beans.property.BooleanProperty;
|
||||||
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FX implementation of {@link SetupModel}
|
||||||
|
*/
|
||||||
|
public class FXSetupModel implements SetupModel {
|
||||||
|
|
||||||
|
private final BooleanProperty subtitleExtractorInstalled;
|
||||||
|
private final BooleanProperty subtitleExtractorUpdateAvailable;
|
||||||
|
private final BooleanProperty videoConverterInstalled;
|
||||||
|
private final BooleanProperty videoConverterUpdateAvailable;
|
||||||
|
private final BooleanProperty translatorInstalled;
|
||||||
|
private final BooleanProperty translatorUpdateAvailable;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
FXSetupModel() {
|
||||||
|
this.subtitleExtractorInstalled = new SimpleBooleanProperty(false);
|
||||||
|
this.subtitleExtractorUpdateAvailable = new SimpleBooleanProperty(false);
|
||||||
|
this.videoConverterInstalled = new SimpleBooleanProperty(false);
|
||||||
|
this.videoConverterUpdateAvailable = new SimpleBooleanProperty(false);
|
||||||
|
this.translatorInstalled = new SimpleBooleanProperty(false);
|
||||||
|
this.translatorUpdateAvailable = new SimpleBooleanProperty(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSubtitleExtractorInstalled() {
|
||||||
|
return subtitleExtractorInstalled.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSubtitleExtractorInstalled(final boolean installed) {
|
||||||
|
subtitleExtractorInstalled.set(installed);
|
||||||
|
}
|
||||||
|
|
||||||
|
BooleanProperty subtitleExtractorInstalledProperty() {
|
||||||
|
return subtitleExtractorInstalled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSubtitleExtractorUpdateAvailable() {
|
||||||
|
return subtitleExtractorUpdateAvailable.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSubtitleExtractorUpdateAvailable(final boolean updateAvailable) {
|
||||||
|
subtitleExtractorUpdateAvailable.set(updateAvailable);
|
||||||
|
}
|
||||||
|
|
||||||
|
BooleanProperty subtitleExtractorUpdateAvailableProperty() {
|
||||||
|
return subtitleExtractorUpdateAvailable;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVideoConverterInstalled() {
|
||||||
|
return videoConverterInstalled.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setVideoConverterInstalled(final boolean installed) {
|
||||||
|
videoConverterInstalled.set(installed);
|
||||||
|
}
|
||||||
|
|
||||||
|
BooleanProperty videoConverterInstalledProperty() {
|
||||||
|
return videoConverterInstalled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVideoConverterUpdateAvailable() {
|
||||||
|
return videoConverterUpdateAvailable.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setVideoConverterUpdateAvailable(final boolean updateAvailable) {
|
||||||
|
videoConverterUpdateAvailable.set(updateAvailable);
|
||||||
|
}
|
||||||
|
|
||||||
|
BooleanProperty videoConverterUpdateAvailableProperty() {
|
||||||
|
return videoConverterUpdateAvailable;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTranslatorInstalled() {
|
||||||
|
return translatorInstalled.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTranslatorInstalled(final boolean installed) {
|
||||||
|
translatorInstalled.set(installed);
|
||||||
|
}
|
||||||
|
|
||||||
|
BooleanProperty translatorInstalledProperty() {
|
||||||
|
return translatorInstalled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTranslatorUpdateAvailable() {
|
||||||
|
return translatorUpdateAvailable.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTranslatorUpdateAvailable(final boolean updateAvailable) {
|
||||||
|
translatorUpdateAvailable.set(updateAvailable);
|
||||||
|
}
|
||||||
|
|
||||||
|
BooleanProperty translatorUpdateAvailableProperty() {
|
||||||
|
return translatorUpdateAvailable;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package com.github.gtache.autosubtitle.subtitle.fx;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Bounds;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.EditableSubtitle;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Font;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.impl.BoundsImpl;
|
||||||
|
import javafx.beans.property.LongProperty;
|
||||||
|
import javafx.beans.property.ObjectProperty;
|
||||||
|
import javafx.beans.property.SimpleLongProperty;
|
||||||
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
|
import javafx.beans.property.StringProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FX implementation of {@link EditableSubtitle}
|
||||||
|
*/
|
||||||
|
public class ObservableSubtitleImpl implements EditableSubtitle {
|
||||||
|
|
||||||
|
private final StringProperty content;
|
||||||
|
private final LongProperty start;
|
||||||
|
private final LongProperty end;
|
||||||
|
private final ObjectProperty<Font> font;
|
||||||
|
private final ObjectProperty<Bounds> location;
|
||||||
|
|
||||||
|
public ObservableSubtitleImpl() {
|
||||||
|
content = new SimpleStringProperty("");
|
||||||
|
start = new SimpleLongProperty(0);
|
||||||
|
end = new SimpleLongProperty(0);
|
||||||
|
font = new SimpleObjectProperty<>();
|
||||||
|
location = new SimpleObjectProperty<>(new BoundsImpl(0, 0, 100, 12));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String content() {
|
||||||
|
return content.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setContent(final String content) {
|
||||||
|
this.content.set(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringProperty contentProperty() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long start() {
|
||||||
|
return start.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setStart(final long start) {
|
||||||
|
this.start.set(start);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LongProperty startProperty() {
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long end() {
|
||||||
|
return end.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnd(final long end) {
|
||||||
|
this.end.set(end);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LongProperty endProperty() {
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Font font() {
|
||||||
|
return font.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setFont(final Font font) {
|
||||||
|
this.font.set(font);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectProperty<Font> fontProperty() {
|
||||||
|
return font;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Bounds bounds() {
|
||||||
|
return location.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBounds(final Bounds bounds) {
|
||||||
|
this.location.set(bounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectProperty<Bounds> locationProperty() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.control.TableColumn?>
|
||||||
|
<?import javafx.scene.control.TableView?>
|
||||||
|
<?import javafx.scene.control.TextField?>
|
||||||
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
|
<?import javafx.scene.layout.GridPane?>
|
||||||
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
|
<?import javafx.scene.layout.StackPane?>
|
||||||
|
<?import javafx.scene.media.MediaView?>
|
||||||
|
|
||||||
|
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.github.gtache.autosubtitle.gui.fx.FXMainController">
|
||||||
|
<children>
|
||||||
|
<GridPane hgap="10.0" layoutX="152.0" layoutY="116.0" vgap="10.0" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="10.0">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<TextField fx:id="fileField" editable="false" GridPane.columnIndex="1" />
|
||||||
|
<Button mnemonicParsing="false" onAction="#fileButtonPressed" text="%main.button.file.label" GridPane.columnIndex="2" />
|
||||||
|
<Button fx:id="extractButton" mnemonicParsing="false" onAction="#extractPressed" text="%main.button.extract.label" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||||
|
<Button fx:id="exportButton" mnemonicParsing="false" onAction="#exportPressed" text="%main.button.export.label" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||||
|
<TableView fx:id="subtitlesTable" GridPane.rowIndex="1">
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="startColumn" prefWidth="50.0" text="Column X" />
|
||||||
|
<TableColumn fx:id="endColumn" prefWidth="50.0" text="Column X" />
|
||||||
|
<TableColumn fx:id="textColumn" prefWidth="75.0" text="Column X" />
|
||||||
|
</columns>
|
||||||
|
<columnResizePolicy>
|
||||||
|
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
|
||||||
|
</columnResizePolicy>
|
||||||
|
</TableView>
|
||||||
|
<Button fx:id="resetButton" mnemonicParsing="false" onAction="#resetButtonPressed" text="%main.button.reset.label" GridPane.rowIndex="2" />
|
||||||
|
<StackPane fx:id="stackPane" prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.columnSpan="2147483647" GridPane.rowIndex="1">
|
||||||
|
<children>
|
||||||
|
<MediaView fx:id="videoView" fitHeight="200.0" fitWidth="200.0" />
|
||||||
|
</children>
|
||||||
|
</StackPane>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.geometry.Insets?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
<GridPane hgap="10.0" vgap="10.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/22"
|
||||||
|
fx:controller="com.github.gtache.autosubtitle.gui.fx.FXSetupController">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES"/>
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints vgrow="SOMETIMES"/>
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<Label fx:id="converterNameLabel" text="Label"/>
|
||||||
|
<Label fx:id="converterStatusLabel" text="Label" GridPane.columnIndex="1"/>
|
||||||
|
<Label fx:id="extractorNameLabel" text="Label" GridPane.rowIndex="1"/>
|
||||||
|
<Label fx:id="extractorStatusLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||||
|
<Label fx:id="translatorNameLabel" text="Label" GridPane.rowIndex="2"/>
|
||||||
|
<Label fx:id="translatorStatusLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||||
|
<MenuButton fx:id="converterButton" mnemonicParsing="false" text="MenuButton" GridPane.columnIndex="2">
|
||||||
|
<items>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Action 1"/>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Action 2"/>
|
||||||
|
</items>
|
||||||
|
</MenuButton>
|
||||||
|
<MenuButton fx:id="extractorButton" mnemonicParsing="false" text="MenuButton" GridPane.columnIndex="2"
|
||||||
|
GridPane.rowIndex="1">
|
||||||
|
<items>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Action 1"/>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Action 2"/>
|
||||||
|
</items>
|
||||||
|
</MenuButton>
|
||||||
|
<MenuButton fx:id="translatorButton" mnemonicParsing="false" text="MenuButton" GridPane.columnIndex="2"
|
||||||
|
GridPane.rowIndex="2">
|
||||||
|
<items>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Action 1"/>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Action 2"/>
|
||||||
|
</items>
|
||||||
|
</MenuButton>
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||||
|
</padding>
|
||||||
|
</GridPane>
|
||||||
21
gui/pom.xml
Normal file
21
gui/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>autosubtitle-gui</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui;
|
||||||
|
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
public interface MainController {
|
||||||
|
|
||||||
|
void extractSubtitles();
|
||||||
|
|
||||||
|
void loadVideo(final Path file);
|
||||||
|
|
||||||
|
MainModel model();
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.EditableSubtitle;
|
||||||
|
import com.github.gtache.autosubtitle.Video;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MainModel {
|
||||||
|
|
||||||
|
Video video();
|
||||||
|
|
||||||
|
List<EditableSubtitle> subtitles();
|
||||||
|
|
||||||
|
EditableSubtitle selectedSubtitle();
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controller for the setup view
|
||||||
|
*/
|
||||||
|
public interface SetupController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installs the video converter
|
||||||
|
*/
|
||||||
|
void installVideoConverter();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstalls the video converter
|
||||||
|
*/
|
||||||
|
void uninstallVideoConverter();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the video converter
|
||||||
|
*/
|
||||||
|
void updateVideoConverter();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reinstalls the video converter
|
||||||
|
*/
|
||||||
|
void reinstallVideoConverter();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installs the subtitle extractor
|
||||||
|
*/
|
||||||
|
void installSubtitleExtractor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstalls the subtitle extractor
|
||||||
|
*/
|
||||||
|
void uninstallSubtitleExtractor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the subtitle extractor
|
||||||
|
*/
|
||||||
|
void updateSubtitleExtractor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reinstalls the subtitle extractor
|
||||||
|
*/
|
||||||
|
void reinstallSubtitleExtractor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installs the translator
|
||||||
|
*/
|
||||||
|
void installTranslator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstalls the translator
|
||||||
|
*/
|
||||||
|
void uninstallTranslator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the translator
|
||||||
|
*/
|
||||||
|
void updateTranslator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reinstalls the translator
|
||||||
|
*/
|
||||||
|
void reinstallTranslator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the model
|
||||||
|
*/
|
||||||
|
SetupModel model();
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.github.gtache.autosubtitle.gui;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model for the setup view
|
||||||
|
*/
|
||||||
|
public interface SetupModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether the subtitle extractor is installed
|
||||||
|
*/
|
||||||
|
boolean isSubtitleExtractorInstalled();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the subtitle extractor is installed
|
||||||
|
*
|
||||||
|
* @param installed whether the subtitle extractor is installed
|
||||||
|
*/
|
||||||
|
void setSubtitleExtractorInstalled(boolean installed);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether an update is available for the subtitle extractor
|
||||||
|
*/
|
||||||
|
boolean isSubtitleExtractorUpdateAvailable();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether an update is available for the subtitle extractor
|
||||||
|
*
|
||||||
|
* @param updateAvailable whether an update is available for the subtitle extractor
|
||||||
|
*/
|
||||||
|
void setSubtitleExtractorUpdateAvailable(boolean updateAvailable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether the video converter is installed
|
||||||
|
*/
|
||||||
|
boolean isVideoConverterInstalled();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the video converter is installed
|
||||||
|
*
|
||||||
|
* @param installed whether the video converter is installed
|
||||||
|
*/
|
||||||
|
void setVideoConverterInstalled(boolean installed);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether an update is available for the video converter
|
||||||
|
*/
|
||||||
|
boolean isVideoConverterUpdateAvailable();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether an update is available for the video converter
|
||||||
|
*
|
||||||
|
* @param updateAvailable whether an update is available for the video converter
|
||||||
|
*/
|
||||||
|
void setVideoConverterUpdateAvailable(boolean updateAvailable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether the translator is installed
|
||||||
|
*/
|
||||||
|
boolean isTranslatorInstalled();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the translator is installed
|
||||||
|
*
|
||||||
|
* @param installed whether the translator is installed
|
||||||
|
*/
|
||||||
|
void setTranslatorInstalled(boolean installed);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether an update is available for the translator
|
||||||
|
*/
|
||||||
|
boolean isTranslatorUpdateAvailable();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether an update is available for the translator
|
||||||
|
*
|
||||||
|
* @param updateAvailable whether an update is available for the translator
|
||||||
|
*/
|
||||||
|
void setTranslatorUpdateAvailable(boolean updateAvailable);
|
||||||
|
}
|
||||||
4
gui/src/main/resources/MainBundle.properties
Normal file
4
gui/src/main/resources/MainBundle.properties
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
main.button.export.label=Export video...
|
||||||
|
main.button.extract.label=Extract subtitles
|
||||||
|
main.button.file.label=Open file...
|
||||||
|
main.button.reset.label=Reset subtitles
|
||||||
1
gui/src/main/resources/MainBundle_fr.properties
Normal file
1
gui/src/main/resources/MainBundle_fr.properties
Normal file
@@ -0,0 +1 @@
|
|||||||
|
main.button.file.label=Ouvrir un fichier...
|
||||||
66
pom.xml
Normal file
66
pom.xml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<modules>
|
||||||
|
<module>api</module>
|
||||||
|
<module>core</module>
|
||||||
|
<module>whisper</module>
|
||||||
|
<module>ffmpeg</module>
|
||||||
|
<module>gui</module>
|
||||||
|
<module>fx</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-ffmpeg</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-gui</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-fx</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-whisper</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.dagger</groupId>
|
||||||
|
<artifactId>dagger</artifactId>
|
||||||
|
<version>2.51.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
</project>
|
||||||
21
whisper/pom.xml
Normal file
21
whisper/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>autosubtitle-whisper</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gtache.autosubtitle</groupId>
|
||||||
|
<artifactId>autosubtitle-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.github.gtache.autosubtitle.whisper;
|
||||||
|
|
||||||
|
import com.github.gtache.autosubtitle.Audio;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.Subtitle;
|
||||||
|
import com.github.gtache.autosubtitle.subtitle.SubtitleExtractor;
|
||||||
|
import com.github.gtache.autosubtitle.Video;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class WhisperSubtitleExtractor implements SubtitleExtractor {
|
||||||
|
@Override
|
||||||
|
public Collection<Subtitle> extract(final Video in) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<Subtitle> extract(final Audio in) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user