mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
26 lines
656 B
Dart
26 lines
656 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';
|
|
import 'src/fr/otakufr/source.dart';
|
|
import 'src/fr/universanime/source.dart';
|
|
|
|
void main() {
|
|
List<Source> _sourcesList = [
|
|
gogoanimeSource,
|
|
franimeSource,
|
|
universanimeSource,
|
|
otakufr
|
|
];
|
|
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}');
|
|
}
|