buxared / BananaMangaReader

Banana Manga Reader, also referred to as BMR, is an application designed to read manga on Kobo eReaders.
GNU General Public License v3.0
22 stars 2 forks source link

More sources? #2

Open Funk3 opened 1 year ago

Funk3 commented 1 year ago

I was looking at the codebase seeing where you would inject more manga apis, and it appears to be in BMRmain.py only?

If you look at other apps that do this, they tend to build a reader and allow manga source files to be external files that can be loaded to the program dependent on the user needs, and then the program standardizes the way the api is organized with the reader.

I think I need to read the codebase a little more closely, but I would like to suggest and/or assist with adding more manga sources in your initial manner, or possibly change the structure to modularize the manga sources to be external from the source code!

buxared commented 1 year ago

Thanks for starting this discussion! Yes, all of the functional code is in BMRmain.py Your approach is what I originally had in mind, but I was not armed with the necessary background (I have no formal training in software engineering or web development; I have only ever used python and matlab for scientific calculations/applications) or research to learn how and to actually do that. At the time I did not know how I could incorporate (get access to/use) apis in my code. Some apis were available on subscription and a fee, and I did not want to end up paying for something that I did not know would work for sure. So, what I ended up doing was looking at one particular source: mangakakalot, and finding how search strings are used in the url, and parsing the html sources for the search results page and manga title page (which I store as strings) for relevant information. All of this happens in BMRmain.py Noob approach for sure, but it worked! We could add more sources with the same approach, but I think that might just make the code unnecessarily complex and bloated. So, in order to do it in the more streamlined and sophisticated way, with apis for each manga source, the code would need major reorganization, which I would encourage you to do if you are interested. (Fork this repository? I'm new to github too, sorry)

Funk3 commented 1 year ago

I am currently doing a web app midterm project so I’ll be putting this in the back burner, but I’ll eventually modularize the code in the new year possibly in February? I was doing a design portion and didn’t realise how tough it’s going to be. If you’re willing to wait though I am very interested in this project!

I did a little bit of python back in the day, but I currently am a jr web dev doing a lot of JavaScript at the moment.

As for GitHub stuff I’ll fork the repo to test stuff and then make a pull request once I’ve created something that works!

buxared commented 1 year ago

Sounds good! In the meantime, if you could point me to a specific example that uses manga apis, I would like to have a look and think about it too. Thanks!

Funk3 commented 1 year ago

Check out these two repos. Neither are in Javascript but you might be able to glean from them!

https://github.com/tachiyomiorg/tachiyomi

https://github.com/Paperback-iOS