{"id":21008589,"url":"https://github.com/vim-jp/slacklog-generator","last_synced_at":"2025-05-15T02:32:26.297Z","repository":{"id":49259478,"uuid":"261223501","full_name":"vim-jp/slacklog-generator","owner":"vim-jp","description":"Archive generator for Slack","archived":false,"fork":false,"pushed_at":"2021-10-26T20:45:35.000Z","size":464,"stargazers_count":26,"open_issues_count":32,"forks_count":9,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-06-20T05:16:21.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://vim-jp.org/slacklog/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vim-jp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-04T15:29:16.000Z","updated_at":"2022-08-22T07:23:04.000Z","dependencies_parsed_at":"2022-08-12T20:01:13.160Z","dependency_job_id":null,"html_url":"https://github.com/vim-jp/slacklog-generator","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/vim-jp%2Fslacklog-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-jp%2Fslacklog-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-jp%2Fslacklog-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-jp%2Fslacklog-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vim-jp","download_url":"https://codeload.github.com/vim-jp/slacklog-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225324124,"owners_count":17456460,"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-11-19T09:12:57.398Z","updated_at":"2024-11-19T09:12:58.200Z","avatar_url":"https://github.com/vim-jp.png","language":"Go","readme":"# slacklog\n\n## What\n\nA project to htmlize vim-jp Slack logs.\n\nThis solves the following problems due to using free tier\n\n* No old messages to see\n* Can't see unless you join the workspace, even though you'd like to refer from something such as your blogs\n* We lose our knowledge base\n\n## How to contribute\n\n[@tyru](https://twitter.com/_tyru_) and [@thinca](https://twitter.com/thinca) will invite you  to slacklog Team if you contact us via vim-jp Slack or Twitter. We'll share Slack token as well.\n\nHow to join vim-jp Slack (Japanese):\n\u003chttps://vim-jp.org/docs/chat.html\u003e\n\n## What you need to develop\n\n- Go\n- (Optional) GNU Make\n\n## Env vars\n\nCreate `.env` copiying `.env.template`.\nSee the details for each env vars in the file.\n\n## How to develop\n\n### Generate HTML\n\nUnarchive logs\n\n```console\n$ make logdata\n```\n\nGenerate HTML\n\nThe following commands will generate them under `_site` dir.\n\n```console\nscripts/generate_html.sh\nscripts/build.sh\n```\n\nOr simply run `make` or `gmake`\n\n### Download attached files and emojis\n\n```console\nscripts/download_emoji.sh\nscripts/download_files.sh\n```\n\n### Run dev server\n\nUse your favourite server under `_site`\n\ne.g.\n\n```console\npython -m http.server --directory=_site\n```\n\n### How to check the diff from geneate-html subcommands\n\nThe generate-html output diff from your changes can be checked with this:\n\n```console\n$ ./scripts/site_diff.sh\n```\n\nTODO translate the following\n\n\u003e `site_diff.sh` では現在のHEADでの generate-html の結果と merge-base での\n\u003e geneate-html の結果の diff を取得しています。\n\u003e 出力先は `./tmp/site_diff/current/` および\n\u003e `./tmp/site_diff/{merge-base-commit-id}/` ディレクトリとなっています。\n\u003e \n\u003e merge-base の算出基準はローカルの origin/master です。そのため origin/master が\n\u003e リモート(GitHub)の物よりも古いと出力内容が異なり、差分も異なる場合があります。\n\u003e `-u` オプションを使うと merge-base の算出前にローカルの origin/master を更新し\n\u003e ます。変更がなくても更新にそれなりに時間がかかるため、デフォルトではオフになっ\n\u003e ており明示的に指定するようにしています。\n\u003e \n\u003e merge-base の出力結果はキャッシュし再利用しています。このキャッシュを無視して強\n\u003e 制的に再出力するには `-f` オプションを使ってください。\n\u003e \n\u003e ```console\n\u003e $ ./scripts/site_diff.sh -f\n\u003e ```\n\u003e \n\u003e 全てのキャッシュを破棄したい場合には `-c` オプションを使ってください。`-c` オプ\n\u003e ションでは `./tmp/site_diff/` ディレクトリを消すだけで差分の出力は行いません。\n\u003e \n\u003e ```console\n\u003e $ ./scripts/site_diff.sh -c\n\u003e ```\n\u003e \n\u003e 差分だけを特定のファイルに出力するには `-o {filename}` オプションを使ってくださ\n\u003e い。リダイレクト (` \u003e filename`) では差分以外の動作ログも含まれる場合がありま\n\u003e す。\n\u003e \n\u003e 注意事項: `./scripts/site_diff.sh` は未コミットな変更を stash を用いて保存・復\n帰しているため staged な変更が unstaged に巻き戻ることに留意してください。\n\n## How to update log-data\n\nTODO translate the following\n\n\u003e log-data ブランチにはSlackからエクスポートしたデータを格納し、それを本番の生成\n\u003e に利用しています。log-data ブランチの更新手順は以下の通りです。\n\u003e \n\u003e 1. Slack からログをエクスポート(今はできる人が限られてる)\n\u003e 2. ログをワーキングスペースに展開する\n\u003e 3. `convert-exported-logs` サブコマンドを実行する\n\u003e \n\u003e     ```console\n\u003e     $ go run . convert-exported-logs {indir} {outdir}\n\u003e     ```\n\u003e \n\u003e 4. 更新内容を log-data ブランチに `commit --amend` して `push -f`\n\n## How to see the changes at Pull Request\n\nTODO translate the following\n\n\u003e 以下の手順で Pull Request への `site_diff.sh` の実行結果を\n\u003e Artifacts として Web から取得できます。レビューの際に利用してください。\n\u003e \n\u003e 1. Pull Request の \u003cb\u003eChecks\u003c/b\u003e タブを開く\n\u003e 2. \u003cb\u003eCI\u003c/b\u003e ワークフロー(右側)を選択\n\u003e 3. \u003cb\u003eCompare Pages and Site\u003c/b\u003e ジョブ(右側)を選択\n\u003e 4. \u003cb\u003eArtifacts\u003c/b\u003e ドロワー(左側)を選択\n\u003e 5. `diffs-{数値}` アーティファクトをダウンロード\n\u003e \n\u003e 以下のスクリーンショットは、上記の選択個所をマーキングしたものです。\n\u003e (SSには3つのアーティファクトが表示されますが、現在は2つになっています)\n\u003e \n\u003e ![](https://raw.githubusercontent.com/wiki/vim-jp/slacklog-generator/images/where-are-artifacts.png)\n\u003e \n\u003e Artifacts はそれぞれ zip としてダウンロードできます。\n\u003e `diffs-*.zip` には `sites_diff.sh` の差分が含まれています。\n\u003e `log-*.zip` は動作ログが含まれていますが、こちらはCIの動作デバッグ目的のものです。\n\u003e 末尾の数値は [`${{ github.run_id }}`](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context) 由来です。\n\n### Why we output the diff at Artifacts\n\nTODO translate the following\n\n\u003e Artifacts に差分を出力している主な理由は2つあります。1つ目は、小さな変更でも差\n\u003e 分をオンライン上のどこかに出力しないと、レビューの負荷が高すぎてそれを解消した\n\u003e かったという動機です。\n\u003e \n\u003e 2つ目は、テストデータとして実際のログを使っているため、差分とはいえログの一部の\n\u003e コピーが消せない状態で永続化されるのを避けたい、という動機です。vim-jp slackで\n\u003e は参加者の「忘れられる権利」を尊重しています。\n\u003e \n\u003e 以上の理由から消せる状態でデータ=差分をオンライン上にホストできる GitHub\n\u003e Actions の Artifacts を利用しています。\n\n## LICNESE\n\nTODO translate the following\n\n\u003e \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003e\u003cimg alt=\"クリエイティブ・コモンズ・ライセンス\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eこの 作品 は \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"\u003eクリエイティブ・コモンズ 表示 4.0 国際 ライセンス\u003c/a\u003eの下に提供されています。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-jp%2Fslacklog-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvim-jp%2Fslacklog-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-jp%2Fslacklog-generator/lists"}