From d65170c85ab607b1bfbf05617596f88929a747a7 Mon Sep 17 00:00:00 2001 From: K1ngfish3r Date: Wed, 1 Mar 2023 17:00:39 +0800 Subject: [PATCH] Minor: prerequisites/build cmd to CONTRIBUTING.md (#565) * Minor: prerequisites/build cmd to CONTRIBUTING.md * switch npm start under developing section * link CONTRIBUTING.md in README.md * make clearer --- .github/workflows/build.yml | 9 ++++-- CONTRIBUTING.md | 29 +++++++++++++++---- README.md | 6 +++- .../wpmangastream/WPMangaStreamScraper.js | 2 +- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b2f5ce2..551e99ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,19 +8,22 @@ jobs: name: Build App runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16' - name: Install Dependencies run: | npm install --legacy-peer-deps - name: Cache Gradle Wrapper - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.gradle/wrapper key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - name: Cache Gradle Dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 21fb5806..03372d76 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,6 +7,11 @@ Contributions are welcome and are greatly appreciated! After forking to your own github org or account, do the following steps to get started: ```bash +# prerequisites +node --version <= 16.13.1 (for version management, get nvm [recommended]) +java sdk --version <= 11 (for version management, get jenv [optional]) +android sdk (https://developer.android.com/studio) + # clone your fork to your local machine git clone https://github.com//lnreader.git @@ -14,20 +19,34 @@ git clone https://github.com//lnreader.git cd lnreader # install dependencies -npm install +npm install --legacy-peer-deps -# run metro for development -npm start +# build the apk (the built apk will be found in ~/lnreader/android/app/build/outputs/apk/release/) +npm run buildRelease ``` ### Developing on Android -While the packager is running and you have an Android device or emulator connected to your computer, build and launch the Android app. +You will need an Android device or emulator connected to your computer as well as an IDE of your choice. (eg: vscode) -``` +```bash +# prerequisites +adb (https://developer.android.com/studio/command-line/adb) +IDE + +# check if android device/emulator is connected +adb devices + +# run metro for development +npm start + +# then to view on your android device (new terminal) npm run android ``` +To view any changes to the app with new code, save your code and press "r" on the metro terminal to +reload it. The app on the android device/emulator will reload shortly. + ### Style & Linting This codebase's linting rules are enforced using [ESLint](http://eslint.org/). diff --git a/README.md b/README.md index 593d2433..c82e9731 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,10 @@ LNReader does not have any affiliation with the content providers available. Source requests should be created at [LNReader/lnreader-sources](https://github.com/LNReader/lnreader-sources). +## Building & Contributing + +See [CONTRIBUTING.md](./CONTRIBUTING.md) + ## License -[MIT ](https://github.com/rajarsheechatterjee/lnreader/blob/main/LICENSE) +[MIT](https://github.com/rajarsheechatterjee/lnreader/blob/main/LICENSE) diff --git a/src/sources/multisrc/wpmangastream/WPMangaStreamScraper.js b/src/sources/multisrc/wpmangastream/WPMangaStreamScraper.js index a10845f7..8184a0f5 100644 --- a/src/sources/multisrc/wpmangastream/WPMangaStreamScraper.js +++ b/src/sources/multisrc/wpmangastream/WPMangaStreamScraper.js @@ -90,7 +90,7 @@ class WPMangaStreamScraper { novel.genre = loadedCheerio('.genxed').text().trim().replace(/\s/g, ','); - novel.summary = loadedCheerio('div[itemprop="description') + novel.summary = loadedCheerio('div[itemprop="description"]') .find('h3 , p.a') .remove() .end()