搜索插件、代码仓与 APP 分类

GitHub 代码仓manuelvargastapia/libgen_mobile_app

LibGen

这是 Library Genesis 服务的非官方移动客户端。

LibGen 项目封面
星标
174
复刻
10
最近推送(UTC)
2022年4月27日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

LibGen Mobile


Looking for maintainers!

Due to my limited amount of time, I haven't been able to keep this project updated. The app and the server still are running and I plan it to keep like that, but currently, I'm not able to build more features. At least not at the required pace. So, contact me or simply fork and code. I'll remain aware and try to help with anything. Thanks.

F-Droid GitHub

This is a non-offical mobile client for Library Genesis service. It's an independent side project. And it's Open Source, so feel free to collaborate.

The app is built with Flutter and it's available in FDroid.

Currently, we're working mainly in Android version.

Versión en español

Features

  • Search books in SciTech or Fiction sections of Library Genesis, by title, author, series, publisher, ISBN or MD5
  • In SciTech, order results by relevance, title, year, pages or file size, and decide ordering criteria according to sorting option (newer firsts, smaller first, etc)
  • In Fiction, filter by file extension: Epub, Mobi, AZW, AZW3, FB2, PDF, RTF, and TXT; filter by a language among a large amount of options; and also, use the "Wildcard" option to search using each word as a wildcard
  • See detailed info about the books (depending on the metadata provided, some field may be not be present): cover image, title, author, description, table of contents, year, volume, series, edition, publisher, city, pages, language, ISBN, DOI, file size, and file extension
  • Show search history as suggestions
  • Switch between ligh and dark theme
  • Show info dialog
  • Available on multiple languages: German (DE), English (US), Spanish (ES), French (FR), Japanese (JP), Polish (PL), Portuguese (BR), and Chinese (CN, simplified)
  • And of course, download any book. Multiple download options are provided.

TODO

The following is a list of desired new features within the scope of the project. Notwithstanding, we're happy to hear new ideas and feeback.

  • [ ] Search books in other sections of LibGen (SciTech and Fiction already covered)
  • [ ] Allow for switching between languages, instead of only using the system's
  • [ ] Translate to other languages (see above the list of languages already covered)
  • [ ] UI improvements (smoother animations, colors, layout, fonts, etc)
  • [ ] Filter by file extension (already implement in Fiction, but it may require some extra work to do it in SciTech)

We recommend to submit first an issue to discuss ideas, instead of directly send a PR.

Environment

Flutter and Dart
  • Flutter: version 2.0.4 (channel stable)
  • Dart: version 2.12.2
Environment config

We're managing the different stages of the app (basically, development and production) throught compile time variables (check this article for information). The only environmental variable in use right now is LIBGEN_MOBILE_API. This allow us to pass a development and production API URL directly from CLI commands.

Also note that this app is using multiple flavors, therefore it has to be specifically referenced when running the app. Otherwise, you'll get the a "Gradle build failed to produce an .apk file" error.

To run the app with compile time variable plus the correct flavor, use the following command:

flutter run --dart-define=LIBGEN_API_URL=<VALUE> --flavor local

Finally, in VSCode, it could be useful define a launch.json file to debug. Such file would look like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "emulator",
            "request": "launch",
            "type": "dart",
            "args": [
                "--dart-define=LIBGEN_API_URL=http://10.0.2.2:3000",
                "--flavor",
                "local"
            ]
        },
    ]
}

Those flags also work with flutter build apk and others similar commands.

IMPORTANT

To use a phisical device to run the app, you'll need to pass the internal IP of the machine that's running the server as the value of LIBGEN_API_URL. "http://10.0.2.2:3000" will only provide access to emulators, as those are part of the same network.

Libgen API

Library Genesis doesn't provide a public API to work with, so we decided to build a backend service to consume. It's currently hosted in Heroku.

Check the repo to run your own instance and pass the corresponding URLs to the app throught compile time variables. It's an ExpressJS project; you just need to clone (or fork) the repo, install dependencies and run npm start.

During development, a forked version of this unofficial Libgen library has been used to get the data. This is the repo of our modified version.

Dependencies

The followings are all the official and third-party packages in use right now.

Internationalization

  • flutter_localizations:
    • sdk: flutter
  • intl: ^0.17.1

Additionally, for generating the needed boilerplate we used the VSCode plugin Flutter Intl. This way, is recommended using this plugin to automatically generate new code for new locales. Unfortunately, the offical docs seems to be outdated.

API requests

State management

Downloads

For downloading, we're using a fork of flutter_downloader package. Check pubspec.yaml for details.

Open download link in browser

Render HTML content

For rendering HTML, we're using a fork of simple_html_css package. Check pubspec.yaml for details.

Local storage

Code generation

Others

Manuel Vargas GitHub avatar
GitHub 作者

Manuel Vargas ↗

I'm a full-stack software developer. I love to learn new stuff and collaborate with others.

Santiago de Chile官方网站 ↗
语言DartSwiftKotlinObjective-C

依赖Flutter组件

使用的依赖

依赖清单 23 项

App 分类

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