McKael / madonctl

CLI client for the Mastodon social network API
MIT License
194 stars 9 forks source link

Emoji colon-sequences in the JSON output instead of Unicode #8

Closed bortzmeyer closed 7 years ago

bortzmeyer commented 7 years ago

The JSON output of madonctl includes emoji sequences (colon cherry_blossom colon) instead of the Unicode character (in that case, U+‎1F338). It's really annoying because it prevents to use this output directly, one need to replace all these sequences with characters.

I don't know if this choice comes from madonctl or from Mastodon but is is a bad choice. Please send normal Unicode characters instead of these sequences.

Example (in the display name):

 % madonctl status --output json --status-id 1662561 show
{"id":1662561,"uri":"tag:mamot.fr,2017-05-24:objectId=1662561:objectType=Status","url":"https://mamot.fr/@jcfrog/1662561","account":{"id":163,"username":"jcfrog","acct":"jcfrog","display_name":"jcfrog :guitar: :metal: :frog:" [...]
McKael commented 7 years ago

Yes it comes from the Mastodon API (with the HTML messages...). :/ When using the JSON (or YAML) output the object is dumped as-is.

bortzmeyer commented 7 years ago

See also https://github.com/tootsuite/mastodon/issues/717 (I hesitate to open a new bug report specifically for the API output)

McKael commented 7 years ago

@bortzmeyer I think it's been fixed in Mastodon 1.5... Or did I misread the changelog (I haven't tested yet)?

https://github.com/tootsuite/mastodon/releases/tag/v1.5.0

bortzmeyer commented 7 years ago

Yes, it seems better now. I can see the nice characters on this page (automatically produced from toots retrieved with madonctl) https://mercredifiction.bortzmeyer.org/mercredifiction-dernier.html

McKael commented 7 years ago

OK, thanks, I'll close this issue then.