mirror of
https://github.com/tachiyomiorg/website.git
synced 2024-05-29 05:38:49 +02:00
Compare commits
8 Commits
8502bfc2b6
...
fa3c78d984
Author | SHA1 | Date | |
---|---|---|---|
|
fa3c78d984 | ||
|
650ee07fb0 | ||
|
a89f1f1396 | ||
|
567daf87d0 | ||
|
764e524074 | ||
|
0118fb868d | ||
|
64135597a6 | ||
|
2c8675bd22 |
|
@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at the Tachiyomi [Discord server](https://discord.gg/tachiyomi). All
|
||||
reported by contacting the project team in the issues. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
<p align="center">Discover and read manga, webtoons, comics, and more – easier than ever on your Android device.</p>
|
||||
|
||||
<p align="center">
|
||||
<a title="Discord server" href="https://discord.gg/tachiyomi">
|
||||
<img src="https://img.shields.io/discord/349436576037732353.svg?label=&labelColor=6A7EC2&color=7389D8&logo=discord&logoColor=FFFFFF">
|
||||
</a>
|
||||
<a title="GitHub downloads" href="https://github.com/tachiyomiorg/tachiyomi/releases">
|
||||
<img src="https://img.shields.io/github/downloads/tachiyomiorg/tachiyomi/total?label=downloads&labelColor=27303D&color=0D1117&logo=github&logoColor=FFFFFF&style=flat">
|
||||
</a>
|
||||
|
@ -35,7 +32,6 @@
|
|||
</p>
|
||||
|
||||
<p align="center">Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.</p>
|
||||
<p align="center">If you got any questions, join our <a target="_blank" href="https://discord.gg/tachiyomi">Discord server</a>.</p>
|
||||
|
||||
<h3 align="center">Repositories</h3>
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import type { DefaultTheme } from 'vitepress'
|
||||
|
||||
const nav: DefaultTheme.NavItem[] = [
|
||||
{
|
||||
text: 'Tachiyomi is no longer supported',
|
||||
link: '/news/2024-01-13-goodbye',
|
||||
},
|
||||
{
|
||||
text: 'Get v{app_version}',
|
||||
activeMatch: '^/*?(download|changelogs)/*?$',
|
||||
|
|
|
@ -4,7 +4,6 @@ const sidebar: DefaultTheme.SidebarMulti = {
|
|||
'/download/': defaultSidebar(),
|
||||
'/extensions/': defaultSidebar(),
|
||||
'/docs/': defaultSidebar(),
|
||||
'/forks/': defaultSidebar(),
|
||||
'/changelogs/': defaultSidebar(),
|
||||
'/news/': defaultSidebar(),
|
||||
'/sandbox/': defaultSidebar(),
|
||||
|
@ -26,14 +25,6 @@ function defaultSidebar(): DefaultTheme.SidebarItem[] {
|
|||
text: 'Changelogs',
|
||||
link: '/changelogs/',
|
||||
},
|
||||
{
|
||||
text: 'Forks',
|
||||
link: '/forks/',
|
||||
},
|
||||
{
|
||||
text: 'Contribute',
|
||||
link: '/docs/contribute',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -96,6 +87,28 @@ function defaultSidebar(): DefaultTheme.SidebarItem[] {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Creating extensions',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: 'Prerequisites',
|
||||
link: '/docs/guides/creating-extensions/prerequisites',
|
||||
},
|
||||
{
|
||||
text: 'Writing an extension',
|
||||
link: '/docs/guides/creating-extensions/writing',
|
||||
},
|
||||
{
|
||||
text: 'Compiling and running',
|
||||
link: '/docs/guides/creating-extensions/compiling',
|
||||
},
|
||||
{
|
||||
text: 'Signing and releasing',
|
||||
link: '/docs/guides/creating-extensions/signing',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Source migration',
|
||||
link: '/docs/guides/source-migration',
|
||||
|
|
|
@ -21,11 +21,6 @@ const themeConfig: DefaultTheme.Config = {
|
|||
link: 'https://github.com/tachiyomiorg/tachiyomi',
|
||||
ariaLabel: 'Project GitHub',
|
||||
},
|
||||
{
|
||||
icon: 'discord',
|
||||
link: 'https://discord.gg/tachiyomi',
|
||||
ariaLabel: 'Discord Server',
|
||||
},
|
||||
{
|
||||
icon: 'x',
|
||||
link: 'https://twitter.com/tachiyomiorg',
|
||||
|
|
|
@ -24,6 +24,6 @@ export default createContentLoader('news/*.md', {
|
|||
url,
|
||||
},
|
||||
)
|
||||
.sort((a, b) => b.date.toString().localeCompare(a.date.toString()))
|
||||
.sort((a, b) => a.date.toString().localeCompare(b.date.toString()))
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,203 +0,0 @@
|
|||
// Assign theme color
|
||||
$themeColor = #ffcc4d
|
||||
|
||||
.page-tachiyomi-az {
|
||||
.VPHero {
|
||||
h1 {
|
||||
.clip {
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.VPButton {
|
||||
&.brand {
|
||||
border-color: var(--vp-button-brand-border)
|
||||
color: var(--vp-button-brand-text)
|
||||
background-color: var(--vp-button-brand-bg)
|
||||
}
|
||||
}
|
||||
|
||||
.image-bg {
|
||||
display: none
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: alpha($themeColor, 0.2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Colors
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root .page-tachiyomi-az {
|
||||
--vp-c-brand: $themeColor
|
||||
--vp-c-brand-light: tint($themeColor, 20%)
|
||||
--vp-c-brand-lighter: tint($themeColor, 40%)
|
||||
--vp-c-brand-lightest: tint($themeColor, 60%)
|
||||
--vp-c-brand-dark: shade($themeColor, 25%)
|
||||
--vp-c-brand-darker: shade($themeColor, 50%)
|
||||
--vp-c-brand-darkest: shade($themeColor, 75%)
|
||||
--vp-c-brand-dimm: alpha($themeColor, 0.08)
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root .page-tachiyomi-az {
|
||||
--vp-button-brand-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-text: var(--vp-c-black)
|
||||
--vp-button-brand-bg: var(--vp-c-brand)
|
||||
--vp-button-brand-hover-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-hover-text: var(--vp-c-black)
|
||||
--vp-button-brand-hover-bg: var(--vp-c-brand-light)
|
||||
--vp-button-brand-active-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-active-text: var(--vp-c-black)
|
||||
--vp-button-brand-active-bg: var(--vp-button-brand-bg)
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Dumb
|
||||
* -------------------------------------------------------------------------- */
|
||||
@font-face {
|
||||
font-family: 'Comic Sans MS'
|
||||
src: url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.eot')
|
||||
src: url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.eot?#iefix') format('embedded-opentype'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.woff2') format('woff2'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.woff') format('woff'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.ttf') format('truetype'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.svg#Comic Sans MS') format('svg')
|
||||
}
|
||||
|
||||
.azContainer {
|
||||
width: 100%
|
||||
overflow: hidden
|
||||
|
||||
.azMarquee {
|
||||
display: inline-block
|
||||
overflow: hidden
|
||||
white-space: nowrap
|
||||
animation: marquee 10s linear infinite
|
||||
padding-left: 100%
|
||||
|
||||
.azWiggleText {
|
||||
padding: 2em
|
||||
width: fit-content
|
||||
animation: wiggleAnimation 1s ease-out infinite
|
||||
|
||||
&:hover {
|
||||
animation: barrelRollAnimation 0.6s
|
||||
}
|
||||
|
||||
.azText {
|
||||
font-family: 'Comic Sans MS', 'Comic Sans', cursive
|
||||
font-size: 2em
|
||||
display: inline-block
|
||||
-webkit-text-stroke: 1px black
|
||||
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000
|
||||
animation: rainbowTextColorAnimation 0.5s linear infinite, scaleXTextAnimation 2s infinite
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes marquee {
|
||||
0% {
|
||||
transform: translate(0, 0)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate(-100%, 0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes barrelRollAnimation {
|
||||
from {
|
||||
transform: rotate(0)
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wiggleAnimation {
|
||||
0% {
|
||||
transform: rotate(0)
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: rotate(-15deg)
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: rotate(0)
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: rotate(15deg)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes scaleXTextAnimation {
|
||||
0% {
|
||||
transform: scaleX(0.5) scaleY(0.5)
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scaleX(1) scaleY(1)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scaleX(0.5) scaleY(0.5)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rainbowTextColorAnimation {
|
||||
0% {
|
||||
color: hsl(0, 100%, 50%)
|
||||
}
|
||||
|
||||
10% {
|
||||
color: hsl(36, 100%, 50%)
|
||||
}
|
||||
|
||||
20% {
|
||||
color: hsl(72, 100%, 50%)
|
||||
}
|
||||
|
||||
30% {
|
||||
color: hsl(108, 100%, 50%)
|
||||
}
|
||||
|
||||
40% {
|
||||
color: hsl(144, 100%, 50%)
|
||||
}
|
||||
|
||||
50% {
|
||||
color: hsl(180, 100%, 50%)
|
||||
}
|
||||
|
||||
60% {
|
||||
color: hsl(216, 100%, 50%)
|
||||
}
|
||||
|
||||
70% {
|
||||
color: hsl(252, 100%, 50%)
|
||||
}
|
||||
|
||||
80% {
|
||||
color: hsl(288, 100%, 50%)
|
||||
}
|
||||
|
||||
90% {
|
||||
color: hsl(324, 100%, 50%)
|
||||
}
|
||||
|
||||
100% {
|
||||
color: hsl(360, 100%, 50%)
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
// Assign theme color
|
||||
$themeColor = #0952af
|
||||
|
||||
.page-tachiyomi-j2k {
|
||||
.VPHero {
|
||||
h1 {
|
||||
.clip {
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.VPButton {
|
||||
&.brand {
|
||||
border-color: var(--vp-button-brand-border)
|
||||
color: var(--vp-button-brand-text)
|
||||
background-color: var(--vp-button-brand-bg)
|
||||
}
|
||||
}
|
||||
|
||||
.image-bg {
|
||||
display: none
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: alpha($themeColor, 0.2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Colors
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root .page-tachiyomi-j2k {
|
||||
--vp-c-brand: $themeColor
|
||||
--vp-c-brand-light: tint($themeColor, 20%)
|
||||
--vp-c-brand-lighter: tint($themeColor, 40%)
|
||||
--vp-c-brand-lightest: tint($themeColor, 60%)
|
||||
--vp-c-brand-dark: shade($themeColor, 25%)
|
||||
--vp-c-brand-darker: shade($themeColor, 50%)
|
||||
--vp-c-brand-darkest: shade($themeColor, 75%)
|
||||
--vp-c-brand-dimm: alpha($themeColor, 0.08)
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root .page-tachiyomi-j2k {
|
||||
--vp-button-brand-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-text: var(--vp-c-white)
|
||||
--vp-button-brand-bg: var(--vp-c-brand)
|
||||
--vp-button-brand-hover-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-hover-text: var(--vp-c-white)
|
||||
--vp-button-brand-hover-bg: var(--vp-c-brand-light)
|
||||
--vp-button-brand-active-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-active-text: var(--vp-c-white)
|
||||
--vp-button-brand-active-bg: var(--vp-button-brand-bg)
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
// Assign theme color
|
||||
$themeColor = #ce2828
|
||||
|
||||
.page-tachiyomi-sy {
|
||||
.VPHero {
|
||||
h1 {
|
||||
.clip {
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.VPButton {
|
||||
&.brand {
|
||||
border-color: var(--vp-button-brand-border)
|
||||
color: var(--vp-button-brand-text)
|
||||
background-color: var(--vp-button-brand-bg)
|
||||
}
|
||||
}
|
||||
|
||||
.image-bg {
|
||||
display: none
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: alpha($themeColor, 0.2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Colors
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root .page-tachiyomi-sy {
|
||||
--vp-c-brand: $themeColor
|
||||
--vp-c-brand-light: tint($themeColor, 20%)
|
||||
--vp-c-brand-lighter: tint($themeColor, 40%)
|
||||
--vp-c-brand-lightest: tint($themeColor, 60%)
|
||||
--vp-c-brand-dark: shade($themeColor, 25%)
|
||||
--vp-c-brand-darker: shade($themeColor, 50%)
|
||||
--vp-c-brand-darkest: shade($themeColor, 75%)
|
||||
--vp-c-brand-dimm: alpha($themeColor, 0.08)
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root .page-tachiyomi-sy {
|
||||
--vp-button-brand-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-text: var(--vp-c-white)
|
||||
--vp-button-brand-bg: var(--vp-c-brand)
|
||||
--vp-button-brand-hover-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-hover-text: var(--vp-c-white)
|
||||
--vp-button-brand-hover-bg: var(--vp-c-brand-light)
|
||||
--vp-button-brand-active-border: var(--vp-c-brand-light)
|
||||
--vp-button-brand-active-text: var(--vp-c-white)
|
||||
--vp-button-brand-active-bg: var(--vp-button-brand-bg)
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
title: Contribute
|
||||
description: Find out how to help translate or build the app and extensions.
|
||||
---
|
||||
|
||||
# Contribute
|
||||
Find out how to help translate or build the app and extensions.
|
||||
|
||||
## Code
|
||||
Know how to code and want to improve something or you generally want to support the creation of the app?
|
||||
|
||||
[![tachiyomiorg/tachiyomi - GitHub](https://gh-card.dev/repos/tachiyomiorg/tachiyomi.svg)](https://github.com/tachiyomiorg/tachiyomi)
|
||||
|
||||
[![tachiyomiorg/extensions - GitHub](https://gh-card.dev/repos/tachiyomiorg/extensions.svg)](https://github.com/tachiyomiorg/extensions)
|
||||
|
||||
[![tachiyomiorg/website - GitHub](https://gh-card.dev/repos/tachiyomiorg/website.svg)](https://github.com/tachiyomiorg/website)
|
||||
|
||||
## Translation
|
||||
![Translation stats](https://hosted.weblate.org/widget/tachiyomi/strings/287x66-grey.png)
|
||||
|
||||
![Translation progress](https://hosted.weblate.org/widget/tachiyomi/strings/horizontal-auto.svg)
|
||||
|
||||
Want to help translate the app to your language? You can easily help by utilizing a service we use called **Weblate**.
|
||||
|
||||
### Helpful links
|
||||
* [Translators guide](https://docs.weblate.org/en/latest/user/translating.html)
|
||||
* [Secondary languages](https://docs.weblate.org/en/latest/user/profile.html#secondary-languages)
|
||||
* [Subscriptions](https://docs.weblate.org/en/latest/user/profile.html#subscriptions)
|
||||
* [Glossary](https://docs.weblate.org/en/latest/user/translating.html#glossary)
|
||||
|
||||
## Donation
|
||||
If you're unable to contribute code nor translations but still wish to help, then you can choose to contribute directly to the projects founder [Inorichi](https://github.com/inorichi/) using [Ko-fi](https://ko-fi.com/inorichi).
|
|
@ -72,4 +72,4 @@ Refer to [this GitHub comment](https://github.com/tachiyomiorg/tachiyomi/issues/
|
|||
Projects using the **Tachiyomi** name for anime streaming aren't affiliated with the main project.
|
||||
|
||||
## What's a fork?
|
||||
Forks are alternate **Tachiyomi** versions with distinct features. Get more details [here](/forks/).
|
||||
Forks are alternate **Tachiyomi** versions with distinct features managed by other developers.
|
||||
|
|
|
@ -77,21 +77,4 @@ Users who are familiar with [FolderSync](https://play.google.com/store/apps/deta
|
|||
or [Tasker](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) can setup auto sync of their backups similarly.
|
||||
|
||||
## Additional information for forks
|
||||
|
||||
::: warning
|
||||
This section explores some extra details regarding [forks](/forks/).
|
||||
:::
|
||||
|
||||
All [endorsed Tachiyomi forks](/forks/) support the `.tachibk`/`.proto.gz` format to backup/restore your library.
|
||||
|
||||
In addition, some forks have specific limitations regarding backup restoration:
|
||||
|
||||
- All forks have fork-specific settings and changes that might be saved in Backups.
|
||||
Such settings are not restored in original Tachiyomi and will get lost when creating a new backup.
|
||||
> For Example: [TachiyomiSY](/forks/TachiyomiSY/) has the option to backup/restore saved searches.
|
||||
|
||||
These will **NOT** be restored to original Tachiyomi or its forks.
|
||||
- Only [TachiyomiAZ](/forks/TachiyomiAZ/) supports creating/restoring both legacy `.json` backups and `.proto.gz` backups.
|
||||
> Users are recommended to update their `.json` backups to use the improved and efficient `.tachibk`/`.proto.gz` backups.
|
||||
|
||||
Be aware of these limitations when dealing with backups in different **Tachiyomi** forks.
|
||||
Most Tachiyomi forks support the `.tachibk`/`.proto.gz` format to backup/restore your library, but have specific limitations. Refer to their documentation for more information.
|
||||
|
|
134
website/src/docs/guides/creating-extensions/compiling.md
Normal file
134
website/src/docs/guides/creating-extensions/compiling.md
Normal file
|
@ -0,0 +1,134 @@
|
|||
---
|
||||
title: Compiling and running
|
||||
titleTemplate: Creating extensions - Guides
|
||||
description: Compile and run own Tachiyomi extension.
|
||||
---
|
||||
|
||||
# Compiling and running
|
||||
|
||||
## Running
|
||||
|
||||
To make local development more convenient, you can use the following run configuration to launch **Tachiyomi** directly at the Browse panel:
|
||||
|
||||
![Browse panel](/docs/guides/creating-extensions/compiling/BrowsePanel.webp =801x394)
|
||||
|
||||
If you're running a Preview or debug build of **Tachiyomi**:
|
||||
|
||||
```bash
|
||||
-W -S -n eu.kanade.tachiyomi.debug/eu.kanade.tachiyomi.ui.main.MainActivity -a eu.kanade.tachiyomi.SHOW_CATALOGUES
|
||||
```
|
||||
|
||||
And for a release build of **Tachiyomi**:
|
||||
|
||||
```bash
|
||||
-W -S -n eu.kanade.tachiyomi/eu.kanade.tachiyomi.ui.main.MainActivity -a eu.kanade.tachiyomi.SHOW_CATALOGUES
|
||||
```
|
||||
::: warning IMPORTANT
|
||||
If you're deploying to Android 11 or higher, enable the "Always install with package manager" option in the run configurations.
|
||||
Without this option enabled, you might face issues such as **Android Studio** running an older version of the extension without the modifications you might have done.
|
||||
:::
|
||||
|
||||
## Debugging
|
||||
|
||||
### Android Debugger
|
||||
|
||||
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.
|
||||
|
||||
Instead, once you've built and installed your extension on the target device, use `Attach Debugger to Android Process` to start debugging **Tachiyomi**.
|
||||
|
||||
![Android Debugger](/docs/guides/creating-extensions/compiling/AndroidDebugger.webp =532x474)
|
||||
|
||||
### Logs
|
||||
|
||||
You can also elect to simply rely on logs printed from your extension, which
|
||||
show up in the [`Logcat`](https://developer.android.com/studio/debug/am-logcat) panel of **Android Studio**.
|
||||
|
||||
### 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.
|
||||
|
||||
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 <nav to="advanced"> and confirm that **Verbose logging** is enabled. 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.
|
||||
|
||||
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.
|
||||
|
||||
### 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`.
|
||||
|
||||
#### 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 bellow.
|
||||
|
||||
```bash
|
||||
Install the tool.
|
||||
$ sudo pip3 install mitmproxy
|
||||
Execute the web interface and the proxy.
|
||||
$ mitmweb
|
||||
```
|
||||
|
||||
Alternatively, you can also use the Docker image:
|
||||
|
||||
```bash
|
||||
$ docker run --rm -it -p 8080:8080 \
|
||||
-p 127.0.0.1:8081:8081 \
|
||||
--web-host 0.0.0.0 \
|
||||
mitmproxy/mitmproxy mitmweb
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```kotlin
|
||||
package eu.kanade.tachiyomi.extension.en.mysource
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import okhttp3.OkHttpClient
|
||||
import java.net.InetSocketAddress
|
||||
import java.net.Proxy
|
||||
import java.security.SecureRandom
|
||||
import java.security.cert.X509Certificate
|
||||
import javax.net.ssl.SSLContext
|
||||
import javax.net.ssl.TrustManager
|
||||
import javax.net.ssl.X509TrustManager
|
||||
|
||||
class MySource : HttpSource() {
|
||||
private fun OkHttpClient.Builder.ignoreAllSSLErrors(): OkHttpClient.Builder {
|
||||
val naiveTrustManager = @SuppressLint("CustomX509TrustManager")
|
||||
object : X509TrustManager {
|
||||
override fun getAcceptedIssuers(): Array<X509Certificate> = emptyArray()
|
||||
override fun checkClientTrusted(certs: Array<X509Certificate>, authType: String) = Unit
|
||||
override fun checkServerTrusted(certs: Array<X509Certificate>, authType: String) = Unit
|
||||
}
|
||||
|
||||
val insecureSocketFactory = SSLContext.getInstance("TLSv1.2").apply {
|
||||
val trustAllCerts = arrayOf<TrustManager>(naiveTrustManager)
|
||||
init(null, trustAllCerts, SecureRandom())
|
||||
}.socketFactory
|
||||
|
||||
sslSocketFactory(insecureSocketFactory, naiveTrustManager)
|
||||
hostnameVerifier { _, _ -> true }
|
||||
return this
|
||||
}
|
||||
|
||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||
.ignoreAllSSLErrors()
|
||||
.proxy(Proxy(Proxy.Type.HTTP, InetSocketAddress("10.0.2.2", 8080)))
|
||||
.build()
|
||||
}
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
## Building
|
||||
|
||||
APKs can be created in **Android Studio** via `Build > Build Bundle(s) / APK(s) > Build APK(s)` or `Build > Generate Signed Bundle / APK`.
|
23
website/src/docs/guides/creating-extensions/prerequisites.md
Normal file
23
website/src/docs/guides/creating-extensions/prerequisites.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: Prerequisites
|
||||
titleTemplate: Creating extensions - Guides
|
||||
description: Prerequisites to creating your own Tachiyomi extensions.
|
||||
---
|
||||
|
||||
# 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.
|
||||
|
||||
- Basic [Android development](https://developer.android.com/)
|
||||
- [Kotlin](https://kotlinlang.org/)
|
||||
- Web scraping
|
||||
- [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML)
|
||||
- [CSS selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)
|
||||
- [OkHttp](https://square.github.io/okhttp/)
|
||||
- [JSoup](https://jsoup.org/)
|
||||
|
||||
## Tools
|
||||
|
||||
- [Android Studio](https://developer.android.com/studio)
|
||||
- Emulator or phone with developer options enabled and a recent version of Tachiyomi installed
|
||||
- [Icon Generator](https://as280093.github.io/AndroidAssetStudio/icons-launcher.html)
|
99
website/src/docs/guides/creating-extensions/signing.md
Normal file
99
website/src/docs/guides/creating-extensions/signing.md
Normal file
|
@ -0,0 +1,99 @@
|
|||
---
|
||||
title: Signing and releasing
|
||||
titleTemplate: Creating extensions - Guides
|
||||
description: Signing and releasing the repository
|
||||
---
|
||||
|
||||
# Signing and releasing
|
||||
|
||||
To setup the GitHub actions to automatically release new extensions on every push, you will need to setup a signing key.
|
||||
To do that, you need to create one first.
|
||||
|
||||
## Creating a signing key
|
||||
|
||||
The following steps will guide you into creating a key.
|
||||
|
||||
1. On Android Studio, open **Build → Generate Signed Bundle or APK**. Under the new screen, choose the **APK** option and click **Next**.
|
||||
2. Click on **Create new…** under the **Key store path** field.
|
||||
3. Fill up the required fields in the **New Key Store** window.
|
||||
|
||||
The fields under the Certificate section are optional, but you will need to fill at least one of them.
|
||||
4. Click **OK** and it will create the signing key at the path choosen at the **Key store path** field.
|
||||
5. You can close the **Generate Signed Bundle or APK** window as it will not be used anymore.
|
||||
|
||||
::: tip
|
||||
Make sure to remember the given values of **Password**, **Alias** and **Key Password** as they will be needed later.
|
||||
:::
|
||||
|
||||
::: danger Caution
|
||||
Make sure to not use any special characters such as `@` or `!` under any of the passwords, otherwise it will lead to the generation of broken keys.
|
||||
:::
|
||||
|
||||
## Configuring the GitHub actions
|
||||
|
||||
This section will guide you into setting up the secrets needed for the build and also some options you need to change under the repository settings.
|
||||
|
||||
### Adding the secrets
|
||||
|
||||
All secrets depends on a generated signed key which was described in the previous section.
|
||||
|
||||
1. In your repository on GitHub, open the **Settings** tab and navigate to **Secrets and variables → Actions**.
|
||||
2. Under the **Secrets** tab, you will need to create four secrets by following the table below.
|
||||
|
||||
- `ALIAS`: The value of the key alias;
|
||||
- `KEY_PASSWORD`: The main password of the key;
|
||||
- `KEY_STORE_PASSWORD`: The password of the key store;
|
||||
- `SIGNING_KEY`: Base-64 representation of the key `.jks` file content;
|
||||
|
||||
#### Creating the Base-64 representation
|
||||
|
||||
Under a terminal window in the path of the key, you can use the following command to convert the key and copy the value.
|
||||
|
||||
```bash
|
||||
base64 signingkey.jks | tr -d \\n | xclip -selection c
|
||||
```
|
||||
|
||||
The previous command depends on `xclip` installed to copy the contents of the conversion to the clipboard, but you can replace that last part with any other similar tool.
|
||||
|
||||
:::warning Caution
|
||||
Make sure your copied value doesn't have any trailing whitespace while pasting the value under GitHub.
|
||||
:::
|
||||
|
||||
### Enabling Actions read and write permission
|
||||
|
||||
The workflows will need write permissions to commit to the `repo` branch.
|
||||
|
||||
1. Under the repository Settings on GitHub, navigate to **Actions → General**.
|
||||
2. Choose the **Read and write permissions** option on the **Workflow permissions** section and click **Save**.
|
||||
|
||||
### Creating an empty `repo` branch
|
||||
|
||||
If your repository doesn't already have a `repo` branch, you will need to create it.
|
||||
|
||||
To create you can follow the standard flow of creating a `branch` named `repo` and then proceed by deleting all repository files (except the `.git`) folder and then commiting and pushing to GitHub.
|
||||
|
||||
### Changing the checks in the workflow
|
||||
|
||||
If your repository is forked or cloned from the official extensions repository, you will need to change two checks under the `.github/workflows/build_push.yml` file.
|
||||
|
||||
<!-- eslint-disable-next-line -->
|
||||
```yml
|
||||
- name: Upload APKs
|
||||
uses: actions/upload-artifact@v4
|
||||
if: "github.repository == 'tachiyomiorg/extensions'" # [!code --]
|
||||
if: "github.repository == '[user]/[repository]'" # [!code ++]
|
||||
```
|
||||
|
||||
<!-- eslint-disable-next-line -->
|
||||
```yml
|
||||
publish_repo:
|
||||
name: Publish repo
|
||||
needs:
|
||||
- build_individual
|
||||
if: "github.repository == 'tachiyomiorg/extensions'" # [!code --]
|
||||
if: "github.repository == '[user]/[repository]'" # [!code ++]
|
||||
```
|
||||
|
||||
### Finishing up
|
||||
|
||||
If all is configured correctly, GitHub should run the workflow whenever there's a new commit pushed to the `main` branch which will build the extensions APKs and release it through the `repo` branch by creating the needed structure.
|
310
website/src/docs/guides/creating-extensions/writing.md
Normal file
310
website/src/docs/guides/creating-extensions/writing.md
Normal file
|
@ -0,0 +1,310 @@
|
|||
---
|
||||
title: Writing an extension
|
||||
titleTemplate: Creating extensions - Guides
|
||||
description: Create your own Tachiyomi extensions.
|
||||
---
|
||||
|
||||
# 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.
|
||||
|
||||
## 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.
|
||||
|
||||
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 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.
|
||||
|
||||
### Extension file structure
|
||||
|
||||
The simplest extension structure looks like this:
|
||||
|
||||
```bash
|
||||
$ tree src/<lang>/<mysourcename>/
|
||||
src/<lang>/<mysourcename>/
|
||||
├── AndroidManifest.xml
|
||||
├── build.gradle
|
||||
├── res
|
||||
│ ├── mipmap-hdpi
|
||||
│ │ └── ic_launcher.png
|
||||
│ ├── mipmap-mdpi
|
||||
│ │ └── ic_launcher.png
|
||||
│ ├── mipmap-xhdpi
|
||||
│ │ └── ic_launcher.png
|
||||
│ ├── mipmap-xxhdpi
|
||||
│ │ └── ic_launcher.png
|
||||
│ ├── mipmap-xxxhdpi
|
||||
│ │ └── ic_launcher.png
|
||||
│ └── web_hi_res_512.png
|
||||
└── src
|
||||
└── eu
|
||||
└── kanade
|
||||
└── tachiyomi
|
||||
└── extension
|
||||
└── <lang>
|
||||
└── <mysourcename>
|
||||
└── <MySourceName>.kt
|
||||
|
||||
13 directories, 9 files
|
||||
```
|
||||
|
||||
### AndroidManifest.xml
|
||||
A minimal [Android manifest file](https://developer.android.com/guide/topics/manifest/manifest-intro) is needed for Android to recognize an 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:
|
||||
|
||||
```kotlin
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
ext {
|
||||
extName = '<My source name>'
|
||||
pkgNameSuffix = '<lang>.<mysourcename>'
|
||||
extClass = '.<MySourceName>'
|
||||
extVersionCode = 1
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
```
|
||||
|
||||
| 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 `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/main/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/tachiyomiorg/extensions/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/).
|
||||
|
||||
```kotlin
|
||||
dependencies {
|
||||
implementation(project(':lib-dataimage'))
|
||||
}
|
||||
```
|
||||
|
||||
### i18n library
|
||||
|
||||
[`lib-i18n`](https://github.com/tachiyomiorg/extensions/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.
|
||||
|
||||
```kotlin
|
||||
dependencies {
|
||||
implementation(project(':lib-i18n'))
|
||||
}
|
||||
```
|
||||
|
||||
### 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/main/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.
|
||||
|
||||
> [!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).
|
||||
|
||||
## 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`.
|
||||
|
||||
| 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. |
|
||||
|
||||
### 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. |
|
||||
|
||||
## Extension call flow
|
||||
|
||||
### Popular Manga
|
||||
|
||||
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).
|
||||
|
||||
### Latest Manga
|
||||
|
||||
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`.
|
||||
- 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/main/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`. |
|
||||
|
||||
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`:
|
||||
|
||||
```kotlin
|
||||
open class UriPartFilter(displayName: String, private val vals: Array<Pair<String, String>>) :
|
||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||
fun toUriPart() = vals[state].second
|
||||
}
|
||||
```
|
||||
|
||||
### Manga Details
|
||||
|
||||
- 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.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/main/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.
|
||||
- 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.
|
||||
|
||||
```kotlin
|
||||
private fun parseDate(dateStr: String): Long {
|
||||
return runCatching { DATE_FORMATTER.parse(dateStr)?.time }
|
||||
.getOrNull() ?: 0L
|
||||
}
|
||||
|
||||
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.
|
||||
- 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.
|
||||
- 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.
|
||||
- `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.
|
||||
- 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`.
|
||||
- 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("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.)
|
||||
|
||||
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.
|
||||
|
||||
```bash
|
||||
adb shell am start -d "<your-link>" -a android.intent.action.VIEW
|
||||
```
|
||||
::: warning CAUTION
|
||||
The activity does not support any Kotlin Intrinsics specific methods or calls, and using them will causes crashes in the activity.
|
||||
Consider using Java's equivalent methods instead, such as using `String`'s `equals()` instead of using `==`.
|
||||
|
||||
You can use Kotlin Intrinsics in the extension source class, this limitation only applies to the activity classes.
|
||||
:::
|
||||
|
||||
### 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.
|
||||
|
||||
- `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.
|
||||
|
||||
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/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.
|
||||
|
||||
::: warning 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 `id` also needs to be explicity set to the old value if you're changing the `lang` attribute.
|
||||
|
||||
::: info NOTE
|
||||
If the source has also changed their theme you can instead just change the `name` field in the source class and in the Gradle file.
|
||||
By doing so a new `id` will be generated and users will be forced to migrate.
|
||||
:::
|
|
@ -20,8 +20,6 @@ You will need to remove these manually with a file manager.
|
|||
|
||||
## Migration guide
|
||||
|
||||
::::tabs
|
||||
==Tachiyomi
|
||||
### Migrating from Series
|
||||
|
||||
1. Tap into the **Series** you would like to migrate.
|
||||
|
@ -41,60 +39,3 @@ You will need to remove these manually with a file manager.
|
|||
> **Tachiyomi** will do a global search of all the sources you have installed and enabled.
|
||||
1. Select the **Source** you'd like to migrate _to_ by tapping the **Series** thumbnail.
|
||||
1. Choose which data you want to transfer over, and you're done.
|
||||
|
||||
==TachiyomiJ2K
|
||||
### Migrating multiple Series
|
||||
|
||||
1. Tap **Settings** -> **Sources** -> **Source migration**.
|
||||
1. Select the **Source** you'd like to migrate _from_ and select **All**.
|
||||
1. Select the **Sources** that you'd like to migrate _to_ and search by and tap the arrow at the bottom right.
|
||||
1. Choose which data you want to transfer over.
|
||||
1. Wait until all your **Series** is found and hit the done at the top and you're done.
|
||||
|
||||
> If a series is not found, or is wrong you can manually search it by pressing Overflow -> **Search manually**.
|
||||
|
||||
### Migrating a single Series
|
||||
|
||||
1. Tap into a **Series** in your Library.
|
||||
1. Tap **Overflow** -> **Migrate**.
|
||||
1. Select the **Sources** you'd like to search and migrate _to_ and hit the arrow at the bottom right.
|
||||
1. Wait until it is found and select _done_ in the top right and you're done.
|
||||
|
||||
> If a series is not found, or is wrong you can manually search it by pressing Overflow -> **Search manually**
|
||||
|
||||
==TachiyomiSY
|
||||
### Migrating from Library
|
||||
|
||||
1. Tap into **Library**.
|
||||
1. Tap **Overflow** -> **Source migration**.
|
||||
1. Select the **Source** you'd like to migrate _from_ and select **All**.
|
||||
1. Select the **Sources** that you'd like to migrate _to_ and search by and tap the arrow labeled Migrate at the bottom right.
|
||||
1. Choose which data you want to transfer over.
|
||||
1. Wait until all your **Series** is found and hit the done at the top and you're done.
|
||||
|
||||
> If a series is not found, or is wrong you can manually search it by pressing **Overflow** -> **Search manually**.
|
||||
|
||||
### Migrating from Source {#migrating-from-source-sy}
|
||||
|
||||
1. Tap into Browse on the bottom navbar.
|
||||
1. Press the Migrate tab at the top next to Extensions.
|
||||
1. Select the **Source** that you'd like to migrate _from_.
|
||||
1. Select the **Source** you'd like to migrate _from_ and select **All**.
|
||||
1. Select the **Sources** that you'd like to migrate _to_ and search by and tap the arrow labeled Migrate at the bottom right.
|
||||
1. Choose which data you want to transfer over.
|
||||
1. Wait until all your **Series** is found and hit the done at the top and you're done.
|
||||
|
||||
> If a series is not found, or is wrong you can manually search it by pressing **Overflow** -> **Search manually**.
|
||||
|
||||
==TachiyomiAZ
|
||||
### Instructions
|
||||
|
||||
1. Tap into **Library**.
|
||||
1. Tap **Overflow** -> **Source migration**.
|
||||
1. Select the **Source** you'd like to migrate _from_ and select **All**.
|
||||
1. Select the **Sources** that you'd like to migrate _to_ and search by and tap the arrow at the bottom right.
|
||||
1. Choose which data you want to transfer over.
|
||||
1. Wait until all your **Series** is found and hit the done at the top and you're done.
|
||||
|
||||
> If a series is not found, or is wrong you can manually search it by pressing **Overflow** -> **Search manually**.
|
||||
::::
|
||||
|
|
|
@ -32,11 +32,6 @@ Follow these steps to troubleshoot and find solutions.
|
|||
If any of these solutions help, go to [Personalized Issue](#personalized-issue).
|
||||
If it is not just you, go to [Widespread Issue](#widespread-issue).
|
||||
|
||||
If none of these solutions help, try asking in our [Discord server](https://discord.gg/tachiyomi).
|
||||
|
||||
Check [#status-updates](https://discord.com/channels/349436576037732353/738862409284059239) first to see if your issue is known.
|
||||
State your app version and the source, series, and chapter with the problem if it is not listed.
|
||||
|
||||
::: tip An extension update may fix your issue
|
||||
Wait or check for an extension update if you have not already.
|
||||
There are no ETAs for updates.
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
---
|
||||
title: TachiyomiAZ
|
||||
titleTemplate: false
|
||||
description: Hentai-focused with legacy features
|
||||
|
||||
layout: home
|
||||
pageClass: page-tachiyomi-az
|
||||
|
||||
hero:
|
||||
name: TachiyomiAZ
|
||||
text: Hentai-focused
|
||||
tagline: Recommendation system, a hamburger menu, and loads of hentai
|
||||
image: /forks/logo-az.webp
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Download
|
||||
link: https://github.com/az4521/TachiyomiAZ/releases/latest
|
||||
- theme: alt
|
||||
text: GitHub
|
||||
link: https://github.com/az4521/tachiyomiAZ
|
||||
|
||||
customMetaTitle: TachiyomiAZ
|
||||
|
||||
features:
|
||||
- title: Hentai-focused
|
||||
details: Adds several features to enhance your Hentai experience.
|
||||
icon: 🔞
|
||||
- title: Series recommendations
|
||||
details: Get recommendations from MyAnimeList and AniDB.
|
||||
icon: 📚
|
||||
- title: Legacy design
|
||||
details: Keeps the old design of Tachiyomi with hamburger menu.
|
||||
icon: 👵
|
||||
|
||||
theme: "#FFCC4D"
|
||||
image: /forks/logo-az.webp
|
||||
imageSize: small
|
||||
---
|
||||
|
||||
<br><VPTeamMembers size="small" :members="members" />
|
||||
|
||||
<script setup>
|
||||
import "@theme/styles/forks/tachiyomi-az.styl"
|
||||
import { VPTeamMembers } from "vitepress/theme"
|
||||
|
||||
const members = [
|
||||
{
|
||||
avatar: "https://www.github.com/az4521.png",
|
||||
name: "az4521",
|
||||
title: "Creator",
|
||||
links: [
|
||||
{ icon: "github", link: "https://github.com/az4521" }
|
||||
]
|
||||
},
|
||||
{
|
||||
avatar: "https://www.github.com/jobobby04.png",
|
||||
name: "jobobby04",
|
||||
title: "Former Maintainer",
|
||||
links: [
|
||||
{ icon: "github", link: "https://github.com/jobobby04" }
|
||||
]
|
||||
},
|
||||
{
|
||||
avatar: "https://www.github.com/NerdNumber9.png",
|
||||
name: "NerdNumber9",
|
||||
title: "Original EH Fork",
|
||||
links: [
|
||||
{ icon: "github", link: "https://github.com/NerdNumber9" }
|
||||
]
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="azContainer">
|
||||
<div class="azMarquee">
|
||||
<div class="azWiggleText">
|
||||
<span class="azText"><i>"The BEST fork"</i> - az4521</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,56 +0,0 @@
|
|||
---
|
||||
title: TachiyomiJ2K
|
||||
titleTemplate: false
|
||||
description: New design approach along with several other enhancements
|
||||
|
||||
layout: home
|
||||
pageClass: page-tachiyomi-j2k
|
||||
|
||||
hero:
|
||||
name: TachiyomiJ2K
|
||||
text: Redesigned
|
||||
tagline: New design approach along with several other enhancements
|
||||
image: /forks/logo-j2k.webp
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Download
|
||||
link: https://github.com/Jays2Kings/tachiyomiJ2K/releases/latest
|
||||
- theme: alt
|
||||
text: GitHub
|
||||
link: https://github.com/Jays2Kings/tachiyomiJ2K
|
||||
|
||||
customMetaTitle: TachiyomiJ2K
|
||||
|
||||
features:
|
||||
- title: Redesigned UI
|
||||
details: Entirely different design from regular Tachiyomi, with exciting new features.
|
||||
icon: 👑
|
||||
- title: Double-page for Tablets
|
||||
details: Combine 2 pages while reading into a single one for a better tablet experience.
|
||||
icon: 📖
|
||||
- title: Dynamic categories
|
||||
details: Group your library automatically by the tags, tracking status, source, and more.
|
||||
icon: 🔖
|
||||
|
||||
theme: "#0952AF"
|
||||
image: /forks/logo-j2k.webp
|
||||
imageSize: small
|
||||
---
|
||||
|
||||
<br><VPTeamMembers size="small" :members="members" />
|
||||
|
||||
<script setup>
|
||||
import "@theme/styles/forks/tachiyomi-j2k.styl"
|
||||
import { VPTeamMembers } from "vitepress/theme"
|
||||
|
||||
const members = [
|
||||
{
|
||||
avatar: "https://www.github.com/Jays2Kings.png",
|
||||
name: "Jays2Kings",
|
||||
title: "Creator",
|
||||
links: [
|
||||
{ icon: "github", link: "https://github.com/Jays2Kings" }
|
||||
]
|
||||
}
|
||||
]
|
||||
</script>
|
|
@ -1,72 +0,0 @@
|
|||
---
|
||||
title: TachiyomiSY
|
||||
titleTemplate: false
|
||||
description: Keeping up-to-date with Tachiyomi while also adding exclusive features
|
||||
|
||||
layout: home
|
||||
pageClass: page-tachiyomi-sy
|
||||
|
||||
hero:
|
||||
name: TachiyomiSY
|
||||
text: Hentai-focused
|
||||
tagline: Keeping up-to-date with Tachiyomi while also adding exclusive features
|
||||
image: /forks/logo-sy.webp
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Download
|
||||
link: https://github.com/jobobby04/TachiyomiSY/releases/latest
|
||||
- theme: alt
|
||||
text: GitHub
|
||||
link: https://github.com/jobobby04/TachiyomiSY
|
||||
|
||||
customMetaTitle: TachiyomiSY
|
||||
|
||||
features:
|
||||
- title: Hentai-focused
|
||||
details: Adds several features to enhance your Hentai experience.
|
||||
icon: 🔞
|
||||
- title: Series recommendations
|
||||
details: Get recommendations from MyAnimeList and AniDB.
|
||||
icon: 📚
|
||||
- title: Autoscroll
|
||||
details: Allows you to read without any extra interaction.
|
||||
icon: 📜
|
||||
|
||||
theme: "#CE2828"
|
||||
image: /forks/logo-sy.webp
|
||||
imageSize: small
|
||||
---
|
||||
|
||||
<br><VPTeamMembers size="small" :members="members" />
|
||||
|
||||
<script setup>
|
||||
import "@theme/styles/forks/tachiyomi-sy.styl"
|
||||
import { VPTeamMembers } from "vitepress/theme"
|
||||
|
||||
const members = [
|
||||
{
|
||||
avatar: "https://www.github.com/jobobby04.png",
|
||||
name: "jobobby04",
|
||||
title: "Creator",
|
||||
links: [
|
||||
{ icon: "github", link: "https://github.com/jobobby04" }
|
||||
]
|
||||
},
|
||||
{
|
||||
avatar: "https://www.github.com/she11sh0cked.png",
|
||||
name: "she11sh0cked",
|
||||
title: "Extra tracking, filter, recommendations, and more",
|
||||
links: [
|
||||
{ icon: "github", link: "https://github.com/she11sh0cked" }
|
||||
]
|
||||
},
|
||||
{
|
||||
avatar: "https://www.github.com/az4521.png",
|
||||
name: "az4521",
|
||||
title: "Base recommendations and AZ",
|
||||
links: [
|
||||
{ icon: "github", link: "https://github.com/az4521" }
|
||||
]
|
||||
}
|
||||
]
|
||||
</script>
|
|
@ -1,33 +0,0 @@
|
|||
---
|
||||
title: Endorsed Forks
|
||||
description: Forks are alternative versions of Tachiyomi with exclusive features.
|
||||
lastUpdated: false
|
||||
editLink: false
|
||||
prev: false
|
||||
next: false
|
||||
pageClass: forks
|
||||
|
||||
features:
|
||||
- title: TachiyomiJ2K
|
||||
details: New design approach along with several other enhancements
|
||||
icon: <img src="/forks/logo-j2k.webp" alt="TachiyomiJ2K Logo" height="32" width="32">
|
||||
link: /forks/TachiyomiJ2K/
|
||||
- title: TachiyomiSY
|
||||
details: Keeping up-to-date with Tachiyomi while also adding exclusive features
|
||||
icon: <img src="/forks/logo-sy.webp" alt="TachiyomiSY Logo" height="32" width="32">
|
||||
link: /forks/TachiyomiSY/
|
||||
- title: TachiyomiAZ
|
||||
details: Keeps the old design of Tachiyomi with hamburger menu.
|
||||
icon: <img src="/forks/logo-az.webp" alt="TachiyomiAZ Logo" height="32" width="32">
|
||||
link: /forks/TachiyomiAZ/
|
||||
---
|
||||
|
||||
<script setup>
|
||||
import { VPHomeFeatures } from "vitepress/theme"
|
||||
</script>
|
||||
|
||||
# Endorsed Forks
|
||||
|
||||
Forks are alternative versions of Tachiyomi with exclusive features.
|
||||
|
||||
<VPHomeFeatures />
|
|
@ -8,5 +8,7 @@
|
|||
/help/guides/categories/ /docs/guides/categories 301
|
||||
/help/guides/local-manga/ /docs/guides/local-source/ 301
|
||||
/help/guides/reader-settings/ /docs/guides/reader-settings 301
|
||||
/help/contribution/ /docs/contribute 301
|
||||
/help/contribution/ /news/2024-01-13-goodbye 301
|
||||
/help/faq/ /docs/faq/general 301
|
||||
/forks/ /news/2024-01-13-goodbye 301
|
||||
/docs/contribute /news/2024-01-13-goodbye 301
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue
Block a user