Compare commits

..

No commits in common. "master" and "orig-archive" have entirely different histories.

12716 changed files with 52781 additions and 113151 deletions

View File

@ -1,14 +1,12 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
insert_final_newline = true
end_of_line = lf
[*.kt]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
@ -17,3 +15,5 @@ ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
[*.properties]
charset = utf-8
end_of_line = lf
insert_final_newline = true

2
.gitattributes vendored
View File

@ -1,2 +0,0 @@
/gradlew linguist-generated
/gradlew.bat linguist-generated

View File

@ -105,15 +105,3 @@ body:
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: textarea
attributes:
label: <!-- footer -->
description: Do **not** modify. This is a reminder for other users to vote.
value: |
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/keiyoushi/extensions-source/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@ -57,15 +57,3 @@ body:
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: textarea
attributes:
label: <!-- footer -->
description: Do **not** modify. This is a reminder for other users to vote.
value: |
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/keiyoushi/extensions-source/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@ -55,15 +55,3 @@ body:
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: textarea
attributes:
label: <!-- footer -->
description: Do **not** modify. This is a reminder for other users to vote.
value: |
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/keiyoushi/extensions-source/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@ -61,15 +61,3 @@ body:
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: textarea
attributes:
label: <!-- footer -->
description: Do **not** modify. This is a reminder for other users to vote.
value: |
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/keiyoushi/extensions-source/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@ -57,15 +57,3 @@ body:
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: textarea
attributes:
label: <!-- footer -->
description: Do **not** modify. This is a reminder for other users to vote.
value: |
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/keiyoushi/extensions-source/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@ -39,15 +39,3 @@ body:
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: textarea
attributes:
label: <!-- footer -->
description: Do **not** modify. This is a reminder for other users to vote.
value: |
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/keiyoushi/extensions-source/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@ -7,4 +7,3 @@ Checklist:
- [ ] Have not changed source names
- [ ] Have explicitly kept the `id` if a source's name or language were changed
- [ ] Have tested the modifications by compiling and running the extension through Android Studio
- [ ] Have removed `web_hi_res_512.png` when adding a new extension

24
.github/renovate.json vendored
View File

@ -1,30 +1,8 @@
{
"extends": [
"config:recommended"
"config:base"
],
"schedule": ["on sunday"],
"includePaths": [
"buildSrc/gradle/**",
"gradle/**",
".github/**"
],
"ignoreDeps": ["keiyoushi/issue-moderator-action"],
"packageRules": [
{
"matchManagers": ["github-actions"],
"groupName": "{{manager}} dependencies"
},
{
"matchManagers": ["gradle"],
"enabled": false
},
{
"matchPackageNames": [
"com.android.tools.build:gradle",
"gradle"
],
"draftPR": true,
"enabled": true
}
]
}

View File

@ -1,14 +1,17 @@
#!/bin/bash
set -e
rsync -a --delete --exclude .git --exclude .gitignore --exclude repo.json ../master/repo/ .
git config --global user.email "gitea@catgirlsneed.homes"
git config --global user.name "Homeless Catgirl"
rsync -a --delete --exclude .git --exclude .gitignore ../master/repo/ .
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git status
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Upload APKs"
git commit -m "Update extensions repo"
git push
# Purge cached index on jsDelivr
curl https://purge.jsdelivr.net/gh/tachiyomiorg/tachiyomi-extensions@repo/index.min.json
else
echo "No changes to commit"
fi

View File

@ -1,117 +0,0 @@
import html
import json
import os
import re
import subprocess
from pathlib import Path
from zipfile import ZipFile
PACKAGE_NAME_REGEX = re.compile(r"package: name='([^']+)'")
VERSION_CODE_REGEX = re.compile(r"versionCode='([^']+)'")
VERSION_NAME_REGEX = re.compile(r"versionName='([^']+)'")
IS_NSFW_REGEX = re.compile(r"'tachiyomi.extension.nsfw' value='([^']+)'")
APPLICATION_LABEL_REGEX = re.compile(r"^application-label:'([^']+)'", re.MULTILINE)
APPLICATION_ICON_320_REGEX = re.compile(
r"^application-icon-320:'([^']+)'", re.MULTILINE
)
LANGUAGE_REGEX = re.compile(r"tachiyomi-([^\.]+)")
*_, ANDROID_BUILD_TOOLS = (Path(os.environ["ANDROID_HOME"]) / "build-tools").iterdir()
REPO_DIR = Path("repo")
REPO_APK_DIR = REPO_DIR / "apk"
REPO_ICON_DIR = REPO_DIR / "icon"
REPO_ICON_DIR.mkdir(parents=True, exist_ok=True)
with open("output.json", encoding="utf-8") as f:
inspector_data = json.load(f)
index_data = []
index_min_data = []
for apk in REPO_APK_DIR.iterdir():
badging = subprocess.check_output(
[
ANDROID_BUILD_TOOLS / "aapt",
"dump",
"--include-meta-data",
"badging",
apk,
]
).decode()
package_info = next(x for x in badging.splitlines() if x.startswith("package: "))
package_name = PACKAGE_NAME_REGEX.search(package_info).group(1)
application_icon = APPLICATION_ICON_320_REGEX.search(badging).group(1)
with ZipFile(apk) as z, z.open(application_icon) as i, (
REPO_ICON_DIR / f"{package_name}.png"
).open("wb") as f:
f.write(i.read())
language = LANGUAGE_REGEX.search(apk.name).group(1)
sources = inspector_data[package_name]
if len(sources) == 1:
source_language = sources[0]["lang"]
if (
source_language != language
and source_language not in {"all", "other"}
and language not in {"all", "other"}
):
language = source_language
common_data = {
"name": APPLICATION_LABEL_REGEX.search(badging).group(1),
"pkg": package_name,
"apk": apk.name,
"lang": language,
"code": int(VERSION_CODE_REGEX.search(package_info).group(1)),
"version": VERSION_NAME_REGEX.search(package_info).group(1),
"nsfw": int(IS_NSFW_REGEX.search(badging).group(1)),
}
min_data = {
**common_data,
"sources": [],
}
for source in sources:
min_data["sources"].append(
{
"name": source["name"],
"lang": source["lang"],
"id": source["id"],
"baseUrl": source["baseUrl"],
}
)
index_min_data.append(min_data)
index_data.append(
{
**common_data,
"hasReadme": 0,
"hasChangelog": 0,
"sources": sources,
}
)
index_data.sort(key=lambda x: x["pkg"])
index_min_data.sort(key=lambda x: x["pkg"])
with (REPO_DIR / "index.json").open("w", encoding="utf-8") as f:
index_data_str = json.dumps(index_data, ensure_ascii=False, indent=2)
print(index_data_str)
f.write(index_data_str)
with (REPO_DIR / "index.min.json").open("w", encoding="utf-8") as f:
json.dump(index_min_data, f, ensure_ascii=False, separators=(",", ":"))
with (REPO_DIR / "index.html").open("w", encoding="utf-8") as f:
f.write('<!DOCTYPE html>\n<html>\n<head>\n<meta charset="UTF-8">\n<title>apks</title>\n</head>\n<body>\n<pre>\n')
for entry in index_data:
apk_escaped = 'apk/' + html.escape(entry["apk"])
name_escaped = html.escape(entry["name"])
f.write(f'<a href="{apk_escaped}">{name_escaped}</a>\n')
f.write('</pre>\n</body>\n</html>\n')

69
.github/scripts/create-repo.sh vendored Executable file
View File

@ -0,0 +1,69 @@
#!/bin/bash
set -e
TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)"
mkdir -p repo/apk
mkdir -p repo/icon
cp -f apk/* repo/apk
cd repo
APKS=( ../apk/*".apk" )
for APK in ${APKS[@]}; do
FILENAME=$(basename ${APK})
BADGING="$(${TOOLS}/aapt dump --include-meta-data badging $APK)"
PACKAGE=$(echo "$BADGING" | grep package:)
PKGNAME=$(echo $PACKAGE | grep -Po "package: name='\K[^']+")
VCODE=$(echo $PACKAGE | grep -Po "versionCode='\K[^']+")
VNAME=$(echo $PACKAGE | grep -Po "versionName='\K[^']+")
NSFW=$(echo $BADGING | grep -Po "tachiyomi.extension.nsfw' value='\K[^']+")
HASREADME=$(echo $BADGING | grep -Po "tachiyomi.extension.hasReadme' value='\K[^']+")
HASCHANGELOG=$(echo $BADGING | grep -Po "tachiyomi.extension.hasChangelog' value='\K[^']+")
APPLICATION=$(echo "$BADGING" | grep application:)
LABEL=$(echo $APPLICATION | grep -Po "label='\K[^']+")
LANG=$(echo $APK | grep -Po "tachiyomi-\K[^\.]+")
ICON=$(echo "$BADGING" | grep -Po "application-icon-320.*'\K[^']+")
unzip -p $APK $ICON > icon/${PKGNAME}.png
# TODO: legacy icons; remove after a while
cp icon/${PKGNAME}.png icon/${FILENAME%.*}.png
SOURCE_INFO=$(jq ".[\"$PKGNAME\"]" < ../output.json)
# Fixes the language code without needing to update the packages.
SOURCE_LEN=$(echo $SOURCE_INFO | jq length)
if [ $SOURCE_LEN = "1" ]; then
SOURCE_LANG=$(echo $SOURCE_INFO | jq -r '.[0].lang')
if [ $SOURCE_LANG != $LANG ] && [ $SOURCE_LANG != "all" ] && [ $SOURCE_LANG != "other" ] && [ $LANG != "all" ] && [ $LANG != "other" ]; then
LANG=$SOURCE_LANG
fi
fi
jq -n \
--arg name "$LABEL" \
--arg pkg "$PKGNAME" \
--arg apk "$FILENAME" \
--arg lang "$LANG" \
--argjson code $VCODE \
--arg version "$VNAME" \
--argjson nsfw $NSFW \
--argjson hasReadme $HASREADME \
--argjson hasChangelog $HASCHANGELOG \
--argjson sources "$SOURCE_INFO" \
'{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version, nsfw:$nsfw, hasReadme:$hasReadme, hasChangelog:$hasChangelog, sources:$sources}'
done | jq -sr '[.[]]' > index.json
# Alternate minified copy
jq -c '.' < index.json > index.min.json
cat index.json

View File

@ -1,16 +0,0 @@
from pathlib import Path
import shutil
REPO_APK_DIR = Path("repo/apk")
try:
shutil.rmtree(REPO_APK_DIR)
except FileNotFoundError:
pass
REPO_APK_DIR.mkdir(parents=True, exist_ok=True)
for apk in (Path.home() / "apk-artifacts").glob("**/*.apk"):
apk_name = apk.name.replace("-release.apk", ".apk")
shutil.move(apk, REPO_APK_DIR / apk_name)

