-
Notifications
You must be signed in to change notification settings - Fork 28
Adding new comic
This page describes in detail how to add a new comic to the existing codebase. If you are interested in adding one of your favorite comics to this list, this page is a must-read for you! Given below is a set of steps to be followed before trying to add a comic into the list.
If there is already a class for the comic of interest, no need to reinvent the wheel!
Ask yourself the following questions in that order. Stop when you first encounter a question whose answer is YES.
- Whether this comic falls under DailyComic?
- Whether this comic falls under IndexedComic?
- Whether this comic falls under ArchivedComic?
- Whether this comic falls under YearlyArchivedComic?
- Whether this comic falls under RandomIndexedComic?
If you find the answer to any of these question to be YES, then just sub-class the comic from that base-class and start implementing the 'abstract' methods. Else, you would have to inherit from the base Comic class itself!
But in all cases, you have to update the 'assets/classes.json' file to add a line containing information about this class. This is only way the app can detect that there's a new comic being added into the code-base! When adding a new comic to classes.json, be sure to include the property "new":"1" to allow notification of users.
In case you find a special 'pattern' in the comic, create a new base-class inside the package 'com.blogspot.applications4android.comicreader.comictypes'. And later add a section about this class here and create a new wiki page describing that class's purpose. Example page.
Once you have verified that all your changes are working correctly and you are able to access the comic in the app, create a Pull Request.
If there is already an issue filed to add this comic into ComicReader, please close that issue.