blog-cli 0.2.0__tar.gz → 0.2.2__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.
- {blog_cli-0.2.0 → blog_cli-0.2.2}/PKG-INFO +6 -1
- {blog_cli-0.2.0 → blog_cli-0.2.2}/README.md +5 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/pyproject.toml +1 -1
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/blog_cli.egg-info/PKG-INFO +6 -1
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/personal_cli/cli.py +10 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/setup.cfg +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/blog_cli.egg-info/SOURCES.txt +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/blog_cli.egg-info/dependency_links.txt +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/blog_cli.egg-info/entry_points.txt +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/blog_cli.egg-info/requires.txt +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/blog_cli.egg-info/top_level.txt +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/personal_cli/__init__.py +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/personal_cli/__main__.py +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/personal_cli/client.py +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/src/personal_cli/formatting.py +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/tests/test_cli.py +0 -0
- {blog_cli-0.2.0 → blog_cli-0.2.2}/tests/test_client.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blog-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Agent-friendly CLI for managing a blog. Create drafts, upload media, generate time-limited preview links.
|
|
5
5
|
Author: tanaka-mambinge
|
|
6
6
|
License: MIT
|
|
@@ -74,6 +74,7 @@ blog-cli article create \
|
|
|
74
74
|
--title "My Post" \
|
|
75
75
|
--description "A short summary" \
|
|
76
76
|
--type blog \
|
|
77
|
+
--cover-image my-post-cover \
|
|
77
78
|
--markdown "# My Post\n\nHello."
|
|
78
79
|
|
|
79
80
|
# List published blog posts
|
|
@@ -85,6 +86,10 @@ blog-cli article show my-post
|
|
|
85
86
|
# Update an article
|
|
86
87
|
blog-cli article update my-post --title "Better Title"
|
|
87
88
|
|
|
89
|
+
# Set or clear the cover image
|
|
90
|
+
blog-cli article update my-post --cover-image my-post-cover
|
|
91
|
+
blog-cli article update my-post --clear-cover-image
|
|
92
|
+
|
|
88
93
|
# Generate a 24h preview link for a draft
|
|
89
94
|
blog-cli article preview my-post
|
|
90
95
|
|
|
@@ -45,6 +45,7 @@ blog-cli article create \
|
|
|
45
45
|
--title "My Post" \
|
|
46
46
|
--description "A short summary" \
|
|
47
47
|
--type blog \
|
|
48
|
+
--cover-image my-post-cover \
|
|
48
49
|
--markdown "# My Post\n\nHello."
|
|
49
50
|
|
|
50
51
|
# List published blog posts
|
|
@@ -56,6 +57,10 @@ blog-cli article show my-post
|
|
|
56
57
|
# Update an article
|
|
57
58
|
blog-cli article update my-post --title "Better Title"
|
|
58
59
|
|
|
60
|
+
# Set or clear the cover image
|
|
61
|
+
blog-cli article update my-post --cover-image my-post-cover
|
|
62
|
+
blog-cli article update my-post --clear-cover-image
|
|
63
|
+
|
|
59
64
|
# Generate a 24h preview link for a draft
|
|
60
65
|
blog-cli article preview my-post
|
|
61
66
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "blog-cli"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Agent-friendly CLI for managing a blog. Create drafts, upload media, generate time-limited preview links."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.13"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blog-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Agent-friendly CLI for managing a blog. Create drafts, upload media, generate time-limited preview links.
|
|
5
5
|
Author: tanaka-mambinge
|
|
6
6
|
License: MIT
|
|
@@ -74,6 +74,7 @@ blog-cli article create \
|
|
|
74
74
|
--title "My Post" \
|
|
75
75
|
--description "A short summary" \
|
|
76
76
|
--type blog \
|
|
77
|
+
--cover-image my-post-cover \
|
|
77
78
|
--markdown "# My Post\n\nHello."
|
|
78
79
|
|
|
79
80
|
# List published blog posts
|
|
@@ -85,6 +86,10 @@ blog-cli article show my-post
|
|
|
85
86
|
# Update an article
|
|
86
87
|
blog-cli article update my-post --title "Better Title"
|
|
87
88
|
|
|
89
|
+
# Set or clear the cover image
|
|
90
|
+
blog-cli article update my-post --cover-image my-post-cover
|
|
91
|
+
blog-cli article update my-post --clear-cover-image
|
|
92
|
+
|
|
88
93
|
# Generate a 24h preview link for a draft
|
|
89
94
|
blog-cli article preview my-post
|
|
90
95
|
|
|
@@ -64,6 +64,7 @@ def article_create(
|
|
|
64
64
|
description: str = typer.Option(..., "--description", help="Short summary."),
|
|
65
65
|
slug: str | None = typer.Option(None, "--slug", help="Optional slug override."),
|
|
66
66
|
tag: list[str] = typer.Option([], "--tag", help="Repeat for each tag."),
|
|
67
|
+
cover_image: str | None = typer.Option(None, "--cover-image", help="Uploaded media name for the article cover image."),
|
|
67
68
|
article_type: str = typer.Option(..., "--type", help="blog or project."),
|
|
68
69
|
status: str = typer.Option("draft", "--status", help="draft or published."),
|
|
69
70
|
markdown: str | None = typer.Option(None, "--markdown", help="Inline markdown body."),
|
|
@@ -80,6 +81,7 @@ def article_create(
|
|
|
80
81
|
"description": description,
|
|
81
82
|
"slug": slug,
|
|
82
83
|
"tags": tag,
|
|
84
|
+
"cover_image": cover_image,
|
|
83
85
|
"type": article_type,
|
|
84
86
|
"status": status,
|
|
85
87
|
"markdown": body,
|
|
@@ -97,6 +99,8 @@ def article_update(
|
|
|
97
99
|
title: str | None = typer.Option(None, "--title", help="New title."),
|
|
98
100
|
description: str | None = typer.Option(None, "--description", help="New summary."),
|
|
99
101
|
tag: list[str] | None = typer.Option(None, "--tag", help="Repeat for each tag."),
|
|
102
|
+
cover_image: str | None = typer.Option(None, "--cover-image", help="Uploaded media name for the article cover image."),
|
|
103
|
+
clear_cover_image: bool = typer.Option(False, "--clear-cover-image", help="Remove the article cover image."),
|
|
100
104
|
article_type: str | None = typer.Option(None, "--type", help="blog or project."),
|
|
101
105
|
status: str | None = typer.Option(None, "--status", help="draft or published."),
|
|
102
106
|
markdown: str | None = typer.Option(None, "--markdown", help="Inline markdown body."),
|
|
@@ -106,6 +110,8 @@ def article_update(
|
|
|
106
110
|
server_url: str | None = typer.Option(None, "--server-url", help="FastAPI base URL."),
|
|
107
111
|
) -> None:
|
|
108
112
|
try:
|
|
113
|
+
if cover_image is not None and clear_cover_image:
|
|
114
|
+
raise CLIError("Use either --cover-image or --clear-cover-image, not both.")
|
|
109
115
|
client = build_client(server_url, insecure=insecure)
|
|
110
116
|
payload: dict[str, object] = {}
|
|
111
117
|
if title is not None:
|
|
@@ -114,6 +120,10 @@ def article_update(
|
|
|
114
120
|
payload["description"] = description
|
|
115
121
|
if tag is not None:
|
|
116
122
|
payload["tags"] = tag
|
|
123
|
+
if cover_image is not None:
|
|
124
|
+
payload["cover_image"] = cover_image
|
|
125
|
+
elif clear_cover_image:
|
|
126
|
+
payload["cover_image"] = None
|
|
117
127
|
if article_type is not None:
|
|
118
128
|
payload["type"] = article_type
|
|
119
129
|
if status is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|