diff --git a/website/src/docs/guides/creating-extensions/compiling.md b/website/src/docs/guides/creating-extensions/compiling.md index f31d275c..4d0619cb 100644 --- a/website/src/docs/guides/creating-extensions/compiling.md +++ b/website/src/docs/guides/creating-extensions/compiling.md @@ -10,7 +10,7 @@ description: Compile and run own Tachiyomi extension. To make local development more convenient, you can use the following run configuration to launch **Tachiyomi** directly at the Browse panel: -![](https://i.imgur.com/STy0UFY.png) +![Browse panel](/docs/guides/creating-extensions/compiling/BrowsePanel.webp =801x394) If you're running a Preview or debug build of **Tachiyomi**: @@ -38,7 +38,7 @@ You *cannot* simply use **Android Studio**'s `Debug 'module.name'` -> this will Instead, once you've built and installed your extension on the target device, use `Attach Debugger to Android Process` to start debugging **Tachiyomi**. -![](https://i.imgur.com/muhXyfu.png) +![Android Debugger](/docs/guides/creating-extensions/compiling/AndroidDebugger.webp =532x474) ### Logs @@ -64,7 +64,7 @@ If you want to take a deeper look into the network flow, such as taking a look i #### 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. -```console +```bash Install the tool. $ sudo pip3 install mitmproxy Execute the web interface and the proxy. @@ -73,14 +73,14 @@ $ 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. +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: diff --git a/website/src/docs/guides/creating-extensions/writing.md b/website/src/docs/guides/creating-extensions/writing.md index 5c9b0074..63207027 100644 --- a/website/src/docs/guides/creating-extensions/writing.md +++ b/website/src/docs/guides/creating-extensions/writing.md @@ -25,7 +25,7 @@ To adjust which modules are loaded, make adjustments to the `settings.gradle.kts The simplest extension structure looks like this: -```console +```bash $ tree src/// src/// ├── AndroidManifest.xml @@ -60,7 +60,7 @@ A minimal [Android manifest file](https://developer.android.com/guide/topics/man ### build.gradle Make sure that your new extension's `build.gradle` file follows the following structure: -```gradle +```kotlin apply plugin: 'com.android.application' apply plugin: 'kotlin-android' @@ -96,7 +96,7 @@ Extensions rely on [extensions-lib](https://github.com/tachiyomiorg/extensions-l [`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/). -```gradle +```kotlin dependencies { implementation(project(':lib-dataimage')) } @@ -106,7 +106,7 @@ dependencies { [`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. -```gradle +```kotlin dependencies { implementation(project(':lib-i18n')) } @@ -267,8 +267,8 @@ Extensions can define URL intent filters by defining it inside a custom `Android To test if the URL intent filter is working as expected, you can try opening the website in a browser and navigating to the endpoint that was added as a filter or clicking a hyperlink. Alternatively, you can use the `adb` command below. -```console -$ adb shell am start -d "" -a android.intent.action.VIEW +```bash +adb shell am start -d "" -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. diff --git a/website/src/public/docs/guides/creating-extensions/compiling/AndroidDebugger.webp b/website/src/public/docs/guides/creating-extensions/compiling/AndroidDebugger.webp new file mode 100644 index 00000000..511d1ba4 Binary files /dev/null and b/website/src/public/docs/guides/creating-extensions/compiling/AndroidDebugger.webp differ diff --git a/website/src/public/docs/guides/creating-extensions/compiling/BrowsePanel.webp b/website/src/public/docs/guides/creating-extensions/compiling/BrowsePanel.webp new file mode 100644 index 00000000..fcfd60b3 Binary files /dev/null and b/website/src/public/docs/guides/creating-extensions/compiling/BrowsePanel.webp differ