Compare commits

...

11 commits

Author SHA1 Message Date
8e58d45e10
uv
Some checks failed
/ arch (push) Successful in 1m23s
/ alpine (push) Successful in 42s
/ fedora (push) Successful in 8m48s
/ opensuse (push) Successful in 2m23s
/ alma (push) Successful in 2m35s
/ rocky (push) Successful in 5m37s
/ ubuntu (push) Successful in 1m24s
/ debian (push) Failing after 58s
2024-10-08 16:17:14 +02:00
4a2fb8a3d4
−ignore/.venv 2024-10-08 16:16:44 +02:00
0075b9f78d
tabs 2024-09-28 20:28:00 +02:00
ca098993c9
tabs 2024-09-28 20:26:55 +02:00
096b659db9
useless 2024-09-28 20:23:45 +02:00
44ceef10de
pydeps 2024-09-23 11:10:36 +02:00
72133580d0
doc/commands
Some checks failed
/ arch (push) Failing after 7s
/ alpine (push) Failing after 3s
/ fedora (push) Failing after 5s
/ debian (push) Failing after 3s
/ opensuse (push) Failing after 3s
/ ubuntu (push) Failing after 3s
/ alma (push) Failing after 5s
/ rocky (push) Failing after 4s
2024-09-17 12:33:23 +02:00
b7e5adfa73
fix/main 2024-09-17 12:30:17 +02:00
6347c0c5c3
doc/main 2024-09-17 12:28:44 +02:00
1e14eaf12d
doc/project 2024-09-17 12:22:15 +02:00
1b6e120470
doc/cmd 2024-09-17 12:20:02 +02:00
9 changed files with 1268 additions and 1250 deletions

View file

@ -1,3 +0,0 @@
[*.sh]
indent_size = 4
indent_style = space

1
.gitignore vendored
View file

@ -1,3 +1,2 @@
__pycache__ __pycache__
/dist /dist
/.venv

View file

@ -291,3 +291,4 @@ Handle project workflows in a unified way:
* tex * tex
* translate to french * translate to french
* try to support nix * try to support nix
* uv

54
spcd.sh
View file

@ -1,30 +1,30 @@
#! /usr/bin/env sh #! /usr/bin/env sh
gource \ gource \
--auto-skip-seconds 0.25 \ --auto-skip-seconds 0.25 \
--date-format "%Y / %m / %d ⋅ %H : %M : %S" \ --date-format "%Y / %m / %d ⋅ %H : %M : %S" \
--disable-input \ --disable-input \
--font-scale 2.5 \ --font-scale 2.5 \
--frameless \ --frameless \
--hide mouse,usernames \ --hide mouse,usernames \
--highlight-dirs \ --highlight-dirs \
--key \ --key \
--multi-sampling \ --multi-sampling \
--output-framerate 60 \ --output-framerate 60 \
--output-ppm-stream - \ --output-ppm-stream - \
--seconds-per-day 0.6 \ --seconds-per-day 0.6 \
--stop-at-end \ --stop-at-end \
--viewport "1920x1080" | --viewport "1920x1080" |
ffmpeg \ ffmpeg \
-codec:v ppm \ -codec:v ppm \
-format image2pipe \ -format image2pipe \
-framerate 120 \ -framerate 120 \
-i - \ -i - \
-codec:v libx264 \ -codec:v libx264 \
-preset veryslow \ -preset veryslow \
-qp 28 \ -qp 28 \
-movflags \ -movflags \
+faststart \ +faststart \
-pix_fmt yuv420p \ -pix_fmt yuv420p \
-y \ -y \
spcd.mp4 spcd.mp4

View file

@ -44,8 +44,12 @@ def clone_project_branch() -> None:
) )
def install_commands(path: str) -> None: def install_commands(path: Path) -> None:
"""Make commands callable in the operating system.""" """Make commands callable in the operating system.
:param path: entry point that commands will call
:type path: Path
"""
step("Install commands") step("Install commands")
user = Path("/usr/local/bin") user = Path("/usr/local/bin")
for command in [ for command in [
@ -72,10 +76,12 @@ def install_python_packages() -> None:
"pydoclint", "pydoclint",
"pylint", "pylint",
"pytest", "pytest",
"PyYAML",
"ruff", "ruff",
"sphinx", "Sphinx",
"sphinx-rtd-theme", "sphinx-rtd-theme",
"twine", "twine",
"types-PyYAML",
] ]
for package in packages: for package in packages:
log.info(package) log.info(package)
@ -92,8 +98,12 @@ def list_environment_variables() -> None:
log.info("%s", variable) log.info("%s", variable)
def main(main_file: str) -> None: def main(main_file: Path) -> None:
"""Entry point to initialize environment or run a specific command.""" """Entry point to initialize environment or run a specific command.
:param main_file: entry point file calling this function
:type main_file: Path
"""
paths = environ["PATH"].split(pathsep) paths = environ["PATH"].split(pathsep)
if env.SPCD_PYTHON_VENV_BINARIES not in paths: if env.SPCD_PYTHON_VENV_BINARIES not in paths:
environ["PATH"] = pathsep.join([env.SPCD_PYTHON_VENV_BINARIES, *paths]) environ["PATH"] = pathsep.join([env.SPCD_PYTHON_VENV_BINARIES, *paths])

View file

@ -4,6 +4,7 @@
import importlib import importlib
import sys import sys
from pathlib import Path
if __name__ == "__main__": if __name__ == "__main__":
env = importlib.import_module("env") env = importlib.import_module("env")
@ -11,4 +12,4 @@ if __name__ == "__main__":
sys.path.insert(0, env.SPCD_PYTHON_VENV_PACKAGES) sys.path.insert(0, env.SPCD_PYTHON_VENV_PACKAGES)
from spcd import main from spcd import main
main(__file__) main(Path(__file__))

File diff suppressed because it is too large Load diff

View file

@ -32,7 +32,13 @@ def spcd_check_project() -> None:
def spcd_synchronize( def spcd_synchronize(
target: str | None = None, source: str | None = None target: str | None = None, source: str | None = None
) -> None: ) -> None:
"""Synchronize output towards a target.""" """Synchronize output towards a target.
:param target: where to deploy to
:type target: str | None
:param source: where to deploy from
:type source: str | None
"""
if not target: if not target:
user = "cd" user = "cd"
host = env.SPCD_PROJECT_PATH host = env.SPCD_PROJECT_PATH

View file

@ -28,7 +28,11 @@ class Project:
"""Current project.""" """Current project."""
def __init__(self, projects: Projects) -> None: def __init__(self, projects: Projects) -> None:
"""Set projects, branch, name, root & url.""" """Set projects, branch, name, root & url.
:param projects: parent class with environment
:type projects: Projects
"""
self.projects = projects self.projects = projects
# branch # branch
for variable in BRANCH: for variable in BRANCH: