{"id":15187491,"url":"https://github.com/emurenmrz/blog-system","last_synced_at":"2026-03-03T19:02:47.771Z","repository":{"id":160581487,"uuid":"549546611","full_name":"emurenMRz/blog-system","owner":"emurenMRz","description":"自サイトのブログ用途に開発した簡易DMSです。","archived":false,"fork":false,"pushed_at":"2024-02-07T13:14:33.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T08:31:31.507Z","etag":null,"topics":["javascript","plpgsql","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emurenMRz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-10-11T10:58:10.000Z","updated_at":"2022-10-11T11:00:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"d64f71c0-5a9a-42f9-be4b-025089d9768f","html_url":"https://github.com/emurenMRz/blog-system","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emurenMRz/blog-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emurenMRz%2Fblog-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emurenMRz%2Fblog-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emurenMRz%2Fblog-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emurenMRz%2Fblog-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emurenMRz","download_url":"https://codeload.github.com/emurenMRz/blog-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emurenMRz%2Fblog-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30056056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["javascript","plpgsql","ruby"],"created_at":"2024-09-27T18:23:13.110Z","updated_at":"2026-03-03T19:02:47.756Z","avatar_url":"https://github.com/emurenMRz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blog-system\n\n自サイトのブログ用途に開発した簡易DMSです。\n\n長年お世話になった[tDiary](https://tdiary.org/)からの移行先として開発したため\n\n* tDiary互換の記事アクセス\n* 簡易なログ変換ツールの同梱\n\nのような特徴があります。\n\nCGI動作にのみ対応します。\n\n## Required\n\n* Ruby 3.0.4\n* PostgreSQL 12.11\n\n\u003e 記述しているのは開発に使用したバージョンです。必須バージョンではありません。\n\n## Usage\n\n手順は以下の通りです。\n\n0. リポジトリをcloneした後\"`blog_ctrl.sh`\"を開き、冒頭付近のにある生成するデータベース名と接続用のユーザーを編集します。\n\t```\n\tNAME=blog\n\tUSER=pgsql\n\t```\n1. \"`./blog_ctrl.sh init [デプロイ先のパス]`\"を実行します。\n\n\tデータベース、設定ファイルを作成し、デプロイ先にシンボリックリンクが生成されます。\n\n2. WEBサーバーでCGIの実行権限などを付与します。\n\n\t以下、Apacheでの例です。\n\t\u003e `/admin`ディレクトリは記事管理画面用ファイル群なので、**必ず**アクセス制限をかけてください。\n\n\t```\n\t\u003cDirectory \"[デプロイ先のパス]/admin/\"\u003e\n\t\tAuthName     Blog\n\t\tAuthType     Basic\n\t\tAuthUserFile ./.htpasswd\n\t\tRequire user ***username***\n\n\t\tAllowOverride None\n\t\tOptions ExecCGI\n\t\tAddHandler cgi-script .rb\n\t\tDirectoryIndex index.html\n\t\u003c/Directory\u003e\n\t\u003cDirectory \"[デプロイ先のパス]\"\u003e\n\t\tAllowOverride None\n\t\tOptions ExecCGI FollowSymLinks\n\t\tAddHandler cgi-script .rb\n\t\tDirectoryIndex index.rb\n\t\tRequire all granted\n\t\t\u003cFiles \"*.rhtml*\"\u003e\n\t\t\tRequire all denied\n\t\t\u003c/Files\u003e\n\t\u003c/Directory\u003e\n\t```\n\n3. `template.rhtml`を必要な形に編集します。\n4. URLにアクセスし、動作を確認します。\n\n\u003e 管理画面[`/admin`]はURL直接指定でアクセスします。\n\n## Etc.\n\n`/utility`ディレクトリにはtDiaryから移行する際に使用するログ変換ツールが含まれています。\n\n### tdiary_parser.rb\n\ntDiaryの日記とコメントを抽出しjsonに書き出すツールです。tDiaryのdataディレクトリを指定して実行します。\n\u003e tDiaryのdataディレクトリにある\"`*.td2`\"または\"`*.tdc`\"ファイルで、一行目に`TDIARY2.01.00`と記述されているものだけに対応しています。\n\u003e 記述フォーマットは`Wiki`と`GFM`にのみ対応します。\n\n```\n./tdiary_parser.rb [tdiary.confの@data_pathで指定していたパス]\n```\n\n完了後、`articles_and_comments.json`が生成されます。\n\n日記の段落ごとに1つの記事として分割されています。分割されると不都合がある内容の場合はtDiary側で編集してから再度本ツールを実行するか、生成されたjsonファイルを編集してください。\n\n### tdiary2db.rb\n\n上記で生成された`articles_and_comments.json`から日記とツッコミをデータベースに登録するツールです。`blog_ctrl.sh init`を実行しデータベースを生成した後に実行します。\n\n```\n./tdiary2db.rb\n```\n\n完了後、データベースに日記とツッコミが登録されます。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femurenmrz%2Fblog-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femurenmrz%2Fblog-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femurenmrz%2Fblog-system/lists"}