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;
|
final entries = timelineResult.value;
|
||||||
print('# Post/Comments returned for Page $page: ${entries.length}');
|
print('# Post/Comments returned for Page $page: ${entries.length}');
|
||||||
for (final entry in entries) {
|
for (final entry in entries) {
|
||||||
|
if (allEntries.containsKey(entry.id)) {
|
||||||
|
print('Replacing existing entry for ${entry.url}');
|
||||||
|
}
|
||||||
allEntries[entry.id] = entry;
|
allEntries[entry.id] = entry;
|
||||||
if (settings['download-images']) {
|
if (settings['download-images']) {
|
||||||
final imageEntryResults = await imageArchive.addEntryImages(entry);
|
final imageEntryResults = await imageArchive.addEntryImages(entry);
|
||||||
|
|
|
@ -2,6 +2,7 @@ class FriendicaEntry {
|
||||||
final Map<String, dynamic> originalJson;
|
final Map<String, dynamic> originalJson;
|
||||||
final int id;
|
final int id;
|
||||||
final String text;
|
final String text;
|
||||||
|
final String url;
|
||||||
final int commentCount;
|
final int commentCount;
|
||||||
final List<String> images;
|
final List<String> images;
|
||||||
|
|
||||||
|
@ -10,12 +11,14 @@ class FriendicaEntry {
|
||||||
required this.text,
|
required this.text,
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.commentCount,
|
required this.commentCount,
|
||||||
|
required this.url,
|
||||||
required this.images});
|
required this.images});
|
||||||
|
|
||||||
FriendicaEntry.fromJson(Map<String, dynamic> json)
|
FriendicaEntry.fromJson(Map<String, dynamic> json)
|
||||||
: originalJson = json,
|
: originalJson = json,
|
||||||
id = json['id'] ?? -1,
|
id = json['id'] ?? -1,
|
||||||
text = json['text'] ?? '',
|
text = json['text'] ?? '',
|
||||||
|
url = json['external_url'] ?? '',
|
||||||
commentCount = _commentCountFromJson(json),
|
commentCount = _commentCountFromJson(json),
|
||||||
images = _imagesFromJson(json);
|
images = _imagesFromJson(json);
|
||||||
|
|
||||||
|
@ -25,6 +28,7 @@ class FriendicaEntry {
|
||||||
FriendicaPost{
|
FriendicaPost{
|
||||||
id: $id,
|
id: $id,
|
||||||
text: $text,
|
text: $text,
|
||||||
|
url: $url,
|
||||||
commentCount: $commentCount,
|
commentCount: $commentCount,
|
||||||
images: $images,
|
images: $images,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: friendica_archiver
|
name: friendica_archiver
|
||||||
description: A simple command-line application.
|
description: A simple command-line application.
|
||||||
version: 1.0.0
|
version: 1.1.0
|
||||||
# homepage: https://www.example.com
|
# homepage: https://www.example.com
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue