Dev section
This commit is contained in:
@@ -88,10 +88,6 @@ function defaultSidebar(): DefaultTheme.SidebarItem[] {
|
||||
text: "Changelogs",
|
||||
link: "/changelogs/",
|
||||
},
|
||||
{
|
||||
text: "Contribute",
|
||||
link: "/contribute/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -111,26 +107,26 @@ function defaultSidebar(): DefaultTheme.SidebarItem[] {
|
||||
text: "Sources",
|
||||
link: "/manuals/faq/explore/sources"
|
||||
},
|
||||
{
|
||||
/* {
|
||||
text: "Local storage",
|
||||
link: "/manuals/faq/explore/local-storage",
|
||||
},
|
||||
{
|
||||
}, */
|
||||
/* {
|
||||
text: "Bookmarks",
|
||||
link: "/manuals/faq/explore/bookmarks",
|
||||
},
|
||||
{
|
||||
text: "Random",
|
||||
link: "/manuals/faq/explore/random",
|
||||
},
|
||||
}, */
|
||||
{
|
||||
text: "Downloads",
|
||||
link: "/manuals/faq/explore/downloads",
|
||||
},
|
||||
{
|
||||
/* {
|
||||
text: "Suggestions",
|
||||
link: "/manuals/faq/explore/suggestions",
|
||||
},
|
||||
}, */
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -172,27 +168,29 @@ function defaultSidebar(): DefaultTheme.SidebarItem[] {
|
||||
{ text: "Backups", link: "/manuals/guides/backups" },
|
||||
{ text: "Tracking", link: "/manuals/guides/tracking" },
|
||||
{ text: "Categories", link: "/manuals/guides/categories" },
|
||||
{
|
||||
text: "Local storage",
|
||||
link: "/manuals/guides/local-storage/",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "Advanced editing",
|
||||
link: "/manuals/guides/local-source/advanced",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Reader settings",
|
||||
link: "/manuals/guides/reader-settings",
|
||||
},
|
||||
{
|
||||
text: "Synchronization",
|
||||
link: "/manuals/guides/synchronization"
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "For developers",
|
||||
items: [
|
||||
{
|
||||
text: "Contribute",
|
||||
link: "/dev/contribute/",
|
||||
},
|
||||
{
|
||||
text: "Parsers library",
|
||||
link: "/dev/parsers-library/",
|
||||
},
|
||||
{
|
||||
text: "Synchronization server",
|
||||
link: "/dev/sync-server/",
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -213,19 +211,19 @@ function getNav(): DefaultTheme.NavItem[] {
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Manual",
|
||||
text: "User manual",
|
||||
link: "/manuals/guides/getting-started",
|
||||
activeMatch: "/manuals/",
|
||||
},
|
||||
/* {
|
||||
text: "News",
|
||||
link: "/news/",
|
||||
activeMatch: "/news/",
|
||||
{
|
||||
text: "Desktop app",
|
||||
link: "/desktop/",
|
||||
activeMatch: "/desktop/",
|
||||
},
|
||||
{
|
||||
text: "Account",
|
||||
link: "/account/",
|
||||
activeMatch: "/account/"
|
||||
} */
|
||||
text: "News",
|
||||
link: "/news/",
|
||||
activeMatch: "/news/"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -64,7 +64,9 @@ function getDir(url: string) {
|
||||
return "News"
|
||||
} else if (url.startsWith("/sandbox/")) {
|
||||
return "Sandbox"
|
||||
} else if (url !== "/manuals/faq/" && url !== "/manuals/guides/" && url !== "/news/" && url !== "/sandbox/") {
|
||||
} else if (url.startsWith("/dev/")) {
|
||||
return "Dev"
|
||||
} else if (url !== "/manuals/faq/" && url !== "/manuals/guides/" && url !== "/news/" && url !== "/sandbox/" && url !== "/dev/") {
|
||||
return "Other"
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@ const navigationMappings: Record<string, Navigation> = {
|
||||
"checking": { name: "Check for new chapters", icon: iconMappings.feed, dependsOn: "main_settings" },
|
||||
"services": { name: "Services", icon: iconMappings.services, dependsOn: "main_settings" },
|
||||
"about": { name: "About", icon: iconMappings.about, dependsOn: "main_settings" },
|
||||
|
||||
// Sync
|
||||
"sync_settings": { name: "Synchronization settings", dependsOn: "services" },
|
||||
"server_address": { name: "Server address", dependsOn: "sync_settings" }
|
||||
}
|
||||
|
||||
function generateNavigationHtml(navKey: string) {
|
||||
|
||||
@@ -47,6 +47,9 @@ defineProps<{
|
||||
|
||||
section {
|
||||
padding: 42px 32px;
|
||||
background: var(--vp-c-bg-soft);
|
||||
border-radius: var(--vp-border-radius);
|
||||
margin: 48px 96px;
|
||||
}
|
||||
|
||||
#hero {
|
||||
@@ -113,6 +116,9 @@ html:not(.dark) .accent,
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
section {
|
||||
margin: 24px;
|
||||
}
|
||||
.tagline {
|
||||
font-size: 48px;
|
||||
letter-spacing: -0.5px;
|
||||
@@ -120,6 +126,9 @@ html:not(.dark) .accent,
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
section {
|
||||
margin: 24px;
|
||||
}
|
||||
#hero {
|
||||
padding: 56px 32px;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ defineProps<{ title: string; description?: string; dir?: string }>()
|
||||
<svg v-else-if="dir === 'Guide'" height="600" width="600" viewBox="0 0 960 960" fill="#0b37aa" xmlns="http://www.w3.org/2000/svg"><path d="M 480 261.82 C 600.5 261.82 698.18 359.5 698.18 480 C 698.18 560.73 654.18 631.27 589.09 669.09 L 589.09 734.54 C 589.09 754.62 572.81 770.9 552.73 770.9 L 407.27 770.9 C 387.19 770.9 370.91 754.62 370.91 734.54 L 370.91 669.09 C 305.82 631.27 261.82 560.73 261.82 480 C 261.82 359.5 359.5 261.82 480 261.82 M 552.73 807.27 L 552.73 843.63 C 552.73 863.71 536.45 879.99 516.37 879.99 L 443.64 879.99 C 423.56 879.99 407.28 863.71 407.28 843.63 L 407.28 807.27 L 552.73 807.27 M 770.91 443.64 L 880 443.64 L 880 516.37 L 770.91 516.37 L 770.91 443.64 M 80 443.64 L 189.09 443.64 L 189.09 516.37 L 80 516.37 L 80 443.64 M 516.36 80 L 516.36 189.09 L 443.63 189.09 L 443.63 80 L 516.36 80 M 222.55 170.91 L 300 248.73 L 248.36 300 L 170.91 222.91 L 222.55 170.91 M 660 248.36 L 737.09 170.91 L 789.09 222.91 L 711.64 300 L 660 248.36 Z" /></svg>
|
||||
<svg v-else-if="dir === 'News'" height="600" width="600" viewBox="0 0 960 960" fill="#0b37aa" xmlns="http://www.w3.org/2000/svg"><path d="M157.5-122.5q-31 0-53-22t-22-53v-614q0-6.5 5.5-9t10.5 2.5l35.5 35.5q5.5 5.5 13 5.25t13-5.75l40-40q5.5-5.5 13-5.75t13 5.25l41 41q5.5 5.5 13 5.5t13-5.5l41-41q5.5-5.5 13-5.25t13 5.75l40 40q5.5 5.5 13 5.75t13-5.25l41-41q5.5-5.5 13-5.5t13 5.5l41 41q5.5 5.5 13 5.25t13-5.75l40-40q5.5-5.5 13-5.75t13 5.25l41 41q5.5 5.5 13 5.5t13-5.5l41-41q5.5-5.5 13-5.25t13 5.75l40 40q5.5 5.5 13 5.75t13-5.25l35.5-35.5q5-5 10.5-2.5t5.5 9v614q0 31-22 53t-53 22h-645Zm0-75h285v-245h-285v245Zm360 0h285v-85h-285v85Zm0-160h285v-85h-285v85Zm-360-160h645v-125h-645v125Z" /></svg>
|
||||
<svg v-else-if="dir === 'Sandbox'" height="600" width="600" viewBox="0 0 960 960" fill="#0b37aa" xmlns="http://www.w3.org/2000/svg"><path d="M 220 80 C 142.4 80 80 142.4 80 220 L 80 740 C 80 817.6 142.4 880 220 880 L 640 880 L 880 640 L 880 220 C 880 142.4 817.6 80 740 80 L 220 80 M 230 160 L 730 160 C 768.66 160 800 191.34 800 230 L 800 600 L 740 600 C 662.4 600 600 662.4 600 740 L 600 800 L 230 800 C 191.34 800 160 768.66 160 730 L 160 230 C 160 191.34 191.34 160 230 160 M 577.6 270.8 C 571.2 270.8 564.8 271.6 558.8 273.2 C 521.2 283.6 500 322 509.6 360 C 511.6 366 514.4 372 518 377.6 L 647.2 342.4 C 647.2 335.6 646.4 328.8 644.8 322 C 636.4 292 608.8 270.8 577.6 270.8 M 326.8 340 C 320 340 314 340 308 342 C 270.8 352.4 248.8 390.8 258.8 428 C 260 434.4 263.6 440 267.2 446.4 L 396.4 411.2 C 396.4 404.4 395.6 397.6 394 391.2 C 385.6 360 358 340 326.8 340 M 668.8 450.4 L 303.6 550.8 C 356.4 612 440 637.6 518 616.4 C 596 594.8 654.4 530 668.8 450.4 Z" /></svg>
|
||||
<svg v-else-if="dir === 'Dev'" height="600" width="600" viewBox="0 0 960 960" fill="#0b37aa" xmlns="http://www.w3.org/2000/svg"><path d="M 520.43 74.16 L 608.78 92.19 L 440.2 885.52 L 351.85 867.49 L 520.43 74.16 M 822.44 479.84 L 660.62 318.02 L 660.62 190.46 L 950 479.84 L 660.62 768.77 L 660.62 641.21 L 822.44 479.84 M 10.63 479.84 L 300.01 190.46 L 300.01 318.02 L 138.19 479.84 L 300.01 641.21 L 300.01 768.77 L 10.63 479.84 Z" /></svg>
|
||||
<svg v-else-if="dir === 'Other'" height="600" width="600" viewBox="0 0 960 960" fill="#0b37aa" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 500.37 828.06 C 551.94 827.86 603.32 821.92 653.57 810.35 L 663.79 807.89 C 662.43 812.48 661.75 817.23 661.76 822.02 C 662.06 823.99 662.8 825.88 663.92 827.54 C 665.04 829.2 666.52 830.58 668.24 831.6 C 670.92 832.4 675.62 829.09 678.35 826.25 C 680.68 823.16 682.67 819.82 684.29 816.3 C 686.16 813.41 688.41 810.95 690.93 807.52 C 695.19 813.26 699.74 818.78 704.58 824.05 C 705.78 825.13 707.23 825.9 708.79 826.3 C 710.36 826.7 712 826.72 713.57 826.35 C 715.6 825.28 715.92 820.62 716.41 817.41 C 716.62 815.65 716.18 813.89 715.18 812.43 C 703.46 795.63 711.43 785.67 725.19 774.28 C 771.64 717.99 781.75 680.21 779.34 617.87 C 776.5 543.54 777.36 470.39 745.74 401.85 C 735.68 380.07 731.99 355.24 726.26 331.59 C 725.31 324.71 725.45 317.72 726.69 310.88 C 731.4 262.72 729.26 216.17 731.51 167.79 C 731.41 144.75 727.39 121.9 719.63 100.21 C 711.07 75.06 665.74 52.48 646.86 71.26 C 626.63 91.43 620.69 131.35 609.4 157.52 C 595.17 189.63 592.28 222.16 574.73 255.12 C 551.45 254.09 528.13 255.54 505.17 259.45 C 504.39 233.35 501.35 207.37 496.07 181.81 C 487.56 141.94 476.7 102.61 449.25 70.56 C 447.27 68.21 445.4 65.74 443.26 63.6 C 423.35 43.48 403.02 45.3 393.01 71.57 C 381.41 101.72 372.73 132.92 367.11 164.73 C 360.15 205.08 357.85 246.28 353.3 287.06 C 352.99 291.79 351.74 296.41 349.61 300.65 C 331.43 333.75 320.9 370.5 318.79 408.21 C 317.09 436.1 312.41 463.73 304.82 490.62 C 288.77 544.13 297.11 597.32 311.29 649.81 C 322.07 692.78 340.72 733.39 366.3 769.57 C 375.97 784.41 387.63 797.84 400.97 809.49 C 408.3 815.27 419.91 815.54 419.91 817.3 C 419.91 819.06 414.93 820.67 402.09 828 C 394.92 832.12 392.73 833.94 392.67 836.29 C 392.62 838.64 397.54 839.77 400.11 841.16 C 400.55 841.4 401.05 841.52 401.55 841.52 C 402.05 841.52 402.55 841.4 402.99 841.16 C 409.02 838.77 414.58 835.35 419.42 831.05 C 423.34 828.33 426.67 824.86 429.21 820.83 C 425.65 827.97 422.97 835.51 421.24 843.3 C 420.7 846.4 430.93 847.58 433.17 843.3 C 436.11 837.95 433.6 829.44 442.37 825.05 C 442.37 825.05 434.5 843.4 440.23 848.54 C 441.68 849.58 443.42 850.15 445.21 850.15 C 447 850.15 448.74 849.59 450.19 848.54 C 455.97 843.99 450.19 833.4 453.94 827.14 C 457.69 820.88 468.48 823.94 500.37 828.06 Z M 586.36 276.15 C 588.55 271.98 590.75 268.28 592.51 264.38 C 605.41 235.86 608.03 207.66 620.28 175.66 C 634.78 137.93 636.33 107.22 657.74 83.51 C 669.19 70.93 703.6 92.29 707.88 108.45 C 713.21 128.9 715.61 149.99 715 171.11 C 713.5 211.19 720.35 251.38 714.04 290.97 C 707.14 330.31 713.09 370.85 731 406.55 C 745.53 434.17 755.07 464.13 759.2 495.06 C 767.71 561.09 774.77 621.13 761.61 684.49 C 748.02 727.83 734.32 764.76 673.96 787.23 C 603.33 813.56 529.16 819.02 454.19 809.33 C 440.23 807.86 426.74 803.47 414.59 796.44 C 402.44 789.41 391.91 779.91 383.67 768.55 C 353.75 727.42 332.6 680.57 321.54 630.92 C 310.2 584.1 306.61 537.06 319.61 489.54 C 325.58 469.06 329.62 448.06 331.65 426.83 C 335.13 383.17 342.35 340.95 365.2 302.74 C 367.41 298.45 368.45 293.65 368.2 288.83 C 368.31 241.14 374.08 193.63 385.38 147.29 C 390.71 123.88 397.59 100.86 405.98 78.37 C 412.4 61.46 422.03 60.12 432.74 74.36 C 444.95 89.67 455.18 106.47 463.19 124.34 C 481.01 167.3 489.99 213.42 489.57 259.94 C 489.57 267.54 491.18 273.42 500.7 271.28 C 529.13 264.76 558.85 266.44 586.36 276.15 Z"/>
|
||||
<path d="M 617.29 348.5 C 600.41 351.64 585.44 361.35 575.7 375.5 C 565.96 389.65 562.23 407.1 565.33 423.99 C 568.43 440.88 578.12 455.87 592.25 465.63 C 606.38 475.39 623.82 479.15 640.72 476.08 C 657.61 473.01 672.62 463.34 682.4 449.23 C 692.19 435.12 695.98 417.69 692.94 400.78 C 690.9 389.55 685.93 379.04 678.54 370.34 C 671.15 361.63 661.59 355.03 650.84 351.2 C 640.1 347.36 628.52 346.43 617.29 348.5 Z M 620.82 365.03 C 633.27 363.35 645.91 366.48 656.12 373.79 C 666.34 381.09 673.39 392.04 675.83 404.36 C 679.95 428.76 661.76 455.03 637.89 459.1 C 627.94 460.94 617.67 459.57 608.54 455.2 C 599.42 450.83 591.92 443.67 587.12 434.77 C 582.32 425.87 580.47 415.67 581.83 405.64 C 583.19 395.62 587.71 386.29 594.71 378.99 C 601.72 371.69 610.86 366.81 620.82 365.03 Z M 427.54 450.01 C 443.01 447.11 456.71 438.19 465.62 425.22 C 474.53 412.25 477.94 396.25 475.1 380.77 C 472.26 365.29 463.39 351.56 450.45 342.6 C 437.51 333.64 421.53 330.17 406.04 332.96 C 390.55 335.75 376.78 344.57 367.78 357.48 C 358.77 370.39 355.25 386.35 357.98 401.85 C 359.82 412.2 364.37 421.88 371.16 429.91 C 377.95 437.93 386.74 444.02 396.65 447.55 C 406.54 451.08 417.21 451.92 427.54 450.01 Z M 375.42 398.8 C 373.81 387.89 376.42 376.76 382.69 367.7 C 388.96 358.63 398.46 352.28 409.24 349.95 C 418.13 348.06 427.41 349.09 435.66 352.9 C 443.92 356.7 450.72 363.09 455.05 371.09 C 459.37 379.08 461 388.27 459.68 397.27 C 458.36 406.27 454.15 414.59 447.7 421 C 441.26 427.41 432.9 431.56 423.9 432.84 C 412.99 434.51 401.85 431.9 392.82 425.56 C 383.8 419.21 377.56 409.62 375.42 398.8 Z"/>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
title: Contribute
|
||||
description: Find out how to help translate or build the app and parsers.
|
||||
lastUpdated: false
|
||||
editLink: false
|
||||
prev: false
|
||||
next: false
|
||||
---
|
||||
|
||||
# Contribute
|
||||
Find out how to help translate or build the app and parsers.
|
||||
|
||||
## Code
|
||||
Know how to code and want to improve something or you generally want to support the creation of the app?
|
||||
|
||||
[](https://github.com/KotatsuApp/Kotatsu)
|
||||
|
||||
[](https://github.com/KotatsuApp/kotatsu-parsers)
|
||||
|
||||
[](https://github.com/KotatsuApp/website)
|
||||
|
||||
## Translation
|
||||

|
||||
|
||||
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)
|
||||
110
website/dev/contribute/index.md
Normal file
110
website/dev/contribute/index.md
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
title: Contribute
|
||||
description: Find out how to help translate or build the app and parsers.
|
||||
---
|
||||
|
||||
# Contribute
|
||||
Find out how to help translate or build the app and parsers.
|
||||
|
||||
## App contribution guidelines
|
||||
- If you want to fix bug or implement a new feature, that already mention in the [issues](https://github.com/KotatsuApp/Kotatsu/issues), please, assign this issue to you and/or comment about it.
|
||||
- Whether you have to implement new feature, please, open an issue or discussion regarding it to ensure it will be accepted.
|
||||
- Translations have to be managed using the [Weblate](https://hosted.weblate.org/engage/kotatsu/) platform.
|
||||
- In case you want to add a new manga source, refer to the [parsers repository](https://github.com/KotatsuApp/kotatsu-parsers).
|
||||
|
||||
Refactoring or some dev-faces improvements are also might be accepted, however please stick to the following principles:
|
||||
- Performance matters. In the case of choosing between source code beauty and performance, performance should be a priority.
|
||||
- Please, do not modify readme and other information files (except for typos).
|
||||
- Avoid adding new dependencies unless required. APK size is important.
|
||||
|
||||
## Parsers contribution guidelines
|
||||
The following is guide for creating a Kotatsu parsers. Thanks for taking the time to contribute!
|
||||
|
||||
### Prerequisites
|
||||
Before you start, please note that the ability to use following technologies is **required**.
|
||||
|
||||
- Basic [Android development](https://developer.android.com/)
|
||||
- [Kotlin](https://kotlinlang.org/)
|
||||
- Web scraping ([JSoup](https://jsoup.org/)) or JSON API
|
||||
|
||||
#### Tools
|
||||
|
||||
- [Android Studio](https://developer.android.com/studio)
|
||||
- [IntelliJ IDEA](https://www.jetbrains.com/idea/) (Community edition is enough)
|
||||
- Android device (or emulator)
|
||||
|
||||
Kotatsu parsers is not a part of Android application, but you can easily develop and test it directly inside an Android
|
||||
application project and relocate it to the library project when done.
|
||||
|
||||
#### Before you start
|
||||
|
||||
First, take a look at `kotatsu-parsers` project structure. Each parser is a single class that
|
||||
extends `MangaParser` class and have a `MangaSourceParser` annotation.
|
||||
Also pay attention on extensions in `util` package. For example, extensions from `Jsoup` file
|
||||
should be used instead of existing JSoup functions because they have better nullability support
|
||||
and improved error messages.
|
||||
|
||||
### Writing your parser
|
||||
|
||||
So, you want to create a parser, that will provide access to manga from a website.
|
||||
First, you should explore a website for API availability.
|
||||
If it does not contain any documentation about
|
||||
API, [explore network requests](https://firefox-source-docs.mozilla.org/devtools-user/):
|
||||
some websites use ajax.
|
||||
|
||||
- [Example](https://github.com/KotatsuApp/kotatsu-parsers/blob/master/src/main/kotlin/org/koitharu/kotatsu/parsers/site/ru/DesuMeParser.kt)
|
||||
of Json API usage.
|
||||
- [Example](https://github.com/KotatsuApp/kotatsu-parsers/blob/master/src/main/kotlin/org/koitharu/kotatsu/parsers/site/be/AnibelParser.kt)
|
||||
of GraphQL API usage
|
||||
- [Example](https://github.com/KotatsuApp/kotatsu-parsers/blob/master/src/main/kotlin/org/koitharu/kotatsu/parsers/site/en/MangaTownParser.kt)
|
||||
of pure HTML parsing.
|
||||
|
||||
If website is based on some engine it is rationally to use common base class for this one (for example, Madara wordress
|
||||
theme
|
||||
and the `MadaraParser` class)
|
||||
|
||||
#### Parser class skeleton
|
||||
|
||||
Parser class must have exactly one primary constructor parameter of type `MangaLoaderContext` and have an
|
||||
`MangaSourceParser` annotation that provides internal name, title and language of a manga source.
|
||||
|
||||
All functions in `MangaParser` class are documented. Pay attention to some peculiarities:
|
||||
|
||||
- Never hardcode domain. Specify default domain in `configKeyDomain` field and obtain an actual one using `getDomain()`.
|
||||
- All ids must be unique and domain-independent. Use `generateUid` functions with relative url or some internal id which
|
||||
is unique across the manga source.
|
||||
- `sortOrders` set should not be empty. If your source is not support sorting, specify one most relevance value.
|
||||
- If you cannot obtain direct links to pages images inside `getPages` method, it is ok to use an intermediate url
|
||||
as `Page.url` and fetch a direct link at `getPageUrl` function.
|
||||
- You can use _asserts_ to check some optional fields. For example. `Manga.author` field is not required, but if your
|
||||
source provide such information, add `assert(it != null)`. This will not have any effect on production but help to
|
||||
find issues during unit testing.
|
||||
- If your source website (or it's api) uses pages for pagination instead of offset you should extend `PagedMangaParser`
|
||||
instead of `MangaParser`.
|
||||
- Your parser may also implement the `Interceptor` interface for additional manipulation of all network requests and/or
|
||||
responses, including image loading.
|
||||
|
||||
### Development process
|
||||
|
||||
During the development it is recommended (but not necessary) to write it directly
|
||||
in the Kotatsu android application project. You can use `core.parser.DummyParser` class as a sandbox. `Dummy` manga
|
||||
source is available in debug Kotatsu build.
|
||||
|
||||
Once parser is ready you can relocate your code into `kotatsu-parsers` library project in a `site` package and create a
|
||||
Pull Request.
|
||||
|
||||
#### Testing
|
||||
|
||||
It is recommended to run unit tests before submitting a PR.
|
||||
|
||||
- Temporary modify the `MangaSources` annotation class: specify your parser(s) name(s) and change mode to `EnumSource.Mode.INCLUDE`
|
||||
- Run the `MangaParserTest`
|
||||
```bash
|
||||
gradlew :test --tests "org.koitharu.kotatsu.parsers.MangaParserTest"
|
||||
```
|
||||
- Optionally, you can run the `generateTestsReport` gradle task to get a pretty readable html report from test results.
|
||||
|
||||
### Help
|
||||
|
||||
If you need a help or have some questions, ask a community in our [Telegram chat](https://t.me/kotatsuapp)
|
||||
or [Discord server](https://discord.gg/NNJ5RgVBC5).
|
||||
59
website/dev/parsers-library/index.md
Normal file
59
website/dev/parsers-library/index.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Parsers library
|
||||
description: Instructions for using the Kotatsu parser library.
|
||||
---
|
||||
|
||||
# Kotatsu parsers
|
||||
This library provides manga sources.
|
||||
|
||||
## Usage
|
||||
Add it to your root `build.gradle` at the end of repositories:
|
||||
|
||||
```groovy{4}
|
||||
allprojects {
|
||||
repositories {
|
||||
...
|
||||
maven { url 'https://jitpack.io' } // [!code focus]
|
||||
}
|
||||
}
|
||||
```
|
||||
Add the dependency
|
||||
|
||||
:::tip For Java/Kotlin project:
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation("com.github.KotatsuApp:kotatsu-parsers:$parsers_version")
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
:::tip For Android project:
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation("com.github.KotatsuApp:kotatsu-parsers:$parsers_version") {
|
||||
exclude group: 'org.json', module: 'json'
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Versions are available on [JitPack](https://jitpack.io/#KotatsuApp/kotatsu-parsers)
|
||||
|
||||
:::tip Usage in code
|
||||
```kotlin
|
||||
val parser = mangaLoaderContext.newParserInstance(MangaSource.MANGADEX)
|
||||
```
|
||||
:::
|
||||
|
||||
`mangaLoaderContext` is an implementation of the `MangaLoaderContext` class.
|
||||
|
||||
See examples
|
||||
of [Android](https://github.com/KotatsuApp/Kotatsu/blob/devel/app/src/main/java/org/koitharu/kotatsu/core/parser/MangaLoaderContextImpl.kt)
|
||||
and [Non-Android](https://github.com/KotatsuApp/kotatsu-dl/blob/master/src/main/kotlin/org/koitharu/kotatsu_dl/env/MangaLoaderContextImpl.kt) implementation.
|
||||
|
||||
Note that the `MangaSource.LOCAL` and `MangaSource.DUMMY` parsers cannot be instantiated.
|
||||
|
||||
## DMCA disclaimer
|
||||
|
||||
The developers of this application have no affiliation with the content available in the app. It is collected from
|
||||
sources freely available through any web browser.
|
||||
53
website/dev/sync-server/index.md
Normal file
53
website/dev/sync-server/index.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Synchronization server
|
||||
description: Instructions for installing the synchronization server.
|
||||
---
|
||||
|
||||
# Synchronization server
|
||||
Instructions for installing the synchronization server.
|
||||
|
||||
## Installation
|
||||
|
||||
### Docker
|
||||
Build image container:
|
||||
|
||||
```bash
|
||||
docker build github.com/KotatsuApp/kotatsu-syncserver.git -t kotatsuapp/syncserver
|
||||
```
|
||||
|
||||
Run container:
|
||||
|
||||
```bash
|
||||
docker run -d -p 8081:8080 \
|
||||
-e DATABASE_HOST=your_db_host \
|
||||
-e DATABASE_USER=your_db_user \
|
||||
-e DATABASE_PASSWORD=your_db_password \
|
||||
-e DATABASE_NAME=your_db_name \
|
||||
-e DATABASE_PORT=your_db_port \
|
||||
-e JWT_SECRET=your_secret \
|
||||
--restart always \
|
||||
--name kotatsu-sync kotatsuapp/syncserver
|
||||
```
|
||||
|
||||
### Systemd
|
||||
Requirements:
|
||||
- JDK 11+
|
||||
- Gradle 7.0+
|
||||
|
||||
Commands:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/KotatsuApp/kotatsu-syncserver.git
|
||||
cd kotatsu-syncserver && ./gradlew shadowJar
|
||||
```
|
||||
|
||||
Then edit file `kotatsu-sync.service`, change `replaceme` fields with your values and specify the `kotatsu-syncserver-0.0.1.jar` file location (it can be found in `build/libs` directory after buliding)
|
||||
|
||||
```bash
|
||||
cp kotatsu-sync.service /etc/systemd/system
|
||||
systemctl enable kotatsu-sync
|
||||
systemctl daemon-reload
|
||||
systemctl start kotatsu-sync
|
||||
```
|
||||
|
||||
For any questions, please, contact us in [Telegram group](https://t.me/kotatsuapp) or write an issue, thanks.
|
||||
@@ -8,11 +8,11 @@ main:
|
||||
tagline: A simple and convenient open source manga reader from and for the community, where you can find and read your favorite manga easier than ever.
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Get started
|
||||
link: /manuals/guides/getting-started
|
||||
- theme: alt
|
||||
text: Download
|
||||
link: /download/
|
||||
- theme: alt
|
||||
text: Manuals
|
||||
link: /manuals/guides/getting-started
|
||||
features:
|
||||
- icon: <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="var(--vp-c-brand-1)"><path d="M19 1L14 6V17L19 12.5V1M21 5V18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5V6C10.55 4.9 8.45 4.5 6.5 4.5C4.55 4.5 2.45 4.9 1 6V20.65C1 20.9 1.25 21.15 1.5 21.15C1.6 21.15 1.65 21.1 1.75 21.1C3.1 20.45 5.05 20 6.5 20C8.45 20 10.55 20.4 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5M10 18.41C8.75 18.09 7.5 18 6.5 18C5.44 18 4.18 18.19 3 18.5V7.13C3.91 6.73 5.14 6.5 6.5 6.5C7.86 6.5 9.09 6.73 10 7.13V18.41Z" /></svg>
|
||||
title: Huge count of sources
|
||||
|
||||
@@ -1,4 +1,39 @@
|
||||
---
|
||||
title: Synchronization
|
||||
description: Allows you to continue reading on your device from where you left off on another device.
|
||||
---
|
||||
---
|
||||
|
||||
# Synchronization
|
||||
Allows you to continue reading on your device from where you left off on another device.
|
||||
|
||||
List of official servers:
|
||||
|
||||
| Domain | IP:Port | Location |
|
||||
| ---------------- | ------------------ | ---------------- |
|
||||
| sync.kotatsu.app | 86.57.183.214:8081 | Belarus |
|
||||
| - | 86.57.183.214:1337 | Belarus (Mirror) |
|
||||
|
||||
## What is synchronization?
|
||||
Synchronization is needed to store your collection of favorites, history and categories and have remote access to them. On a synchronized device, you can restore your manga collection in real time without loss. It also supports working across multiple devices. It is convenient for those who use several devices.
|
||||
|
||||
## How does synchronization work?
|
||||
- An account is created and configured in the application where it will store data;
|
||||
- Synchronization starts. The data selected by the user is saved on the service and stored there under protection;
|
||||
- Another device connects and syncs with the service;
|
||||
- The uploaded data appears on the device connected to the account.
|
||||
|
||||
## What data can be synchronized?
|
||||
- Favorites (with categories);
|
||||
- History.
|
||||
|
||||
## How do I sync my data?
|
||||
Go to <nav to='services'>, then select **Synchronization**. Enter your email address (even if you have not registered in the synchronization system, the authorization screen also acts as a registration screen), then come up with and enter a password.
|
||||
|
||||
:::warning Attention
|
||||
There is no password recovery from the account at the moment, if you forget the password, you will not be able to log into your account on other devices, so we recommend that you do not forget the password or write it down somewhere.
|
||||
:::
|
||||
|
||||
After the authorization/registration process, you will return back to the **Content** screen. To set up synchronization, select **Synchronization** again, and then you will go to system sync settings. Choose what you want to sync, history, favorites or all together, after which automatic synchronization to our server will begin.
|
||||
|
||||
## Can I use a synchronization server on my hosting?
|
||||
Yes, you can use your synchronization server in the application by specifying its address (<nav to='server_address'>). Instructions for deploying the server are [here](/dev/sync-server/).
|
||||
Reference in New Issue
Block a user