Skip to main content

本地快速浏览 Github issue/pr,查看新增 comment/issue/pr/response

Project description

local-github

本地快速浏览 Github issue/pr,查看新增 comment/issue/pr/response

Quick start

python -m local_github.main luzhixing12345/zood

命令会读取项目根目录 .github-token,从 GitHub API 同步仓库 Issue / PR 数据到 data/github/,然后生成 docs/ 静态页面。

生成结果采用少量 HTML 页面加数据分片:

  • docs/index.html:仓库入口。
  • docs/repos/<owner>/<repo>/issues.html:Issue 列表和详情页面壳。
  • docs/repos/<owner>/<repo>/pulls.html:PR 列表和详情页面壳。
  • docs/repos/<owner>/<repo>/data/*.json:原始数据分片。
  • docs/repos/<owner>/<repo>/data/*.js:用于直接 file:// 打开的按需加载数据分片。

Issue / PR 详情通过单页路由显示,不额外生成详情 HTML。例如:

docs/repos/luzhixing12345/zood/issues.html#/issue/22
docs/repos/luzhixing12345/zood/pulls.html#/pull/1

生成后直接打开:

docs/index.html

也可以分步执行:

python -m local_github.main sync luzhixing12345/zood
python -m local_github.main build

Shell completion

pip install local_github 会安装 bash / zsh 补全脚本到当前 Python prefix 的标准目录:

  • share/bash-completion/completions/local-github
  • share/zsh/site-functions/_local-github

补全脚本会从当前目录向上查找 docs/repos/<owner>/<repo>,输入下面命令后按 Tab 可以补全本地已有仓库:

local-github sync <Tab>

如果 docs/ 不在当前项目目录下,可以指定:

export LOCAL_GITHUB_DOCS_REPOS=/path/to/docs/repos

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

local_github-0.1.2.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

local_github-0.1.2-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file local_github-0.1.2.tar.gz.

File metadata

  • Download URL: local_github-0.1.2.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.4 Linux/6.6.0vtism+

File hashes

Hashes for local_github-0.1.2.tar.gz
Algorithm Hash digest
SHA256 631aba4b2081664f8649c82f8221697addb0739678335763574fd315ba9402df
MD5 05a8e21a441e6bc43a2342c082f10104
BLAKE2b-256 8c074b223f93b9f09828033efe4fdc83ef4893170e96fca18cb57864e2ef6f2b

See more details on using hashes here.

File details

Details for the file local_github-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: local_github-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.4 Linux/6.6.0vtism+

File hashes

Hashes for local_github-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae5fd694b4b29af27eb233c8f9daaea65f1b5951fcb22309c5adcf6716a9ed8c
MD5 5f7d0d024d4718fca92c9a1b212fc7aa
BLAKE2b-256 ed51ad083757e7be10d382a010f262919ac48aeb13055e9755e241bc41ddbc30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page