├── .gitignore ├── package.json ├── .github └── workflows │ └── nodejs.yml ├── featured.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn.lock 3 | package-lock.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "prettier": "1.19.1" 4 | }, 5 | "scripts": { 6 | "format": "prettier --write supported_sites.json featured.json" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | name: Node.js CI 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | strategy: 11 | matrix: 12 | node-version: [12.x] 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Use Node.js ${{ matrix.node-version }} 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: ${{ matrix.node-version }} 20 | - name: Installing NPM dependencies 21 | run: npm install 22 | - name: Formatting the json files 23 | run: npm run format --if-present 24 | - name: Stage Files 25 | run: git add . 26 | - name: Commit files 27 | run: | 28 | git config --local user.email "actions@github.com" 29 | git config --local user.name "GitHub Actions" 30 | git diff-index --quiet HEAD || git commit -m "formatted files for merge request" 31 | - name: Publish the formatted changes 32 | run: git push -f 33 | env: 34 | CI: true 35 | -------------------------------------------------------------------------------- /featured.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "url": "http://xkcd.com/", 4 | "title": "xkcd", 5 | "imageUrl": "http://imgs.xkcd.com/comics/alternative_energy_revolution.jpg" 6 | }, 7 | { 8 | "url": "http://nedroid.com/", 9 | "title": "nedroid", 10 | "imageUrl": "http://nedroid.com/comics/2009-02-12-beartato-cheerupface.jpg" 11 | }, 12 | { 13 | "url": "http://www.thingsinsquares.com/", 14 | "title": "thingsinsquares", 15 | "imageUrl": "http://www.thingsinsquares.com/wp-content/uploads/old-woman-dream-comic.jpg" 16 | }, 17 | { 18 | "url": "http://www.safelyendangered.com/", 19 | "title": "safelyendangered", 20 | "imageUrl": "http://www.safelyendangered.com/wp-content/uploads/2016/06/art-of-seduction.png" 21 | }, 22 | { 23 | "url": "http://www.oglaf.com/", 24 | "title": "oglaf", 25 | "imageUrl": "http://media.oglaf.com/comic/hoops.jpg" 26 | }, 27 | { 28 | "url": "https://explosm.net/comics/kris-kapplesauce", 29 | "title": "cyanide & happiness", 30 | "imageUrl": "https://static.explosm.net/2022/03/07230424/separated1.png" 31 | } 32 | ] 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ⚠️ Deprecated 2 | 3 | This project is no longer actively maintained. Due to continued issues with website overhauls of many comics websites like GoComics, Arcamax, etc we unpublished the app in early 2024 4 | 5 | I will still occassionaly fix selectors here when I have time but for all intents and purposes this app is no longer supported 6 | 7 | Please keep in mind that we are still getting a number of installs even without a store listing. If you are downloading the app from sources like Softonic, CNet or other these are not versions uploaded by us - use at your own risk. 8 | 9 | Feel free to use these HTML selectors in this Github repo for your own projects 10 | 11 | # What is this? 12 | 13 | This is the backend selector handling for the PageFlip comic reader app on Android: https://play.google.com/store/apps/details?id=com.printandpixel.pageflip2&hl=en_US 14 | 15 | The app uses css selectors to read and pull out comics and navigation links directly from the comic sites to provide them to the user in a mobile friendly universal format with browsing history, bookmarks and accessibility features 16 | 17 | # Adding comics 18 | Supported sites use the following format: 19 | 20 | ``` 21 | { 22 | "url":"http://nedroid.com/", 23 | "title":"Nedroid", 24 | "imageUrl":"http://nedroid.com/comics/2009-02-12-beartato-cheerupface.jpg", 25 | "imageSelector":"div#comic > img", 26 | "imageIndex":"0", 27 | "firstSelector":".nav-first a", 28 | "firstIndex":"0", 29 | "prevSelector":"div.nav-previous > a", 30 | "prevIndex":"0", 31 | "randomSelector":"http://nedroid.com/?randomcomic=1", 32 | "randomIndex":"-1", 33 | "nextSelector":"div.nav-next > a", 34 | "nextIndex":"0", 35 | "lastSelector":".nav-last a", 36 | "lastIndex":"0", 37 | "donateUrl":"https://www.patreon.com/nedroid", 38 | "nsfw":true 39 | }, 40 | ``` 41 | 42 | * **url** - url of the lastest comic for this site. This is where a new reader will start 43 | * **title** - plaintext title of the site. When searching in app, special characters like ',.|- will be ignored so don't worry about including them 44 | * **imageUrl** - featured image that will show up on the feed and to users browsing through list of comics 45 | * **imageSelector** - the css selector for getting the comic image 46 | * **imageIndex** - the index of the selected item you are using 47 | * **firstSelector** - the css selector for getting the first comic link 48 | * **firstIndex** - the index of the selected item you are using 49 | * **prevSelector** - the css selector for getting the previous comic link 50 | * **prevIndex** - the index of the selected item you are using 51 | * **randomSelector** - the css selector for getting the random comic link 52 | * **randomIndex** - the index of the selected item you are using 53 | * **nextSelector** - the css selector for getting the next comic link 54 | * **nextIndex** - the index of the selected item you are using 55 | * **lastSelector** - the css selector for getting the last comic link 56 | * **lastIndex** - the index of the selected item you are using 57 | * **donateUrl** - the donation page for the comic author if applicable. Patreon, paypal etc. Support the content 58 | * **nsfw** - (true/false) whether or not the comic contains nsfw content on ANY of its pages. Default is false. 59 | 60 | Notes: 61 | * If you want to supply a direct link to the address use index "-1". 62 | * If a comic doesn't have one of the navigation options e.g. a random button, just leave out the two relevant entries; in this case "randomSelector" and "randomIndex" 63 | * Documentation about how to write the selectors can be found here https://jsoup.org/apidocs/org/jsoup/select/Selector.html 64 | 65 | # Testing your work 66 | 67 | If you want to see how your added code will work: 68 | 69 | 1. go to https://try.jsoup.org/ 70 | 2. copy paste the page source code for the comic into the input HTML section 71 | 3. type in your CSS Query at the bottom of the page e.g. "div#comic > img" 72 | 4. you will see an ordered list of results appear below. If you don't see any results, then your selector is invalid or could not find anything on this page. 73 | 5. The number on the left of the result correponds to the index. Use this for the various index entries in the code above e.g "nextIndex". Most of the time you'll find you'll only need to use 0. 74 | 6. Test that your version of the file is proper JSON. You can copy paste the whole content into a website like this to test (you'll see an error message if there's a syntax problem) http://json.parser.online.fr/ 75 | 76 | # Need help? 77 | 78 | If you have questions on how to do this, or have questions/suggestions about the app in general, feel free to open an issue on this project :) 79 | --------------------------------------------------------------------------------