Skip to content

lrusso96/simple-biblio

Repository files navigation

simple-biblio

Build Status License: GPL v3

Maintainability Test Coverage

A simple Kotlin library to search for ebooks.

Getting started

Add to your project

Gradle

Add the library to dependencies

    dependencies {
         compile 'com.github.lrusso96:simple-biblio:0.6.0'
    }

Maven

    <dependency>
        <groupId>com.github.lrusso96</groupId>
        <artifactId>simple-biblio</artifactId>
        <version>0.6.0</version>
    </dependency>

Examples

A simple search (with default options) can be run in this way

    val biblio = SimpleBiblio.Builder().build()
    biblio.searchAll("Carroll")

Otherwise, a more advanced (and custom) search is available

    // custom options for first provider
    val feedbooks = Feedbooks.Builder()
            .addLanguage(Language.ITALIAN)
            .build()

    // custom options for second provider
    val libgen = LibraryGenesisBuilder(
            sortingField = Field.TITLE,
            sortingMode = Sorting.ASCENDING)
            .build()

    // build a SimpleBiblio object and get the results
    biblio = SimpleBiblio.Builder()
            .addProvider(feedbooks)
            .addProvider(libgen)
            .build()

    biblio.searchAll(query)

To get a direct download URI it's sufficient to invoke

    ebook.getDownloads()

Dependencies

Contributing

  1. clone the repository
  2. apply changes
  3. build and test before opening a PR with
./gradlew build
./gradlew test [jacocoTestReport]

About

Kotlin library to search for ebooks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages