mirror of
https://gitlab.com/mysocialportal/fediverse-archiving-tools.git
synced 2024-10-18 08:53:31 +00:00
Add prompt in archiver when updating existing entry with the URL of the entry
This commit is contained in:
parent
0e29d54528
commit
0d2a93078a
3 changed files with 8 additions and 1 deletions
|
@ -98,6 +98,9 @@ void main(List<String> arguments) async {
|
|||
final entries = timelineResult.value;
|
||||
print('# Post/Comments returned for Page $page: ${entries.length}');
|
||||
for (final entry in entries) {
|
||||
if (allEntries.containsKey(entry.id)) {
|
||||
print('Replacing existing entry for ${entry.url}');
|
||||
}
|
||||
allEntries[entry.id] = entry;
|
||||
if (settings['download-images']) {
|
||||
final imageEntryResults = await imageArchive.addEntryImages(entry);
|
||||
|
|
|
@ -2,6 +2,7 @@ class FriendicaEntry {
|
|||
final Map<String, dynamic> originalJson;
|
||||
final int id;
|
||||
final String text;
|
||||
final String url;
|
||||
final int commentCount;
|
||||
final List<String> images;
|
||||
|
||||
|
@ -10,12 +11,14 @@ class FriendicaEntry {
|
|||
required this.text,
|
||||
required this.id,
|
||||
required this.commentCount,
|
||||
required this.url,
|
||||
required this.images});
|
||||
|
||||
FriendicaEntry.fromJson(Map<String, dynamic> json)
|
||||
: originalJson = json,
|
||||
id = json['id'] ?? -1,
|
||||
text = json['text'] ?? '',
|
||||
url = json['external_url'] ?? '',
|
||||
commentCount = _commentCountFromJson(json),
|
||||
images = _imagesFromJson(json);
|
||||
|
||||
|
@ -25,6 +28,7 @@ class FriendicaEntry {
|
|||
FriendicaPost{
|
||||
id: $id,
|
||||
text: $text,
|
||||
url: $url,
|
||||
commentCount: $commentCount,
|
||||
images: $images,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: friendica_archiver
|
||||
description: A simple command-line application.
|
||||
version: 1.0.0
|
||||
version: 1.1.0
|
||||
# homepage: https://www.example.com
|
||||
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue