Code Monkey home page Code Monkey logo

kocha's People

Contributors

tkmcclellan avatar

Stargazers

 avatar

Watchers

 avatar

kocha's Issues

Improve provider detection

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.

Add chapter selection to reading menu

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.

Add support for adding manga by url

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.

Proposal: Modify download modes

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 edit feature

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.