ãã®èšäºã®å¯Ÿè±¡
ïœ00幎代åé ã«ããŒã ããŒãžäœã£ãŠããŠãçŸåšæŸçœ®äžâŠâŠãšãã人ããããã¯ãããã人ããäŸé ŒãããŠæã®ãã©ã«ããåãåã£ã人ã察象ã«ãªããŸãã
ã¹ãã«çã«ã¯jQuery(Bootstrap)ãªãäœãšãå¢ïœïŒããã¯ã«ãé¢å¿ãããïŒSPAåå¿è
å¢ãæ³å®ããŠããŸãã
æé
1.æ¬åœã«èªåã§ããå¿ èŠããããèãã
WebãµãŒãã¹ãæ°Ÿæ¿«ããçŸåšãçŸåšãµã€ãã«ããæ©èœãæ¬åœã«èªåã§æäŸããå¿ èŠããããèããŸãããã
æ¥èš
ãŸãææåã¯ããã°ãžã®ç§»è¡ã§ãããé»æŽå²ãæ¶ã人ãå€ãã§ãããéã«éå»ã®æ¥èšã¿ãããªããã§ãæ®ããŠãããããšæã人ãããããšæããŸãããŠãããããŒã ããŒãžã¯æŸçœ®ããŠãŠæ¥èšã«ãããéšåã ãæµç³ã«ããã°ã«ç§»è¡ããŠã人ãå€ãããšæããŸããã
äœããã®çç±ã§ããã°ã«ç§»è¡ã§ããªããäžé©åã ãšæãå Žåã¯ã¹ã¯ã¬ã€ãã³ã°ããŠæç« ããŒã¿ãmdããjsonã«çºããŠãä»æµè¡ãã®Gatsbyãããã«æãåºãã®ãè¯ãã®ã§ã¯ãªãã§ããããã
ã€ã©ã¹ã
ããã¯çŸè¡ã®ã·ã§ã¢ãšããŠãã·ã¹ãã çã«ã**pixivãžäžžæãããã®ãäžçªåŠ¥åœ**ããšæããŸãã
ç»åã®ã£ã©ãªãŒç³»ã®ã©ã€ãã©ãªãå
¥ããŠèªåã®ãµã€ãã§èŠããããšãã§ããŸãããpixivãšäºé管çã«ãªã£ãŠæŸçœ®ããå¯èœæ§ãé«ãããšã
å°èª¬
**ããã¯é£ããã**æçš¿ãµã€ãã¯æããå±±ã»ã©ãããŸããããªãããå§ãè²ãã€ããŠããããã®ã§âŠâŠãïŒ2ïœ3幎ã§ééããªããšããæå³ã§ïŒå®å®ããŠãŠããžã£ã³ã«åããã§äžåŒ·ã¿ãããªã®ãããã°ãããã§ããã
ããš00幎代åé ã£ãŠãWebå°èª¬ãªãã§ã¯ãªããè¡šçŸãç®æãããçãªæµãããã£ãŠãå°èª¬æ¬æäžã«æ¿çµµç»åã¶ã¡ããã ããJSããã©ã³ãã¿ã°åŒããã£ãŠããããå°èª¬ãããããããã®ã§ãããããžãå®ãå¿
èŠãããïŒã®ããã¯ãåæïŒããã£ããããã®ç³»èãçŸä»£ã®æè¡ã§æŽã«é²åãããããšããæ°éªšã®æ¹ã¯èªåãå
šç¶ã¢ãªã ãšæããŸãã
æ²ç€ºæ¿
ãããé£ããã SNSã®çŽæ¥äº€æµãããã·ã¥ã¿ã°äº€æµã§ä»£æ¿ã§ãã¡ãã£ãŠããã§å®å
šã«ã¯åºæ¥ãŠãªãã®ã§ããã¢ã«ãŠã³ããæããªããŠãæžãããå人管çã®ãã©ãŒã©ã ãã®ããŒãºã¯ç¢ºãã«ãããã§ããã
ãã åœæã§ãããšããã®CGIïŒæ»èªïŒãPerl/PHPïŒãã ã®ãã°ãã¡ã€ã«ã§åºæ¥ãŠãã®ã«å¯ŸããçŸåšã¯ããã¯ãšã³ãç³»èšèª(Ruby/PHPç) + ãã¬ãŒã ã¯ãŒã¯ + DBãæ®éãã€ãä»æã®èšèšã ãšããã¯ãšã³ãã¯APIã®ã¿ãšãªã£ãŠã衚瀺é¢ã¯ããã³ããšã³ãã§ããå¿
èŠããããšæ·å±
äžãããŸãã£ãŠããã§ããããçã£åããããã«ã¯ããã¯ãšã³ãã®å匷ãã¬ãããªããªããšãã€ãããšã
OSSã®ãã©ãŒã©ã ã¢ããªã調ã¹ãŸããããéèŠããããåããã®ãšãä»ã ãšããã¯ãšã³ãAPI+ããã³ããšã³ãã®ã»ããæäŸã«ãªãããªããã€å¯çµåã«ãªããããåŸãªãã®ã§ãä»äžã€éçºãçãäžãã£ãŠãªãå°è±¡ãåããŸãããçŸè¡åé¡ãªãåããŠãã®ãªããã®ãŸãŸïŒSNS亀æµã§éããŠãããã®ã§ã¯ãšããæ觊ã¯ãããŸããã
ã²ãŒã ç³»ãã£ããã¢ããªã®ã€ã¡ãŒãžã匷ãã§ãããdiscordãšãã§äžžæãã§ããªãããªãŒãšããã®ã¯èãããããŸããã䜿ã£ãããšããªãã®ã§ïŒry
ãã£ãã
æ²ç€ºæ¿ãšåããdiscordã«äžžæãã§ããªãããªïœïŒry
2. Webã¹ã¯ã¬ã€ãã³ã°ããŠHTMLããå®ããŒã¿ãåãåºããŠæŽåœ¢ãã
æã¯HTMLãã¡ã€ã«ã®äžã«è£
食ããŒã¿ïŒfontã¿ã°ïŒãå®ããŒã¿ãå«ããŠå
šãŠãè©°ãŸã£ãŠããã®ã§ã解æããŠãªããžã§ã¯ãã®åœ¢ã«çºããïŒïŒã¹ã¯ã¬ã€ãã³ã°ïŒã®ã¯å¿
é ã§ããã**DOMããtableã¿ã°ããã²ãããæãç¶ããã®ã âŠâŠ**â
ã²ãŒã æ»ç¥ãµã€ããšãããŒã¿ç³»ãµã€ãã¯ããã®å·¥æ°ãèŠæããšããæ¹ãããã§ããæœåºãããããšãªããã䜿ãåæãæªããšãè²ã
ããŒã¿æŽåœ¢ããããªããšæãã®ã§ã延ã
ãšããŒã¿æŽåœ¢ããããšã«ãªããŸãïŒäœéšè«ïŒ
ãšããã§ã¹ã¯ã¬ã€ãã³ã°ãšããã°Python ïŒãšãããBeautifulSoupïŒããªã¹ã¹ã¡ãšãããŠããŸããããWebããã³ããšã³ãç³»ã®æè¡ã¯ä»æ¹ãªãã«ãããPythonãŸã§æåºãã®ã¯ããã€âŠâŠããšæãæ¹ãå€ãããšæããŸãã
ããããæ¹ã¯ãããããèªåã®ãµã€ãã§ããããšã掻ããã
- ããŒã«ã«ã®éçºãµãŒããŒïŒæã£åãæ©ãã®ã¯VSCodeã®æ¡åŒµæ©èœã®LiveServerãšãïŒãçšæ
- èªãµã€ãã«JSã®ã¹ã¯ã¬ã€ãã³ã°ããã°ã©ã ãä»èŸŒãã§ããŒã¿ãªããžã§ã¯ããäœã
- 以äžã®JSã§JSONãã¡ã€ã«ãçæããŠããŠã³ããŒãããã
export const downloadJsonFile = (data: unknown, baseName: string): void => {
const blob = new Blob([JSON.stringify(data)], { "type": "application/json" })
const fileName = `${baseName}.json`
const url = URL.createObjectURL(blob)
//aã¿ã°ãçæããã¯ãªãã¯ããããšã«ããŠDLããããšããã¢ãããŒããåã
//ããªãç¡çããæãããçŸç¶ããããã¹ããã©ã¯ãã£ã¹ãªæš¡æ§ã
const aTag = window.document.createElement("a")
document.body.appendChild(aTag)
aTag.download = fileName
aTag.href = url
aTag.click()
aTag.remove()
URL.revokeObjectURL(url) //çæããURLãä¿æãããŠããŸãã®ã§è§£æŸãã
}
ããããæãã§å¯ŸåŠããŸããããã¡ãªã¿ã«èªåã¯JSã§ãã¡ã€ã«ãçæâDLãããããã®ãç¥ããªããŠãéäžãŸã§console.logã«åãåºãâãšãã£ã¿ã«ã³ããã§ãã£ããšJSONãã¡ã€ã«ãäœã£ãŠãŸããðš
åè:JavaScriptã§ãã¡ã€ã«ããŠã³ããŒãåŠçãå®çŸãã - Qiita
3.æ§ãµã€ããšã®é£æºãæ°ã«ãã€ã€å¥œããªæè¡ã§äœãçŽã
ããããäœãçŽããããšæããããã§ããããµã€ãã®èŠæš¡ãšããŠã¯ãããã倧ããã§ãããïŒãšãªããšãæ§ãµã€ããšç¹ãããæèãã€ã€åŸã
ã«å
¥ãæ¿ããŠãã圢ãåãæ¹ãè¯ãããšæããŸãã
æè¡é¢ã«é¢ããŠã¯é¢å¿ã®ããã奜ããªæè¡ã§âŠâŠãšããèšãããããããŸããããæè¿ã®ãã¬ã³ãããèšããšå€§èŠæš¡âReact/å°èŠæš¡âVueãšãã圢ã«ãªãã®ããªãšæããŸãã
ãŸãå
ãéçãªãŠã§ããµã€ããšããç¹æ§ãããªãã©ãŒã åŸãéçãªç¹æ§ã匷ãããšæãããã®ã§ãSSGãšã®èŠªåæ§ãé«ãã®ããªïœãšãæããŸãã
ã¢ã€ãã¢åé
ãã®èšäºã¯ã©ã£ã¡ããšãããšãïŒãã£ããïŒåå¿è
ããã°ã©ããŒãçŸä»£ããã³ããšã³ããåŠç¿ããªããDIY粟ç¥ã§ãªãã©ãŒã ããð ãæ¹åãªãã§ããã©ãæ¢åã®ãµãŒãã¹ãé§äœ¿ããŠããããšäœããšããã®ãå
šç¶ã¢ãªã ãšæããŸãã
ãã£ã¡æ¹é¢ã¯è©³ãããªãã®ã§ãããäœã䜿ããããªãµãŒãã¹ãããã°æããŠäžããã