{"id":22682190,"url":"https://github.com/andry81-devops/accum-content","last_synced_at":"2025-03-29T14:22:45.810Z","repository":{"id":134988094,"uuid":"481838004","full_name":"andry81-devops/accum-content","owner":"andry81-devops","description":"Tutorial to setup accumulation of various external statistic and content. • :page_with_curl: https://github.com/andry81-stats/accum-content--gh-stats :page_with_curl:","archived":false,"fork":false,"pushed_at":"2025-02-03T01:38:13.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T02:27:35.061Z","etag":null,"topics":["actions","content","download","github","github-action","tutorial","workflow"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andry81-devops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","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,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://github.com/andry81/donate"]}},"created_at":"2022-04-15T04:39:12.000Z","updated_at":"2025-02-03T01:38:16.000Z","dependencies_parsed_at":"2024-02-07T05:00:18.543Z","dependency_job_id":null,"html_url":"https://github.com/andry81-devops/accum-content","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/andry81-devops%2Faccum-content","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andry81-devops%2Faccum-content/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andry81-devops%2Faccum-content/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andry81-devops%2Faccum-content/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andry81-devops","download_url":"https://codeload.github.com/andry81-devops/accum-content/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246193849,"owners_count":20738555,"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":["actions","content","download","github","github-action","tutorial","workflow"],"created_at":"2024-12-09T20:25:41.268Z","updated_at":"2025-03-29T14:22:45.790Z","avatar_url":"https://github.com/andry81-devops.png","language":null,"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/andry81-stats/accum-content--gh-stats/commits/master/traffic/views\"\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/views/all.svg\" valign=\"middle\" alt=\"GitHub views|any|total\" /\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/views/all-14d.svg\" valign=\"middle\" alt=\"GitHub views|any|14d\" /\u003e\u003c/a\u003e\n• \u003ca href=\"https://github.com/andry81-stats/accum-content--gh-stats/commits/master/traffic/views\"\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/views/unq.svg\" valign=\"middle\" alt=\"GitHub views|unique per day|total\" /\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/views/unq-14d.svg\" valign=\"middle\" alt=\"GitHub views|unique per day|14d\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/andry81-stats/accum-content--gh-stats/commits/master/traffic/clones\"\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/clones/all.svg\" valign=\"middle\" alt=\"GitHub clones|any|total\" /\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/clones/all-14d.svg\" valign=\"middle\" alt=\"GitHub clones|any|14d\" /\u003e\u003c/a\u003e\n• \u003ca href=\"https://github.com/andry81-stats/accum-content--gh-stats/commits/master/traffic/clones\"\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/clones/unq.svg\" valign=\"middle\" alt=\"GitHub clones|unique per day|total\" /\u003e\n    \u003cimg src=\"https://github.com/andry81-cache/andry81-devops--gh-content-cache/raw/master/repo/andry81-devops/accum-content/badges/traffic/clones/unq-14d.svg\" valign=\"middle\" alt=\"GitHub clones|unique per day|14d\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/andry81/donate\"\u003e\u003cimg src=\"https://github.com/andry81-cache/gh-content-static-cache/raw/master/common/badges/donate/donate.svg\" valign=\"middle\" alt=\"donate\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Tutorial to setup accumulation of various external statistic and content\n\n\u003e [!WARNING]\n\u003e This tutorial does contain content related to not the GitHub itself.\n\nAll tutorials: https://github.com/andry81/index#tutorials\n\n## Features:\n\n1. Implementation can accumulate external inpage downloads counter, phpbb forum board view/replies counters, external content (svg files, images, etc) into a cache repository.\n\n2. The workflow does use a bash script to accumulate statistic for:\n\n   * External web page with downloads counter: [accum-downloads.sh](https://github.com/andry81-devops/gh-workflow/tree/HEAD/bash/inpage/accum-downloads.sh)\n\n   * PhpBB forum board views/replies counter: [accum-stats.sh](https://github.com/andry81-devops/gh-workflow/tree/HEAD/bash/board/accum-stats.sh)\n\n   * External content cache files: [accum-content.sh](https://github.com/andry81-devops/gh-workflow/tree/HEAD/bash/cache/accum-content.sh)\n\n3. Basically most of the scripts does accumulate the response. For example, the board viewes/replies accumulator script does accumulate statistic both into a single file: `traffic/board/myboard/latest.json`,\n   and into a set of files grouped by year and allocated per day: `traffic/board/myboard/by_year/YYYY/YYYY-MM-DD.json`.\n\n4. You can directly point the statistic or the content cache as a standalone commits list: `https://github.com/{{REPO_OWNER}}/{{REPO}}--gh-stats/commits/master/traffic/clones` or `https://github.com/{{REPO_OWNER}}/{{REPO}}--gh-content-cache/commits/master`.\n\n5. All scripts does use GitHub composite action to reuse workflow code base: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action\n\n\u003e [!WARNING]\n\u003e Not all features of a generic GitHub action is supported: [Known Issues](#known-issues)\n\n## Repositories:\n\nYou need setup 2-5 repositories.\n\n1. Repository, where content config file will be stored: `myrepo--gh-content-config`.\u003cbr /\u003e\n   \u003e [!NOTE]\n   \u003e This repository is only required for the content accumulation script. This repository and a content store repository can be a single.\n\n2. Repository, where to store downloaded content: `myrepo--gh-content-cache`.\u003cbr /\u003e\n   \u003e [!NOTE]\n   \u003e This repository is only required for the content accumulation script. This repository and a content config repository can be a single.\n\n   Features of a standalone content cache repository:\u003cbr /\u003e\n   https://github.com/andry81-devops/gh-action--accum-content#features-of-a-standalone-content-cache-repository\n\n3. Repository, where statistic will be saved: `myrepo--gh-stats`.\u003cbr /\u003e\n   \u003e [!NOTE]\n   \u003e This repository is only required for the statistic accumulation script.\n\n4. Repository, where to store github workflow support scripts: `gh-workflow`.\u003cbr /\u003e\n   You can fork or use it from here: https://github.com/andry81-devops/gh-workflow\n\n5. Repository, where to store github composite action:\n\n   * GitHub composite action to request and accumulate downloads counter statistic from a value on a web page:\u003cbr /\u003e\n     https://github.com/andry81-devops/gh-action--accum-inpage-downloads\n\n   * GitHub composite action to request and accumulate a forum board post replies/views counter statistic:\u003cbr /\u003e\n     https://github.com/andry81-devops/gh-action--accum-board-stats\n\n   * GitHub composite action to periodically download and accumulate content into a repository:\u003cbr /\u003e\n     https://github.com/andry81-devops/gh-action--accum-content\n\n   All action scripts:\u003cbr /\u003e\n   https://github.com/andry81/index#action-scripts\n\n\u003e [!NOTE]\n\u003e You need to attach a personal access token (PAT) into a repository used to run a GitHub action script (`.github/workflows/*.yml`) to read content from another repository and obtain the read permission from that repository: `repo`-\u003e`public_repo`.\n\n\u003e [!NOTE]\n\u003e You need to attach a personal access token (PAT) into a repository used to run a GitHub action script (`.github/workflows/*.yml`) to write content into another repository and obtain the push permission into that repository: `repo`.\n\n\u003e [!NOTE]\n\u003e A separate personal access token (PAT) does not require to be attached into a repository used to run a GitHub action script for another repository as long as that another repository is owned by the same owner as a repository which runs a GitHub action script.\n\n* `myrepo--gh-content-config` -\u003e needs read access permission to read repository files\n* `myrepo--gh-stats` -\u003e needs read/write access permissions to read/write repository files\n* `myrepo--gh-content-cache` -\u003e needs read/write content permission to read/write repository files\n\nTo generate PAT: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token\n\nTo attach PAT: https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository\n\nThe `myrepo-*` repository should contain 1 file per statistic entity:\n\n* [.github/workflows/accum-mypage-download-stats.yml example](https://github.com/andry81-devops/gh-action--accum-inpage-downloads#accum-mypage-download-stats-yml)\n\n* [.github/workflows/accum-phpbb-board-stats.yml example](https://github.com/andry81-devops/gh-action--accum-board-stats#accum-phpbb-board-stats-yml)\n\n* [.github/workflows/accum-content.yml example](https://github.com/andry81-devops/gh-action--accum-content#accum-content-yml)\n\n\u003e [!WARNING]\n\u003e You must replace all placeholder into respective values:\n\n* `{{REPO_OWNER}}` -\u003e repository owner\n* `{{REPO}}` -\u003e `myrepo-*`\n\nAfter the github workflow yaml file is commited and pushed, you can run the action from the `Actions` tab in the `myrepo-*` repository.\n\n\u003e [!NOTE]\n\u003e See \u003ca href=\"https://github.com/andry81-devops/github-accum-stats#reuse\"\u003eREUSE\u003c/a\u003e section for details if you have multiple repositories and want to store all GitHub workflow scripts (`.github/workflows/*.yml`) in a single repository.\n\n## Known Issues\n\nhttps://github.com/andry81-devops/gh-known-issues#known-issues\n\n## Last known issues updates\n\nhttps://github.com/andry81-devops/gh-known-issues#last-known-issues-updates\n","funding_links":["https://github.com/andry81/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandry81-devops%2Faccum-content","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandry81-devops%2Faccum-content","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandry81-devops%2Faccum-content/lists"}