Compare commits
1 Commits
main
...
leora/read
| Author | SHA1 | Date | |
|---|---|---|---|
| 220be789d2 |
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 The coffer contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
10
README.md
10
README.md
@ -66,8 +66,16 @@ That updates the `coffer-public-ledger` article on `leora/news` (branch → PR
|
|||||||
|
|
||||||
## Platform hook
|
## Platform hook
|
||||||
|
|
||||||
`leora/agent-chat` calls `coffer.product.CofferProduct.signup_flow` after a successful agent registration when the coffer checkout is on `COFFER_ROOT` (default `/home/box/coffer`). Missing coffer does not fail signup; it logs and continues.
|
`leora/agent-chat` calls `coffer.product.CofferProduct.signup_flow` after a successful agent registration when the coffer checkout is on `COFFER_ROOT` (default `~/coffer`). Missing coffer does not fail signup; it logs and continues.
|
||||||
|
|
||||||
## Change
|
## Change
|
||||||
|
|
||||||
Branch → pull request → merge. Nothing is live unless it is on `main`.
|
Branch → pull request → merge. Nothing is live unless it is on `main`.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
`main` is protected: open a pull request from a branch; the owner reviews and merges.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT, see [LICENSE](LICENSE) (suggested; the owner decides).
|
||||||
|
|||||||
@ -17,10 +17,10 @@ ARTICLE_ID_RE = re.compile(
|
|||||||
re.DOTALL,
|
re.DOTALL,
|
||||||
)
|
)
|
||||||
|
|
||||||
DEFAULT_NEWS_REPO = Path(os.environ.get("COFFER_NEWS_REPO", "/home/box/news-work"))
|
DEFAULT_NEWS_REPO = Path(os.environ.get("COFFER_NEWS_REPO", str(Path.home() / "news-work")))
|
||||||
DEFAULT_BRANCH = os.environ.get("COFFER_NEWS_BRANCH", "coffer-public-ledger")
|
DEFAULT_BRANCH = os.environ.get("COFFER_NEWS_BRANCH", "coffer-public-ledger")
|
||||||
GITEA = os.environ.get("GITEA_URL", "/gitea")
|
GITEA = os.environ.get("GITEA_URL", "/gitea")
|
||||||
TOKEN_PATH = Path(os.environ.get("GITEA_TOKEN_FILE", "/home/box/.config/leora/gitea-token"))
|
TOKEN_PATH = Path(os.environ.get("GITEA_TOKEN_FILE", str(Path.home() / ".config/coffer/gitea-token")))
|
||||||
|
|
||||||
|
|
||||||
def upsert_ledger_article(index_html: str, article_html: str) -> str:
|
def upsert_ledger_article(index_html: str, article_html: str) -> str:
|
||||||
|
|||||||
@ -6,6 +6,7 @@ from dataclasses import asdict
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
import os
|
||||||
from zoneinfo import ZoneInfo
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
from coffer.db import CofferDB
|
from coffer.db import CofferDB
|
||||||
@ -30,7 +31,8 @@ from coffer.units import (
|
|||||||
to_subunits,
|
to_subunits,
|
||||||
)
|
)
|
||||||
|
|
||||||
PT = ZoneInfo("Australia/Perth")
|
# Display timezone for ledger timestamps. Set COFFER_TZ on the host (e.g. the operator's zone).
|
||||||
|
PT = ZoneInfo(os.environ.get("COFFER_TZ", "UTC"))
|
||||||
|
|
||||||
|
|
||||||
def now_pt() -> str:
|
def now_pt() -> str:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user