e621_export_downloader 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/e621/artist.rb +2 -1
- data/lib/e621/bulk_update_request.rb +3 -0
- data/lib/e621/post.rb +32 -29
- data/lib/e621/tag_alias.rb +10 -0
- data/lib/e621/tag_implication.rb +15 -5
- data/lib/e621/wiki_page.rb +1 -0
- data/lib/e621_export_downloader/models/artist.rb +10 -5
- data/lib/e621_export_downloader/models/bulk_update_request.rb +15 -0
- data/lib/e621_export_downloader/models/post.rb +73 -58
- data/lib/e621_export_downloader/models/tag_alias.rb +54 -4
- data/lib/e621_export_downloader/models/tag_implication.rb +60 -9
- data/lib/e621_export_downloader/models/wiki_page.rb +6 -1
- data/lib/e621_export_downloader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ca5e1aa72caa7ce565b4887222579025187c23a13f86ec2b818367991ee6cc5
|
|
4
|
+
data.tar.gz: 393166c4a129496f7ecdd409899b644750b98a623d6501ca72c1f937d0645b62
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a2ea533d91b0f8dc403d9f4a287880815e1c955d76b28897cb80b55593c570524099760dfa37f8924c80e340cc83800955da0a5e14a042e270a9bea64f8047c
|
|
7
|
+
data.tar.gz: 7a38db5401d422e48ae51470a5363bd5bfee65c4e2f0a6095e2fb3803123ee38a7dee90afaf4904f3f3390f593f33b6064ec7f99fcb94ba79f8ea5e6d21dde25
|
data/lib/e621/artist.rb
CHANGED
|
@@ -25,16 +25,17 @@ module E621
|
|
|
25
25
|
private_class_method(def self.attributes_from_export(record)
|
|
26
26
|
{
|
|
27
27
|
id: record.id,
|
|
28
|
+
active_urls: record.active_urls,
|
|
28
29
|
created_at: record.created_at,
|
|
29
30
|
creator_id: record.creator_id,
|
|
30
31
|
group_name: record.group_name,
|
|
32
|
+
inactive_urls: record.inactive_urls,
|
|
31
33
|
is_active: record.is_active,
|
|
32
34
|
is_locked: record.is_locked,
|
|
33
35
|
linked_user_id: record.linked_user_id,
|
|
34
36
|
name: record.name,
|
|
35
37
|
other_names: record.other_names,
|
|
36
38
|
updated_at: record.updated_at,
|
|
37
|
-
urls: record.urls,
|
|
38
39
|
}
|
|
39
40
|
end)
|
|
40
41
|
end
|
|
@@ -27,10 +27,13 @@ module E621
|
|
|
27
27
|
id: record.id,
|
|
28
28
|
approver_id: record.approver_id,
|
|
29
29
|
created_at: record.created_at,
|
|
30
|
+
down_votes: record.down_votes,
|
|
30
31
|
forum_topic_id: record.forum_topic_id,
|
|
32
|
+
meh_votes: record.meh_votes,
|
|
31
33
|
script: record.script,
|
|
32
34
|
status: record.status,
|
|
33
35
|
title: record.title,
|
|
36
|
+
up_votes: record.up_votes,
|
|
34
37
|
updated_at: record.updated_at,
|
|
35
38
|
user_id: record.user_id,
|
|
36
39
|
}
|
data/lib/e621/post.rb
CHANGED
|
@@ -24,35 +24,38 @@ module E621
|
|
|
24
24
|
|
|
25
25
|
private_class_method(def self.attributes_from_export(record)
|
|
26
26
|
{
|
|
27
|
-
id:
|
|
28
|
-
approver_id:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
27
|
+
id: record.id,
|
|
28
|
+
approver_id: record.approver_id,
|
|
29
|
+
bg_color: record.bg_color,
|
|
30
|
+
change_seq: record.change_seq,
|
|
31
|
+
comment_count: record.comment_count,
|
|
32
|
+
created_at: record.created_at,
|
|
33
|
+
description: record.description,
|
|
34
|
+
down_score: record.down_score,
|
|
35
|
+
duration: record.duration,
|
|
36
|
+
fav_count: record.fav_count,
|
|
37
|
+
file_ext: record.file_ext,
|
|
38
|
+
file_size: record.file_size,
|
|
39
|
+
image_height: record.image_height,
|
|
40
|
+
image_width: record.image_width,
|
|
41
|
+
is_deleted: record.is_deleted,
|
|
42
|
+
is_flagged: record.is_flagged,
|
|
43
|
+
is_note_locked: record.is_note_locked,
|
|
44
|
+
is_pending: record.is_pending,
|
|
45
|
+
is_rating_locked: record.is_rating_locked,
|
|
46
|
+
is_status_locked: record.is_status_locked,
|
|
47
|
+
last_commented_at: record.last_commented_at,
|
|
48
|
+
last_noted_at: record.last_noted_at,
|
|
49
|
+
locked_tags: record.locked_tags,
|
|
50
|
+
md5: record.md5,
|
|
51
|
+
parent_id: record.parent_id,
|
|
52
|
+
rating: record.rating,
|
|
53
|
+
score: record.score,
|
|
54
|
+
sources: record.sources,
|
|
55
|
+
tags: record.tags,
|
|
56
|
+
up_score: record.up_score,
|
|
57
|
+
updated_at: record.updated_at,
|
|
58
|
+
uploader_id: record.uploader_id,
|
|
56
59
|
}
|
|
57
60
|
end)
|
|
58
61
|
end
|
data/lib/e621/tag_alias.rb
CHANGED
|
@@ -26,9 +26,19 @@ module E621
|
|
|
26
26
|
{
|
|
27
27
|
id: record.id,
|
|
28
28
|
antecedent_name: record.antecedent_name,
|
|
29
|
+
approver_id: record.approver_id,
|
|
29
30
|
consequent_name: record.consequent_name,
|
|
30
31
|
created_at: record.created_at,
|
|
32
|
+
# creator_id: record.creator_id,
|
|
33
|
+
down_votes: record.down_votes,
|
|
34
|
+
forum_post_id: record.forum_post_id,
|
|
35
|
+
forum_topic_id: record.forum_topic_id,
|
|
36
|
+
meh_votes: record.meh_votes,
|
|
37
|
+
post_count: record.post_count,
|
|
38
|
+
reason: record.reason,
|
|
31
39
|
status: record.status,
|
|
40
|
+
up_votes: record.up_votes,
|
|
41
|
+
updated_at: record.updated_at,
|
|
32
42
|
}
|
|
33
43
|
end)
|
|
34
44
|
end
|
data/lib/e621/tag_implication.rb
CHANGED
|
@@ -24,11 +24,21 @@ module E621
|
|
|
24
24
|
|
|
25
25
|
private_class_method(def self.attributes_from_export(record)
|
|
26
26
|
{
|
|
27
|
-
id:
|
|
28
|
-
antecedent_name:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
id: record.id,
|
|
28
|
+
antecedent_name: record.antecedent_name,
|
|
29
|
+
approver_id: record.approver_id,
|
|
30
|
+
consequent_name: record.consequent_name,
|
|
31
|
+
created_at: record.created_at,
|
|
32
|
+
# creator_id: record.creator_id,
|
|
33
|
+
descendant_names: record.descendant_names,
|
|
34
|
+
down_votes: record.down_votes,
|
|
35
|
+
forum_post_id: record.forum_post_id,
|
|
36
|
+
forum_topic_id: record.forum_topic_id,
|
|
37
|
+
meh_votes: record.meh_votes,
|
|
38
|
+
reason: record.reason,
|
|
39
|
+
status: record.status,
|
|
40
|
+
up_votes: record.up_votes,
|
|
41
|
+
updated_at: record.updated_at,
|
|
32
42
|
}
|
|
33
43
|
end)
|
|
34
44
|
end
|
data/lib/e621/wiki_page.rb
CHANGED
|
@@ -6,6 +6,9 @@ module E621ExportDownloader
|
|
|
6
6
|
class Artist
|
|
7
7
|
extend(T::Sig)
|
|
8
8
|
|
|
9
|
+
sig { returns(T::Array[String]) }
|
|
10
|
+
attr_reader(:active_urls)
|
|
11
|
+
|
|
9
12
|
sig { returns(DateTime) }
|
|
10
13
|
attr_reader(:created_at)
|
|
11
14
|
|
|
@@ -18,6 +21,9 @@ module E621ExportDownloader
|
|
|
18
21
|
sig { returns(Integer) }
|
|
19
22
|
attr_reader(:id)
|
|
20
23
|
|
|
24
|
+
sig { returns(T::Array[String]) }
|
|
25
|
+
attr_reader(:inactive_urls)
|
|
26
|
+
|
|
21
27
|
sig { returns(T::Boolean) }
|
|
22
28
|
attr_reader(:is_active)
|
|
23
29
|
|
|
@@ -36,16 +42,15 @@ module E621ExportDownloader
|
|
|
36
42
|
sig { returns(DateTime) }
|
|
37
43
|
attr_reader(:updated_at)
|
|
38
44
|
|
|
39
|
-
sig { returns(T::Array[String]) }
|
|
40
|
-
attr_reader(:urls)
|
|
41
|
-
|
|
42
45
|
sig { params(record: T::Hash[String, String]).void }
|
|
43
46
|
def initialize(record)
|
|
44
47
|
@record = T.let(record, T::Hash[String, String])
|
|
48
|
+
@active_urls = T.let(T.must(record["active_urls"]).split("\n"), T::Array[String])
|
|
45
49
|
@created_at = T.let(DateTime.parse(record["created_at"]), DateTime)
|
|
46
50
|
@creator_id = T.let(record["creator_id"].to_i, Integer)
|
|
47
51
|
@group_name = T.let(T.must(record["group_name"]).empty? ? nil : record["group_name"], T.nilable(String))
|
|
48
52
|
@id = T.let(record["id"].to_i, Integer)
|
|
53
|
+
@inactive_urls = T.let(T.must(record["inactive_urls"]).split("\n"), T::Array[String])
|
|
49
54
|
@is_active = T.let(record["is_active"] == "t", T::Boolean)
|
|
50
55
|
@is_locked = T.let(record["is_locked"] == "t", T::Boolean)
|
|
51
56
|
@linked_user_id = T.let(T.must(record["linked_user_id"]).empty? ? nil : record["linked_user_id"].to_i, T.nilable(Integer))
|
|
@@ -53,23 +58,23 @@ module E621ExportDownloader
|
|
|
53
58
|
inner = T.must(T.must(record["other_names"])[1..-2])
|
|
54
59
|
@other_names = T.let(inner.empty? ? [] : inner.split(","), T::Array[String])
|
|
55
60
|
@updated_at = T.let(DateTime.parse(record["updated_at"]), DateTime)
|
|
56
|
-
@urls = T.let(T.must(record["urls"]).split("\n"), T::Array[String])
|
|
57
61
|
end
|
|
58
62
|
|
|
59
63
|
sig { params(_args: T.untyped).returns(String) }
|
|
60
64
|
def to_json(*_args)
|
|
61
65
|
{
|
|
66
|
+
active_urls: @active_urls,
|
|
62
67
|
created_at: @created_at,
|
|
63
68
|
creator_id: @creator_id,
|
|
64
69
|
group_name: @group_name,
|
|
65
70
|
id: @id,
|
|
71
|
+
inactive_urls: @inactive_urls,
|
|
66
72
|
is_active: @is_active,
|
|
67
73
|
is_locked: @is_locked,
|
|
68
74
|
linked_user_id: @linked_user_id,
|
|
69
75
|
name: @name,
|
|
70
76
|
other_names: @other_names,
|
|
71
77
|
updated_at: @updated_at,
|
|
72
|
-
urls: @urls,
|
|
73
78
|
}.to_json
|
|
74
79
|
end
|
|
75
80
|
end
|
|
@@ -12,12 +12,18 @@ module E621ExportDownloader
|
|
|
12
12
|
sig { returns(DateTime) }
|
|
13
13
|
attr_reader(:created_at)
|
|
14
14
|
|
|
15
|
+
sig { returns(Integer) }
|
|
16
|
+
attr_reader(:down_votes)
|
|
17
|
+
|
|
15
18
|
sig { returns(T.nilable(Integer)) }
|
|
16
19
|
attr_reader(:forum_topic_id)
|
|
17
20
|
|
|
18
21
|
sig { returns(Integer) }
|
|
19
22
|
attr_reader(:id)
|
|
20
23
|
|
|
24
|
+
sig { returns(Integer) }
|
|
25
|
+
attr_reader(:meh_votes)
|
|
26
|
+
|
|
21
27
|
sig { returns(String) }
|
|
22
28
|
attr_reader(:script)
|
|
23
29
|
|
|
@@ -27,6 +33,9 @@ module E621ExportDownloader
|
|
|
27
33
|
sig { returns(T.nilable(String)) }
|
|
28
34
|
attr_reader(:title)
|
|
29
35
|
|
|
36
|
+
sig { returns(Integer) }
|
|
37
|
+
attr_reader(:up_votes)
|
|
38
|
+
|
|
30
39
|
sig { returns(DateTime) }
|
|
31
40
|
attr_reader(:updated_at)
|
|
32
41
|
|
|
@@ -38,11 +47,14 @@ module E621ExportDownloader
|
|
|
38
47
|
@record = T.let(record, T::Hash[String, String])
|
|
39
48
|
@approver_id = T.let(T.must(record["approver_id"]).empty? ? nil : record["approver_id"].to_i, T.nilable(Integer))
|
|
40
49
|
@created_at = T.let(DateTime.parse(record["created_at"]), DateTime)
|
|
50
|
+
@down_votes = T.let(record["down_votes"].to_i, Integer)
|
|
41
51
|
@forum_topic_id = T.let(T.must(record["forum_topic_id"]).empty? ? nil : record["forum_topic_id"].to_i, T.nilable(Integer))
|
|
42
52
|
@id = T.let(record["id"].to_i, Integer)
|
|
53
|
+
@meh_votes = T.let(record["meh_votes"].to_i, Integer)
|
|
43
54
|
@script = T.let(T.must(record["script"]), String)
|
|
44
55
|
@status = T.let(T.must(record["status"]), String)
|
|
45
56
|
@title = T.let(T.must(record["title"]).empty? ? nil : record["title"], T.nilable(String))
|
|
57
|
+
@up_votes = T.let(record["up_votes"].to_i, Integer)
|
|
46
58
|
@updated_at = T.let(DateTime.parse(record["updated_at"]), DateTime)
|
|
47
59
|
@user_id = T.let(record["user_id"].to_i, Integer)
|
|
48
60
|
end
|
|
@@ -52,11 +64,14 @@ module E621ExportDownloader
|
|
|
52
64
|
{
|
|
53
65
|
approver_id: @approver_id,
|
|
54
66
|
created_at: @created_at,
|
|
67
|
+
down_votes: @down_votes,
|
|
55
68
|
forum_topic_id: @forum_topic_id,
|
|
56
69
|
id: @id,
|
|
70
|
+
meh_votes: @meh_votes,
|
|
57
71
|
script: @script,
|
|
58
72
|
status: @status,
|
|
59
73
|
title: @title,
|
|
74
|
+
up_votes: @up_votes,
|
|
60
75
|
updated_at: @updated_at,
|
|
61
76
|
user_id: @user_id,
|
|
62
77
|
}.to_json
|
|
@@ -9,6 +9,9 @@ module E621ExportDownloader
|
|
|
9
9
|
sig { returns(T.nilable(Integer)) }
|
|
10
10
|
attr_reader(:approver_id)
|
|
11
11
|
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_reader(:bg_color)
|
|
14
|
+
|
|
12
15
|
sig { returns(Integer) }
|
|
13
16
|
attr_reader(:change_seq)
|
|
14
17
|
|
|
@@ -63,6 +66,12 @@ module E621ExportDownloader
|
|
|
63
66
|
sig { returns(T::Boolean) }
|
|
64
67
|
attr_reader(:is_status_locked)
|
|
65
68
|
|
|
69
|
+
sig { returns(T.nilable(DateTime)) }
|
|
70
|
+
attr_reader(:last_commented_at)
|
|
71
|
+
|
|
72
|
+
sig { returns(T.nilable(DateTime)) }
|
|
73
|
+
attr_reader(:last_noted_at)
|
|
74
|
+
|
|
66
75
|
sig { returns(String) }
|
|
67
76
|
attr_reader(:locked_tags)
|
|
68
77
|
|
|
@@ -96,69 +105,75 @@ module E621ExportDownloader
|
|
|
96
105
|
sig { params(record: T::Hash[String, String]).void }
|
|
97
106
|
def initialize(record)
|
|
98
107
|
@record = T.let(record, T::Hash[String, String])
|
|
99
|
-
@approver_id
|
|
100
|
-
@
|
|
101
|
-
@
|
|
102
|
-
@
|
|
103
|
-
@
|
|
104
|
-
@
|
|
105
|
-
@
|
|
106
|
-
@
|
|
107
|
-
@
|
|
108
|
-
@
|
|
109
|
-
@
|
|
110
|
-
@
|
|
111
|
-
@
|
|
112
|
-
@
|
|
113
|
-
@
|
|
114
|
-
@
|
|
115
|
-
@
|
|
116
|
-
@
|
|
117
|
-
@
|
|
118
|
-
@
|
|
119
|
-
@
|
|
120
|
-
@
|
|
121
|
-
@
|
|
122
|
-
@
|
|
123
|
-
@
|
|
124
|
-
@
|
|
125
|
-
@
|
|
126
|
-
@
|
|
127
|
-
@
|
|
108
|
+
@approver_id = T.let(T.must(record["approver_id"]).empty? ? nil : record["approver_id"].to_i, T.nilable(Integer))
|
|
109
|
+
@bg_color = T.let(T.must(record["bg_color"]).empty? ? nil : record["bg_color"], T.nilable(String))
|
|
110
|
+
@change_seq = T.let(record["change_seq"].to_i, Integer)
|
|
111
|
+
@comment_count = T.let(record["comment_count"].to_i, Integer)
|
|
112
|
+
@created_at = T.let(DateTime.parse(record["created_at"]), DateTime)
|
|
113
|
+
@description = T.let(T.must(record["description"]).gsub("\r\n", "\n"), String)
|
|
114
|
+
@down_score = T.let(record["down_score"].to_i, Integer)
|
|
115
|
+
@duration = T.let(T.must(record["duration"]).empty? ? nil : record["duration"].to_f, T.nilable(Float))
|
|
116
|
+
@fav_count = T.let(record["fav_count"].to_i, Integer)
|
|
117
|
+
@file_ext = T.let(T.must(record["file_ext"]), String)
|
|
118
|
+
@file_size = T.let(record["file_size"].to_i, Integer)
|
|
119
|
+
@id = T.let(record["id"].to_i, Integer)
|
|
120
|
+
@image_height = T.let(record["image_height"].to_i, Integer)
|
|
121
|
+
@image_width = T.let(record["image_width"].to_i, Integer)
|
|
122
|
+
@is_deleted = T.let(record["is_deleted"] == "t", T::Boolean)
|
|
123
|
+
@is_flagged = T.let(record["is_flagged"] == "t", T::Boolean)
|
|
124
|
+
@is_note_locked = T.let(record["is_note_locked"] == "t", T::Boolean)
|
|
125
|
+
@is_pending = T.let(record["is_pending"] == "t", T::Boolean)
|
|
126
|
+
@is_rating_locked = T.let(record["is_rating_locked"] == "t", T::Boolean)
|
|
127
|
+
@is_status_locked = T.let(record["is_status_locked"] == "t", T::Boolean)
|
|
128
|
+
@last_commented_at = T.let(T.must(record["last_commented_at"]).empty? ? nil : DateTime.parse(record["last_commented_at"]), T.nilable(DateTime))
|
|
129
|
+
@last_noted_at = T.let(T.must(record["last_noted_at"]).empty? ? nil : DateTime.parse(record["last_noted_at"]), T.nilable(DateTime))
|
|
130
|
+
@locked_tags = T.let(T.must(record["locked_tags"]), String)
|
|
131
|
+
@md5 = T.let(T.must(record["md5"]).empty? ? nil : record["md5"], T.nilable(String))
|
|
132
|
+
@parent_id = T.let(T.must(record["parent_id"]).empty? ? nil : record["parent_id"].to_i, T.nilable(Integer))
|
|
133
|
+
@rating = T.let(T.must(record["rating"]), String)
|
|
134
|
+
@score = T.let(record["score"].to_i, Integer)
|
|
135
|
+
@sources = T.let(T.must(record["source"]).gsub("\r\n", "\n").split("\n"), T::Array[String])
|
|
136
|
+
@tags = T.let(T.must(record["tag_string"]).split, T::Array[String])
|
|
137
|
+
@up_score = T.let(record["up_score"].to_i, Integer)
|
|
138
|
+
@updated_at = T.let(T.must(record["updated_at"]).empty? ? nil : DateTime.parse(record["updated_at"]), T.nilable(DateTime))
|
|
139
|
+
@uploader_id = T.let(T.must(record["uploader_id"]).empty? ? nil : record["uploader_id"].to_i, T.nilable(Integer))
|
|
128
140
|
end
|
|
129
141
|
|
|
130
142
|
sig { params(_args: T.untyped).returns(String) }
|
|
131
143
|
def to_json(*_args)
|
|
132
144
|
{
|
|
133
|
-
approver_id:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
145
|
+
approver_id: @approver_id,
|
|
146
|
+
bg_color: @bg_color,
|
|
147
|
+
change_seq: @change_seq,
|
|
148
|
+
comment_count: @comment_count,
|
|
149
|
+
created_at: @created_at,
|
|
150
|
+
description: @description,
|
|
151
|
+
down_score: @down_score,
|
|
152
|
+
duration: @duration,
|
|
153
|
+
fav_count: @fav_count,
|
|
154
|
+
file_ext: @file_ext,
|
|
155
|
+
file_size: @file_size,
|
|
156
|
+
id: @id,
|
|
157
|
+
image_height: @image_height,
|
|
158
|
+
image_width: @image_width,
|
|
159
|
+
is_deleted: @is_deleted,
|
|
160
|
+
is_flagged: @is_flagged,
|
|
161
|
+
is_note_locked: @is_note_locked,
|
|
162
|
+
is_pending: @is_pending,
|
|
163
|
+
is_rating_locked: @is_rating_locked,
|
|
164
|
+
is_status_locked: @is_status_locked,
|
|
165
|
+
last_commented_at: @last_commented_at,
|
|
166
|
+
last_noted_at: @last_noted_at,
|
|
167
|
+
locked_tags: @locked_tags,
|
|
168
|
+
md5: @md5,
|
|
169
|
+
parent_id: @parent_id,
|
|
170
|
+
rating: @rating,
|
|
171
|
+
score: @score,
|
|
172
|
+
sources: @sources,
|
|
173
|
+
tags: @tags,
|
|
174
|
+
up_score: @up_score,
|
|
175
|
+
updated_at: @updated_at,
|
|
176
|
+
uploader_id: @uploader_id,
|
|
162
177
|
}.to_json
|
|
163
178
|
end
|
|
164
179
|
end
|
|
@@ -9,36 +9,86 @@ module E621ExportDownloader
|
|
|
9
9
|
sig { returns(String) }
|
|
10
10
|
attr_reader(:antecedent_name)
|
|
11
11
|
|
|
12
|
+
sig { returns(T.nilable(Integer)) }
|
|
13
|
+
attr_reader(:approver_id)
|
|
14
|
+
|
|
12
15
|
sig { returns(String) }
|
|
13
16
|
attr_reader(:consequent_name)
|
|
14
17
|
|
|
15
18
|
sig { returns(T.nilable(DateTime)) }
|
|
16
19
|
attr_reader(:created_at)
|
|
17
20
|
|
|
21
|
+
# sig { returns(T.nilable(Integer)) }
|
|
22
|
+
# attr_reader(:creator_id)
|
|
23
|
+
|
|
24
|
+
sig { returns(Integer) }
|
|
25
|
+
attr_reader(:down_votes)
|
|
26
|
+
|
|
27
|
+
sig { returns(T.nilable(Integer)) }
|
|
28
|
+
attr_reader(:forum_post_id)
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader(:forum_topic_id)
|
|
32
|
+
|
|
18
33
|
sig { returns(Integer) }
|
|
19
34
|
attr_reader(:id)
|
|
20
35
|
|
|
36
|
+
sig { returns(Integer) }
|
|
37
|
+
attr_reader(:meh_votes)
|
|
38
|
+
|
|
39
|
+
sig { returns(Integer) }
|
|
40
|
+
attr_reader(:post_count)
|
|
41
|
+
|
|
42
|
+
sig { returns(String) }
|
|
43
|
+
attr_reader(:reason)
|
|
44
|
+
|
|
21
45
|
sig { returns(String) }
|
|
22
46
|
attr_reader(:status)
|
|
23
47
|
|
|
48
|
+
sig { returns(Integer) }
|
|
49
|
+
attr_reader(:up_votes)
|
|
50
|
+
|
|
51
|
+
sig { returns(T.nilable(DateTime)) }
|
|
52
|
+
attr_reader(:updated_at)
|
|
53
|
+
|
|
24
54
|
sig { params(record: T::Hash[String, String]).void }
|
|
25
55
|
def initialize(record)
|
|
26
|
-
@record
|
|
56
|
+
@record = T.let(record, T::Hash[String, String])
|
|
27
57
|
@antecedent_name = T.let(T.must(record["antecedent_name"]), String)
|
|
58
|
+
@approver_id = T.let(T.must(record["approver_id"]).empty? ? nil : record["approver_id"].to_i, T.nilable(Integer))
|
|
28
59
|
@consequent_name = T.let(T.must(record["consequent_name"]), String)
|
|
29
|
-
@created_at
|
|
30
|
-
@
|
|
31
|
-
@
|
|
60
|
+
@created_at = T.let(T.must(record["created_at"]).empty? ? nil : DateTime.parse(record["created_at"]), T.nilable(DateTime))
|
|
61
|
+
# @creator_id = T.let(T.must(record["creator_id"]).empty? ? nil : record["creator_id"].to_i, T.nilable(Integer))
|
|
62
|
+
@down_votes = T.let(record["down_votes"].to_i, Integer)
|
|
63
|
+
@forum_post_id = T.let(T.must(record["forum_post_id"]).empty? ? nil : record["forum_post_id"].to_i, T.nilable(Integer))
|
|
64
|
+
@forum_topic_id = T.let(T.must(record["forum_topic_id"]).empty? ? nil : record["forum_topic_id"].to_i, T.nilable(Integer))
|
|
65
|
+
@id = T.let(record["id"].to_i, Integer)
|
|
66
|
+
@meh_votes = T.let(record["meh_votes"].to_i, Integer)
|
|
67
|
+
@post_count = T.let(record["post_count"].to_i, Integer)
|
|
68
|
+
@reason = T.let(T.must(record["reason"]), String)
|
|
69
|
+
@status = T.let(T.must(record["status"]), String)
|
|
70
|
+
@up_votes = T.let(record["up_votes"].to_i, Integer)
|
|
71
|
+
@updated_at = T.let(T.must(record["updated_at"]).empty? ? nil : DateTime.parse(record["updated_at"]), T.nilable(DateTime))
|
|
32
72
|
end
|
|
33
73
|
|
|
34
74
|
sig { params(_args: T.untyped).returns(String) }
|
|
35
75
|
def to_json(*_args)
|
|
36
76
|
{
|
|
37
77
|
antecedent_name: @antecedent_name,
|
|
78
|
+
approver_id: @approver_id,
|
|
38
79
|
consequent_name: @consequent_name,
|
|
39
80
|
created_at: @created_at,
|
|
81
|
+
# creator_id: @creator_id,
|
|
82
|
+
down_votes: @down_votes,
|
|
83
|
+
forum_post_id: @forum_post_id,
|
|
84
|
+
forum_topic_id: @forum_topic_id,
|
|
40
85
|
id: @id,
|
|
86
|
+
meh_votes: @meh_votes,
|
|
87
|
+
post_count: @post_count,
|
|
88
|
+
reason: @reason,
|
|
41
89
|
status: @status,
|
|
90
|
+
up_votes: @up_votes,
|
|
91
|
+
updated_at: @updated_at,
|
|
42
92
|
}.to_json
|
|
43
93
|
end
|
|
44
94
|
end
|
|
@@ -9,36 +9,87 @@ module E621ExportDownloader
|
|
|
9
9
|
sig { returns(String) }
|
|
10
10
|
attr_reader(:antecedent_name)
|
|
11
11
|
|
|
12
|
+
sig { returns(T.nilable(Integer)) }
|
|
13
|
+
attr_reader(:approver_id)
|
|
14
|
+
|
|
12
15
|
sig { returns(String) }
|
|
13
16
|
attr_reader(:consequent_name)
|
|
14
17
|
|
|
15
18
|
sig { returns(T.nilable(DateTime)) }
|
|
16
19
|
attr_reader(:created_at)
|
|
17
20
|
|
|
21
|
+
# sig { returns(T.nilable(Integer)) }
|
|
22
|
+
# attr_reader(:creator_id)
|
|
23
|
+
|
|
24
|
+
sig { returns(T::Array[String]) }
|
|
25
|
+
attr_reader(:descendant_names)
|
|
26
|
+
|
|
27
|
+
sig { returns(Integer) }
|
|
28
|
+
attr_reader(:down_votes)
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader(:forum_post_id)
|
|
32
|
+
|
|
33
|
+
sig { returns(T.nilable(Integer)) }
|
|
34
|
+
attr_reader(:forum_topic_id)
|
|
35
|
+
|
|
18
36
|
sig { returns(Integer) }
|
|
19
37
|
attr_reader(:id)
|
|
20
38
|
|
|
39
|
+
sig { returns(Integer) }
|
|
40
|
+
attr_reader(:meh_votes)
|
|
41
|
+
|
|
42
|
+
sig { returns(String) }
|
|
43
|
+
attr_reader(:reason)
|
|
44
|
+
|
|
21
45
|
sig { returns(String) }
|
|
22
46
|
attr_reader(:status)
|
|
23
47
|
|
|
48
|
+
sig { returns(Integer) }
|
|
49
|
+
attr_reader(:up_votes)
|
|
50
|
+
|
|
51
|
+
sig { returns(T.nilable(DateTime)) }
|
|
52
|
+
attr_reader(:updated_at)
|
|
53
|
+
|
|
24
54
|
sig { params(record: T::Hash[String, String]).void }
|
|
25
55
|
def initialize(record)
|
|
26
|
-
@record
|
|
56
|
+
@record = T.let(record, T::Hash[String, String])
|
|
27
57
|
@antecedent_name = T.let(T.must(record["antecedent_name"]), String)
|
|
58
|
+
@approver_id = T.let(T.must(record["approver_id"]).empty? ? nil : record["approver_id"].to_i, T.nilable(Integer))
|
|
28
59
|
@consequent_name = T.let(T.must(record["consequent_name"]), String)
|
|
29
|
-
@created_at
|
|
30
|
-
@
|
|
31
|
-
|
|
60
|
+
@created_at = T.let(T.must(record["created_at"]).empty? ? nil : DateTime.parse(record["created_at"]), T.nilable(DateTime))
|
|
61
|
+
# @creator_id = T.let(T.must(record["creator_id"]).empty? ? nil : record["creator_id"].to_i, T.nilable(Integer))
|
|
62
|
+
inner = T.must(T.must(record["descendant_names"])[1..-2])
|
|
63
|
+
@descendant_names = T.let(inner.empty? ? [] : inner.split(","), T::Array[String])
|
|
64
|
+
@down_votes = T.let(record["down_votes"].to_i, Integer)
|
|
65
|
+
@forum_post_id = T.let(T.must(record["forum_post_id"]).empty? ? nil : record["forum_post_id"].to_i, T.nilable(Integer))
|
|
66
|
+
@forum_topic_id = T.let(T.must(record["forum_topic_id"]).empty? ? nil : record["forum_topic_id"].to_i, T.nilable(Integer))
|
|
67
|
+
@id = T.let(record["id"].to_i, Integer)
|
|
68
|
+
@meh_votes = T.let(record["meh_votes"].to_i, Integer)
|
|
69
|
+
@reason = T.let(T.must(record["reason"]), String)
|
|
70
|
+
@status = T.let(T.must(record["status"]), String)
|
|
71
|
+
@up_votes = T.let(record["up_votes"].to_i, Integer)
|
|
72
|
+
@updated_at = T.let(T.must(record["updated_at"]).empty? ? nil : DateTime.parse(record["updated_at"]), T.nilable(DateTime))
|
|
32
73
|
end
|
|
33
74
|
|
|
34
75
|
sig { params(_args: T.untyped).returns(String) }
|
|
35
76
|
def to_json(*_args)
|
|
36
77
|
{
|
|
37
|
-
antecedent_name:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
78
|
+
antecedent_name: @antecedent_name,
|
|
79
|
+
approver_id: @approver_id,
|
|
80
|
+
consequent_name: @consequent_name,
|
|
81
|
+
created_at: @created_at,
|
|
82
|
+
# creator_id: @creator_id,
|
|
83
|
+
descendant_names: @descendant_names,
|
|
84
|
+
down_votes: @down_votes,
|
|
85
|
+
forum_post_id: @forum_post_id,
|
|
86
|
+
forum_topic_id: @forum_topic_id,
|
|
87
|
+
id: @id,
|
|
88
|
+
meh_votes: @meh_votes,
|
|
89
|
+
reason: @reason,
|
|
90
|
+
status: @status,
|
|
91
|
+
up_votes: @up_votes,
|
|
92
|
+
updated_at: @updated_at,
|
|
42
93
|
}.to_json
|
|
43
94
|
end
|
|
44
95
|
end
|
|
@@ -21,6 +21,9 @@ module E621ExportDownloader
|
|
|
21
21
|
sig { returns(T::Boolean) }
|
|
22
22
|
attr_reader(:is_locked)
|
|
23
23
|
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader(:parent)
|
|
26
|
+
|
|
24
27
|
sig { returns(String) }
|
|
25
28
|
attr_reader(:title)
|
|
26
29
|
|
|
@@ -38,7 +41,8 @@ module E621ExportDownloader
|
|
|
38
41
|
@creator_id = T.let(T.must(record["creator_id"]).empty? ? nil : record["creator_id"].to_i, T.nilable(Integer))
|
|
39
42
|
@id = T.let(record["id"].to_i, Integer)
|
|
40
43
|
@is_locked = T.let(record["is_locked"] == "t", T::Boolean)
|
|
41
|
-
@
|
|
44
|
+
@parent = T.let(T.must(record["parent"]).empty? ? nil : record["parent"], T.nilable(String))
|
|
45
|
+
@title = T.let(T.must(record["title"]), String)
|
|
42
46
|
@updated_at = T.let(T.must(record["updated_at"]).empty? ? nil : DateTime.parse(record["updated_at"]), T.nilable(DateTime))
|
|
43
47
|
@updater_id = T.let(T.must(record["updater_id"]).empty? ? nil : record["updater_id"].to_i, T.nilable(Integer))
|
|
44
48
|
end
|
|
@@ -51,6 +55,7 @@ module E621ExportDownloader
|
|
|
51
55
|
creator_id: @creator_id,
|
|
52
56
|
id: @id,
|
|
53
57
|
is_locked: @is_locked,
|
|
58
|
+
parent: @parent,
|
|
54
59
|
title: @title,
|
|
55
60
|
updated_at: @updated_at,
|
|
56
61
|
updater_id: @updater_id,
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: e621_export_downloader
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Donovan_DMC
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-06-
|
|
10
|
+
date: 2026-06-24 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: csv
|