Template of a custom feed generator service for the Bluesky network in Ruby

show language label for non-English posts in print_feed

Changed files
+9
app
+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)