This package contains facilities for defining fansubbing-related tasks using Gradle.
Of particular interest are:
- Subs - central extension tracking episodes, batches and tasks, and providing access to properties
- glob - basic brace expansion and globbing
- ItemGroupContext - facilities for creating groups of items (e.g. tasks) for multiple entries
- ItemGroup - represents a group of items (e.g. tasks) which can be accessed on an entry basis
- The extension functions to org.gradle.api.Task
The package provides the following Gradle tasks:
- Merge for merging ASS files
- Chapters for generating chapter files
- Swap for swapping honorifics and the like
- ASS for modifying ASS files
- Automation for running Aegisub automations
- Mux for muxing files using mkvmerge
- FTP for uploading files to an FTP server
- SFTP for uploading files to an SSH server
- SSHExec for executing commands on an SSH server
- HTTP for making HTTP(S) requests
- Torrent for generating a torrent file
- Nyaa for publishing to nyaa.si
- Anidex for publishing to anidex.info
- Discord for posting messages to a Discord webhook
In addition, simple wrappers of standard Gradle tasks implementing SubTask are available for convenience:
Name | Summary |
---|---|
AbstractTransferTask | abstract class AbstractTransferTask<T> : AbstractCopyTask , SubTask |
Anidex | open class Anidex : PropertyTask Task for uploading a torrent file to anidex.info. A predefined task instance can be accessed through Subs.anidex. |
ASS | open class ASS : ASSTask Generic task for modifying ASS files. See ASSFile and related classes for more information. The modified file is written to a new file. |
ASSColorSerializer | object ASSColorSerializer : JsonSerializer< Color > |
ASSTask | abstract class ASSTask : PropertyTask Represents a task that outputs an ASS file. |
Automation | open class Automation : DefaultTask , SubTask Task for running Aegisub automations on a script using Aegisub CLI. |
BaseContext | abstract class BaseContext : AbstractContext Simple base implementation of a Velocity AbstractContext. |
Chapters | open class Chapters : PropertyTask Generates a chapter file from an ASS file in the same way as Significance. The provided ASS file will be searched for lines where the field specified by field contains the value specified by chapterMarker, and for each such line a chapter will be generated using the start time as the time, and the value of the field specified by chapterName as the chapter name. A predefined task instance can be accessed through Subs.chapters. |
ColorSerializer | object ColorSerializer : JsonSerializer< Color > |
DefaultSubTask | open class DefaultSubTask : DefaultTask , SubTask Wrapper task for DefaultTask which implements SubTask, giving access to SubTask.item and SubTask.batchItems for convenience. |
Discord | open class Discord : DefaultTask , SubTask Task for posting to a Discord webhook. Supports normal messages, embeds, and uploading files. A predefined task instance can be accessed through Subs.discord. |
ErrorMode | enum class ErrorMode Used in some tasks to specify the failure mode. |
Filterable | interface Filterable Represents an item that can be optionally discarded. |
FTP | abstract class FTP : AbstractTransferTask <FTPClient> Task for uploading files via FTP. A predefined task instance can be accessed through Subs.ftp. |
HTTP | open class HTTP : PropertyTask , SubTask Task for sending general HTTP requests. Data should be sent using one of json, body and form. The response can be retrieved from responseData or responseJson. |
ItemGroup | abstract class ItemGroup<T> A group of items of type T. Has convenience functions for getting all items belonging to the same entry as a certain task, or all items corresponding to a specified list of entries. |
ItemGroupContext | abstract class ItemGroupContext Context for defining groups of objects such as tasks. |
Merge | open class Merge : ASSTask Task to merge multiple ASS files into one. A predefined task instance can be accessed through Subs.merge. |
Mux | open class Mux : PropertyTask Task to mux a set of files into a single Matroska container using mkvmerge. |
Nyaa | open class Nyaa : PropertyTask Task for uploading a torrent file to nyaa.si. A predefined task instance can be accessed through Subs.nyaa. |
OverwriteStrategy | enum class OverwriteStrategy The strategy for overwriting existing files. |
PropertyTask | abstract class PropertyTask : DefaultTask , SubTask Parent task type that automatically keeps track of and stores properties in JSON format. |
ProviderGroup | class ProviderGroup<T> : ItemGroup < Provider < T >> ItemGroup that keeps track of providers for values of type T. A Provider is generated for each entry, and the given closure is evaluated when the provider's value is requested. |
ProviderSerializer | object ProviderSerializer : JsonSerializer< Provider <*>> |
SFTP | abstract class SFTP : AbstractTransferTask <ChannelSftp>, SSHTask Task for uploading files via SFTP (SSH). A predefined task instance can be accessed through Subs.sftp. |
SSHExec | open class SSHExec : DefaultSubTask , SSHTask Task for executing commands on a remote shell via SSH. |
SSHTask | interface SSHTask Common interface for tasks that connect to SSH. |
SubCopy | open class SubCopy : Copy , SubTask Wrapper task for Copy which implements SubTask, giving access to SubTask.item and SubTask.batchItems for convenience. |
SubExec | open class SubExec : Exec , SubTask Wrapper task for Exec which implements SubTask, giving access to SubTask.item and SubTask.batchItems for convenience. |
SubPlugin | class SubPlugin : Plugin < Project > Plugin that adds a Subs instance as a DSL extension with the name "subs". |
SubProperties | class SubProperties Reads a list of properties of the form release.entry.property=value , which can later be looked up using the match method. |
Subs | open class Subs : ItemGroupContext Central object that keeps track of episodes, batches, tasks and user-loaded properties. For tasks to be generated correctly, episodes and optionally batches should be set. Set release if you wish to be able to differentiate between different releases when looking up properties. |
SubSync | open class SubSync : Sync , SubTask Wrapper task for Sync which implements SubTask, giving access to SubTask.item and SubTask.batchItems for convenience. |
SubTask | interface SubTask : Task Mixin task interface providing convenience functions for accessing ItemGroup instances. |
SubZip | open class SubZip : Zip , SubTask Wrapper task for Zip which implements SubTask, giving access to SubTask.item and SubTask.batchItems for convenience. |
Swap | open class Swap : ASSTask Task to enable/disable honorifics and the like using the same syntax as Daiz's autoswapper. |
TaskContext | class TaskContext : BaseContext AbstractContext implementation for getting properties in a task context. |
TaskCreator | class TaskCreator<T : Task > Delegate for creation of tasks using property delegate syntax. See ItemGroupContext.task. |
TaskGroup | class TaskGroup<T : Task > : ItemGroup < TaskProvider < T >> A group of tasks of the same type. |
Torrent | open class Torrent : AbstractArchiveTask , SubTask Task to create a torrent file from a set of files. A predefined task instance can be accessed through Subs.torrent. |
ValueClosure | class ValueClosure<T> |
ValueGroup | class ValueGroup<T> : ItemGroup < T > ItemGroup that keeps track of simple values of type T. The closure is evaluated immediately for each entry. |
ZonedDateTimeSerializer | object ZonedDateTimeSerializer : JsonSerializer< ZonedDateTime > |
Name | Summary |
---|---|
MuxFlag | annotation class MuxFlag Marks a property with its corresponding mkvmerge flag. |
Name | Summary |
---|---|
anidex | val Subs .anidex: TaskGroup < Anidex > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Anidex with the name anidex . |
chapters | val Subs .chapters: TaskGroup < Chapters > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Chapters with the name chapters . |
discord | val Subs .discord: TaskGroup < Discord > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Discord with the name discord . |
ftp | val Subs .ftp: TaskGroup < FTP > Convenience property that upon use automatically instantiates and returns a TaskGroup of type FTP with the name ftp . |
merge | val Subs .merge: TaskGroup < Merge > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Merge with the name merge . |
mux | val Subs .mux: TaskGroup < Mux > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Mux with the name mux . |
nyaa | val Subs .nyaa: TaskGroup < Nyaa > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Nyaa with the name nyaa . |
sftp | val Subs .sftp: TaskGroup < SFTP > Convenience property that upon use automatically instantiates and returns a TaskGroup of type SFTP with the name sftp . |
swap | val Subs .swap: TaskGroup < Swap > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Swap with the name swap . |
taskGroup | val <T : Task > T .taskGroup: TaskGroup < T > The TaskGroup instance this task belongs to. |
torrent | val Subs .torrent: TaskGroup < Torrent > Convenience property that upon use automatically instantiates and returns a TaskGroup of type Torrent with the name torrent . |