mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
19 lines
528 B
Dart
19 lines
528 B
Dart
import 'dart:convert';
|
|
import 'dart:developer';
|
|
import 'dart:io';
|
|
import '../model/source.dart';
|
|
import 'src/en/gogoanime/source.dart';
|
|
import 'src/fr/franime/source.dart';
|
|
|
|
void main() {
|
|
List<Source> _sourcesList = [gogoanimeSource, franimeSource];
|
|
final List<Map<String, dynamic>> jsonList =
|
|
_sourcesList.map((source) => source.toJson()).toList();
|
|
final jsonString = jsonEncode(jsonList);
|
|
|
|
final file = File('anime_index.json');
|
|
file.writeAsStringSync(jsonString);
|
|
|
|
log('JSON file created: ${file.path}');
|
|
}
|