pysocha 0.2.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pysocha-0.4.1/.gitignore +25 -0
- pysocha-0.4.1/.reactorcide/jobs/publish.yaml +12 -0
- pysocha-0.4.1/.reactorcide/jobs/release-editor.yaml +10 -0
- pysocha-0.4.1/.reactorcide/jobs/tag.yaml +12 -0
- pysocha-0.4.1/.reactorcide/jobs/test.yaml +9 -0
- pysocha-0.4.1/.reactorcide/scripts/build-editor.sh +33 -0
- pysocha-0.4.1/.reactorcide/scripts/publish.sh +15 -0
- pysocha-0.4.1/.reactorcide/scripts/release-editor.sh +30 -0
- pysocha-0.4.1/.reactorcide/scripts/tag.py +61 -0
- pysocha-0.4.1/.reactorcide/scripts/tag.sh +7 -0
- pysocha-0.4.1/.reactorcide/scripts/test.sh +12 -0
- pysocha-0.4.1/.reactorcide/scripts/verify-tag.sh +12 -0
- pysocha-0.4.1/.reactorcide/workflows/merge.yaml +8 -0
- pysocha-0.4.1/.reactorcide/workflows/pr.yaml +8 -0
- pysocha-0.4.1/.reactorcide/workflows/release.yaml +10 -0
- pysocha-0.4.1/PKG-INFO +177 -0
- pysocha-0.4.1/README.md +146 -0
- pysocha-0.4.1/docs/README.md +17 -0
- pysocha-0.4.1/docs/building.md +79 -0
- pysocha-0.4.1/docs/configuration.md +103 -0
- pysocha-0.4.1/docs/content.md +170 -0
- pysocha-0.4.1/docs/editor.md +41 -0
- pysocha-0.4.1/docs/feeds.md +43 -0
- pysocha-0.4.1/docs/markdown.md +87 -0
- pysocha-0.4.1/docs/search-providers.md +158 -0
- pysocha-0.4.1/docs/search.md +261 -0
- pysocha-0.4.1/editor/.dockerignore +1 -0
- pysocha-0.4.1/editor/Cargo.lock +9806 -0
- pysocha-0.4.1/editor/Cargo.toml +26 -0
- pysocha-0.4.1/editor/ci/cross-metal.py +23 -0
- pysocha-0.4.1/editor/ci/linux.Dockerfile +22 -0
- pysocha-0.4.1/editor/ci/macos.Dockerfile +11 -0
- pysocha-0.4.1/editor/ci/package.py +83 -0
- pysocha-0.4.1/editor/ci/windows.Dockerfile +8 -0
- pysocha-0.4.1/editor/src/engine.rs +70 -0
- pysocha-0.4.1/editor/src/main.rs +746 -0
- pysocha-0.4.1/editor/src/tab.js +32 -0
- pysocha-0.4.1/editor/src/toast.rs +64 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/blog_posts/filenames_are_ignored.md +1 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/blog_posts/first_post.md +1 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/blog_posts/second_post.md +1 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/blog_posts/some_random_name.md +1 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/blog_posts/unlisted_post.md +2 -2
- pysocha-0.4.1/example/content/extra_files/vendor/.gitkeep +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/example-config.yaml +25 -1
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/base.jinja2 +1 -0
- pysocha-0.4.1/example/templates/search-sqlite.jinja2 +98 -0
- pysocha-0.4.1/example/templates/search.jinja2 +78 -0
- pysocha-0.4.1/pyproject.toml +65 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/src/pysocha/__init__.py +13 -21
- pysocha-0.4.1/src/pysocha/atom.py +98 -0
- pysocha-0.4.1/src/pysocha/build.py +522 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/src/pysocha/config.py +25 -6
- pysocha-0.4.1/src/pysocha/editor_engine.py +143 -0
- pysocha-0.4.1/src/pysocha/markdown.py +411 -0
- pysocha-0.4.1/src/pysocha/preview.py +70 -0
- pysocha-0.4.1/src/pysocha/search/__init__.py +212 -0
- pysocha-0.4.1/src/pysocha/search/assets/sqlite-search.js +149 -0
- pysocha-0.4.1/src/pysocha/search/providers/__init__.py +5 -0
- pysocha-0.4.1/src/pysocha/search/providers/_pagefind_service.py +73 -0
- pysocha-0.4.1/src/pysocha/search/providers/pagefind.py +149 -0
- pysocha-0.4.1/src/pysocha/search/providers/sqlite_fts.py +306 -0
- pysocha-0.4.1/src/pysocha/search/text.py +94 -0
- pysocha-0.4.1/src/pysocha/search/types.py +143 -0
- pysocha-0.4.1/src/pysocha/search/vendor.py +187 -0
- pysocha-0.4.1/tests/test_build.py +379 -0
- pysocha-0.4.1/tests/test_config.py +21 -0
- pysocha-0.4.1/tests/test_editor_engine.py +64 -0
- pysocha-0.4.1/tests/test_feeds.py +49 -0
- pysocha-0.4.1/tests/test_markdown.py +192 -0
- pysocha-0.4.1/tests/test_pagefind_failures.py +89 -0
- pysocha-0.4.1/tests/test_preview.py +87 -0
- pysocha-0.4.1/tests/test_release_tag.py +29 -0
- pysocha-0.4.1/tests/test_search.py +663 -0
- pysocha-0.4.1/tests/test_vendor.py +181 -0
- pysocha-0.4.1/uv.lock +1080 -0
- pysocha-0.2.0/.gitignore +0 -16
- pysocha-0.2.0/PKG-INFO +0 -21
- pysocha-0.2.0/README.md +0 -3
- pysocha-0.2.0/pyproject.toml +0 -38
- pysocha-0.2.0/requirements-dev.lock +0 -62
- pysocha-0.2.0/requirements.lock +0 -62
- pysocha-0.2.0/src/pysocha/atom.py +0 -32
- pysocha-0.2.0/src/pysocha/build.py +0 -285
- pysocha-0.2.0/src/pysocha/markdown.py +0 -27
- pysocha-0.2.0/src/pysocha/preview.py +0 -36
- {pysocha-0.2.0 → pysocha-0.4.1}/.python-version +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/download_me.txt +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/extra.css +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/extra.js +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/logo.png +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/main.css +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/main.js +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/readme.md +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/sub_dirs/download_me2.txt +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/extra_files/zips.gif +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/pages/index.md +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/content/pages/test.md +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/author.jinja2 +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/authors.jinja2 +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/blog.jinja2 +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/listing.jinja2 +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/page.jinja2 +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/tag.jinja2 +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/example/templates/tags.jinja2 +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/src/pysocha/__main__.py +0 -0
- {pysocha-0.2.0 → pysocha-0.4.1}/tools.sh +0 -0
pysocha-0.4.1/.gitignore
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# python generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# venv
|
|
10
|
+
.venv
|
|
11
|
+
venv/
|
|
12
|
+
env/
|
|
13
|
+
|
|
14
|
+
# Specific to this project
|
|
15
|
+
generated/
|
|
16
|
+
scratch.py
|
|
17
|
+
|
|
18
|
+
# Browser assets that the sqlite-fts5 search provider downloads on demand. The
|
|
19
|
+
# directory is kept so that the example shows where they go, but the files
|
|
20
|
+
# themselves stay out of this repository. A site that uses pysocha may well want
|
|
21
|
+
# to commit its own copy instead, which is why the provider writes them into
|
|
22
|
+
# extra_files.
|
|
23
|
+
example/content/extra_files/vendor/*
|
|
24
|
+
!example/content/extra_files/vendor/.gitkeep
|
|
25
|
+
/editor/target/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
name: pysocha-publish-pypi
|
|
2
|
+
triggers:
|
|
3
|
+
events: [tag_created]
|
|
4
|
+
branches: ["v*"]
|
|
5
|
+
job:
|
|
6
|
+
image: containers.catalystsquad.com/public/reactorcide/runnerbase:latest
|
|
7
|
+
command: "runnerlib run --job-command 'bash /job/ci/.reactorcide/scripts/publish.sh'"
|
|
8
|
+
working_dir: /job
|
|
9
|
+
timeout: 1800
|
|
10
|
+
disable_run_local: true
|
|
11
|
+
environment:
|
|
12
|
+
UV_PUBLISH_TOKEN: "${secret:pysocha/pypi:reactorcide_publish_pysocha}"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
name: pysocha-github-release
|
|
2
|
+
job:
|
|
3
|
+
image: containers.catalystsquad.com/public/reactorcide/runnerbase:latest
|
|
4
|
+
command: "runnerlib run --job-command 'bash /job/ci/.reactorcide/scripts/release-editor.sh'"
|
|
5
|
+
working_dir: /job
|
|
6
|
+
timeout: 21600
|
|
7
|
+
capabilities: [builder]
|
|
8
|
+
disable_run_local: true
|
|
9
|
+
environment:
|
|
10
|
+
GH_TOKEN: "${secret:catalystcommunity/ci:githubpat}"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
name: pysocha-release-tag
|
|
2
|
+
triggers:
|
|
3
|
+
events: [pull_request_merged]
|
|
4
|
+
branches: ["main"]
|
|
5
|
+
job:
|
|
6
|
+
image: containers.catalystsquad.com/public/reactorcide/runnerbase:latest
|
|
7
|
+
command: "runnerlib run --job-command 'bash /job/ci/.reactorcide/scripts/tag.sh'"
|
|
8
|
+
working_dir: /job
|
|
9
|
+
timeout: 1800
|
|
10
|
+
disable_run_local: true
|
|
11
|
+
environment:
|
|
12
|
+
GH_TOKEN: "${secret:catalystcommunity/ci:githubpat}"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
name: pysocha-test
|
|
2
|
+
triggers:
|
|
3
|
+
events: [pull_request_opened, pull_request_updated]
|
|
4
|
+
branches: ["main"]
|
|
5
|
+
job:
|
|
6
|
+
image: containers.catalystsquad.com/public/reactorcide/runnerbase:latest
|
|
7
|
+
command: "runnerlib run --job-command 'bash /job/ci/.reactorcide/scripts/test.sh'"
|
|
8
|
+
working_dir: /job
|
|
9
|
+
timeout: 1800
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
cd "${REACTORCIDE_CODE_DIR:-/job/src}"
|
|
4
|
+
target=${1:?desktop target required}
|
|
5
|
+
output=${2:?archive directory required}
|
|
6
|
+
version=${3:-0.0.0}
|
|
7
|
+
work=$(mktemp -d)
|
|
8
|
+
trap 'rm -rf "$work"' EXIT
|
|
9
|
+
case "$target" in
|
|
10
|
+
linux-x86_64) os=linux; triple=x86_64-unknown-linux-gnu ;;
|
|
11
|
+
linux-arm64) os=linux; triple=aarch64-unknown-linux-gnu ;;
|
|
12
|
+
windows-x86_64) os=windows; triple=x86_64-pc-windows-msvc ;;
|
|
13
|
+
macos-arm64) os=macos; triple=aarch64-apple-darwin ;;
|
|
14
|
+
*) exit 2 ;;
|
|
15
|
+
esac
|
|
16
|
+
case "$(uname -m)" in
|
|
17
|
+
x86_64) arch=amd64; hash=bc5a158c97c1f7ace1af81c375e8c28bd27e6afeb283fc5b3bfb10777f48fc83 ;;
|
|
18
|
+
aarch64) arch=arm64; hash=02a6f8c1ea519b11d312ea2fb2f45cf3a7a34814a0e61d55d2532adb211ce400 ;;
|
|
19
|
+
*) exit 2 ;;
|
|
20
|
+
esac
|
|
21
|
+
curl --retry 3 -fsSL "https://github.com/moby/buildkit/releases/download/v0.28.0/buildkit-v0.28.0.linux-$arch.tar.gz" -o "$work/buildkit.tgz"
|
|
22
|
+
echo "$hash $work/buildkit.tgz" | sha256sum -c -
|
|
23
|
+
tar -xzf "$work/buildkit.tgz" -C "$work" bin/buildctl
|
|
24
|
+
for _ in {1..30}; do
|
|
25
|
+
if "$work/bin/buildctl" debug info >/dev/null 2>&1; then break; fi
|
|
26
|
+
sleep 1
|
|
27
|
+
done
|
|
28
|
+
"$work/bin/buildctl" build --frontend dockerfile.v0 --local context=editor \
|
|
29
|
+
--local dockerfile=editor/ci --opt "filename=$os.Dockerfile" \
|
|
30
|
+
--opt "build-arg:TARGET=$triple" --output "type=local,dest=$work/bin-out"
|
|
31
|
+
binary=pysocha-editor
|
|
32
|
+
if [[ "$os" = windows ]]; then binary+=.exe; fi
|
|
33
|
+
python3 editor/ci/package.py "$target" "$work/bin-out/$binary" "$output" "$version"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
cd "${REACTORCIDE_CODE_DIR:-/job/src}"
|
|
4
|
+
source "$(dirname "$0")/verify-tag.sh"
|
|
5
|
+
|
|
6
|
+
# Stamp a private build tree. A shared checkout can have concurrent readers.
|
|
7
|
+
work=$(mktemp -d)
|
|
8
|
+
mkdir "$work/src"
|
|
9
|
+
git archive HEAD | tar -x -C "$work/src"
|
|
10
|
+
cd "$work/src"
|
|
11
|
+
sed -i -E "/^\[project\]$/,/^\[/{s/^version = .*/version = \"${tag#v}\"/;}" pyproject.toml
|
|
12
|
+
export SOURCE_DATE_EPOCH=$(git -C "${REACTORCIDE_CODE_DIR:-/job/src}" show -s --format=%ct HEAD)
|
|
13
|
+
env -u UV_PUBLISH_TOKEN uv build --out-dir "$work/dist"
|
|
14
|
+
# uv checks the PyPI index before upload. A retry can complete a partial upload.
|
|
15
|
+
uv publish --publish-url https://upload.pypi.org/legacy/ --check-url https://pypi.org/simple/ "$work"/dist/*
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
ci=$(dirname "$0")
|
|
4
|
+
cd "${REACTORCIDE_CODE_DIR:-/job/src}"
|
|
5
|
+
source "$ci/verify-tag.sh"
|
|
6
|
+
work=$(mktemp -d)
|
|
7
|
+
trap 'rm -rf "$work"' EXIT
|
|
8
|
+
for target in linux-x86_64 linux-arm64 windows-x86_64 macos-arm64; do
|
|
9
|
+
env -u GH_TOKEN bash "$ci/build-editor.sh" "$target" "$work/assets" "${tag#v}"
|
|
10
|
+
done
|
|
11
|
+
case "$(uname -m)" in
|
|
12
|
+
x86_64) arch=amd64; hash=afada88676dfccea384e6cc28ae990b3e31bbc55f9d75c4697f902c757fa462b ;;
|
|
13
|
+
aarch64) arch=arm64; hash=80b467daabeabf4379b5b7138f4b8b47f56670cc615ab288361a602ce413d8bf ;;
|
|
14
|
+
*) exit 2 ;;
|
|
15
|
+
esac
|
|
16
|
+
curl -fsSL --retry 3 "https://github.com/cli/cli/releases/download/v2.82.1/gh_2.82.1_linux_$arch.tar.gz" -o "$work/gh.tgz"
|
|
17
|
+
echo "$hash $work/gh.tgz" | sha256sum -c -
|
|
18
|
+
tar -xzf "$work/gh.tgz" -C "$work" --strip-components=2 "gh_2.82.1_linux_$arch/bin/gh"
|
|
19
|
+
export GH_REPO=catalystcommunity/pysocha
|
|
20
|
+
gh="$work/gh"
|
|
21
|
+
if ! "$gh" release view "$tag" --json isDraft >/dev/null 2>&1; then
|
|
22
|
+
"$gh" release create "$tag" --verify-tag --draft --title "Pysocha $tag" --generate-notes
|
|
23
|
+
fi
|
|
24
|
+
if [[ "$("$gh" release view "$tag" --json isDraft --jq .isDraft)" = true ]]; then
|
|
25
|
+
"$gh" release upload "$tag" "$work"/assets/* --clobber
|
|
26
|
+
"$gh" release edit "$tag" --draft=false
|
|
27
|
+
fi
|
|
28
|
+
for archive in "$work"/assets/*; do
|
|
29
|
+
"$gh" release view "$tag" --json assets --jq '.assets[].name' | grep -Fx "$(basename "$archive")"
|
|
30
|
+
done
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Create one version tag per merged commit. Reuse the tag on a retry."""
|
|
2
|
+
|
|
3
|
+
import base64
|
|
4
|
+
import os
|
|
5
|
+
import re
|
|
6
|
+
import subprocess
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
REPO = "https://github.com/catalystcommunity/pysocha.git"
|
|
10
|
+
VERSION = re.compile(r"v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def next_tag(refs, sha, floor):
|
|
14
|
+
versions = []
|
|
15
|
+
for line in refs.splitlines():
|
|
16
|
+
commit, ref = line.split()
|
|
17
|
+
tag = ref[len("refs/tags/"):]
|
|
18
|
+
match = VERSION.fullmatch(tag)
|
|
19
|
+
if match:
|
|
20
|
+
if commit == sha:
|
|
21
|
+
return tag, False
|
|
22
|
+
versions.append(tuple(map(int, match.groups())))
|
|
23
|
+
if versions:
|
|
24
|
+
major, minor, patch = max(versions)
|
|
25
|
+
floor = max(floor, (major, minor, patch + 1))
|
|
26
|
+
return "v%d.%d.%d" % floor, True
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main():
|
|
30
|
+
sha = os.environ["REACTORCIDE_SHA"]
|
|
31
|
+
section = Path("pyproject.toml").read_text().split("[project]\n", 1)[1].split("\n[", 1)[0]
|
|
32
|
+
floor = tuple(map(int, re.search(r'^version = "(\d+)\.(\d+)\.(\d+)"$', section, re.M).groups()))
|
|
33
|
+
env = os.environ.copy()
|
|
34
|
+
credentials = ("x-access-token:" + env.pop("GH_TOKEN")).encode()
|
|
35
|
+
env.update(
|
|
36
|
+
GIT_TERMINAL_PROMPT="0",
|
|
37
|
+
GIT_CONFIG_COUNT="1",
|
|
38
|
+
GIT_CONFIG_KEY_0="http.https://github.com/.extraHeader",
|
|
39
|
+
GIT_CONFIG_VALUE_0="Authorization: Basic " + base64.b64encode(credentials).decode(),
|
|
40
|
+
)
|
|
41
|
+
push_tag(REPO, sha, floor, env)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def push_tag(repo, sha, floor, env):
|
|
45
|
+
for attempt in range(5):
|
|
46
|
+
refs = subprocess.check_output(["git", "ls-remote", "--tags", "--refs", repo, "refs/tags/v*"], text=True)
|
|
47
|
+
tag, create = next_tag(refs, sha, floor)
|
|
48
|
+
if create:
|
|
49
|
+
# A Git push produces the push webhook that Reactorcide maps to tag_created.
|
|
50
|
+
push = subprocess.run(["git", "push", repo, sha + ":refs/tags/" + tag], env=env)
|
|
51
|
+
if push.returncode:
|
|
52
|
+
# Retry a concurrent allocation. Surface transport and permissions errors.
|
|
53
|
+
if attempt < 4 and subprocess.check_output(["git", "ls-remote", repo, "refs/tags/" + tag]):
|
|
54
|
+
continue
|
|
55
|
+
push.check_returncode()
|
|
56
|
+
print(tag, sha)
|
|
57
|
+
return tag
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
if __name__ == "__main__":
|
|
61
|
+
main()
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
cd "${REACTORCIDE_CODE_DIR:-/job/src}"
|
|
4
|
+
[[ "$REACTORCIDE_EVENT_TYPE" = pull_request_merged && "$REACTORCIDE_BRANCH" = main ]]
|
|
5
|
+
[[ "$(git rev-parse HEAD)" = "$REACTORCIDE_SHA" ]]
|
|
6
|
+
# Push the merge SHA. GitHub sends a push event for the new tag.
|
|
7
|
+
python3 /job/ci/.reactorcide/scripts/tag.py
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
cd "${REACTORCIDE_CODE_DIR:-/job/src}"
|
|
4
|
+
out=$(mktemp -d)
|
|
5
|
+
uv sync --locked --all-extras
|
|
6
|
+
uv run --no-sync pytest --junitxml="${REACTORCIDE_ARTIFACTS_DIR:-$out}/junit.xml"
|
|
7
|
+
uv build --out-dir "$out"
|
|
8
|
+
uv venv "$out/smoke"
|
|
9
|
+
uv pip install --python "$out/smoke/bin/python" "$out"/*.whl
|
|
10
|
+
(cd "$out" && smoke/bin/pysocha --help >/dev/null)
|
|
11
|
+
rustc --edition=2024 --test editor/src/toast.rs -o "$out/toast-tests"
|
|
12
|
+
"$out/toast-tests"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Source this file from a tag release job in the source checkout.
|
|
2
|
+
[[ "$REACTORCIDE_EVENT_TYPE" = tag_created ]]
|
|
3
|
+
tag=$REACTORCIDE_BRANCH
|
|
4
|
+
[[ "$tag" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
|
|
5
|
+
[[ "$(git rev-parse HEAD)" = "$REACTORCIDE_SHA" ]]
|
|
6
|
+
repo=https://github.com/catalystcommunity/pysocha.git
|
|
7
|
+
[[ "$(git ls-remote --refs "$repo" "refs/tags/$tag" | cut -f1)" = "$REACTORCIDE_SHA" ]]
|
|
8
|
+
# Keep fetch state out of the shared checkout.
|
|
9
|
+
refs=$(mktemp -d)
|
|
10
|
+
git init --bare -q "$refs"
|
|
11
|
+
git -C "$refs" fetch -q --filter=blob:none "$repo" refs/heads/main
|
|
12
|
+
git -C "$refs" merge-base --is-ancestor "$REACTORCIDE_SHA" FETCH_HEAD
|
pysocha-0.4.1/PKG-INFO
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: pysocha
|
|
3
|
+
Version: 0.4.1
|
|
4
|
+
Summary: Extremely simple static site generator
|
|
5
|
+
Project-URL: Homepage, https://catalystsquad.com
|
|
6
|
+
Project-URL: Repository, https://github.com/catalystcommunity/pysocha
|
|
7
|
+
Author-email: Tod Hansmann <githubpub@todandlorna.com>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Keywords: blog,markdown,static-site-generator
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
|
|
14
|
+
Requires-Python: >=3.8
|
|
15
|
+
Requires-Dist: flask>=3.0.3
|
|
16
|
+
Requires-Dist: jinja2>=3.1.4
|
|
17
|
+
Requires-Dist: linkify-it-py>=2.0.3
|
|
18
|
+
Requires-Dist: markdown-it-py>=3.0.0
|
|
19
|
+
Requires-Dist: mdit-py-plugins>=0.4.1
|
|
20
|
+
Requires-Dist: pygments>=2.18.0
|
|
21
|
+
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
22
|
+
Requires-Dist: python-frontmatter>=1.1.0
|
|
23
|
+
Requires-Dist: python-slugify>=8.0.4
|
|
24
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
25
|
+
Requires-Dist: typer>=0.12.3
|
|
26
|
+
Requires-Dist: typing-extensions>=4.12.1
|
|
27
|
+
Provides-Extra: search-pagefind
|
|
28
|
+
Requires-Dist: pagefind-bin==1.5.2; (python_version >= '3.9') and extra == 'search-pagefind'
|
|
29
|
+
Requires-Dist: pagefind[bin]==1.5.2; (python_version >= '3.9') and extra == 'search-pagefind'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# pysocha
|
|
33
|
+
|
|
34
|
+
Pysocha is a static site generator of as simple a variety as we can make for our
|
|
35
|
+
needs.
|
|
36
|
+
|
|
37
|
+
It reads Markdown content and Jinja templates. It writes a directory of files.
|
|
38
|
+
No code runs on the server.
|
|
39
|
+
|
|
40
|
+
It still has features like search for large sites, rss and atom feeds, and extra files for things like favicons.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
Pysocha needs Python 3.8 or newer.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
python -m pip install pysocha
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
With uv:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
uv tool install pysocha
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Direct from this repository:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
python -m pip install git+https://github.com/catalystcommunity/pysocha.git
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
For work on Pysocha itself, use uv from the repository root:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uv sync
|
|
66
|
+
uv run pysocha --help
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Desktop editor
|
|
70
|
+
|
|
71
|
+
Use Pysocha Editor to edit a site and preview unsaved changes. See the [editor guide](docs/editor.md) for installation and controls.
|
|
72
|
+
|
|
73
|
+
## Quickstart
|
|
74
|
+
|
|
75
|
+
Make a site with this shape:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
site/
|
|
79
|
+
config.yaml
|
|
80
|
+
content/
|
|
81
|
+
pages/
|
|
82
|
+
index.md
|
|
83
|
+
blog_posts/
|
|
84
|
+
first-post.md
|
|
85
|
+
extra_files/
|
|
86
|
+
main.css
|
|
87
|
+
templates/
|
|
88
|
+
page.jinja2
|
|
89
|
+
blog.jinja2
|
|
90
|
+
listing.jinja2
|
|
91
|
+
tags.jinja2
|
|
92
|
+
tag.jinja2
|
|
93
|
+
authors.jinja2
|
|
94
|
+
author.jinja2
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Write a page in `content/pages/index.md`:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
---
|
|
101
|
+
Title: "Welcome"
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
# Welcome
|
|
105
|
+
|
|
106
|
+
This is the first page.
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Write a post in `content/blog_posts/first-post.md`:
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
---
|
|
113
|
+
Title: "The first post"
|
|
114
|
+
PostedDate: "2026-07-14T10:00:00-06:00"
|
|
115
|
+
Author: "Your Name"
|
|
116
|
+
AuthorEmail: "you@example.com"
|
|
117
|
+
hook: "A short summary for feeds and listings."
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
Hello.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Write `config.yaml`. Every key has a default, so a short file is enough:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
siteTitle: "My site"
|
|
127
|
+
siteAddress: "https://example.com/"
|
|
128
|
+
blogConfig:
|
|
129
|
+
title: "My blog"
|
|
130
|
+
blogBaseDir: "blog"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Build the site:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
pysocha build --config-file config.yaml
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Look at the site:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pysocha preview --config-file config.yaml
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Pysocha writes the files into `outputDir`. The default is `generated`.
|
|
146
|
+
|
|
147
|
+
## What Pysocha does
|
|
148
|
+
|
|
149
|
+
- Markdown pages, with one body or with named regions.
|
|
150
|
+
- Blog posts, listing pages, tag pages, and author pages.
|
|
151
|
+
- Atom feeds and RSS feeds.
|
|
152
|
+
- Syntax highlighting at build time, with no style sheet.
|
|
153
|
+
- Search in the browser, with more than one search for each site.
|
|
154
|
+
- Staged output. A failed build never replaces a good site.
|
|
155
|
+
|
|
156
|
+
## Documentation
|
|
157
|
+
|
|
158
|
+
The [docs](docs/) directory holds the details:
|
|
159
|
+
|
|
160
|
+
- [Configuration](docs/configuration.md) — every key and its default.
|
|
161
|
+
- [Content](docs/content.md) — pages, blog posts, front matter, and regions.
|
|
162
|
+
- [Markdown](docs/markdown.md) — syntax highlighting and themes.
|
|
163
|
+
- [Feeds](docs/feeds.md) — Atom and RSS.
|
|
164
|
+
- [Search](docs/search.md) — search configuration and the two providers.
|
|
165
|
+
- [Search providers](docs/search-providers.md) — how to write your own.
|
|
166
|
+
- [Build behavior](docs/building.md) — commands, staged output, and preview.
|
|
167
|
+
|
|
168
|
+
## Example sites
|
|
169
|
+
|
|
170
|
+
- [`example/`](example/) in this repository. It shows every feature, and it
|
|
171
|
+
includes a search page for each provider.
|
|
172
|
+
- [todpunk/tnl-site](https://github.com/todpunk/tnl-site) — the content of
|
|
173
|
+
[todandlorna.com](https://todandlorna.com/).
|
|
174
|
+
|
|
175
|
+
## Licence
|
|
176
|
+
|
|
177
|
+
Apache-2.0.
|
pysocha-0.4.1/README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# pysocha
|
|
2
|
+
|
|
3
|
+
Pysocha is a static site generator of as simple a variety as we can make for our
|
|
4
|
+
needs.
|
|
5
|
+
|
|
6
|
+
It reads Markdown content and Jinja templates. It writes a directory of files.
|
|
7
|
+
No code runs on the server.
|
|
8
|
+
|
|
9
|
+
It still has features like search for large sites, rss and atom feeds, and extra files for things like favicons.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Pysocha needs Python 3.8 or newer.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python -m pip install pysocha
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
With uv:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uv tool install pysocha
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Direct from this repository:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
python -m pip install git+https://github.com/catalystcommunity/pysocha.git
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For work on Pysocha itself, use uv from the repository root:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv sync
|
|
35
|
+
uv run pysocha --help
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Desktop editor
|
|
39
|
+
|
|
40
|
+
Use Pysocha Editor to edit a site and preview unsaved changes. See the [editor guide](docs/editor.md) for installation and controls.
|
|
41
|
+
|
|
42
|
+
## Quickstart
|
|
43
|
+
|
|
44
|
+
Make a site with this shape:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
site/
|
|
48
|
+
config.yaml
|
|
49
|
+
content/
|
|
50
|
+
pages/
|
|
51
|
+
index.md
|
|
52
|
+
blog_posts/
|
|
53
|
+
first-post.md
|
|
54
|
+
extra_files/
|
|
55
|
+
main.css
|
|
56
|
+
templates/
|
|
57
|
+
page.jinja2
|
|
58
|
+
blog.jinja2
|
|
59
|
+
listing.jinja2
|
|
60
|
+
tags.jinja2
|
|
61
|
+
tag.jinja2
|
|
62
|
+
authors.jinja2
|
|
63
|
+
author.jinja2
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Write a page in `content/pages/index.md`:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
---
|
|
70
|
+
Title: "Welcome"
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
# Welcome
|
|
74
|
+
|
|
75
|
+
This is the first page.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Write a post in `content/blog_posts/first-post.md`:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
---
|
|
82
|
+
Title: "The first post"
|
|
83
|
+
PostedDate: "2026-07-14T10:00:00-06:00"
|
|
84
|
+
Author: "Your Name"
|
|
85
|
+
AuthorEmail: "you@example.com"
|
|
86
|
+
hook: "A short summary for feeds and listings."
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
Hello.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Write `config.yaml`. Every key has a default, so a short file is enough:
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
siteTitle: "My site"
|
|
96
|
+
siteAddress: "https://example.com/"
|
|
97
|
+
blogConfig:
|
|
98
|
+
title: "My blog"
|
|
99
|
+
blogBaseDir: "blog"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Build the site:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pysocha build --config-file config.yaml
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Look at the site:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pysocha preview --config-file config.yaml
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Pysocha writes the files into `outputDir`. The default is `generated`.
|
|
115
|
+
|
|
116
|
+
## What Pysocha does
|
|
117
|
+
|
|
118
|
+
- Markdown pages, with one body or with named regions.
|
|
119
|
+
- Blog posts, listing pages, tag pages, and author pages.
|
|
120
|
+
- Atom feeds and RSS feeds.
|
|
121
|
+
- Syntax highlighting at build time, with no style sheet.
|
|
122
|
+
- Search in the browser, with more than one search for each site.
|
|
123
|
+
- Staged output. A failed build never replaces a good site.
|
|
124
|
+
|
|
125
|
+
## Documentation
|
|
126
|
+
|
|
127
|
+
The [docs](docs/) directory holds the details:
|
|
128
|
+
|
|
129
|
+
- [Configuration](docs/configuration.md) — every key and its default.
|
|
130
|
+
- [Content](docs/content.md) — pages, blog posts, front matter, and regions.
|
|
131
|
+
- [Markdown](docs/markdown.md) — syntax highlighting and themes.
|
|
132
|
+
- [Feeds](docs/feeds.md) — Atom and RSS.
|
|
133
|
+
- [Search](docs/search.md) — search configuration and the two providers.
|
|
134
|
+
- [Search providers](docs/search-providers.md) — how to write your own.
|
|
135
|
+
- [Build behavior](docs/building.md) — commands, staged output, and preview.
|
|
136
|
+
|
|
137
|
+
## Example sites
|
|
138
|
+
|
|
139
|
+
- [`example/`](example/) in this repository. It shows every feature, and it
|
|
140
|
+
includes a search page for each provider.
|
|
141
|
+
- [todpunk/tnl-site](https://github.com/todpunk/tnl-site) — the content of
|
|
142
|
+
[todandlorna.com](https://todandlorna.com/).
|
|
143
|
+
|
|
144
|
+
## Licence
|
|
145
|
+
|
|
146
|
+
Apache-2.0.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Pysocha documentation
|
|
2
|
+
|
|
3
|
+
Pysocha is a static site generator. It reads Markdown content and Jinja
|
|
4
|
+
templates. It writes a directory of files. No code runs on the server.
|
|
5
|
+
|
|
6
|
+
For installation and a first site, read the [quickstart](../README.md).
|
|
7
|
+
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- [Configuration](configuration.md) — every configuration key and its default.
|
|
11
|
+
- [Content](content.md) — pages, blog posts, front matter, and content regions.
|
|
12
|
+
- [Markdown](markdown.md) — syntax highlighting and themes.
|
|
13
|
+
- [Feeds](feeds.md) — Atom and RSS output.
|
|
14
|
+
- [Search](search.md) — search configuration and the two supplied providers.
|
|
15
|
+
- [Search providers](search-providers.md) — how to write your own provider.
|
|
16
|
+
- [Build behavior](building.md) — the commands, staged output, and the preview
|
|
17
|
+
server.
|