{"id":17560059,"url":"https://github.com/knsh14/instagram_mosaic_art","last_synced_at":"2025-03-29T10:23:56.736Z","repository":{"id":7714456,"uuid":"9079820","full_name":"knsh14/instagram_mosaic_art","owner":"knsh14","description":"instagram_mosaic_art","archived":false,"fork":false,"pushed_at":"2020-11-05T01:42:08.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"for_github","last_synced_at":"2025-02-04T04:30:19.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knsh14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-28T15:19:14.000Z","updated_at":"2020-11-05T01:42:10.000Z","dependencies_parsed_at":"2022-09-02T20:20:45.845Z","dependency_job_id":null,"html_url":"https://github.com/knsh14/instagram_mosaic_art","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knsh14%2Finstagram_mosaic_art","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knsh14%2Finstagram_mosaic_art/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knsh14%2Finstagram_mosaic_art/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knsh14%2Finstagram_mosaic_art/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knsh14","download_url":"https://codeload.github.com/knsh14/instagram_mosaic_art/tar.gz/refs/heads/for_github","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246169466,"owners_count":20734665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-21T11:09:49.043Z","updated_at":"2025-03-29T10:23:56.712Z","avatar_url":"https://github.com/knsh14.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Instagramでユーザが投稿した画像からモザイクアートを作成するwebアプリケーションの構成ファイルとその概要．\r\n\r\n# for_cron\r\nサーバーで自動的にモザイクアートを構成する画像情報を集めるためのファイルが置かれている\r\n\r\n#### analyze_color.php\r\nデータベース内にある画像の中で，まだ画像の色情報がないものを取得して，それらを解析して画像全体のRGB値を求め，それをデータベースに上書きする．\r\nもし，その画像がなんらかの原因で参照できない場合，無視する．\r\nそのためにmax_id.txtが必要となる．\r\n\r\n#### gather.php\r\nInstagramからいいねが多く押されているポピュラー画像を取得し，データベースに挿入する．\r\n\r\n#### max_id.txt\r\nこのファイルにはデータベース内の画像のどこまで色の解析が終わっているかを表示してある．\r\n手動で書き換えることはしない．\r\n\r\n# template_files\r\nこのアプリケーションのテンプレート部分が置かれている．\r\nそれぞれのtplファイルは同じ名前のPHPファイルの出力先になっている．\r\n\r\n#### show_images.tpl\r\n認証されたユーザの投稿画像を受け取り，ラジオボタンで選択できるような形式にして表示する．\r\nユーザはこの中から一つを選び，「変換する」のボタンを押すことで，実際に変換する．\r\n\r\n#### mosaic.tpl\r\n受け取った画像URLの2次元配列を表示する．\r\nCSSでマウスが乗った画像は拡大するようにしてある．\r\n\r\n\r\n# index.php\r\nアプリケーションを起動して，最初の画面\r\n単純なものなので，テンプレートエンジンを使う必要がないと感じたため，ここはHTMLがじかに書いてある\r\n\r\n# login.php\r\nInstagramのOAuth認証を行うためのファイル，ユーザに表示するものはない．\r\n\r\n# mosaic.php\r\nこのアプリケーションのメイン部分．\r\nshow_images.phpで選ばれた画像を実際にモザイクアートに変換する．\r\nテンプレートファイルには，画像のURLの2次元配列を渡す．\r\n元画像と比較できるように，元画像のURLもテンプレートファイルに渡す．\r\n\r\n# show_images.php\r\n認証した後，ユーザにどの画像をモザイクアートにするかを選ばせるためのもの．\r\n中ではユーザの投稿画像を取得し，小さいサムネイル画像をテンプレートファイルに渡して表示させ，大きい画像をSESSIONでmosaic.phpと共有する．\r\nこれで番号でユーザがどの画像を選んだかがわかる．\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknsh14%2Finstagram_mosaic_art","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknsh14%2Finstagram_mosaic_art","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknsh14%2Finstagram_mosaic_art/lists"}