This commit is contained in:
Inex Code 2022-06-18 16:25:46 +00:00
parent 80da74f0e1
commit b398d7761a

View file

@ -76,6 +76,9 @@ Future<void> _postRandomPost() async {
if (!File('/data/posts.json').existsSync()) {
return;
}
if (!File('/data/horny.json').existsSync()) {
return;
}
bool isHorny = false;
@ -116,6 +119,10 @@ void main(List<String> args) async {
await File('/data/posts.json').writeAsString(json.encode([]));
}
if (!File('/data/horny.json').existsSync()) {
await File('/data/horny.json').writeAsString(json.encode([]));
}
// Import posts from files
await _importPosts('/data/posts.txt', 'posts.json');
await _importPosts('/data/horny.txt', 'horny.json');