subkt / myaa.subkt.tasks / Anidex
open class Anidex :
PropertyTask
(source)
Task for uploading a torrent file to anidex.info. A predefined task instance can be accessed through Subs.anidex.
anidex {
from(torrent.item())
apiKey("your-key-goes-hre")
category(AnidexCategories.ANIME_SUB)
lang(AnidexLanguage.ENGLISH)
torrentName("[Group] My Show - 01.mkv")
torrentDescription("This is the *description*.")
hidden(true)
}
Name | Summary |
---|---|
AnidexCategories | enum class AnidexCategories Torrent categories on Nyaa. |
AnidexLanguage | enum class AnidexLanguage |
Name | Summary |
---|---|
<init> | Anidex() Task for uploading a torrent file to anidex.info. A predefined task instance can be accessed through Subs.anidex. |
Name | Summary |
---|---|
anidexUrl | var anidexUrl: String The URL of the uploaded torrent. Only available if the upload succeeded. |
apiKey | val apiKey: Property < String > The API key for posting the torrent. |
batch | val batch: Property < Boolean > If true, marks the torrent as a batch torrent. Defaults to false . |
category | val category: Property < Anidex.AnidexCategories > What category to post the torrent to. Defaults to AnidexCategories.ANIME_SUB. |
endpoint | val endpoint: Property < String > The API endpoint. Don't change unless you know what you're doing. Defaults to api . |
from | val from: ConfigurableFileCollection ! The torrent file to upload. |
group | val group: Property < Int > The group to post the torrent as. Defaults to 0 , i.e. individual/no group. |
hidden | val hidden: Property < Boolean > If true, marks the torrent as hidden. Defaults to true . |
host | val host: Property < String > The hostname. Don't change unless you know what you're doing. Defaults to anidex.info . |
https | val https: Property < Boolean > If true, uses HTTPS to connect; HTTP otherwise. Don't change unless you know what you're doing. Defaults to true . |
lang | val lang: Property < Anidex.AnidexLanguage > The language of the torrent. Defaults to AnidexLanguage.ENGLISH. |
out | val out: File |
port | val port: Property < Int > The port to connect to. Don't change unless you know what you're doing. Defaults to 443 if https is true; 80 otherwise. |
r18 | val r18: Property < Boolean > If true, marks the torrent as an R18+ torrent. Defaults to false . |
remake | val remake: Property < Boolean > If true, marks the torrent as a remake. Defaults to false . |
torrentDescription | val torrentDescription: Property < String > The torrent description. Defaults to empty. |
torrentName | val torrentName: Property < String > The name (title) of the torrent. By default lets Anidex choose a title based on the torrent file. |
ttApi | val ttApi: Property < Boolean > If true, auto-submit torrent to TokyoToshokan. A TokyoToshokan API key must have been provided in the upload settings. Defaults to false. |
Name | Summary |
---|---|
propertyFile | val propertyFile: File |
Name | Summary |
---|---|
run | open fun run(): Unit |
Name | Summary |
---|---|
doTask | fun doTask(): Unit |
Name | Summary |
---|---|
batch | val Task .batch: String The same as entry if this is a batch task; error otherwise. |
currentTask | val Task .currentTask: String The name of this task. |
entry | val Task .entry: String The entry (batch or episode) this task corresponds to. |
episode | val Task .episode: String The same as entry if this is an episode task; error otherwise. |
episodes | val Task .episodes: List < String > The episodes this task corresponds to. A single-item list containing episode if this is an episode task; a list of the episodes for the batch given by batch otherwise. |
isBatch | val Task .isBatch: Boolean True if this task is a batch task. |
release | val Task .release: String The release this task was generated for. |
taskGroup | val <T : Task > T .taskGroup: TaskGroup < T > The TaskGroup instance this task belongs to. |
Name | Summary |
---|---|
defaultProperty | fun <T> Task .defaultProperty(default: T ): Property < T > Returns a Property with a default value set. |
evaluate | fun Task .evaluate(expression: String ): Provider < List < String >!>! Evaluates a string using Velocity, splits it on ` |
evaluateTemplate | fun Task .evaluateTemplate(expression: String ): Provider < String !>! Like evaluate but only processes the template syntax, without globbing. |
get | fun Task .get(propertyName: String ): Provider < String !>! Searches for the given property in the Subs object's SubProperties instance, evaluates its value using evaluate, and returns a single string, assuming that the resulting list contains only one element. |
getAs | fun <T> Task .getAs(propertyName: String ): Provider < T >! Searches for the given property in the Subs object's SubProperties instance, evaluates its value using evaluate, and returns a single string, cast to the given type using String.asType, assuming that the resulting list contains only one element. |
getFile | fun Task .getFile(filename: String ): Provider < String !>! fun Task .getFile(filename: Provider < String >): Provider < String !>! Reads the specified file and processes it using Velocity. |
getList | fun Task .getList(propertyName: String ): Provider < List < String >> Searches for the given property in the Subs object's SubProperties instance, and evaluates its value using evaluate. |
getListAs | fun <T> Task .getListAs(propertyName: String ): Provider < List < T >!>! Searches for the given property in the Subs object's SubProperties instance, evaluates its value using evaluate, and casts the list elements to the given type using String.asType. |
getRaw | fun Task .getRaw(propertyName: String ): String Searches for the given property in the Subs object's SubProperties instance, and returns the raw string. Raises an error if not found. |
getRawMaybe | fun Task .getRawMaybe(propertyName: String ): String ? Searches for the given property in the Subs object's SubProperties instance, and returns the raw string, possibly null. |
outputFile | fun Task .outputFile(extension: String ): ConfigurableFileCollection Returns a ConfigurableFileCollection containing a single file taskName.extension located in the build directory. |
propertyExists | fun Task .propertyExists(propertyName: String ): Boolean Returns true if the given property exists in the Subs object's SubProperties instance for the given context. |