Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion COMMERCIAL_LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Commercial License Terms (Summary)

For **production or commercial use** of `contentkit`, you must obtain a commercial license from the Licensor.
For **production or commercial use** of `PulseWriter`, you must obtain a commercial license from the Licensor.

Contact: nikita.koselev@gmail.com
Typical grant includes:
Expand Down
2 changes: 1 addition & 1 deletion FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Status: 🟢 Ready · 🟡 In Progress · 🔴 Blocked · ✅ Done

| ID | Feature | Status | Notes / Acceptance Criteria | Owner |
|----|---------|--------|-----------------------------|-------|
| F-001 | CLI: transform markdown → blog/LinkedIn/X/Dev.to | ✅ | `contentkit_cli transform` writes files to /out | core |
| F-001 | CLI: transform markdown → blog/LinkedIn/X/Dev.to | ✅ | `pulsewriter` writes files to /out | core |
| F-002 | API: `/generate` + `/revise` | ✅ | Accepts `topic` or `body_markdown`, returns drafts | api |
| F-003 | Templates: tone/persona system | ✅ | Jinja templates parametrize `{tone, persona, word_target}` | core |
| F-004 | GitHub PR helper (blog repo) | 🟢 | Function: create branch, commit file, open PR to `nikitakoselev/nikitakoselev.github.io` | connectors |
Expand Down
76 changes: 63 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,82 @@ This MVP intentionally keeps logic simple (template-based) so you can ship fast;

## Quick start

### 1. Create and activate a virtual environment

**macOS / Linux (bash or zsh)**

```bash
# Create & activate venv (example)
python -m venv .venv && . .venv/bin/activate # Windows: .venv\Scripts\activate
python -m venv .venv # -m: run the venv module to create env in .venv
source .venv/bin/activate # activate the virtual environment
```

**Windows PowerShell**

```powershell
python -m venv .venv # -m: run the venv module; .venv is env folder
.\.venv\Scripts\Activate.ps1 # activate the virtual environment
```

**Windows CMD**

# Install
```cmd
python -m venv .venv
REM -m: run the venv module; .venv is env folder
.\.venv\Scripts\activate.bat
REM Activate the virtual environment
```

### 2. Install dependencies

**macOS / Linux**

```bash
pip install -e .[dev] # -e: editable install; .[dev]: include dev extras
```

**Windows PowerShell**

```powershell
pip install -e ".[dev]" # -e: editable install; "[dev]": include dev extras
```

**Windows CMD**

```cmd
pip install -e .[dev]
REM -e: editable install
REM .[dev]: include dev extras
```

# Try CLI
python -m PulseWriter_cli --help
python -m PulseWriter_cli transform examples/input.md --platforms linkedin x devto --out-dir ./out
### 3. Run the CLI

# Run API
uvicorn PulseWriter_api.main:app --reload
```bash
pulsewriter --help # show CLI usage and exit
pulsewriter examples/input.md \ # source markdown
--platforms linkedin \ # include LinkedIn draft
--platforms x \ # include X (Twitter) draft
--platforms devto \ # include Dev.to draft
--out-dir ./out # write output files to ./out
```

### 4. Run the API

```bash
uvicorn pulsewriter_api.main:app --reload # --reload: restart on code changes
# POST /generate with JSON: {"topic":"Impact to Cashflow","platforms":["blog","linkedin","x"]}
```

## Project layout

```
packages/
core/PulseWriter_core/ # Open core: transforms, templates, validators
cli/PulseWriter_cli/ # Typer CLI (calls core)
api/PulseWriter_api/ # FastAPI (calls core)
src/
pulsewriter_core/ # Open core: transforms, templates, validators
pulsewriter_cli/ # Typer CLI (calls core)
pulsewriter_api/ # FastAPI (calls core)
examples/ # Sample input & config
recipes/n8n/ # (Optional) n8n workflow stubs
tests/ # Test suite
connectors/ # Optional helper modules
```

## License
Expand All @@ -43,7 +94,6 @@ You may run, modify, and use non-production internally. **Production/commercial
- v0.2: add optional LLM augment in core (behind a flag)
- v0.3: connectors (Buffer/Notion/GitHub PR helper)
- v0.4: n8n nodes + Telegram bot adapter
```


---
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion packages/core/contentkit_core/__init__.py

This file was deleted.

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@ dependencies = [
[project.optional-dependencies]
dev = ["pytest>=8.2.0", "pytest-cov>=5.0.0"]

[tool.setuptools.packages.find]
where = ["packages"]
[project.scripts]
pulsewriter = "pulsewriter_cli.main:app"

[tool.setuptools]
packages = ["pulsewriter_core", "pulsewriter_cli", "pulsewriter_api"]
package-dir = {"" = "src"}

[tool.setuptools.package-data]
pulsewriter_core = ["templates/*.j2"]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from fastapi import FastAPI, Body
from pydantic import BaseModel
from typing import List, Optional, Dict, Any
from contentkit_core import TransformConfig, generate, revise
from pulsewriter_core import TransformConfig, generate, revise

app = FastAPI(title="contentkit API", version="0.1.0")
app = FastAPI(title="PulseWriter API", version="0.1.0")

class GenerateRequest(BaseModel):
topic: Optional[str] = None
Expand Down
4 changes: 4 additions & 0 deletions src/pulsewriter_cli/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .main import app

if __name__ == "__main__":
app()
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import typer
from pathlib import Path
from typing import List
from contentkit_core import TransformConfig, generate, save_text, load_markdown
from pulsewriter_core import TransformConfig, generate, save_text, load_markdown

app = typer.Typer(help="contentkit CLI — transform a single markdown into platform drafts.")
app = typer.Typer(help="PulseWriter CLI — transform a single markdown into platform drafts.")

@app.command()
def transform(
Expand Down
15 changes: 15 additions & 0 deletions src/pulsewriter_core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from .transform import (
TransformConfig,
generate,
revise,
load_markdown,
save_text,
)

__all__ = [
"TransformConfig",
"generate",
"revise",
"load_markdown",
"save_text",
]
File renamed without changes.