Update README.

This commit is contained in:
stonegate 2020-08-06 22:18:32 +08:00
parent 6f0d12606e
commit d782d06565
2 changed files with 48 additions and 11 deletions

View File

@ -44,10 +44,14 @@ Support languages
* ![English]
* ![Chinese Simplified]
* ![French]
* ![French]
Translator: ppp
* ![Spanish]
Translator: Joel
Please [Email](mailto:<tsacdop.app@gmail.com>) me you'd like to contribute to support more languages!
Credit to [Localizely](https://localizely.com/) for kind support to open source projects.
@ -58,15 +62,35 @@ Tsacdop is licensed under the [GPL v3.0](https://github.com/stonega/tsacdop/blob
## Build
1. If you don't have Flutter SDK installed, please visit offcial [Flutter][Flutter Install] site.
2. Fetch latest sorce code from master branch.
```
git clone https://github.com/stonega/tsacdop.git
```
3. Add api search api configure file.
Tsacdop uses ListenNotes API 1.0 pro to search for podcasts, which is not free, so I can not expose the API key in the repo.
If you want to build the app, you need to create a new file named `.env.dart` in lib folder. Add the following code to `.env.dart` .
You can get your own API key on [ListenNotes](https://www.listennotes.com/api/), remember that you need to get pro plan API, because basic plan dosen't provide rss link for serach result. If no api key is added, the search function in the app won't work. But you can still add podcasts by using an RSS link or importing an OMPL file.
``` dart
final environment = {"apiKey":"APIKEY"};
```
You can get your own API key on [ListenNotes](https://www.listennotes.com/api/), basic plan is free for everyone. Replace `"APIKEY"` with it.
If no api key is added, the search function in the app won't work. But you can still add podcasts by using an RSS link or importing an OMPL file.
4. Run the app with Android Studio or Visual Studio. Or the command line.
```
flutter pub get
flutter run
```
## Contribute
If you have an issue or found a bug, please raise a GitHub issue. Pull requests are also welcome.
## Archetecture
@ -82,6 +106,8 @@ If no api key is added, the search function in the app won't work. But you can s
+ provider
* Download
+ flutter_downloader
* Background task
+ workmanager
### Directory Structure
@ -91,14 +117,14 @@ src
├──home
├──home.dart [Homepage]
├──searc_podcast.dart [Search Page]
──playlist.dart [Playlist Page]
──playlist.dart [Playlist Page]
├──podcasts
├──podcast_manage.dart [Group Page]
──podcast_detail.dart [Podcast Page]
──podcast_detail.dart [Podcast Page]
├──episodes
──episode_detail.dart [Episode Page]
──episode_detail.dart [Episode Page]
├──settings
──setting.dart [Setting Page]
──setting.dart [Setting Page]
STATE
src
@ -107,14 +133,24 @@ src
├──download_state.dart [Episode Download]
├──podcast_group.dart [Podcast Groups]
├──refresh_podcast.dart [Episode Refresh]
├──setting_state.dart [Setting]
└──setting_state.dart [Setting]
Service
src
├──service
├──api_service.dart [Podcast Search]
└──ompl_builde.dart [OMPL export]
```
## Known Issue
* Playlist is unstable
## Getting Started
## Contact
You can also reach out to me directly at [tsacdop.app@gmail.com](mailto:<tsacdop.app@gmail.com>).
## Getting Started with Flutter
This project is a starting point for a Flutter application.
@ -126,6 +162,7 @@ Here are a few resources to get you started if this is your first Flutter projec
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials, samples, guidance on mobile development, and a full API reference.
[Flutter Install]: https://flutter.dev/docs/get-started/install
[tsacdop banner]: https://raw.githubusercontent.com/stonega/tsacdop/master/preview/banner.png
[build status - cirrus]: https://circleci.com/gh/stonega/tsacdop/tree/master.svg?style=shield
[build status]: https://circleci.com/gh/stonega/tsacdop/tree/master
@ -136,6 +173,7 @@ For help getting started with Flutter, view our
[English]: https://img.shields.io/badge/dynamic/json?color=%2323CCC6&label=English&query=%24.languages%5B0%5D.reviewedProgress&url=https%3A%2F%2Fapi.localizely.com%2Fv1%2Fprojects%2Fbde4e9bd-4cb2-449b-9de2-18f231ddb47d%2Fstatus&suffix=%
[Chinese Simplified]: https://img.shields.io/badge/dynamic/json?color=%2323CCC6&label=Chinese%20Simplified&query=%24.languages%5B1%5D.reviewedProgress&url=https%3A%2F%2Fapi.localizely.com%2Fv1%2Fprojects%2Fbde4e9bd-4cb2-449b-9de2-18f231ddb47d%2Fstatus&suffix=%
[French]: https://img.shields.io/badge/dynamic/json?color=%2323CCC6&label=French&query=%24.languages%5B3%5D.reviewedProgress&url=https%3A%2F%2Fapi.localizely.com%2Fv1%2Fprojects%2Fbde4e9bd-4cb2-449b-9de2-18f231ddb47d%2Fstatus&suffix=%
[Spanish]: https://img.shields.io/badge/dynamic/json?color=%2323CCC6&label=Spanish&query=%24.languages%5B5%5D.reviewedProgress&url=https%3A%2F%2Fapi.localizely.com%2Fv1%2Fprojects%2Fbde4e9bd-4cb2-449b-9de2-18f231ddb47d%2Fstatus&suffix=%
[localizely - website]: https://localizely.com/
[google play - icon]: https://img.shields.io/badge/google-playStore-%2323CCC6
[google play]: https://play.google.com/store/apps/details?id=com.stonegate.tsacdop

View File

@ -4,10 +4,9 @@ import 'dart:io';
Future<void> main() async {
final config = {
'apiKey': Platform.environment['API_KEY'],
'shareKey': Platform.environment['SHARE_KEY']
};
final filename = 'lib/.env.dart';
File(filename).writeAsString('final environment = ${json.encode(config)};');
print('Write successfully');
}
}