Skip to content

Commit d674cc2

Browse files
committed
Rebuild the scripts
1 parent 63337be commit d674cc2

3 files changed

Lines changed: 24 additions & 14 deletions

File tree

‎scripts/_const.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from pathlib import Path
2+
3+
ROOT = Path(__file__).resolve().parent.parent
4+
SITE_JSON = ROOT / "site.json"
5+
TEMPLATE = ROOT / "templates" / "index.template.html"
6+
OUTPUT = ROOT / "index.html"
7+
8+
API_BASE = "https://api.github.com"
9+
USER_AGENT = "pythonbackport-website/1.0"
10+
11+
PLACEHOLDER_PROJECTS = "{{projects}}"
12+
PLACEHOLDER_TITLE = "{{site_title}}"
13+
PLACEHOLDER_TAGLINE = "{{site_tagline}}"

‎scripts/_version.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__version__ = "0.1.3"
2+
VERSION = __version__

‎scripts/build.py‎

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,17 @@
2626
import sys
2727
import urllib.error
2828
import urllib.request
29-
from pathlib import Path
3029
from typing import Any, Iterable
3130

32-
ROOT = Path(__file__).resolve().parent.parent
33-
SITE_JSON = ROOT / "site.json"
34-
TEMPLATE = ROOT / "templates" / "index.template.html"
35-
OUTPUT = ROOT / "index.html"
36-
37-
API_BASE = "https://api.github.com"
38-
USER_AGENT = "pythonbackport-website/1.0"
39-
40-
PLACEHOLDER_PROJECTS = "{{projects}}"
41-
PLACEHOLDER_TITLE = "{{site_title}}"
42-
PLACEHOLDER_TAGLINE = "{{site_tagline}}"
43-
44-
__version__ = "0.1.2"
31+
from scripts._const import (API_BASE,
32+
OUTPUT,
33+
PLACEHOLDER_PROJECTS,
34+
PLACEHOLDER_TAGLINE,
35+
PLACEHOLDER_TITLE,
36+
ROOT,
37+
SITE_JSON,
38+
TEMPLATE,
39+
USER_AGENT)
4540

4641
# ---------- GitHub API ------------------------------------------------------
4742

0 commit comments

Comments
 (0)