26
.github/scripts/move-apks.sh vendored Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e
shopt -s globstar nullglob extglob
# Get APKs from previous jobs' artifacts
cp -R ~/apk-artifacts/ $PWD
APKS=( **/*".apk" )
# Fail if too little extensions seem to have been built
if [ "${#APKS[@]}" -le "100" ]; then
echo "Insufficient amount of APKs found. Please check the project configuration."
exit 1
else
echo "Moving ${#APKS[@]} APKs"
fi
DEST=$PWD/apk
rm -rf $DEST && mkdir -p $DEST
for APK in ${APKS[@]}; do
BASENAME=$(basename $APK)
APKNAME="${BASENAME%%+(-release*)}.apk"
APKDEST="$DEST/$APKNAME"
cp $APK $APKDEST
done

View File

@ -0,0 +1,25 @@
name: "Batch close stale issues"
on:
# Monthly
schedule:
- cron: '0 0 1 * *'
# Manual trigger
workflow_dispatch:
inputs:
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Close everything older than a year
days-before-issue-stale: 365
days-before-issue-close: 0
exempt-issue-labels: "do-not-autoclose,Meta request"
close-issue-message: "In an effort to have a more manageable issue backlog, we're closing older requests that weren't addressed since there's a low chance of it being addressed if it hasn't already. If your request is still relevant, please [open a new request](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose)."
close-issue-reason: not_planned
ascending: true
operations-per-run: 250

157
.github/workflows/build_pull_request.yml vendored Normal file
View File

@ -0,0 +1,157 @@
name: PR build check
on:
pull_request:
paths-ignore:
- '**.md'
- '.github/workflows/issue_moderator.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
CI_CHUNK_SIZE: 65
jobs:
prepare:
name: Prepare job
runs-on: ubuntu-latest
outputs:
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
multisrcMatrix: ${{ steps.generate-matrices.outputs.multisrcMatrix }}
isIndividualChanged: ${{ steps.parse-changed-files.outputs.isIndividualChanged }}
isMultisrcChanged: ${{ steps.parse-changed-files.outputs.isMultisrcChanged }}
env:
CI_MODULE_GEN: true
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: adopt
- id: get-changed-files
name: Get changed files
uses: Ana06/get-changed-files@v2.2.0
- id: parse-changed-files
name: Parse changed files
run: |
isIndividualChanged=0
isMultisrcChanged=0
for changedFile in ${{ steps.get-changed-files.outputs.all }}; do
if [[ ${changedFile} == src/* ]]; then
isIndividualChanged=1
elif [[ ${changedFile} == multisrc/* ]]; then
isMultisrcChanged=1
elif [[ ${changedFile} == .github/workflows/issue_moderator.yml ]]; then
true
elif [[ ${changedFile} == *.md ]]; then
true
else
isIndividualChanged=1
isMultisrcChanged=1
break
fi
done
echo "isIndividualChanged=$isIndividualChanged" >> $GITHUB_OUTPUT
echo "isMultisrcChanged=$isMultisrcChanged" >> $GITHUB_OUTPUT
- name: Generate multisrc sources
if: ${{ steps.parse-changed-files.outputs.isMultisrcChanged == '1' }}
uses: gradle/gradle-build-action@v2
with:
arguments: :multisrc:generateExtensions
- name: Get number of modules
run: |
set -x
./gradlew -q projects | grep '.*extensions\:\(individual\|multisrc\)\:.*\:.*' > projects.txt
echo "NUM_INDIVIDUAL_MODULES=$(cat projects.txt | grep '.*\:individual\:.*' | wc -l)" >> $GITHUB_ENV
echo "NUM_MULTISRC_MODULES=$(cat projects.txt | grep '.*\:multisrc\:.*' | wc -l)" >> $GITHUB_ENV
- id: generate-matrices
name: Create output matrices
uses: actions/github-script@v7
with:
script: |
const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES;
const numMultisrcModules = process.env.NUM_MULTISRC_MODULES;
const chunkSize = process.env.CI_CHUNK_SIZE;
const numIndividualChunks = Math.ceil(numIndividualModules / chunkSize);
const numMultisrcChunks = Math.ceil(numMultisrcModules / chunkSize);
console.log(`Individual modules: ${numIndividualModules} (${numIndividualChunks} chunks of ${chunkSize})`);
console.log(`Multi-source modules: ${numMultisrcModules} (${numMultisrcChunks} chunks of ${chunkSize})`);
core.setOutput('individualMatrix', { 'chunk': [...Array(numIndividualChunks).keys()] });
core.setOutput('multisrcMatrix', { 'chunk': [...Array(numMultisrcChunks).keys()] });
build_multisrc:
name: Build multisrc modules
needs: prepare
if: ${{ needs.prepare.outputs.isMultisrcChanged == '1' }}
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.multisrcMatrix) }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: adopt
- name: Generate sources from the multi-source library
uses: gradle/gradle-build-action@v2
env:
CI_MODULE_GEN: "true"
with:
arguments: :multisrc:generateExtensions
cache-read-only: true
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/gradle-build-action@v2
env:
CI_MULTISRC: "true"
CI_CHUNK_NUM: ${{ matrix.chunk }}
with:
arguments: assembleDebug
cache-read-only: true
build_individual:
name: Build individual modules
needs: prepare
if: ${{ needs.prepare.outputs.isIndividualChanged == '1' }}
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: adopt
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/gradle-build-action@v2
env:
CI_MULTISRC: "false"
CI_CHUNK_NUM: ${{ matrix.chunk }}
with:
arguments: assembleDebug
cache-read-only: true

View File

@ -7,7 +7,6 @@ on:
paths-ignore:
- '**.md'
- '.github/workflows/issue_moderator.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
@ -19,46 +18,141 @@ env:
jobs:
prepare:
name: Prepare job
runs-on: arch
runs-on: ubuntu-latest
outputs:
individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }}
multisrcMatrix: ${{ steps.generate-matrices.outputs.multisrcMatrix }}
env:
CI_MODULE_GEN: true
steps:
- name: Clone repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@v4
build_individual:
name: Build individual modules
needs: prepare
runs-on: arch
steps:
- name: Checkout master branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
java-version: 11
distribution: adopt
- name: Generate multisrc sources
uses: gradle/gradle-build-action@v2
with:
arguments: :multisrc:generateExtensions
- name: Get number of modules
run: |
set -x
./gradlew -q projects | grep '.*extensions\:\(individual\|multisrc\)\:.*\:.*' > projects.txt
echo "NUM_INDIVIDUAL_MODULES=$(cat projects.txt | grep '.*\:individual\:.*' | wc -l)" >> $GITHUB_ENV
echo "NUM_MULTISRC_MODULES=$(cat projects.txt | grep '.*\:multisrc\:.*' | wc -l)" >> $GITHUB_ENV
- id: generate-matrices
name: Create output matrices
uses: actions/github-script@v7
with:
script: |
const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES;
const numMultisrcModules = process.env.NUM_MULTISRC_MODULES;
const chunkSize = process.env.CI_CHUNK_SIZE;
const numIndividualChunks = Math.ceil(numIndividualModules / chunkSize);
const numMultisrcChunks = Math.ceil(numMultisrcModules / chunkSize);
console.log(`Individual modules: ${numIndividualModules} (${numIndividualChunks} chunks of ${chunkSize})`);
console.log(`Multi-source modules: ${numMultisrcModules} (${numMultisrcChunks} chunks of ${chunkSize})`);
core.setOutput('individualMatrix', { 'chunk': [...Array(numIndividualChunks).keys()] });
core.setOutput('multisrcMatrix', { 'chunk': [...Array(numMultisrcChunks).keys()] });
build_multisrc:
name: Build multisrc modules
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.multisrcMatrix) }}
steps:
- name: Checkout master branch
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: adopt
- name: Prepare signing key
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
- name: Set up Gradle
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
- name: Build extensions
- name: Generate sources from the multi-source library
uses: gradle/gradle-build-action@v2
env:
CI_MODULE_GEN: "true"
with:
arguments: :multisrc:generateExtensions
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/gradle-build-action@v2
env:
CI_MULTISRC: "true"
CI_CHUNK_NUM: ${{ matrix.chunk }}
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
run: ./gradlew -p src assembleRelease
- name: Upload APKs
uses: actions/upload-artifact@v3
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
with:
name: "individual-apks"
arguments: assembleRelease
- name: Upload APKs (chunk ${{ matrix.chunk }})
uses: actions/upload-artifact@v4
if: "github.repository == 'tachiyomiorg/tachiyomi-extensions'"
with:
name: "multisrc-apks-${{ matrix.chunk }}"
path: "**/*.apk"
retention-days: 1
- name: Clean up CI files
run: rm signingkey.jks
build_individual:
name: Build individual modules
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }}
steps:
- name: Checkout master branch
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: adopt
- name: Prepare signing key
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/gradle-build-action@v2
env:
CI_MULTISRC: "false"
CI_CHUNK_NUM: ${{ matrix.chunk }}
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
with:
arguments: assembleRelease
- name: Upload APKs (chunk ${{ matrix.chunk }})
uses: actions/upload-artifact@v4
if: "github.repository == 'tachiyomiorg/tachiyomi-extensions'"
with:
name: "individual-apks-${{ matrix.chunk }}"
path: "**/*.apk"
retention-days: 1
@ -68,22 +162,24 @@ jobs:
publish_repo:
name: Publish repo
needs:
- build_multisrc
- build_individual
runs-on: arch
if: "github.repository == 'tachiyomiorg/tachiyomi-extensions'"
runs-on: ubuntu-latest
steps:
- name: Download APK artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ~/apk-artifacts
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
distribution: adopt
- name: Checkout master branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@v4
with:
ref: master
path: master
@ -91,14 +187,14 @@ jobs:
- name: Create repo artifacts
run: |
cd master
python ./.github/scripts/move-apks.py
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/keiyoushi/extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
./.github/scripts/move-apks.sh
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/tachiyomiorg/tachiyomi-extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
curl -L "$INSPECTOR_LINK" -o ./Inspector.jar
java -jar ./Inspector.jar "repo/apk" "output.json" "tmp"
python ./.github/scripts/create-repo.py
java -jar ./Inspector.jar "apk" "output.json" "tmp"
./.github/scripts/create-repo.sh
- name: Checkout repo branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@v4
with:
ref: repo
path: repo
@ -107,4 +203,3 @@ jobs:
run: |
cd repo
../master/.github/scripts/commit-repo.sh
rm -r ~/apk-artifacts

73
.github/workflows/issue_moderator.yml vendored Normal file
View File

@ -0,0 +1,73 @@
name: Issue moderator
on:
issues:
types: [opened, edited, reopened]
issue_comment:
types: [created]
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Moderate issues
uses: tachiyomiorg/issue-moderator-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
duplicate-label: Duplicate
duplicate-check-enabled: true
duplicate-check-labels: |
["Source request", "Domain changed"]
existing-check-enabled: true
existing-check-labels: |
["Source request", "Domain changed"]
auto-close-rules: |
[
{
"type": "body",
"regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*",
"message": "The acknowledgment section was not removed."
},
{
"type": "body",
"regex": ".*\\* (Tachiyomi version|Android version|Device): \\?.*",
"message": "Requested information in the template was not filled out."
},
{
"type": "title",
"regex": ".*(Source name|Short description).*",
"message": "You did not fill out the description in the title."
},
{
"type": "both",
"regex": ".*(hq\\s*dragon|manga\\s*host|supermangas|superhentais|union\\s*mangas|yes\\s*mangas|manhuascan|manhwahot|leitor\\.?net|manga\\s*livre|tsuki\\s*mangas|manga\\s*yabu|mangas\\.in|mangas\\.pw|hentaikai|toptoon\\+?|colamanhua|mangadig|hitomi\\.la|copymanga|neox|nexo|1manga\\.co|mangafox\\.fun|mangahere\\.onl|mangakakalot\\.fun|manganel(?!o)|mangaonline\\.fun|mangatoday|manga\\.town|onemanga\\.info|koushoku|ksk\\.moe|comikey|leercapitulo|c[uứ]u\\s*truy[eệ]n|day\\s*comics?|reaper\\s*scans|constellar\\s*scans|mode\\s*scanlator|bakai|japscan|izakaya|blackout\\s*comics|anchira).*",
"ignoreCase": true,
"labels": ["invalid"],
"message": "{match} will not be added back as it is too difficult to maintain. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
},
{
"type": "both",
"regex": ".*(komiktap|gourmet\\s*scans|mangawow|hikari\\s*scans|knightnoscanlations|mangasy|nartag|xxx\\s*yaoi|luminous|hunters\\s*scan|reset(?:\\s*|-)scan|astra\\s*scans|manga(?:-|\\s*)pro|shinobiscans|plot ?twist ?no ?fansub(?: ?scans?)?|plot-twistnf-scans(?:\\.com)?|mhscans|aresmanga|realm ?scans?|mono ?manga|dat(?:\\s*|-)?gar\\s*scan|remangas|moon ?daisy(?: scans?)?).*",
"ignoreCase": true,
"labels": ["invalid"],
"message": "{match} will not be added back as the scanlator team has requested it to be removed. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
},
{
"type": "both",
"regex": ".*(?:fail(?:ed|ure|s)?|can\\s*(?:no|')?t|(?:not|un).*able|(?<!n[o']?t )blocked by|error) (?:to )?(?:get past|by ?pass|penetrate)?.*cloud ?fl?are.*",
"ignoreCase": true,
"labels": ["Cloudflare protected"],
"message": "Refer to the **Solving Cloudflare issues** section at https://tachiyomi.org/docs/guides/troubleshooting/#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
},
{
"type": "both",
"regex": ".*(slime\\s*read).*",
"ignoreCase": true,
"labels": ["invalid"],
"message": "{match} will not be added as they have relations to the Mangá Livre team. Read [this](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/REMOVED_SOURCES.md) for more information."
}
]
auto-close-ignore-label: do-not-autoclose

19
.github/workflows/lock.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Lock threads
on:
# Daily
schedule:
- cron: '0 0 * * *'
# Manual trigger
workflow_dispatch:
inputs:
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
github-token: ${{ github.token }}
issue-inactive-days: '2'
pr-inactive-days: '2'

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="A3MangaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.a3manga.A3MangaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=a3manga" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=a3manga" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="BakaMangaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.bakamanga.BakaMangaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=bakamanga" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=bakamanga" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="BakkinGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.bakkin.BakkinGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=bakkin" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=bakkin" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="BilibiliGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.bilibili.BilibiliGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=bilibili" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=bilibili" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ChanGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.multichan.ChanGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=multichan" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=multichan" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ComiCakeGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.comicake.ComiCakeGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=comicake" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=comicake" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ComicGammaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.comicgamma.ComicGammaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=comicgamma" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=comicgamma" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="EroMuseGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.eromuse.EroMuseGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=eromuse" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=eromuse" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="FMReaderGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.fmreader.FMReaderGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=fmreader" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=fmreader" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="FansubsCatGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.fansubscat.FansubsCatGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=fansubscat" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=fansubscat" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="FlixScansGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.flixscans.FlixScansGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=flixscans" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=flixscans" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="FoolSlideGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.foolslide.FoolSlideGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=foolslide" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=foolslide" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GattsuGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.gattsu.GattsuGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=gattsu" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=gattsu" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GigaViewerGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.gigaviewer.GigaViewerGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=gigaviewer" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=gigaviewer" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GroupLeGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.grouple.GroupLeGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=grouple" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=grouple" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GuyaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.guya.GuyaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=guya" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=guya" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="HeanCmsGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.heancms.HeanCmsGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=heancms" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=heancms" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="HentaiHandGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.hentaihand.HentaiHandGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=hentaihand" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=hentaihand" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="KemonoGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.kemono.KemonoGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=kemono" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=kemono" />
</method>
</configuration>
</component>

11
.run/LibGenerator.run.xml Normal file
View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="LibGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.libgroup.LibGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=libgroup" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=libgroup" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MCCMSGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mccms.MCCMSGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mccms" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mccms" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MMRCMSGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mmrcms.MMRCMSGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mmrcms" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mmrcms" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MadThemeGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.madtheme.MadThemeGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=madtheme" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=madtheme" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MadaraGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.madara.MadaraGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=madara" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=madara" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangAdventureGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangadventure.MangAdventureGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangadventure" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangadventure" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaBoxGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangabox.MangaBoxGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangabox" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangabox" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaCatalogGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangacatalog.MangaCatalogGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangacatalog" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangacatalog" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaHubGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangahub.MangaHubGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangahub" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangahub" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaMainacGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangamainac.MangaMainacGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangamainac" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangamainac" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaRawGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangaraw.MangaRawGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangaraw" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangaraw" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaReaderGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangareader.MangaReaderGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangareader" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangareader" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaSarGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangasar.MangaSarGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangasar" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangasar" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaThemesiaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesiaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangathemesia" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangathemesia" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MangaWorldGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mangaworld.MangaWorldGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangaworld" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mangaworld" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MonochromeGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.monochrome.MonochromeGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=monochrome" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=monochrome" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MyMangaCMSGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.mymangacms.MyMangaCMSGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mymangacms" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=mymangacms" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="NepNepGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.nepnep.NepNepGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=nepnep" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=nepnep" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="OtakuSanctuaryGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.otakusanctuary.OtakuSanctuaryGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=otakusanctuary" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=otakusanctuary" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PaprikaAltGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.paprika.PaprikaAltGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=paprika" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=paprika" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PaprikaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.paprika.PaprikaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=paprika" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=paprika" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PizzaReaderGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.pizzareader.PizzaReaderGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=pizzareader" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=pizzareader" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ReadAllComicsGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.readallcomics.ReadAllComicsGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=readallcomics" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=readallcomics" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ReaderFrontGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.readerfront.ReaderFrontGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=readerfront" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=readerfront" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SinMHGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.sinmh.SinMHGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=sinmh" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=sinmh" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="WPComicsGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.wpcomics.WPComicsGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=wpcomics" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=wpcomics" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="WebtoonsGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.webtoons.WebtoonsGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=webtoons" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=webtoons" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="WebtoonsTranslateGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.webtoons.WebtoonsTranslateGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=webtoons" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=webtoons" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ZMangaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.zmanga.ZMangaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=zmanga" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=zmanga" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ZbuluGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.zbulu.ZbuluGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=zbulu" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=zbulu" />
</method>
</configuration>
</component>

