vim-jp / vim-jp/slacklog-generator

Gyazo の添付ファイルの mime-type を判別したい

Open
#35 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
24
Forks
9
Avg merge
21d 5h
Merged PRs (30d)
1

Description

Gyazo の添付ファイルの mime-type を判別したい。
現状 png なのか、gif なのかがわからないので、画面上に表示できない。
https://vim-jp.org/slacklog/CQ57P4XU4/2020/03/index.html#ts-1585396700.088700

取得した JSON から判別つけるのなら、見えるパス正しく入れて欲しい。
取れないのなら FallbackURL だけを表示します。

以下現状 MessageAttachment に入っている値。

name value
ServiceName Gyazo
AuthorIcon
AuthorName
AuthorSubname
Title
TitleLink https://gyazo.com/e028bb17c6f6ee17d71b3bebf50cbe51
Text
Fallback Gyazo Photo:
ThumbURL
FromURL https://gyazo.com/e028bb17c6f6ee17d71b3bebf50cbe51
ThumbWidth 0
ThumbHeight 0
ServiceIcon https://gyazo.com/favicon.ico
ID 1
OriginalURL https://gyazo.com/e028bb17c6f6ee17d71b3bebf50cbe51
VideoHTML
VideoHTMLWidth 0
VideoHTMLHeight 0
Footer
FooterIcon

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the Gyazo attachment JSON is converted into MessageAttachment, especially the fields shown in the issue and any available MIME or path data. Check the linked Slack discussion for expected behavior. Done means the UI can distinguish PNG and GIF when the JSON provides enough information, while showing only FallbackURL when it does not.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.