概要

Omeka Sのテーマの一覧を視覚的に確認するページを作成しました。

https://satoru196.notion.site/satoru196/6f898ed1352e4c9fa013eee635cbabf4?v=02cab757b6cf4df6bfbedfeb85eca0a5

Omeka Sのテーマを探す際は、以下のサイトが便利です。

https://daniel-km.github.io/UpgradeToOmekaS/omeka_s_themes.html

しかし、テーマの見た目やスター数を一覧できたほうがさらに便利かと思い、本サイトの以下のソースを利用させていただき、今回新たにページを作成しました。

https://github.com/Daniel-KM/UpgradeToOmekaS/blob/master/_data/omeka_s_themes.csv

作成方法

GitHub

GitHub APIをリポジトリの最終更新日とスター数を取得しました。GitHub APIの使用にあたっては、Personal Access Token(PAT)を作成しました。

https://docs.github.com/ja/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens

またOmeka Sのテーマのサムネイル画像はtheme.jpgというファイルが該当するため、その有無を調べて、存在する場合には取得するようにしました。

https://omeka.org/s/docs/developer/themes/theme_functions/

結果、以下のようなJSONデータを作成しました。

[]{}{},,"""""""""""nlsudtnlsudaatrehaatremsalsemsalsetr"cmetr"c"_s:re"_s:r:u"i_:u"ip:"pup:"p"dhtr"dht1a0tilAa2ti9t,to"gt,to7epn:iepn2ds"lds"_"::"e"::t:/hB:/h/"ta/ne"gAts"gum2ipe2ile0ttsO0tl_2hh:m2ho2ue/e3um-bm/k-be0.era1.k1caT2ca-obwh-oS0ma.e0m"4/sgm1/,TmeieTa0adt"1g9rh,1i:lou:l4anb5e8ru1-:a\s:h2/"e1u51Tr3mZ9hcZa"7eo"n,2n,i_Dtttaeihineeltsmy./ecA_"gomimi/lenmekaBaOraSmls"eae,krOaam/eS1k,9a7Tf2ho_ertmhete"hm,ee_doimgeiktaaSl/meaxshtiebri/ttihoenme\."j1p9g7"2.Moda,storiaedesign\"",

Notion

ウェブページの作成にはNotionを利用しました。

https://www.notion.so/ja-jp/help/public-pages-and-web-publishing

REST APIを使い、上記のJSONデータを元に、データベースを更新しました。

https://developers.notion.com/docs/working-with-databases

APIの利用にあたっては、API secretを作成する必要がありました。

https://developers.notion.com/docs/create-a-notion-integration

データベースはフィルターや並び替え、レイアウトの切り替えなど、とても便利でした。以下はタイムラインビューを使い、テーマ(リポジトリ)の最終更新日を表示した例です。

今後

定期更新

GitHub Actionsを使用して、定期的な更新を行いたいと思います。

https://docs.github.com/ja/actions/using-workflows/events-that-trigger-workflows#schedule

STUDIO

今回作成したデータベースの情報をSTUDIOで制作したサイトに表示してみたいと思います。

https://blog.studio.design/ja/posts/api-integration

まとめ

Omeka Sのテーマを探すにあたり、参考になりましたら幸いです。