View File

@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="ZeistMangaGenerator" type="JetRunConfigurationType" nameIsGenerated="true">
<module name="tachiyomi-extensions.multisrc.main" />
<option name="MAIN_CLASS_NAME" value="eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaGenerator" />
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktFormat" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=zeistmanga" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="ktLint" externalProjectPath="$PROJECT_DIR$/multisrc" vmOptions="" scriptParameters="-Ptheme=zeistmanga" />
</method>
</configuration>
</component>

126
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,126 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community moderators are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community moderators have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community moderators responsible for enforcement at
the [Tachiyomi Discord server](https://discord.gg/tachiyomi).
All complaints will be reviewed and investigated promptly and fairly.
All community moderators are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community moderators will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community moderators, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/),
version 2.1, available at
[v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
For answers to common questions about this code of conduct, see the FAQ at
[FAQ](https://www.contributor-covenant.org/faq). Translations are available
at [translations](https://www.contributor-covenant.org/translations).

View File

@ -1,12 +1,8 @@
# Contributing
This guide have some instructions and tips on how to create a new Tachiyomi extension. Please **read
it carefully** if you're a new contributor or don't have any experience on the required languages
and knowledges.
This guide have some instructions and tips on how to create a new Tachiyomi extension. Please **read it carefully** if you're a new contributor or don't have any experience on the required languages and knowledges.
This guide is not definitive and it's being updated over time. If you find any issue on it, feel
free to report it through a [Meta Issue](https://github.com/keiyoushi/extensions-source/issues/new?assignees=&labels=Meta+request&template=06_request_meta.yml)
or fixing it directly by submitting a Pull Request.
This guide is not definitive and it's being updated over time. If you find any issue on it, feel free to report it through a [Meta Issue](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new?assignees=&labels=Meta+request&template=request_meta.yml) or fixing it directly by submitting a Pull Request.
## Table of Contents
@ -38,8 +34,7 @@ or fixing it directly by submitting a Pull Request.
## Prerequisites
Before you start, please note that the ability to use following technologies is **required** and
that existing contributors will not actively teach them to you.
Before you start, please note that the ability to use following technologies is **required** and that existing contributors will not actively teach them to you.
- Basic [Android development](https://developer.android.com/)
- [Kotlin](https://kotlinlang.org/)
@ -57,20 +52,20 @@ that existing contributors will not actively teach them to you.
### Cloning the repository
Some alternative steps can be followed to skip unrelated sources, which will make it faster to pull,
navigate and build. This will also reduce disk usage and network traffic.
**These steps are only needed when the repo is huge and contains a lot of sources. If the repo is
small, just do a normal full clone instead.**
Some alternative steps can be followed to ignore "repo" branch and skip unrelated sources, which will make it faster to pull, navigate and build. This will also reduce disk usage and network traffic.
<details><summary>Steps</summary>
1. Do a partial clone.
1. Make sure to delete "repo" branch in your fork. You may also want to disable Actions in the repo settings.
**Also make sure you are using the latest version of Git as many commands used here are pretty new.**
2. Do a partial clone.
```bash
git clone --filter=blob:none --sparse <fork-repo-url>
cd extensions-source/
cd tachiyomi-extensions/
```
2. Configure sparse checkout.
3. Configure sparse checkout.
There are two modes of pattern matching. The default is cone (🔺) mode.
Cone mode enables significantly faster pattern matching for big monorepos
@ -86,9 +81,12 @@ small, just do a normal full clone instead.**
```bash
git sparse-checkout set --cone --sparse-index
# add project folders
git sparse-checkout add buildSrc core gradle lib lib-multisrc
git sparse-checkout add .run buildSrc core gradle lib multisrc/src/main/java/generator
# add a single source
git sparse-checkout add src/<lang>/<source>
# add a multisrc theme
git sparse-checkout add multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/<source>
git sparse-checkout add multisrc/overrides/<source>
```
To remove a source, open `.git/info/sparse-checkout` and delete the exact
@ -109,11 +107,13 @@ small, just do a normal full clone instead.**
```bash
/*
!/src/*
!/multisrc-lib/*
!/multisrc/overrides/*
!/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/*
# allow a single source
/src/<lang>/<source>
# allow a multisrc theme
/lib-multisrc/<source>
/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/<source>
/multisrc/overrides/<source>
# or type the source name directly
<source>
```
@ -121,34 +121,37 @@ small, just do a normal full clone instead.**
Explanation: the rules are like `gitignore`. We first exclude all sources
while retaining project folders, then add the needed sources back manually.
3. Configure remotes.
4. Configure remotes.
```bash
# add upstream
git remote add upstream <keiyoushi-repo-url>
git remote add upstream <tachiyomiorg-repo-url>
# optionally disable push to upstream
git remote set-url --push upstream no_pushing
# optionally fetch main only (ignore all other branches)
git config remote.upstream.fetch "+refs/heads/main:refs/remotes/upstream/main"
# ignore 'repo' branch of upstream
# option 1: use negative refspec
git config --add remote.upstream.fetch "^refs/heads/repo"
# option 2: fetch master only (ignore all other branches)
git config remote.upstream.fetch "+refs/heads/master:refs/remotes/upstream/master"
# update remotes
git remote update
# track main of upstream instead of fork
git branch main -u upstream/main
# track master of upstream instead of fork
git branch master -u upstream/master
```
4. Useful configurations. (optional)
5. Useful configurations. (optional)
```bash
# prune obsolete remote branches on fetch
git config remote.origin.prune true
# fast-forward only when pulling main branch
# fast-forward only when pulling master branch
git config pull.ff only
# Add an alias to sync main branch without fetching useless blobs.
# Add an alias to sync master branch without fetching useless blobs.
# If you run `git pull` to fast-forward in a blobless clone like this,
# all blobs (files) in the new commits are still fetched regardless of
# sparse rules, which makes the local repo accumulate unused files.
# Use `git sync-main` to avoid this. Be careful if you have changes
# on main branch, which is not a good practice.
git config alias.sync-main '!git switch main && git fetch upstream && git reset --keep FETCH_HEAD'
# Use `git sync-master` to avoid this. Be careful if you have changes
# on master branch, which is not a good practice.
git config alias.sync-master '!git switch master && git fetch upstream && git reset --keep FETCH_HEAD'
```
5. Later, if you change the sparse checkout filter, run `git sparse-checkout reapply`.
6. Later, if you change the sparse checkout filter, run `git sparse-checkout reapply`.
Read more on
[Git's object model](https://github.blog/2020-12-17-commits-are-snapshots-not-diffs/),
@ -160,28 +163,22 @@ and [negative refspecs](https://github.blog/2020-10-19-git-2-29-released/#user-c
## Getting help
- Join [the Discord server](https://discord.gg/3FbCpdKbdY) for online help and to ask questions while
developing your extension. When doing so, please ask it in the `#programming` channel.
- There are some features and tricks that are not explored in this document. Refer to existing
extension code for examples.
- Join [the Discord server](https://discord.gg/tachiyomi) for online help and to ask questions while developing your extension. When doing so, please ask it in the `#programming` channel.
- There are some features and tricks that are not explored in this document. Refer to existing extension code for examples.
## Writing an extension
The quickest way to get started is to copy an existing extension's folder structure and renaming it
as needed. We also recommend reading through a few existing extensions' code before you start.
The quickest way to get started is to copy an existing extension's folder structure and renaming it as needed. We also recommend reading through a few existing extensions' code before you start.
### Setting up a new Gradle module
Each extension should reside in `src/<lang>/<mysourcename>`. Use `all` as `<lang>` if your target
source supports multiple languages or if it could support multiple sources.
Each extension should reside in `src/<lang>/<mysourcename>`. Use `all` as `<lang>` if your target source supports multiple languages or if it could support multiple sources.
The `<lang>` used in the folder inside `src` should be the major `language` part. For example, if
you will be creating a `pt-BR` source, use `<lang>` here as `pt` only. Inside the source class, use
the full locale string instead.
The `<lang>` used in the folder inside `src` should be the major `language` part. For example, if you will be creating a `pt-BR` source, use `<lang>` here as `pt` only. Inside the source class, use the full locale string instead.
### Loading a subset of Gradle modules
By default, all individual and generated multisrc extensions are loaded for local development.
By default, all individual and generated multisrc extensions are loaded for local development.
This may be inconvenient if you only need to work on one extension at a time.
To adjust which modules are loaded, make adjustments to the `settings.gradle.kts` file as needed.
@ -193,7 +190,7 @@ The simplest extension structure looks like this:
```console
$ tree src/<lang>/<mysourcename>/
src/<lang>/<mysourcename>/
├── AndroidManifest.xml (optional)
├── AndroidManifest.xml
├── build.gradle
├── res
│   ├── mipmap-hdpi
@ -204,8 +201,9 @@ src/<lang>/<mysourcename>/
│   │   └── ic_launcher.png
│   ├── mipmap-xxhdpi
│   │   └── ic_launcher.png
│   └── mipmap-xxxhdpi
│      └── ic_launcher.png
│   ├── mipmap-xxxhdpi
│   │   └── ic_launcher.png
│   └── web_hi_res_512.png
└── src
└── eu
└── kanade
@ -218,20 +216,19 @@ src/<lang>/<mysourcename>/
13 directories, 9 files
```
`<lang>` should be an ISO 639-1 compliant language code (two letters or `all`). `<mysourcename>`
should be adapted from the site name, and can only contain lowercase ASCII letters and digits.
Your extension code must be placed in the package `eu.kanade.tachiyomi.extension.<lang>.<mysourcename>`.
#### AndroidManifest.xml (optional)
You only need to create this file if you want to add deep linking to your extension.
See [URL intent filter](#url-intent-filter) for more information.
#### AndroidManifest.xml
A minimal [Android manifest file](https://developer.android.com/guide/topics/manifest/manifest-intro) is needed for Android to recognize a extension when it's compiled into an APK file. You can also add intent filters inside this file (see [URL intent filter](#url-intent-filter) for more information).
#### build.gradle
Make sure that your new extension's `build.gradle` file follows the following structure:
```groovy
```gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
ext {
extName = '<My source name>'
pkgNameSuffix = '<lang>.<mysourcename>'
extClass = '.<MySourceName>'
extVersionCode = 1
isNsfw = true
@ -240,32 +237,28 @@ ext {
apply from: "$rootDir/common.gradle"
```
| Field | Description |
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `extName` | The name of the extension. Should be romanized if site name is not in English. |
| `extClass` | Points to the class that implements `Source`. You can use a relative path starting with a dot (the package name is the base path). This is used to find and instantiate the source(s). |
| `extVersionCode` | The extension version code. This must be a positive integer and incremented with any change to the code. |
| `isNsfw` | (Optional, defaults to `false`) Flag to indicate that a source contains NSFW content. |
| Field | Description |
| ----- | ----------- |
| `extName` | The name of the extension. |
| `pkgNameSuffix` | A unique suffix added to `eu.kanade.tachiyomi.extension`. The language and the site name should be enough. Remember your extension code implementation must be placed in this package. |
| `extClass` | Points to the class that implements `Source`. You can use a relative path starting with a dot (the package name is the base path). This is used to find and instantiate the source(s). |
| `extVersionCode` | The extension version code. This must be a positive integer and incremented with any change to the code. |
| `libVersion` | (Optional, defaults to `1.4`) The version of the [extensions library](https://github.com/tachiyomiorg/extensions-lib) used. |
| `isNsfw` | (Optional, defaults to `false`) Flag to indicate that a source contains NSFW content. |
The extension's version name is generated automatically by concatenating `1.4` and `extVersionCode`.
With the example used above, the version would be `1.4.1`.
The extension's version name is generated automatically by concatenating `libVersion` and `extVersionCode`. With the example used above, the version would be `1.4.1`.
### Core dependencies
#### Extension API
Extensions rely on [extensions-lib](https://github.com/tachiyomiorg/extensions-lib), which provides
some interfaces and stubs from the [app](https://github.com/tachiyomiorg/tachiyomi) for compilation
purposes. The actual implementations can be found [here](https://github.com/tachiyomiorg/tachiyomi/tree/master/app/src/main/java/eu/kanade/tachiyomi/source).
Referencing the actual implementation will help with understanding extensions' call flow.
Extensions rely on [extensions-lib](https://github.com/tachiyomiorg/extensions-lib), which provides some interfaces and stubs from the [app](https://github.com/tachiyomiorg/tachiyomi) for compilation purposes. The actual implementations can be found [here](https://github.com/tachiyomiorg/tachiyomi/tree/master/app/src/main/java/eu/kanade/tachiyomi/source). Referencing the actual implementation will help with understanding extensions' call flow.
#### DataImage library
[`lib-dataimage`](https://github.com/keiyoushi/extensions-source/tree/main/lib/dataimage) is a library
for handling [base 64 encoded image data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs)
using an [OkHttp interceptor](https://square.github.io/okhttp/interceptors/).
[`lib-dataimage`](https://github.com/tachiyomiorg/tachiyomi-extensions/tree/master/lib/dataimage) is a library for handling [base 64 encoded image data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) using an [OkHttp interceptor](https://square.github.io/okhttp/interceptors/).
```groovy
```gradle
dependencies {
implementation(project(':lib-dataimage'))
}
@ -273,11 +266,9 @@ dependencies {
#### i18n library
[`lib-i18n`](https://github.com/keiyoushi/extensions-source/tree/main/lib/i18n) is a library for handling
internationalization in the sources. It allows loading `.properties` files with messages located under
the `assets/i18n` folder of each extension, that can be used to translate strings under the source.
[`lib-i18n`](https://github.com/tachiyomiorg/tachiyomi-extensions/tree/master/lib/i18n) is a library for handling internationalization in the sources. It allows loading `.properties` files with messages located under the `assets/i18n` folder of each extension, that can be used to translate strings under the source.
```groovy
```gradle
dependencies {
implementation(project(':lib-i18n'))
}
@ -285,41 +276,36 @@ dependencies {
#### Additional dependencies
If you find yourself needing additional functionality, you can add more dependencies to your `build.gradle`
file. Many of [the dependencies](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/build.gradle.kts)
from the main Tachiyomi app are exposed to extensions by default.
If you find yourself needing additional functionality, you can add more dependencies to your `build.gradle` file.
Many of [the dependencies](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/build.gradle.kts) from the main Tachiyomi app are exposed to extensions by default.
> [!NOTE]
> Several dependencies are already exposed to all extensions via Gradle's version catalog.
> To view which are available check the `gradle/libs.versions.toml` file.
Notice that we're using `compileOnly` instead of `implementation` if the app already contains it.
You could use `implementation` instead for a new dependency, or you prefer not to rely on whatever
the main app has at the expense of app size.
Notice that we're using `compileOnly` instead of `implementation` if the app already contains it. You could use `implementation` instead for a new dependency, or you prefer not to rely on whatever the main app has at the expense of app size.
> [!IMPORTANT]
> Using `compileOnly` restricts you to versions that must be compatible with those used in
> [the latest stable version of Tachiyomi](https://github.com/tachiyomiorg/tachiyomi/releases/latest).
> Using `compileOnly` restricts you to versions that must be compatible with those used in [the latest stable version of Tachiyomi](https://github.com/tachiyomiorg/tachiyomi/releases/latest).
### Extension main class
The class which is referenced and defined by `extClass` in `build.gradle`. This class should implement
either `SourceFactory` or extend one of the `Source` implementations: `HttpSource` or `ParsedHttpSource`.
The class which is referenced and defined by `extClass` in `build.gradle`. This class should implement either `SourceFactory` or extend one of the `Source` implementations: `HttpSource` or `ParsedHttpSource`.
| Class | Description |
|--------------------|----------------------------------------------------------------------------------------------------------------------------------|
| `SourceFactory` | Used to expose multiple `Source`s. Use this in case of a source that supports multiple languages or mirrors of the same website. |
| `HttpSource` | For online source, where requests are made using HTTP. |
| `ParsedHttpSource` | Similar to `HttpSource`, but has methods useful for scraping pages. |
| Class | Description |
| ----- | ----------- |
|`SourceFactory`| Used to expose multiple `Source`s. Use this in case of a source that supports multiple languages or mirrors of the same website. For similar websites use [theme sources](#multi-source-themes). |
| `HttpSource`| For online source, where requests are made using HTTP. |
| `ParsedHttpSource`| Similar to `HttpSource`, but has methods useful for scraping pages. |
#### Main class key variables
| Field | Description |
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | Name displayed in the "Sources" tab in Tachiyomi. |
| `baseUrl` | Base URL of the source without any trailing slashes. |
| `lang` | An ISO 639-1 compliant language code (two letters in lower case in most cases, but can also include the country/dialect part by using a simple dash character). |
| `id` | Identifier of your source, automatically set in `HttpSource`. It should only be manually overriden if you need to copy an existing autogenerated ID. |
| Field | Description |
| ----- | ----------- |
| `name` | Name displayed in the "Sources" tab in Tachiyomi. |
| `baseUrl` | Base URL of the source without any trailing slashes. |
| `lang` | An ISO 639-1 compliant language code (two letters in lower case in most cases, but can also include the country/dialect part by using a simple dash character). |
| `id` | Identifier of your source, automatically set in `HttpSource`. It should only be manually overriden if you need to copy an existing autogenerated ID. |
### Extension call flow
@ -327,53 +313,40 @@ either `SourceFactory` or extend one of the `Source` implementations: `HttpSourc
a.k.a. the Browse source entry point in the app (invoked by tapping on the source name).
- The app calls `fetchPopularManga` which should return a `MangasPage` containing the first batch of
found `SManga` entries.
- This method supports pagination. When user scrolls the manga list and more results must be fetched,
the app calls it again with increasing `page` values (starting with `page=1`). This continues while
`MangasPage.hasNextPage` is passed as `true` and `MangasPage.mangas` is not empty.
- To show the list properly, the app needs `url`, `title` and `thumbnail_url`. You **must** set them
here. The rest of the fields could be filled later (refer to Manga Details below).
- You should set `thumbnail_url` if is available, if not, `getMangaDetails` will be **immediately**
called (this will increase network calls heavily and should be avoided).
- The app calls `fetchPopularManga` which should return a `MangasPage` containing the first batch of found `SManga` entries.
- This method supports pagination. When user scrolls the manga list and more results must be fetched, the app calls it again with increasing `page` values (starting with `page=1`). This continues while `MangasPage.hasNextPage` is passed as `true` and `MangasPage.mangas` is not empty.
- To show the list properly, the app needs `url`, `title` and `thumbnail_url`. You **must** set them here. The rest of the fields could be filled later (refer to Manga Details below).
- You should set `thumbnail_url` if is available, if not, `getMangaDetails` will be **immediately** called (this will increase network calls heavily and should be avoided).
#### Latest Manga
a.k.a. the Latest source entry point in the app (invoked by tapping on the "Latest" button beside
the source name).
a.k.a. the Latest source entry point in the app (invoked by tapping on the "Latest" button beside the source name).
- Enabled if `supportsLatest` is `true` for a source
- Similar to popular manga, but should be fetching the latest entries from a source.
#### Manga Search
- When the user searches inside the app, `fetchSearchManga` will be called and the rest of the flow
is similar to what happens with `fetchPopularManga`.
- When the user searches inside the app, `fetchSearchManga` will be called and the rest of the flow is similar to what happens with `fetchPopularManga`.
- If search functionality is not available, return `Observable.just(MangasPage(emptyList(), false))`
- `getFilterList` will be called to get all filters and filter types.
##### Filters
The search flow have support to filters that can be added to a `FilterList` inside the `getFilterList`
method. When the user changes the filters' state, they will be passed to the `searchRequest`, and they
can be iterated to create the request (by getting the `filter.state` value, where the type varies
depending on the `Filter` used). You can check the filter types available [here](https://github.com/tachiyomiorg/tachiyomi/blob/master/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/model/Filter.kt)
and in the table below.
The search flow have support to filters that can be added to a `FilterList` inside the `getFilterList` method. When the user changes the filters' state, they will be passed to the `searchRequest`, and they can be iterated to create the request (by getting the `filter.state` value, where the type varies depending on the `Filter` used). You can check the filter types available [here](https://github.com/tachiyomiorg/tachiyomi/blob/master/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/model/Filter.kt) and in the table below.
| Filter | State type | Description |
|--------------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Filter.Header` | None | A simple header. Useful for separating sections in the list or showing any note or warning to the user. |
| `Filter.Separator` | None | A line separator. Useful for visual distinction between sections. |
| `Filter.Select<V>` | `Int` | A select control, similar to HTML's `<select>`. Only one item can be selected, and the state is the index of the selected one. |
| `Filter.Text` | `String` | A text control, similar to HTML's `<input type="text">`. |
| `Filter.CheckBox` | `Boolean` | A checkbox control, similar to HTML's `<input type="checkbox">`. The state is `true` if it's checked. |
| `Filter.TriState` | `Int` | A enhanced checkbox control that supports an excluding state. The state can be compared with `STATE_IGNORE`, `STATE_INCLUDE` and `STATE_EXCLUDE` constants of the class. |
| `Filter.Group<V>` | `List<V>` | A group of filters (preferentially of the same type). The state will be a `List` with all the states. |
| `Filter.Sort` | `Selection` | A control for sorting, with support for the ordering. The state indicates which item index is selected and if the sorting is `ascending`. |
| Filter | State type | Description |
| ------ | ---------- | ----------- |
| `Filter.Header` | None | A simple header. Useful for separating sections in the list or showing any note or warning to the user. |
| `Filter.Separator` | None | A line separator. Useful for visual distinction between sections. |
| `Filter.Select<V>` | `Int` | A select control, similar to HTML's `<select>`. Only one item can be selected, and the state is the index of the selected one. |
| `Filter.Text` | `String` | A text control, similar to HTML's `<input type="text">`. |
| `Filter.CheckBox` | `Boolean` | A checkbox control, similar to HTML's `<input type="checkbox">`. The state is `true` if it's checked. |
| `Filter.TriState` | `Int` | A enhanced checkbox control that supports an excluding state. The state can be compared with `STATE_IGNORE`, `STATE_INCLUDE` and `STATE_EXCLUDE` constants of the class. |
| `Filter.Group<V>` | `List<V>` | A group of filters (preferentially of the same type). The state will be a `List` with all the states. |
| `Filter.Sort` | `Selection` | A control for sorting, with support for the ordering. The state indicates which item index is selected and if the sorting is `ascending`. |
All control filters can have a default state set. It's usually recommended if the source have filters
to make the initial state match the popular manga list, so when the user open the filter sheet, the
state is equal and represents the current manga showing.
All control filters can have a default state set. It's usually recommended if the source have filters to make the initial state match the popular manga list, so when the user open the filter sheet, the state is equal and represents the current manga showing.
The `Filter` classes can also be extended, so you can create new custom filters like the `UriPartFilter`:
@ -386,100 +359,75 @@ open class UriPartFilter(displayName: String, private val vals: Array<Pair<Strin
#### Manga Details
- When user taps on a manga, `getMangaDetails` and `getChapterList` will be called and the results
will be cached.
- When user taps on a manga, `getMangaDetails` and `getChapterList` will be called and the results will be cached.
- A `SManga` entry is identified by it's `url`.
- `getMangaDetails` is called to update a manga's details from when it was initialized earlier.
- `SManga.initialized` tells the app if it should call `getMangaDetails`. If you are overriding
`getMangaDetails`, make sure to pass it as `true`.
- `SManga.initialized` tells the app if it should call `getMangaDetails`. If you are overriding `getMangaDetails`, make sure to pass it as `true`.
- `SManga.genre` is a string containing list of all genres separated with `", "`.
- `SManga.status` is an "enum" value. Refer to [the values in the `SManga` companion object](https://github.com/tachiyomiorg/extensions-lib/blob/master/library/src/main/java/eu/kanade/tachiyomi/source/model/SManga.kt#L26).
- During a backup, only `url` and `title` are stored. To restore the rest of the manga data, the
app calls `getMangaDetails`, so all fields should be (re)filled in if possible.
- If a `SManga` is cached, `getMangaDetails` will be only called when the user does a manual
update (Swipe-to-Refresh).
- `SManga.status` is an "enum" value. Refer to [the values in the `SManga` companion object](https://github.com/tachiyomiorg/extensions-lib/blob/master/library/src/main/java/eu/kanade/tachiyomi/source/model/SManga.kt#L24).
- During a backup, only `url` and `title` are stored. To restore the rest of the manga data, the app calls `getMangaDetails`, so all fields should be (re)filled in if possible.
- If a `SManga` is cached, `getMangaDetails` will be only called when the user does a manual update (Swipe-to-Refresh).
- `getChapterList` is called to display the chapter list.
- **The list should be sorted descending by the source order**.
- `getMangaUrl` is called when the user taps "Open in WebView".
- If the source uses an API to fetch the data, consider overriding this method to return the manga
absolute URL in the website instead.
- If the source uses an API to fetch the data, consider overriding this method to return the manga absolute URL in the website instead.
- It defaults to the URL provided to the request in `mangaDetailsRequest`.
#### Chapter
- After a chapter list for the manga is fetched and the app is going to cache the data,
`prepareNewChapter` will be called.
- `SChapter.date_upload` is the [UNIX Epoch time](https://en.wikipedia.org/wiki/Unix_time)
**expressed in milliseconds**.
- If you don't pass `SChapter.date_upload` and leave it zero, the app will use the default date
instead, but it's recommended to always fill it if it's available.
- To get the time in milliseconds from a date string, you can use a `SimpleDateFormat` like in
the example below.
- After a chapter list for the manga is fetched and the app is going to cache the data, `prepareNewChapter` will be called.
- `SChapter.date_upload` is the [UNIX Epoch time](https://en.wikipedia.org/wiki/Unix_time) **expressed in milliseconds**.
- If you don't pass `SChapter.date_upload` and leave it zero, the app will use the default date instead, but it's recommended to always fill it if it's available.
- To get the time in milliseconds from a date string, you can use a `SimpleDateFormat` like in the example below.
```kotlin
private fun parseDate(dateStr: String): Long {
return try {
dateFormat.parse(dateStr)!!.time
} catch (_: ParseException) {
0L
}
return runCatching { DATE_FORMATTER.parse(dateStr)?.time }
.getOrNull() ?: 0L
}
private val dateFormat by lazy {
SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH)
companion object {
private val DATE_FORMATTER by lazy {
SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH)
}
}
```
Make sure you make the `SimpleDateFormat` a class constant or variable so it doesn't get
recreated for every chapter. If you need to parse or format dates in manga description, create
another instance since `SimpleDateFormat` is not thread-safe.
- If the parsing have any problem, make sure to return `0L` so the app will use the default date
instead.
Make sure you make the `SimpleDateFormat` a class constant or variable so it doesn't get recreated for every chapter. If you need to parse or format dates in manga description, create another instance since `SimpleDateFormat` is not thread-safe.
- If the parsing have any problem, make sure to return `0L` so the app will use the default date instead.
- The app will overwrite dates of existing old chapters **UNLESS** `0L` is returned.
- The default date has [changed](https://github.com/tachiyomiorg/tachiyomi/pull/7197) in
preview ≥ r4442 or stable > 0.13.4.
- The default date has [changed](https://github.com/tachiyomiorg/tachiyomi/pull/7197) in preview ≥ r4442 or stable > 0.13.4.
- In older versions, the default date is always the fetch date.
- In newer versions, this is the same if every (new) chapter has `0L` returned.
- However, if the source only provides the upload date of the latest chapter, you can now set
it to the latest chapter and leave other chapters default. The app will automatically set it (instead of fetch date) to every new chapter and leave old chapters' dates untouched.
- However, if the source only provides the upload date of the latest chapter, you can now set it to the latest chapter and leave other chapters default. The app will automatically set it (instead of fetch date) to every new chapter and leave old chapters' dates untouched.
- `getChapterUrl` is called when the user taps "Open in WebView" in the reader.
- If the source uses an API to fetch the data, consider overriding this method to return the
chapter absolute URL in the website instead.
- If the source uses an API to fetch the data, consider overriding this method to return the chapter absolute URL in the website instead.
- It defaults to the URL provided to the request in `pageListRequest`.
#### Chapter Pages
- When user opens a chapter, `getPageList` will be called and it will return a list of `Page`s.
- While a chapter is open in the reader or is being downloaded, `fetchImageUrl` will be called to get
URLs for each page of the manga if the `Page.imageUrl` is empty.
- If the source provides all the `Page.imageUrl`'s directly, you can fill them and let the `Page.url`
empty, so the app will skip the `fetchImageUrl` source and call directly `fetchImage`.
- While a chapter is open in the reader or is being downloaded, `fetchImageUrl` will be called to get URLs for each page of the manga if the `Page.imageUrl` is empty.
- If the source provides all the `Page.imageUrl`'s directly, you can fill them and let the `Page.url` empty, so the app will skip the `fetchImageUrl` source and call directly `fetchImage`.
- The `Page.url` and `Page.imageUrl` attributes **should be set as an absolute URL**.
- Chapter pages numbers start from `0`.
- The list of `Page`s should be returned already sorted, the `index` field is ignored.
### Misc notes
- Sometimes you may find no use for some inherited methods. If so just override them and throw
exceptions: `throw UnsupportedOperationException()`
- You probably will find `getUrlWithoutDomain` useful when parsing the target source URLs. Keep in
mind there's a current issue with spaces in the URL though, so if you use it, replace all spaces with
URL encoded characters (like `%20`).
- If possible try to stick to the general workflow from `HttpSource`/`ParsedHttpSource`; breaking
them may cause you more headache than necessary.
- By implementing `ConfigurableSource` you can add settings to your source, which is backed by
[`SharedPreferences`](https://developer.android.com/reference/android/content/SharedPreferences).
- Sometimes you may find no use for some inherited methods. If so just override them and throw exceptions: `throw UnsupportedOperationException("Not used.")`
- You probably will find `getUrlWithoutDomain` useful when parsing the target source URLs. Keep in mind there's a current issue with spaces in the URL though, so if you use it, replace all spaces with URL encoded characters (like `%20`).
- If possible try to stick to the general workflow from `HttpSource`/`ParsedHttpSource`; breaking them may cause you more headache than necessary.
- By implementing `ConfigurableSource` you can add settings to your source, which is backed by [`SharedPreferences`](https://developer.android.com/reference/android/content/SharedPreferences).
### Advanced Extension features
#### URL intent filter
Extensions can define URL intent filters by defining it inside a custom `AndroidManifest.xml` file.
(Example TBD.)
For an example, refer to [the NHentai module's `AndroidManifest.xml` file](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/src/all/nhentai/AndroidManifest.xml) and [its corresponding `NHUrlActivity` handler](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/master/src/all/nhentai/src/eu/kanade/tachiyomi/extension/all/nhentai/NHUrlActivity.kt).
To test if the URL intent filter is working as expected, you can try opening the website in a browser
and navigating to the endpoint that was added as a filter or clicking a hyperlink. Alternatively,
you can use the `adb` command below.
To test if the URL intent filter is working as expected, you can try opening the website in a browser and navigating to the endpoint that was added as a filter or clicking a hyperlink. Alternatively, you can use the `adb` command below.
```console
$ adb shell am start -d "<your-link>" -a android.intent.action.VIEW
@ -495,40 +443,27 @@ $ adb shell am start -d "<your-link>" -a android.intent.action.VIEW
#### Update strategy
There is some cases where titles in a source will always only have the same chapter list
(i.e. immutable), and don't need to be included in a global update of the app because of that, saving
a lot of requests and preventing causing unnecessary damage to the source servers. To change the
update strategy of a `SManga`, use the `update_strategy` field. You can find below a description of
the current possible values.
There is some cases where titles in a source will always only have the same chapter list (i.e. immutable), and don't need to be included in a global update of the app because of that, saving a lot of requests and preventing causing unnecessary damage to the source servers. To change the update strategy of a `SManga`, use the `update_strategy` field. You can find below a description of the current possible values.
- `UpdateStrategy.ALWAYS_UPDATE`: Titles marked as always update will be included in the library
update if they aren't excluded by additional restrictions.
- `UpdateStrategy.ONLY_FETCH_ONCE`: Titles marked as only fetch once will be automatically skipped
during library updates. Useful for cases where the series is previously known to be finished and have
only a single chapter, for example.
- `UpdateStrategy.ALWAYS_UPDATE`: Titles marked as always update will be included in the library update if they aren't excluded by additional restrictions.
- `UpdateStrategy.ONLY_FETCH_ONCE`: Titles marked as only fetch once will be automatically skipped during library updates. Useful for cases where the series is previously known to be finished and have only a single chapter, for example.
If not set, it defaults to `ALWAYS_UPDATE`.
#### Renaming existing sources
There is some cases where existing sources changes their name on the website. To correctly reflect
these changes in the extension, you need to explicity set the `id` to the same old value, otherwise
it will get changed by the new `name` value and users will be forced to migrate back to the source.
There is some cases where existing sources changes their name on the website. To correctly reflect these changes in the extension, you need to explicity set the `id` to the same old value, otherwise it will get changed by the new `name` value and users will be forced to migrate back to the source.
To get the current `id` value before the name change, you can search the source name in the [repository JSON file](https://github.com/keiyoushi/extensions/blob/repo/index.json)
by looking into the `sources` attribute of the extension. When you have the `id` copied, you can
override it in the source:
To get the current `id` value before the name change, you can search the source name in the [repository JSON file](https://github.com/tachiyomiorg/tachiyomi-extensions/blob/repo/index.json) by looking into the `sources` attribute of the extension. When you have the `id` copied, you can override it in the source:
```kotlin
override val id: Long = <the-id>
```
Then the class name and the `name` attribute value can be changed. Also don't forget to update the
extension name and class name in the individual Gradle file.
Then the class name and the `name` attribute value can be changed. Also don't forget to update the extension name and class name in the individual Gradle file if it is not a multisrc extension.
> [!IMPORTANT]
> The package name **needs** to be the same (even if it has the old name), otherwise users will not
> receive the extension update when it gets published in the repository.
> The package name **needs** to be the same (even if it has the old name), otherwise users will not receive the extension update when it gets published in the repository. If you're changing the name of a multisrc source, you can manually set it in the generator class of the theme by using `pkgName = "oldpackagename"`.
The `id` also needs to be explicity set to the old value if you're changing the `lang` attribute.
@ -538,14 +473,9 @@ The `id` also needs to be explicity set to the old value if you're changing the
> a new `id` will be generated and users will be forced to migrate.
## Multi-source themes
The `multisrc` module houses source code for generating extensions for cases where multiple source
sites use the same site generator tool (usually a CMS) for bootsraping their website and this makes
them similar enough to prompt code reuse through inheritance/composition; which from now on we will
use the general **theme** term to refer to.
The `multisrc` module houses source code for generating extensions for cases where multiple source sites use the same site generator tool(usually a CMS) for bootsraping their website and this makes them similar enough to prompt code reuse through inheritance/composition; which from now on we will use the general **theme** term to refer to.
This module contains the *default implementation* for each theme and definitions for each source that
builds upon that default implementation and also it's overrides upon that default implementation,
all of this becomes a set of source code which then is used to generate individual extensions from.
This module contains the *default implementation* for each theme and definitions for each source that builds upon that default implementation and also it's overrides upon that default implementation, all of this becomes a set of source code which then is used to generate individual extensions from.
### The directory structure
```console
@ -565,8 +495,9 @@ multisrc
│   │   │   └── ic_launcher.png
│   │   ├── mipmap-xxhdpi
│   │   │   └── ic_launcher.png
│   │   └── mipmap-xxxhdpi
│   │      └── ic_launcher.png
│   │   ├── mipmap-xxxhdpi
│   │   │   └── ic_launcher.png
│   │   └── web_hi_res_512.png
│   └── <sourcepkg>
│   ├── additional.gradle
│   ├── AndroidManifest.xml
@ -579,8 +510,9 @@ multisrc
│   │   │   └── ic_launcher.png
│   │   ├── mipmap-xxhdpi
│   │   │   └── ic_launcher.png
│   │   └── mipmap-xxxhdpi
│   │      └── ic_launcher.png
│   │   ├── mipmap-xxxhdpi
│   │   │   └── ic_launcher.png
│   │   └── web_hi_res_512.png
│   └── src
│   └── <SourceName>.kt
└── src
@ -600,22 +532,15 @@ multisrc
└── ThemeSourceGenerator.kt
```
- `multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/<themepkg>/<Theme>.kt` defines the the theme's
default implementation.
- `multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/<theme>/<Theme>Generator.kt` defines the the
theme's generator class, this is similar to a `SourceFactory` class.
- `multisrc/overrides/<themepkg>/default/res` is the theme's default icons, if a source doesn't have
overrides for `res`, then default icons will be used.
- `multisrc/overrides/<themepkg>/default/additional.gradle` defines additional gradle code, this will
be copied at the end of all generated sources from this theme.
- `multisrc/overrides/<themepkg>/<sourcepkg>` contains overrides for a source that is defined inside
the `<Theme>Generator.kt` class.
- `multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/<themepkg>/<Theme>.kt` defines the the theme's default implementation.
- `multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/<theme>/<Theme>Generator.kt` defines the the theme's generator class, this is similar to a `SourceFactory` class.
- `multisrc/overrides/<themepkg>/default/res` is the theme's default icons, if a source doesn't have overrides for `res`, then default icons will be used.
- `multisrc/overrides/<themepkg>/default/additional.gradle` defines additional gradle code, this will be copied at the end of all generated sources from this theme.
- `multisrc/overrides/<themepkg>/<sourcepkg>` contains overrides for a source that is defined inside the `<Theme>Generator.kt` class.
- `multisrc/overrides/<themepkg>/<sourcepkg>/src` contains source overrides.
- `multisrc/overrides/<themepkg>/<sourcepkg>/res` contains override for icons.
- `multisrc/overrides/<themepkg>/<sourcepkg>/additional.gradle` defines additional gradle code, this
will be copied at the end of the generated gradle file below the theme's `additional.gradle`.
- `multisrc/overrides/<themepkg>/<sourcepkg>/AndroidManifest.xml` is copied as an override to the
default `AndroidManifest.xml` generation if it exists.
- `multisrc/overrides/<themepkg>/<sourcepkg>/additional.gradle` defines additional gradle code, this will be copied at the end of the generated gradle file below the theme's `additional.gradle`.
- `multisrc/overrides/<themepkg>/<sourcepkg>/AndroidManifest.xml` is copied as an override to the default `AndroidManifest.xml` generation if it exists.
> [!NOTE]
> Files ending with `Gen.kt` (i.e. `multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/<theme>/XxxGen.kt`)
@ -626,27 +551,19 @@ There are three steps in running and testing a theme source:
1. Generate the sources
- **Option 1: Only generate sources from one theme**
- **Method 1:** Find and run `<ThemeName>Generator` run configuration from the
`Run/Debug Configuration` menu.
- **Method 2:** Directly run `<themepkg>.<ThemeName>Generator.main` by pressing the play
button in front of the method shown inside Android Studio's Code Editor to generate sources
from the said theme.
- **Method 1:** Find and run `<ThemeName>Generator` run configuration form the `Run/Debug Configuration` menu.
- **Method 2:** Directly run `<themepkg>.<ThemeName>Generator.main` by pressing the play button in front of the method shown inside Android Studio's Code Editor to generate sources from the said theme.
- **Option 2: Generate sources from all themes**
- **Method 1:** Run `./gradlew multisrc:generateExtensions` from a terminal window to
generate all sources.
- **Method 2:** Directly run `Generator.GeneratorMain.main` by pressing the play button
in front of the method shown inside Android Studio's Code Editor to generate all sources.
- **Method 1:** Run `./gradlew multisrc:generateExtensions` from a terminal window to generate all sources.
- **Method 2:** Directly run `Generator.GeneratorMain.main` by pressing the play button in front of the method shown inside Android Studio's Code Editor to generate all sources.
2. Sync gradle to import the new generated sources inside `generated-src`
- **Method 1:** Android Studio might prompt to sync the gradle. Click on `Sync Now`.
- **Method 2:** Manually re-sync by opening `File` -> `Sync Project with Gradle Files` or by
pressing `Alt+f` then `g`.
- **Method 2:** Manually re-sync by opening `File` -> `Sync Project with Gradle Files` or by pressing `Alt+f` then `g`.
3. Build and test the generated Extention like normal `src` sources.
- It's recommended to make changes here to skip going through step 1 and 2 multiple times, and
when you are done, copying the changes back to `multisrc`.
- It's recommended to make changes here to skip going through step 1 and 2 multiple times, and when you are done, copying the changes back to `multisrc`.
### Scaffolding overrides
You can use this python script to generate scaffolds for source overrides.
Put it inside `multisrc/overrides/<themepkg>/` as `scaffold.py`.
You can use this python script to generate scaffolds for source overrides. Put it inside `multisrc/overrides/<themepkg>/` as `scaffold.py`.
```python
import os, sys
from pathlib import Path
@ -673,26 +590,19 @@ with open(f"{package}/src/{source}.kt", "w") as f:
```
### Additional Notes
- Generated sources extension version code is calculated as
`baseVersionCode + overrideVersionCode + multisrcLibraryVersion`.
- Generated sources extension version code is calculated as `baseVersionCode + overrideVersionCode + multisrcLibraryVersion`.
- Currently `multisrcLibraryVersion` is `0`
- When a new source is added, it doesn't need to set `overrideVersionCode` as it's default is `0`.
- For each time a source changes in a way that should the version increase, `overrideVersionCode`
should be increased by one.
- When a theme's default implementation changes, `baseVersionCode` should be increased, the
initial value should be `1`.
- For each time a source changes in a way that should the version increase, `overrideVersionCode` should be increased by one.
- When a theme's default implementation changes, `baseVersionCode` should be increased, the initial value should be `1`.
- For example, for a new theme with a new source, extention version code will be `0 + 0 + 1 = 1`.
- `IntelijConfigurationGeneratorMainKt` should be run on creating or removing a multisrc theme.
- On removing a theme, you can manually remove the corresponding configuration in the `.run`
folder instead.
- Be careful if you're using sparse checkout. If other configurations are accidentally removed,
`git add` the file you want and `git restore` the others. Another choice is to allow
`/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/*` before running the generator.
- On removing a theme, you can manually remove the corresponding configuration in the `.run` folder instead.
- Be careful if you're using sparse checkout. If other configurations are accidentally removed, `git add` the file you want and `git restore` the others. Another choice is to allow `/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/*` before running the generator.
## Running
To make local development more convenient, you can use the following run configuration to launch
Tachiyomi directly at the Browse panel:
To make local development more convenient, you can use the following run configuration to launch Tachiyomi directly at the Browse panel:
![](https://i.imgur.com/STy0UFY.png)
@ -715,17 +625,11 @@ And for a release build of Tachiyomi:
### Android Debugger
> [!IMPORTANT]
> If you didn't build the main app from source with debug enabled and are using a release/beta APK, you **need** a rooted device.
> If you are using an emulator instead, make sure you choose a profile **without** Google Play.
You can leverage the Android Debugger to step through your extension while debugging.
You *cannot* simply use Android Studio's `Debug 'module.name'` -> this will most likely result in an
error while launching.
You *cannot* simply use Android Studio's `Debug 'module.name'` -> this will most likely result in an error while launching.
Instead, once you've built and installed your extension on the target device, use
`Attach Debugger to Android Process` to start debugging Tachiyomi.
Instead, once you've built and installed your extension on the target device, use `Attach Debugger to Android Process` to start debugging Tachiyomi.
![](https://i.imgur.com/muhXyfu.png)
@ -737,31 +641,22 @@ show up in the [`Logcat`](https://developer.android.com/studio/debug/am-logcat)
### Inspecting network calls
One of the easiest way to inspect network issues (such as HTTP errors 404, 429, no chapter found etc.)
is to use the [`Logcat`](https://developer.android.com/studio/debug/am-logcat) panel of Android Studio
and filtering by the `OkHttpClient` tag.
One of the easiest way to inspect network issues (such as HTTP errors 404, 429, no chapter found etc.) is to use the [`Logcat`](https://developer.android.com/studio/debug/am-logcat) panel of Android Studio and filtering by the `OkHttpClient` tag.
To be able to check the calls done by OkHttp, you need to enable verbose logging in the app, that is
not enabled by default and is only included in the Preview versions of Tachiyomi. To enable it, go to
More -> Settings -> Advanced -> Verbose logging. After enabling it, don't forget to restart the app.
To be able to check the calls done by OkHttp, you need to enable verbose logging in the app, that is not enabled by default and is only included in the Preview versions of Tachiyomi. To enable it, go to More -> Settings -> Advanced -> Verbose logging. After enabling it, don't forget to restart the app.
Inspecting the Logcat allows you to get a good look at the call flow and it's more than enough in most
cases where issues occurs. However, alternatively, you can also use an external tool like `mitm-proxy`.
For that, refer to the subsequent sections.
Inspecting the Logcat allows you to get a good look at the call flow and it's more than enough in most cases where issues occurs. However, alternatively, you can also use an external tool like `mitm-proxy`. For that, refer to the subsequent sections.
On newer Android Studio versions, you can use its built-in Network Inspector inside the
App Inspection tool window. This feature provides a nice GUI to inspect the requests made in the app.
To use it, follow the [official documentation](https://developer.android.com/studio/debug/network-profiler)
and select Tachiyomi package name in the process list.
To use it, follow the [official documentation](https://developer.android.com/studio/debug/network-profiler) and select Tachiyomi package name in the process list.
### Using external network inspecting tools
If you want to take a deeper look into the network flow, such as taking a look into the request and
response bodies, you can use an external tool like `mitm-proxy`.
If you want to take a deeper look into the network flow, such as taking a look into the request and response bodies, you can use an external tool like `mitm-proxy`.
#### Setup your proxy server
We are going to use [mitm-proxy](https://mitmproxy.org/) but you can replace it with any other Web
Debugger (i.e. Charles, Burp Suite, Fiddler etc). To install and execute, follow the commands below.
We are going to use [mitm-proxy](https://mitmproxy.org/) but you can replace it with any other Web Debugger (i.e. Charles, Burp Suite, Fiddler etc). To install and execute, follow the commands bellow.
```console
Install the tool.
@ -782,14 +677,14 @@ $ docker run --rm -it -p 8080:8080 \
After installing and running, open your browser and navigate to http://127.0.0.1:8081.
#### OkHttp proxy setup
Since most of the manga sources are going to use HTTPS, we need to disable SSL verification in order
to use the web debugger. For that, add this code to inside your source class:
Since most of the manga sources are going to use HTTPS, we need to disable SSL verification in order to use the web debugger. For that, add this code to inside your source class:
```kotlin
package eu.kanade.tachiyomi.extension.en.mysource
package eu.kanade.tachiyomi.extension.en.mangasource
import eu.kanade.tachiyomi.multisrc.mangatheme.mangasource
import android.annotation.SuppressLint
import eu.kanade.tachiyomi.source.online.HttpSource
import okhttp3.OkHttpClient
import java.net.InetSocketAddress
import java.net.Proxy
@ -799,7 +694,11 @@ import javax.net.ssl.SSLContext
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
class MySource : HttpSource() {
class MangaSource : MangaTheme(
"MangaSource",
"https://example.com",
"en"
) {
private fun OkHttpClient.Builder.ignoreAllSSLErrors(): OkHttpClient.Builder {
val naiveTrustManager = @SuppressLint("CustomX509TrustManager")
object : X509TrustManager {
@ -825,55 +724,30 @@ class MySource : HttpSource() {
}
```
Note: `10.0.2.2` is usually the address of your loopback interface in the android emulator. If
Tachiyomi tells you that it's unable to connect to 10.0.2.2:8080 you will likely need to change it
(the same if you are using hardware device).
Note: `10.0.2.2` is usually the address of your loopback interface in the android emulator. If Tachiyomi tells you that it's unable to connect to 10.0.2.2:8080 you will likely need to change it (the same if you are using hardware device).
If all went well, you should see all requests and responses made by the source in the web interface
of `mitmweb`.
If all went well, you should see all requests and responses made by the source in the web interface of `mitmweb`.
## Building
APKs can be created in Android Studio via `Build > Build Bundle(s) / APK(s) > Build APK(s)` or
`Build > Generate Signed Bundle / APK`.
If for some reason you decide to build the APK from the command line, you can use the following
command (because you're doing things differently than expected, I assume you have some
knowledge of gradlew and your OS):
```console
// For a single apk, use this command
$ ./gradlew src:<lang>:<source>:assembleDebug
```
APKs can be created in Android Studio via `Build > Build Bundle(s) / APK(s) > Build APK(s)` or `Build > Generate Signed Bundle / APK`.
## Submitting the changes
When you feel confident about your changes, submit a new Pull Request so your code can be reviewed
and merged if it's approved. We encourage following a [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962)
and following the good practices of the workflow, such as not commiting directly to `main`: always
create a new branch for your changes.
When you feel confident about your changes, submit a new Pull Request so your code can be reviewed and merged if it's approved. We encourage following a [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962) and following the good practices of the workflow, such as not commiting directly to `master`: always create a new branch for your changes.
If you are more comfortable about using Git GUI-based tools, you can refer to [this guide](https://learntodroid.com/how-to-use-git-and-github-in-android-studio/)
about the Git integration inside Android Studio, specifically the "How to Contribute to an to Existing
Git Repository in Android Studio" section of the guide.
If you are more comfortable about using Git GUI-based tools, you can refer to [this guide](https://learntodroid.com/how-to-use-git-and-github-in-android-studio/) about the Git integration inside Android Studio, specifically the "How to Contribute to an to Existing Git Repository in Android Studio" section of the guide.
> [!IMPORTANT]
> Make sure you have generated the extension icon using the linked Icon Generator tool in the [Tools](#tools)
> section. The icon **must follow the pattern** adopted by all other extensions: a square with rounded
> corners. Make sure to remove the generated `web_hi_res_512.png`.
> Make sure you have generated the extension icon using the linked Icon Generator tool in the [Tools](#tools) section. The icon **must follow the pattern** adopted by all other extensions: a square with rounded corners.
Please **do test your changes by compiling it through Android Studio** before submitting it. Obvious
untested PRs will not be merged, such as ones created with the GitHub web interface. Also make sure
to follow the PR checklist available in the PR body field when creating a new PR. As a reference, you
can find it below.
Please **do test your changes by compiling it through Android Studio** before submitting it. Obvious untested PRs will not be merged, such as ones created with the GitHub web interface. Also make sure to follow the PR checklist available in the PR body field when creating a new PR. As a reference, you can find it below.
### Pull Request checklist
- Updated `extVersionCode` value in `build.gradle` for individual extensions
- Updated `overrideVersionCode` or `baseVersionCode` as needed for all multisrc extensions
- Referenced all related issues in the PR body (e.g. "Closes #xyz")
- Added the `isNsfw = true` flag in `build.gradle` when appropriate
- Have not changed source names
- Have explicitly kept the `id` if a source's name or language were changed
- Have tested the modifications by compiling and running the extension through Android Studio
- Have removed `web_hi_res_512.png` when adding a new extension
- Update `extVersionCode` value in `build.gradle` for individual extensions
- Update `overrideVersionCode` or `baseVersionCode` as needed for all multisrc extensions
- Reference all related issues in the PR body (e.g. "Closes #xyz")
- Add the `isNsfw = true` flag in `build.gradle` when appropriate
- Explicitly kept the `id` if a source's name or language were changed
- Test the modifications by compiling and running the extension through Android Studio

View File

@ -1,18 +1,37 @@
### Please give the repo a :star:
| Build | Support Server |
|-------|---------|
| [![CI](https://github.com/keiyoushi/extensions-source/actions/workflows/build_push.yml/badge.svg)](https://github.com/keiyoushi/extensions-source/actions/workflows/build_push.yml) | [![Discord](https://img.shields.io/discord/1193460528052453448.svg?label=discord&labelColor=7289da&color=2c2f33&style=flat)](https://discord.gg/3FbCpdKbdY) |
| [![CI](https://github.com/tachiyomiorg/tachiyomi-extensions/workflows/CI/badge.svg?event=push)](https://github.com/tachiyomiorg/tachiyomi-extensions/actions/workflows/build_push.yml) | [![Discord](https://img.shields.io/discord/349436576037732353.svg?label=discord&labelColor=7289da&color=2c2f33&style=flat)](https://discord.gg/tachiyomi) |
# ![app icon](./.github/readme-images/app-icon.png)Tachiyomi Extensions
Tachiyomi is a free and open source manga reader for Android 6.0 and above.
This repository contains the available extension catalogues for the [Tachiyomi](https://github.com/tachiyomiorg/tachiyomi) app.
# Usage
[Getting started](https://keiyoushi.github.io/docs/guides/getting-started#adding-the-extension-repo)
Extension sources can be downloaded, installed, and uninstalled via the main Tachiyomi app. They are installed and uninstalled like regular apps, in `.apk` format.
## Downloads
If you prefer to directly download the APK files, they are available via https://tachiyomi.org/extensions/ or directly in this GitHub repository in the [`repo` branch](https://github.com/tachiyomiorg/tachiyomi-extensions/tree/repo/apk).
# Requests
To request a new source or bug fix, [create an issue](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose).
Note that requesting something does not imply that something will be added or fixed in a timely fashion or at all since the work is volunteer-based. Furthermore, some sources may be impossible to do or prohibitively difficult to maintain.
If you would like to see a request fulfilled and have the necessary skills to do so, consider contributing! Issues are up-for-grabs for any developer if there is no assigned user already.
# Contributing
Contributions are welcome!
Check out the repo's [issue backlog](https://github.com/keiyoushi/extensions-source/issues) for source requests and bug reports.
Check out the repo's [issue backlog](https://github.com/tachiyomiorg/tachiyomi-extensions/issues) for source requests and bug reports.
To get started with development, see [CONTRIBUTING.md](./CONTRIBUTING.md).
It might also be good to read our [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
## License
@ -32,5 +51,4 @@ Check out the repo's [issue backlog](https://github.com/keiyoushi/extensions-sou
## Disclaimer
This project is not affiliated with Tachiyomi. Don't ask for help about these extensions at the official support means of Tachiyomi. All credits to the codebase goes to the original contributors.
The developer of this application does not have any affiliation with the content providers available.

78
REMOVED_SOURCES.md Normal file
View File

@ -0,0 +1,78 @@
**There is no timetable on when or if a source request may be filled (also applies to bug reports and enhancement requests).**
### In General the following sources that won't be added as an extension
- In general heavily paywalled sites
- Sources that require cracking some app's source code (realistically, no one's going to put in the effort to do it)
- Sources that are known for filling a lot of DMCA complaints over repositories on GitHub
Here is a list of known sources that were removed.
## Removed sources
### Too difficult to maintain
- Anchira https://github.com/tachiyomiorg/tachiyomi-extensions/pull/19149
- Bakai https://github.com/tachiyomiorg/tachiyomi-extensions/pull/17890
- Blackout Comics and Izakaya https://github.com/tachiyomiorg/tachiyomi-extensions/pull/18500
- ColaManhua (COLA漫画) https://github.com/tachiyomiorg/tachiyomi-extensions/pull/11445
- Comikey https://github.com/tachiyomiorg/tachiyomi-extensions/pull/11971
- Constellar Scans https://github.com/tachiyomiorg/tachiyomi-extensions/pull/17277
- CopyManga (拷贝漫画) https://github.com/tachiyomiorg/tachiyomi-extensions/pull/12376
- Cứu Truyện https://github.com/tachiyomiorg/tachiyomi-extensions/pull/16654
- Hentai Kai https://github.com/tachiyomiorg/tachiyomi-extensions/issues/9999
- Hitomi.la https://github.com/tachiyomiorg/tachiyomi-extensions/pull/11613
- HQ Dragon https://github.com/tachiyomiorg/tachiyomi-extensions/pull/7065
- Japscan https://github.com/tachiyomiorg/tachiyomi-extensions/pull/17892
- Koushoku https://github.com/tachiyomiorg/tachiyomi-extensions/pull/13329
- LeerCapitulo https://github.com/tachiyomiorg/tachiyomi-extensions/pull/16255
- Mangá Host https://github.com/tachiyomiorg/tachiyomi-extensions/pull/7065
- Mangá Livre and Leitor.net https://github.com/tachiyomiorg/tachiyomi-extensions/pull/8679
- MangaDig https://github.com/tachiyomiorg/tachiyomi-extensions/pull/14974
- Mangas.pw (Mangas.in) https://github.com/tachiyomiorg/tachiyomi-extensions/pull/9489
- MangaYabu! https://github.com/tachiyomiorg/tachiyomi-extensions/pull/9336
- ManhuaScan https://github.com/tachiyomiorg/tachiyomi-extensions/pull/7129
- ManhwaHot https://github.com/tachiyomiorg/tachiyomi-extensions/pull/7129
- Mode Scanlator https://github.com/tachiyomiorg/tachiyomi-extensions/pull/17865
- Neox/Nexo Scanlator https://github.com/tachiyomiorg/tachiyomi-extensions/pull/12695
- Reaper Scans (EN) https://github.com/tachiyomiorg/tachiyomi-extensions/pull/16819
- SuperMangás and SuperHentais https://github.com/tachiyomiorg/tachiyomi-extensions/pull/6348
- TopToon+/Day Comics https://github.com/tachiyomiorg/tachiyomi-extensions/pull/10851
- Tsuki Mangás https://github.com/tachiyomiorg/tachiyomi-extensions/pull/8609
- Union Mangás https://github.com/tachiyomiorg/tachiyomi-extensions/pull/7065
- YES Mangás https://github.com/tachiyomiorg/tachiyomi-extensions/pull/7065
### Requested removal by the scanlator team
- ARES Manga https://github.com/tachiyomiorg/tachiyomi-extensions/issues/15396
- Astra Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13845
- Dat-Gar Scan https://github.com/tachiyomiorg/tachiyomi-extensions/issues/18441
- Gourmet Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/6192
- Hikari Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/6611
- Hunter Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/12392
- JuinJutsuReader https://github.com/tachiyomiorg/tachiyomi-extensions/issues/2958
- Knightnoscanlation https://github.com/tachiyomiorg/tachiyomi-extensions/issues/4240
- KomikTap/KomikTap.in https://github.com/tachiyomiorg/tachiyomi-extensions/issues/6133
- Luminous Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/9923
- MangaPro https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13989
- MangaSY https://github.com/tachiyomiorg/tachiyomi-extensions/issues/12007
- Mangawow https://github.com/tachiyomiorg/tachiyomi-extensions/issues/5367
- MHScans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/15319
- Mono Manga https://github.com/tachiyomiorg/tachiyomi-extensions/issues/17634
- Moon Daisy Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/17929
- NarTag https://github.com/tachiyomiorg/tachiyomi-extensions/issues/8038
- Plot-twistnf-scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/4242
- Realm Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/15586
- Remangas https://github.com/tachiyomiorg/tachiyomi-extensions/issues/18807
- Reset Scans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/13168
- SetsuScans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/11040
- ShinobiScans https://github.com/tachiyomiorg/tachiyomi-extensions/issues/14457
- XXX Yaoi https://github.com/tachiyomiorg/tachiyomi-extensions/issues/9535
### Requested removal by copyright holders
By request of [Kakao Entertainment](https://www.kakaoent.com/):
- 1st Kiss-Manga
- Bato.to
- Mangadex
- NewToki / ManaToki
- S2Manga

View File

@ -1,3 +1,17 @@
buildscript {
repositories {
mavenCentral()
google()
maven(url = "https://plugins.gradle.org/m2/")
}
dependencies {
classpath(libs.gradle.agp)
classpath(libs.gradle.kotlin)
classpath(libs.gradle.serialization)
classpath(libs.gradle.kotlinter)
}
}
allprojects {
repositories {
mavenCentral()
@ -5,3 +19,7 @@ allprojects {
maven(url = "https://jitpack.io")
}
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory.asFile.get())
}

2
buildSrc/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.gradle/
build/

View File

@ -3,14 +3,5 @@ plugins {
}
repositories {
gradlePluginPortal()
mavenCentral()
google()
}
dependencies {
implementation(libs.gradle.agp)
implementation(libs.gradle.kotlin)
implementation(libs.gradle.serialization)
implementation(libs.gradle.kotlinter)
}

View File

@ -1,7 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,7 +0,0 @@
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}

View File

@ -1,5 +1,6 @@
object AndroidConfig {
const val compileSdk = 34
const val minSdk = 21
@Suppress("UNUSED")
const val targetSdk = 34
}

View File

@ -1,6 +0,0 @@
import org.gradle.api.plugins.ExtensionAware
import org.gradle.kotlin.dsl.extra
var ExtensionAware.baseVersionCode: Int
get() = extra.get("baseVersionCode") as Int
set(value) = extra.set("baseVersionCode", value)

View File

@ -1,23 +0,0 @@
plugins {
id("com.android.library")
kotlin("android")
id("kotlinx-serialization")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.lib.${project.name}"
buildFeatures {
androidResources = false
}
}
dependencies {
compileOnly(versionCatalogs.named("libs").findBundle("common").get())
}

View File

@ -1,53 +0,0 @@
plugins {
id("com.android.library")
kotlin("android")
id("kotlinx-serialization")
id("org.jmailen.kotlinter")
}
android {
compileSdk = AndroidConfig.compileSdk
defaultConfig {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.multisrc.${project.name}"
sourceSets {
named("main") {
manifest.srcFile("AndroidManifest.xml")
java.setSrcDirs(listOf("src"))
res.setSrcDirs(listOf("res"))
assets.setSrcDirs(listOf("assets"))
}
}
kotlinOptions {
freeCompilerArgs += "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
}
}
kotlinter {
experimentalRules = true
disabledRules = arrayOf(
"experimental:argument-list-wrapping", // Doesn't play well with Android Studio
"experimental:comment-wrapping",
)
}
dependencies {
compileOnly(versionCatalogs.named("libs").findBundle("common").get())
}
tasks {
preBuild {
dependsOn(lintKotlin)
}
if (System.getenv("CI") != "true") {
lintKotlin {
dependsOn(formatKotlin)
}
}
}

View File

@ -1,18 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlinx-serialization'
apply plugin: 'org.jmailen.kotlinter'
assert !ext.has("pkgNameSuffix")
assert !ext.has("libVersion")
assert extName.chars().max().asInt < 0x180 : "Extension name should be romanized"
Project theme = ext.has("themePkg") ? project(":lib-multisrc:$themePkg") : null
if (theme != null) evaluationDependsOn(theme.path)
android {
compileSdk AndroidConfig.compileSdk
compileSdkVersion AndroidConfig.compileSdk
namespace "eu.kanade.tachiyomi.extension"
sourceSets {
@ -22,33 +11,38 @@ android {
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
release {
manifest.srcFile "AndroidManifest.xml"
}
debug {
manifest.srcFile "AndroidManifest.xml"
}
}
defaultConfig {
minSdk AndroidConfig.minSdk
targetSdk AndroidConfig.targetSdk
applicationIdSuffix project.parent.name + "." + project.name
versionCode theme == null ? extVersionCode : theme.baseVersionCode + overrideVersionCode
versionName "1.4.$versionCode"
base {
archivesName = "tachiyomi-$applicationIdSuffix-v$versionName"
minSdkVersion AndroidConfig.minSdk
targetSdkVersion AndroidConfig.targetSdk
applicationIdSuffix pkgNameSuffix
versionCode extVersionCode
versionName project.ext.properties.getOrDefault("libVersion", "1.4") + ".$extVersionCode"
setProperty("archivesBaseName", "tachiyomi-$pkgNameSuffix-v$versionName")
def readmes = project.projectDir.listFiles({ File file ->
file.name == "README.md" || file.name == "CHANGELOG.md"
} as FileFilter)
def hasReadme = readmes != null && readmes.any { File file ->
file.name.startsWith("README")
}
def hasChangelog = readmes != null && readmes.any { File file ->
file.name.startsWith("CHANGELOG")
}
assert extClass.startsWith(".")
manifestPlaceholders = [
appName : "Tachiyomi: $extName",
extClass: extClass,
nsfw : project.ext.find("isNsfw") ? 1 : 0,
extFactory: project.ext.properties.getOrDefault("extFactory", ""),
nsfw: project.ext.properties.getOrDefault("isNsfw", false) ? 1 : 0,
hasReadme: hasReadme ? 1 : 0,
hasChangelog: hasChangelog ? 1 : 0,
]
String baseUrl = project.ext.find("baseUrl") ?: ""
if (theme != null && !baseUrl.isEmpty()) {
def split = baseUrl.split("://")
assert split.length == 2
def path = split[1].split("/")
manifestPlaceholders += [
SOURCEHOST : path[0],
SOURCESCHEME: split[0],
]
}
}
signingConfigs {
@ -64,7 +58,6 @@ android {
release {
signingConfig signingConfigs.release
minifyEnabled false
vcsInfo.include false
}
}
@ -73,11 +66,11 @@ android {
}
buildFeatures {
buildConfig true
}
packaging {
resources.excludes.add("kotlin-tooling-metadata.json")
// Disable unused AGP features
aidl false
renderScript false
resValues false
shaders false
}
compileOptions {
@ -99,28 +92,14 @@ android {
}
}
repositories {
mavenCentral()
}
dependencies {
if (theme != null) implementation(theme) // Overrides core launcher icons
implementation(project(":core"))
compileOnly(libs.bundles.common)
}
tasks.register("writeManifestFile") {
doLast {
def manifest = android.sourceSets.getByName("main").manifest
if (!manifest.srcFile.exists()) {
File tempFile = layout.buildDirectory.get().file("tempAndroidManifest.xml").getAsFile()
if (!tempFile.exists()) {
tempFile.withWriter {
it.write('<?xml version="1.0" encoding="utf-8"?>\n<manifest />\n')
}
}
manifest.srcFile(tempFile.path)
}
}
}
preBuild.dependsOn(writeManifestFile, lintKotlin)
if (System.getenv("CI") != "true") {
lintKotlin.dependsOn(formatKotlin)
}
preBuild.dependsOn(lintKotlin)
lintKotlin.dependsOn(formatKotlin)

View File

@ -6,7 +6,10 @@
<application android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:label="${appName}">
<meta-data android:name="tachiyomi.extension.class" android:value="${extClass}" />
<meta-data android:name="tachiyomi.extension.factory" android:value="${extFactory}" />
<meta-data android:name="tachiyomi.extension.nsfw" android:value="${nsfw}" />
<meta-data android:name="tachiyomi.extension.hasReadme" android:value="${hasReadme}" />
<meta-data android:name="tachiyomi.extension.hasChangelog" android:value="${hasChangelog}" />
</application>

View File

@ -9,8 +9,9 @@ android {
minSdk = AndroidConfig.minSdk
}
namespace = "eu.kanade.tachiyomi.extension.core"
namespace = "eu.kanade.tachiyomi.extension"
@Suppress("UnstableApiUsage")
sourceSets {
named("main") {
manifest.srcFile("AndroidManifest.xml")
@ -18,8 +19,9 @@ android {
}
}
buildFeatures {
resValues = false
shaders = false
libraryVariants.all {
generateBuildConfigProvider?.configure {
enabled = false
}
}
}

View File

@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx8000m
org.gradle.jvmargs=-Xmx6144m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
@ -21,9 +21,3 @@ org.gradle.caching=true
# Enable AndroidX dependencies
android.useAndroidX=true
android.enableBuildConfigAsBytecode=true
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false
org.gradle.configureondemand=true

View File

@ -4,7 +4,7 @@ coroutines_version = "1.6.4"
serialization_version = "1.4.0"
[libraries]
gradle-agp = { module = "com.android.tools.build:gradle", version = "8.6.1" }
gradle-agp = { module = "com.android.tools.build:gradle", version = "7.4.2" }
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin_version" }
gradle-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin_version" }
gradle-kotlinter = { module = "org.jmailen.gradle:kotlinter-gradle", version = "3.13.0" }
@ -18,7 +18,7 @@ kotlin-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", ver
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines_version" }
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines_version" }
injekt-core = { module = "com.github.null2264.injekt:injekt-core", version = "4135455a2a" }
injekt-core = { module = "com.github.inorichi.injekt:injekt-core", version = "65b0440" }
rxjava = { module = "io.reactivex:rxjava", version = "1.3.8" }
jsoup = { module = "org.jsoup:jsoup", version = "1.15.1" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "5.0.0-alpha.11" }

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

33
gradlew vendored
View File

@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@ -57,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@ -85,8 +83,10 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -133,13 +133,10 @@ location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@ -147,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@ -155,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -200,15 +197,11 @@ if "$cygwin" || "$msys" ; then
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \

22
gradlew.bat vendored
View File

@ -13,8 +13,6 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@ -45,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
@ -59,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity
android:name="eu.kanade.tachiyomi.multisrc.a3manga.A3MangaUrlActivity"
android:excludeFromRecents="true"
android:exported="true"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="${SOURCEHOST}" />
<data android:host="*.${SOURCEHOST}" />
<data android:pathPattern="/truyen-tranh/..*"
android:scheme="${SOURCESCHEME}" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,5 +0,0 @@
plugins {
id("lib-multisrc")
}
baseVersionCode = 3

View File

@ -1,5 +0,0 @@
plugins {
id("lib-multisrc")
}
baseVersionCode = 6

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity android:name="eu.kanade.tachiyomi.multisrc.blogtruyen.BlogTruyenUrlActivity"
android:excludeFromRecents="true"
android:exported="true"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="${SOURCEHOST}" />
<data android:host="m.${SOURCEHOST}" />
<data android:scheme="${SOURCESCHEME}" />
<data android:pathPattern="/tac-gia/..*" />
<data android:pathPattern="/nhom-dich/..*" />
<!--
Try to ensure that the passed URL is a chapter `c{id}` or a manga `{id}`, with `id`
being a number.
-->
<data android:pathPattern="/c1.*/..*" />
<data android:pathPattern="/c2.*/..*" />
<data android:pathPattern="/c3.*/..*" />
<data android:pathPattern="/c4.*/..*" />
<data android:pathPattern="/c5.*/..*" />
<data android:pathPattern="/c6.*/..*" />
<data android:pathPattern="/c7.*/..*" />
<data android:pathPattern="/c8.*/..*" />
<data android:pathPattern="/c9.*/..*" />
<data android:pathPattern="/1.*/..*" />
<data android:pathPattern="/2.*/..*" />
<data android:pathPattern="/3.*/..*" />
<data android:pathPattern="/4.*/..*" />
<data android:pathPattern="/5.*/..*" />
<data android:pathPattern="/6.*/..*" />
<data android:pathPattern="/7.*/..*" />
<data android:pathPattern="/8.*/..*" />
<data android:pathPattern="/9.*/..*" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,5 +0,0 @@
plugins {
id("lib-multisrc")
}
baseVersionCode = 4

View File

@ -1,393 +0,0 @@
package eu.kanade.tachiyomi.multisrc.blogtruyen
import android.util.Log
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.jsonArray
import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
import okhttp3.FormBody
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import rx.Single
import rx.schedulers.Schedulers
import uy.kohesive.injekt.injectLazy
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.TimeZone
abstract class BlogTruyen(
override val name: String,
override val baseUrl: String,
override val lang: String,
) : ParsedHttpSource() {
override val supportsLatest = true
override val client = network.cloudflareClient
override fun headersBuilder() = super.headersBuilder()
.add("Referer", "$baseUrl/")
private val json: Json by injectLazy()
private val dateFormat: SimpleDateFormat = SimpleDateFormat("dd/MM/yyyy HH:mm", Locale.US).apply {
timeZone = TimeZone.getTimeZone("Asia/Ho_Chi_Minh")
}
override fun popularMangaRequest(page: Int) =
GET("$baseUrl/ajax/Search/AjaxLoadListManga?key=tatca&orderBy=3&p=$page", headers)
override fun popularMangaParse(response: Response): MangasPage {
val document = response.asJsoup()
val manga = document.select(popularMangaSelector()).map {
val tiptip = it.attr("data-tiptip")
popularMangaFromElement(it, document.getElementById(tiptip)!!)
}
val hasNextPage = document.selectFirst(popularMangaNextPageSelector()) != null
return MangasPage(manga, hasNextPage)
}
override fun popularMangaSelector() = ".list .tiptip"
override fun popularMangaFromElement(element: Element) = throw UnsupportedOperationException()
private fun popularMangaFromElement(element: Element, tiptip: Element) = SManga.create().apply {
val anchor = element.selectFirst("a")!!
setUrlWithoutDomain(anchor.attr("href"))
title = anchor.text()
thumbnail_url = tiptip.selectFirst("img")?.absUrl("src")
description = tiptip.selectFirst(".al-j")?.text()
}
override fun popularMangaNextPageSelector() = ".paging:last-child:not(.current_page)"
override fun latestUpdatesRequest(page: Int): Request =
GET(baseUrl + if (page > 1) "/page-$page" else "", headers)
override fun latestUpdatesSelector() = ".storyitem .fl-l"
override fun latestUpdatesFromElement(element: Element): SManga = SManga.create().apply {
val anchor = element.selectFirst("a")!!
setUrlWithoutDomain(anchor.absUrl("href"))
title = anchor.attr("title")
thumbnail_url = element.selectFirst("img")?.absUrl("src")
}
override fun latestUpdatesNextPageSelector() = "select.slcPaging option:last-child:not([selected])"
override fun fetchSearchManga(
page: Int,
query: String,
filters: FilterList,
): Observable<MangasPage> = when {
query.startsWith(PREFIX_ID_SEARCH) -> {
var id = query.removePrefix(PREFIX_ID_SEARCH).trimStart()
// it's a chapter, resolve to manga ID
if (id.startsWith("c")) {
val document = client.newCall(GET("$baseUrl/$id", headers)).execute().asJsoup()
id = document.selectFirst(".breadcrumbs a:last-child")!!.attr("href").removePrefix("/")
}
fetchMangaDetails(
SManga.create().apply {
url = "/$id"
},
)
.map { MangasPage(listOf(it), false) }
}
else -> super.fetchSearchManga(page, query, filters)
}
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
ajaxSearchUrls.keys
.firstOrNull { query.startsWith(it) }
?.let {
val id = extractIdFromQuery(it, query)
val url = "$baseUrl/ajax/${ajaxSearchUrls[it]!!}".toHttpUrl().newBuilder()
.addQueryParameter("id", id)
.addQueryParameter("p", page.toString())
.build()
return GET(url, headers)
}
val url = "$baseUrl/timkiem/nangcao/1".toHttpUrl().newBuilder().apply {
if (query.isNotBlank()) {
addQueryParameter("txt", query)
}
if (page > 1) {
addQueryParameter("p", page.toString())
}
val inclGenres = mutableListOf<String>()
val exclGenres = mutableListOf<String>()
var status = 0
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
when (filter) {
is GenreList -> filter.state.forEach {
when (it.state) {
Filter.TriState.STATE_INCLUDE -> inclGenres.add(it.id)
Filter.TriState.STATE_EXCLUDE -> exclGenres.add(it.id)
else -> {}
}
}
is Author -> {
addQueryParameter("aut", filter.state)
}
is Scanlator -> {
addQueryParameter("gr", filter.state)
}
is Status -> {
status = filter.state
}
else -> {}
}
}
addPathSegment(status.toString())
addPathSegment(inclGenres.joinToString(",").ifEmpty { "-1" })
addPathSegment(exclGenres.joinToString(",").ifEmpty { "-1" })
}.build()
return GET(url, headers)
}
override fun searchMangaParse(response: Response): MangasPage {
val document = response.asJsoup()
val manga = document.select(searchMangaSelector()).map {
val tiptip = it.attr("data-tiptip")
searchMangaFromElement(it, document.getElementById(tiptip)!!)
}
val hasNextPage = document.selectFirst(searchMangaNextPageSelector()) != null
return MangasPage(manga, hasNextPage)
}
override fun searchMangaSelector() = popularMangaSelector()
override fun searchMangaFromElement(element: Element): SManga =
throw UnsupportedOperationException()
private fun searchMangaFromElement(element: Element, tiptip: Element) =
popularMangaFromElement(element, tiptip)
override fun searchMangaNextPageSelector() = ".pagination .glyphicon-step-forward"
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
val anchor = document.selectFirst(".entry-title a")!!
val descriptionBlock = document.selectFirst("div.description")!!
setUrlWithoutDomain(anchor.absUrl("href"))
title = getMangaTitle(document)
thumbnail_url = document.selectFirst(".thumbnail img")?.absUrl("src")
author = descriptionBlock.select("p:contains(Tác giả) a").joinToString { it.text() }
genre = descriptionBlock.select("span.category").joinToString { it.text() }
status = when (descriptionBlock.selectFirst("p:contains(Trạng thái) span.color-red")?.text()) {
"Đang tiến hành" -> SManga.ONGOING
"Đã hoàn thành" -> SManga.COMPLETED
"Tạm ngưng" -> SManga.ON_HIATUS
else -> SManga.UNKNOWN
}
description = buildString {
document.selectFirst(".manga-detail .detail .content")?.let {
// replace the facebook blockquote in synopsis with the link (if there is one)
it.selectFirst(".fb-page, .fb-group")?.let { fb ->
val link = fb.attr("data-href")
val node = document.createElement("p")
node.appendText(link)
fb.replaceWith(node)
}
appendLine(it.textWithNewlines().trim())
appendLine()
}
descriptionBlock.select("p:not(:contains(Thể loại)):not(:contains(Tác giả))")
.forEach { e ->
val text = e.text()
if (text.isBlank()) {
return@forEach
}
// Uploader and status share the same <p>
if (text.contains("Trạng thái")) {
appendLine(text.substringBefore("Trạng thái").trim())
return@forEach
}
// "Source", "Updaters" and "Scanlators" use badges with links
if (text.contains("Nguồn") ||
text.contains("Tham gia update") ||
text.contains("Nhóm dịch")
) {
val key = text.substringBefore(":")
val value = e.select("a").joinToString { el -> el.text() }
appendLine("$key: $value")
return@forEach
}
// Generic paragraphs i.e. view count and follower count for this series
// Basically the same trick as [Element.textWithNewlines], just applied to
// different elements.
e.select("a, span").append("\\n")
appendLine(
e.text()
.replace("\\n", "\n")
.replace("\n ", "\n")
.trim(),
)
}
}.trim()
}
override fun chapterListParse(response: Response): List<SChapter> {
val document = response.asJsoup()
val title = getMangaTitle(document)
return document.select(chapterListSelector()).map { chapterFromElement(it, title) }
}
override fun chapterListSelector() = "div.list-wrap > p"
override fun chapterFromElement(element: Element): SChapter = throw UnsupportedOperationException()
private fun chapterFromElement(element: Element, title: String): SChapter = SChapter.create().apply {
val anchor = element.select("span > a").first()!!
setUrlWithoutDomain(anchor.attr("href"))
name = anchor.text().removePrefix("$title ")
date_upload = runCatching {
dateFormat.parse(
element.selectFirst("span.publishedDate")!!.text(),
)!!.time
}.getOrDefault(0L)
}
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()
document.select(".content > img, #content > img").forEachIndexed { i, e ->
pages.add(Page(i, imageUrl = e.absUrl("src")))
}
// Some chapters use js script to render images
document.select("#content > script:containsData(listImageCaption)").lastOrNull()
?.let { script ->
val imagesStr = script.data().substringBefore(";").substringAfterLast("=").trim()
val imageArr = json.parseToJsonElement(imagesStr).jsonArray
imageArr.forEach {
val imageUrl = it.jsonObject["url"]!!.jsonPrimitive.content
pages.add(Page(pages.size, imageUrl = imageUrl))
}
}
runCatching { countView(document) }
return pages
}
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException()
override fun getFilterList(): FilterList {
val filters = mutableListOf<Filter<*>>(
Author(),
Scanlator(),
Status(),
)
val genres = getGenreList()
if (genres.isNotEmpty()) {
filters.add(GenreList(genres))
}
return FilterList(filters)
}
// copy([...document.querySelectorAll(".CategoryFilter li")].map((e) => `Genre("${e.textContent.trim()}", "${e.dataset.id}"),`).join("\n"))
open fun getGenreList(): List<Genre> = emptyList()
private class Status : Filter.Select<String>(
"Status",
arrayOf("Sao cũng được", "Đang tiến hành", "Đã hoàn thành", "Tạm ngưng"),
)
private class Author : Filter.Text("Tác giả")
private class Scanlator : Filter.Text("Nhóm dịch")
class Genre(name: String, val id: String) : Filter.TriState(name)
private class GenreList(genres: List<Genre>) : Filter.Group<Genre>("Thể loại", genres)
private fun getMangaTitle(document: Document) =
document
.selectFirst(".entry-title a")!!
.attr("title")
.removePrefix("truyện tranh ")
private fun Element.textWithNewlines() = run {
select("p, br").prepend("\\n")
text().replace("\\n", "\n").replace("\n ", "\n")
}
private fun extractIdFromQuery(prefix: String, query: String): String =
query.substringAfter(prefix).trimStart().substringAfterLast("-")
private fun countView(document: Document) {
val mangaId = document.getElementById("MangaId")!!.attr("value")
val chapterId = document.getElementById("ChapterId")!!.attr("value")
val request = POST(
"$baseUrl/Chapter/UpdateView",
headers,
FormBody.Builder()
.add("mangaId", mangaId)
.add("chapterId", chapterId)
.build(),
)
Single.fromCallable {
try {
client.newCall(request).execute().close()
} catch (e: Exception) {
Log.e("BlogTruyen", "Error updating view count", e)
}
}
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.subscribe()
}
private val ajaxSearchUrls: Map<String, String> = mapOf(
PREFIX_AUTHOR_SEARCH to "Author/AjaxLoadMangaByAuthor?orderBy=3",
PREFIX_TEAM_SEARCH to "TranslateTeam/AjaxLoadMangaByTranslateTeam",
)
companion object {
internal const val PREFIX_ID_SEARCH = "id:"
internal const val PREFIX_AUTHOR_SEARCH = "author:"
internal const val PREFIX_TEAM_SEARCH = "team:"
}
}

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity
android:name="eu.kanade.tachiyomi.multisrc.colamanga.ColaMangaUrlActivity"
android:excludeFromRecents="true"
android:exported="true"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="${SOURCEHOST}"
android:scheme="${SOURCESCHEME}"
android:pathPattern="/manga-..*/" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,9 +0,0 @@
plugins {
id("lib-multisrc")
}
baseVersionCode = 5
dependencies {
api(project(":lib:synchrony"))
}

Some files were not shown because too many files have changed in this diff Show More