tkmcclellan / kocha Goto Github PK
View Code? Open in Web Editor NEWKocha - Black Tea - A tool for reading manga.
License: MIT License
Kocha - Black Tea - A tool for reading manga.
License: MIT License
All go files can have an init
function that's called at the start of the program. Instead of hard coding the names of each provider in a list somewhere, add a map[string]interface{}
map to provider.go
that holds a map of names to providers. each provider should add their name and value to that map in their init function. so for example:
provider.go
ProviderList := map[string]interface{}{}
func FindProvider(provider string) Provider {
return ProviderList[provider]
}
mangakakalot.go
func init() {
ProviderList["mangakakalot"] = new(Mangakakalot)
}
This would make adding providers a bit more maintainable since all you would have to do is add that in each new provider. Whenever you add a new provider, nothing needs to be changed in any other files and you can just drop it in there.
You can also use ProviderList
in other places where you need a list of providers. For instance, when adding a manga, instead of hardcoding values, you could just loop through that list.
Currently readers can only go to the next or previous chapter when reading. Add functionality to the reading menu that allows them to enter a chapter number and skip to reading that chapter.
As long as the user submits a url that comes from one of the supported providers, survey would not be necessary for adding manga. By adding a url flag, the user can just give us a url and we can add it to the list.
I think we should change the download modes. Dynamic and All will remain the same, but there's not really any value in the None type. So instead, let's make that something like "selective" or "selected" where the user has to enter what chapter/range of chapters they want to download while adding the manga. I'm thinking of using Python-like ranges to do this. so something like:
2 - chapter 2
2:10 - chapters 2 through 10
:10 - all chapters up until 10
10: - all chapters including and after 10
Plus, we can also allow for multiple ranges to be selected. just do the same thing as above but separate them by commas. so
2:5,10:20 - chapters 2 through 5 and 10 through 20.
Ultimately this will end up with inputs in the form of a comma-separated list of ranges/individual chapters. so the input should first be split by comma and then each range/chapter will be processed individually.
Adding multiple ranges will allow for overlapping ranges, and that's no problem. What we will need to do though is find some way of managing and merging ranges. Perhaps creating a Range struct that has a Merge function that allows you to merge two ranges? Not sure of exactly what to do here, it's tricky. A range should also have a function for generating a list of numbers within the range for downloading chapters and a method for detecting if a number is in the range.
Also, chapters in the selected mode will be downloaded dynamically like they are in the dynamic mode, but we shouldn't remove them after they're read or if they're out of the reading range.
Add the ability to edit added manga. Users should be pretty limited in what they can edit, but one thing they should be able to edit is the download type. So for now let's only allow editing that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.