+9
app/post_console_printer.rb
+9
app/post_console_printer.rb
···
9
9
10
10
def display(post)
11
11
print Rainbow(post.time).bold + ' * ' + Rainbow(post.id).bold + ' * '
12
+
13
+
langs = post.record['langs']
14
+
if langs.nil?
15
+
print '[nil] * '
16
+
elsif langs != ['en']
17
+
label = langs.map { |ln| ln.upcase.tr('A-Z', "\u{1F1E6}-\u{1F1FF}") }.join
18
+
print "#{label} * "
19
+
end
20
+
12
21
puts Rainbow("https://bsky.app/profile/#{post.repo}/post/#{post.rkey}").darkgray
13
22
puts
14
23
puts @feed.colored_text(post.text)