wpsync 1.17.2__py3-none-any.whl
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.
- wpsync/__init__.py +3 -0
- wpsync/__main__.py +3 -0
- wpsync/cli.py +1479 -0
- wpsync/config.py +178 -0
- wpsync/documents.py +294 -0
- wpsync/editors.py +68 -0
- wpsync/markup/__init__.py +0 -0
- wpsync/markup/dom.py +371 -0
- wpsync/markup/markdown.py +526 -0
- wpsync/media.py +161 -0
- wpsync/posts.py +78 -0
- wpsync/pull.py +400 -0
- wpsync/push.py +288 -0
- wpsync/state.py +219 -0
- wpsync/storage.py +28 -0
- wpsync/sync.py +501 -0
- wpsync/trash.py +132 -0
- wpsync/wordpress/__init__.py +0 -0
- wpsync/wordpress/autop.py +114 -0
- wpsync/wordpress/client.py +233 -0
- wpsync/wordpress/content.py +602 -0
- wpsync/wordpress/remote.py +264 -0
- wpsync-1.17.2.dist-info/METADATA +148 -0
- wpsync-1.17.2.dist-info/RECORD +27 -0
- wpsync-1.17.2.dist-info/WHEEL +4 -0
- wpsync-1.17.2.dist-info/entry_points.txt +2 -0
- wpsync-1.17.2.dist-info/licenses/LICENSE +61 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"""WordPress posts in WPSync's platform-neutral form."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import mimetypes
|
|
6
|
+
import re
|
|
7
|
+
from datetime import UTC, tzinfo
|
|
8
|
+
from typing import Any
|
|
9
|
+
from urllib.parse import quote, unquote, urlsplit
|
|
10
|
+
|
|
11
|
+
import httpx
|
|
12
|
+
|
|
13
|
+
from wpsync.media import Media, MediaImage, MissingImage
|
|
14
|
+
from wpsync.posts import (
|
|
15
|
+
Conversion,
|
|
16
|
+
FetchedPost,
|
|
17
|
+
Post,
|
|
18
|
+
PostStatus,
|
|
19
|
+
PostSummary,
|
|
20
|
+
RemoteState,
|
|
21
|
+
)
|
|
22
|
+
from wpsync.state import MediaRecord
|
|
23
|
+
from wpsync.wordpress.client import (
|
|
24
|
+
FINGERPRINT_FIELDS,
|
|
25
|
+
HEADERS,
|
|
26
|
+
SYNCED_STATUSES,
|
|
27
|
+
TIMEOUT,
|
|
28
|
+
WordPressClient,
|
|
29
|
+
WordPressError,
|
|
30
|
+
display_title,
|
|
31
|
+
local_status,
|
|
32
|
+
parse_gmt,
|
|
33
|
+
remote_state,
|
|
34
|
+
request,
|
|
35
|
+
)
|
|
36
|
+
from wpsync.wordpress.content import render_html, same_display, to_markdown
|
|
37
|
+
|
|
38
|
+
PULL_FIELDS = FINGERPRINT_FIELDS + ",generated_slug,link"
|
|
39
|
+
UNCATEGORIZED = "Uncategorized"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class WordPressRemote:
|
|
43
|
+
"""Reads posts and media from one WordPress site."""
|
|
44
|
+
|
|
45
|
+
def __init__(
|
|
46
|
+
self, client: WordPressClient, transport: httpx.BaseTransport | None = None
|
|
47
|
+
) -> None:
|
|
48
|
+
self.client = client
|
|
49
|
+
# Images are often served from another host, so this client never
|
|
50
|
+
# carries the site's credentials.
|
|
51
|
+
self.downloads = httpx.Client(
|
|
52
|
+
headers=HEADERS, timeout=TIMEOUT, follow_redirects=True, transport=transport
|
|
53
|
+
)
|
|
54
|
+
self._timezone: tzinfo | None = None
|
|
55
|
+
self._terms: dict[str, dict[int, str]] = {}
|
|
56
|
+
self._featured: set[str] | None = None
|
|
57
|
+
|
|
58
|
+
def close(self) -> None:
|
|
59
|
+
self.downloads.close()
|
|
60
|
+
|
|
61
|
+
def fetch_posts(
|
|
62
|
+
self, ids: list[str] | None = None, slug: str | None = None
|
|
63
|
+
) -> list[FetchedPost]:
|
|
64
|
+
return [
|
|
65
|
+
self._fetched(post)
|
|
66
|
+
for post in self.client.posts(PULL_FIELDS, ids=ids, slug=slug)
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
def convert(self, post: FetchedPost, media: Media) -> Conversion:
|
|
70
|
+
return to_markdown(post.content, media)
|
|
71
|
+
|
|
72
|
+
def download(self, url: str) -> bytes:
|
|
73
|
+
response = request(self.downloads, "GET", url)
|
|
74
|
+
if response.status_code in (404, 410):
|
|
75
|
+
raise MissingImage(url)
|
|
76
|
+
if response.is_error:
|
|
77
|
+
raise WordPressError(
|
|
78
|
+
f"could not download {url} (HTTP {response.status_code})"
|
|
79
|
+
)
|
|
80
|
+
# Some servers answer a missing file with a web page and a 200.
|
|
81
|
+
if not response.headers.get("content-type", "").startswith("image/"):
|
|
82
|
+
raise MissingImage(url)
|
|
83
|
+
return response.content
|
|
84
|
+
|
|
85
|
+
def available(self, url: str) -> bool:
|
|
86
|
+
response = request(self.downloads, "GET", url)
|
|
87
|
+
if response.status_code in (404, 410):
|
|
88
|
+
return False
|
|
89
|
+
if response.is_error:
|
|
90
|
+
raise WordPressError(f"could not check {url} (HTTP {response.status_code})")
|
|
91
|
+
return True
|
|
92
|
+
|
|
93
|
+
def post_states(self, ids: list[str]) -> dict[str, RemoteState]:
|
|
94
|
+
return self.client.post_states(ids)
|
|
95
|
+
|
|
96
|
+
def post_summaries(self) -> list[PostSummary]:
|
|
97
|
+
return self.client.post_summaries()
|
|
98
|
+
|
|
99
|
+
def render(self, markdown: str, media: Media) -> str:
|
|
100
|
+
return render_html(markdown, media)
|
|
101
|
+
|
|
102
|
+
def upload(self, name: str, data: bytes) -> MediaImage:
|
|
103
|
+
media_type = mimetypes.guess_type(name)[0] or "application/octet-stream"
|
|
104
|
+
headers = {
|
|
105
|
+
"Content-Type": media_type,
|
|
106
|
+
"Content-Disposition": f'attachment; filename="{quote(name)}"',
|
|
107
|
+
}
|
|
108
|
+
image = self.client.post("wp/v2/media", content=data, headers=headers).json()
|
|
109
|
+
large = image.get("media_details", {}).get("sizes", {}).get("large")
|
|
110
|
+
# WordPress keeps only the first frame of an animated GIF in the copies
|
|
111
|
+
# it resizes, so a GIF is shown at its original size.
|
|
112
|
+
if large and media_type != "image/gif":
|
|
113
|
+
return MediaImage(str(image["id"]), large["source_url"], "large")
|
|
114
|
+
return MediaImage(str(image["id"]), image["source_url"], "full")
|
|
115
|
+
|
|
116
|
+
def missing_terms(self, post: Post) -> list[str]:
|
|
117
|
+
return [
|
|
118
|
+
f"{label} '{name}'"
|
|
119
|
+
for taxonomy, label, names in (
|
|
120
|
+
("categories", "category", _categories(post)),
|
|
121
|
+
("tags", "tag", post.tags),
|
|
122
|
+
)
|
|
123
|
+
for name in names
|
|
124
|
+
if self._term_id(taxonomy, name) is None
|
|
125
|
+
]
|
|
126
|
+
|
|
127
|
+
def save(
|
|
128
|
+
self,
|
|
129
|
+
post_id: str | None,
|
|
130
|
+
post: Post,
|
|
131
|
+
content: str | None,
|
|
132
|
+
fields: bool,
|
|
133
|
+
unpublish: bool,
|
|
134
|
+
) -> FetchedPost:
|
|
135
|
+
body: dict[str, Any] = {}
|
|
136
|
+
if content is not None:
|
|
137
|
+
body["content"] = content
|
|
138
|
+
if fields:
|
|
139
|
+
body["title"] = post.title
|
|
140
|
+
body["status"] = "publish" if post.status is PostStatus.PUBLIC else "draft"
|
|
141
|
+
body["categories"] = self._term_ids("categories", _categories(post))
|
|
142
|
+
body["tags"] = self._term_ids("tags", post.tags)
|
|
143
|
+
if post.slug:
|
|
144
|
+
body["slug"] = post.slug
|
|
145
|
+
if post.date:
|
|
146
|
+
body["date_gmt"] = post.date.astimezone(UTC).strftime(
|
|
147
|
+
"%Y-%m-%dT%H:%M:%S"
|
|
148
|
+
)
|
|
149
|
+
if unpublish:
|
|
150
|
+
body["status"] = "draft"
|
|
151
|
+
route = "wp/v2/posts" + (f"/{post_id}" if post_id else "")
|
|
152
|
+
params = {"context": "edit", "_fields": PULL_FIELDS}
|
|
153
|
+
return self._fetched(self.client.post(route, params, json=body).json())
|
|
154
|
+
|
|
155
|
+
def delete_post(self, post_id: str) -> None:
|
|
156
|
+
# force skips WordPress's own trash: WPSync keeps the copy in .trash/.
|
|
157
|
+
self.client.delete(f"wp/v2/posts/{post_id}", {"force": "true"})
|
|
158
|
+
|
|
159
|
+
def delete_media(self, media_id: str) -> None:
|
|
160
|
+
self.client.delete(f"wp/v2/media/{media_id}", {"force": "true"})
|
|
161
|
+
|
|
162
|
+
def media_in_use(self, media: MediaRecord, post_id: str) -> bool:
|
|
163
|
+
# WordPress marks an image it inserts with its library ID; images added
|
|
164
|
+
# by hand are found by their file path, in any of the image's sizes.
|
|
165
|
+
for term in (f"wp-image-{media.media_id}", _upload_stem(media.url)):
|
|
166
|
+
for route in ("wp/v2/posts", "wp/v2/pages"):
|
|
167
|
+
found = self.client.get_all(
|
|
168
|
+
route,
|
|
169
|
+
{
|
|
170
|
+
"search": term,
|
|
171
|
+
"status": SYNCED_STATUSES,
|
|
172
|
+
"context": "edit",
|
|
173
|
+
"_fields": "id",
|
|
174
|
+
},
|
|
175
|
+
)
|
|
176
|
+
if any(str(item["id"]) != post_id for item in found):
|
|
177
|
+
return True
|
|
178
|
+
return media.media_id in self._featured_media()
|
|
179
|
+
|
|
180
|
+
def _featured_media(self) -> set[str]:
|
|
181
|
+
"""The library images posts and pages show as their featured image."""
|
|
182
|
+
if self._featured is None:
|
|
183
|
+
self._featured = {
|
|
184
|
+
str(item["featured_media"])
|
|
185
|
+
for route in ("wp/v2/posts", "wp/v2/pages")
|
|
186
|
+
for item in self.client.get_all(
|
|
187
|
+
route,
|
|
188
|
+
{
|
|
189
|
+
"status": SYNCED_STATUSES,
|
|
190
|
+
"context": "edit",
|
|
191
|
+
"_fields": "id,featured_media",
|
|
192
|
+
},
|
|
193
|
+
)
|
|
194
|
+
if item.get("featured_media")
|
|
195
|
+
}
|
|
196
|
+
return self._featured
|
|
197
|
+
|
|
198
|
+
def keeps_display(self, sent: str, stored: str) -> bool:
|
|
199
|
+
return same_display(sent, stored)
|
|
200
|
+
|
|
201
|
+
def _term_id(self, taxonomy: str, name: str) -> int | None:
|
|
202
|
+
wanted = name.casefold()
|
|
203
|
+
for term_id, term_name in self._term_names(taxonomy).items():
|
|
204
|
+
if term_name.casefold() == wanted:
|
|
205
|
+
return term_id
|
|
206
|
+
return None
|
|
207
|
+
|
|
208
|
+
def _term_ids(self, taxonomy: str, names: tuple[str, ...]) -> list[int]:
|
|
209
|
+
ids = []
|
|
210
|
+
for name in names:
|
|
211
|
+
term_id = self._term_id(taxonomy, name)
|
|
212
|
+
if term_id is None:
|
|
213
|
+
term_id = self.client.create_term(taxonomy, name)
|
|
214
|
+
self._term_names(taxonomy)[term_id] = name
|
|
215
|
+
ids.append(term_id)
|
|
216
|
+
return ids
|
|
217
|
+
|
|
218
|
+
def _fetched(self, post: dict[str, Any]) -> FetchedPost:
|
|
219
|
+
if self._timezone is None:
|
|
220
|
+
self._timezone = self.client.site_timezone()
|
|
221
|
+
names = {
|
|
222
|
+
taxonomy: self._term_names(taxonomy) for taxonomy in ("categories", "tags")
|
|
223
|
+
}
|
|
224
|
+
fields = Post(
|
|
225
|
+
title=display_title(post),
|
|
226
|
+
slug=unquote(post["slug"]),
|
|
227
|
+
date=parse_gmt(post["date_gmt"]).astimezone(self._timezone),
|
|
228
|
+
status=local_status(post["status"]),
|
|
229
|
+
categories=tuple(
|
|
230
|
+
sorted({names["categories"][i] for i in post["categories"]})
|
|
231
|
+
),
|
|
232
|
+
tags=tuple(sorted({names["tags"][i] for i in post["tags"]})),
|
|
233
|
+
)
|
|
234
|
+
return FetchedPost(
|
|
235
|
+
str(post["id"]),
|
|
236
|
+
fields,
|
|
237
|
+
post["content"]["raw"],
|
|
238
|
+
remote_state(post),
|
|
239
|
+
_file_stem(post),
|
|
240
|
+
post["link"],
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
def _term_names(self, taxonomy: str) -> dict[int, str]:
|
|
244
|
+
if taxonomy not in self._terms:
|
|
245
|
+
self._terms[taxonomy] = self.client.term_names(taxonomy)
|
|
246
|
+
return self._terms[taxonomy]
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def _categories(post: Post) -> tuple[str, ...]:
|
|
250
|
+
"""A post's categories; WordPress keeps a post without any in Uncategorized."""
|
|
251
|
+
return post.categories or (UNCATEGORIZED,)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _upload_stem(url: str) -> str:
|
|
255
|
+
"""An image's upload path without its size suffix, matching every size."""
|
|
256
|
+
path = unquote(urlsplit(url).path)
|
|
257
|
+
path = path.split("/uploads/", 1)[-1]
|
|
258
|
+
return re.sub(r"(-\d+x\d+|-scaled)?\.\w+$", "", path)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def _file_stem(post: dict[str, Any]) -> str:
|
|
262
|
+
slug = unquote(post["slug"] or post.get("generated_slug") or "")
|
|
263
|
+
slug = re.sub(r"[/\\:\x00]", "-", slug).strip(".-")
|
|
264
|
+
return slug or f"post-{post['id']}"
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wpsync
|
|
3
|
+
Version: 1.17.2
|
|
4
|
+
Summary: Manage blog posts as local Markdown files
|
|
5
|
+
Project-URL: Homepage, https://wpsync.dev
|
|
6
|
+
Project-URL: Changelog, https://github.com/ediril/wpsync/blob/main/CHANGELOG.md
|
|
7
|
+
Project-URL: Issues, https://github.com/ediril/wpsync/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/ediril/wpsync.git
|
|
9
|
+
License-Expression: LicenseRef-PolyForm-Strict-1.0.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Requires-Dist: html5lib<2,>=1.1
|
|
17
|
+
Requires-Dist: httpx<1,>=0.28
|
|
18
|
+
Requires-Dist: markdown-it-py<5,>=3
|
|
19
|
+
Requires-Dist: mdit-py-plugins<1,>=0.5
|
|
20
|
+
Requires-Dist: pyyaml<7,>=6
|
|
21
|
+
Requires-Dist: tzdata; sys_platform == 'win32'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# WPSync
|
|
25
|
+
|
|
26
|
+
WPSync (`wpsync`) is a command-line tool for managing blog posts as local
|
|
27
|
+
Markdown files: map a folder to a blog, pull its posts, edit them in any
|
|
28
|
+
editor, preview the differences, and push the changes back. WordPress is the
|
|
29
|
+
first supported platform. Website: [wpsync.dev](https://wpsync.dev).
|
|
30
|
+
|
|
31
|
+
WPSync is pre-alpha software. Profiles, pull, diff, and push work today;
|
|
32
|
+
commands and the post file format may change before a stable release.
|
|
33
|
+
|
|
34
|
+
## Who is it for?
|
|
35
|
+
|
|
36
|
+
WPSync is for people who would rather write blog posts in a Markdown editor,
|
|
37
|
+
such as VS Code or Obsidian, than in the WordPress editor.
|
|
38
|
+
|
|
39
|
+
Your files are the source of truth. Keep them in Git, edit them offline, and see
|
|
40
|
+
exactly what a push will change before anything reaches the blog.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
WPSync requires Python 3.11 or newer. Install it from PyPI with uv:
|
|
45
|
+
|
|
46
|
+
```console
|
|
47
|
+
uv tool install wpsync
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Upgrade later with:
|
|
51
|
+
|
|
52
|
+
```console
|
|
53
|
+
uv tool upgrade wpsync
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quick start
|
|
57
|
+
|
|
58
|
+
WPSync signs in with a WordPress Application Password, created in the WordPress
|
|
59
|
+
dashboard under **Users > Profile > Application Passwords**; the site must use
|
|
60
|
+
HTTPS. WPSync reads the password from an environment variable named after the
|
|
61
|
+
profile and never stores it.
|
|
62
|
+
|
|
63
|
+
From the folder you want to use for the blog:
|
|
64
|
+
|
|
65
|
+
```console
|
|
66
|
+
wpsync init myblog --site https://example.com --username emrah
|
|
67
|
+
export MYBLOG_WP_PASSWORD='abcd efgh ijkl mnop qrst uvwx'
|
|
68
|
+
wpsync pull # download posts and images into content/
|
|
69
|
+
wpsync open hello-world # edit a post in Obsidian or VS Code
|
|
70
|
+
wpsync diff # see what push would change
|
|
71
|
+
wpsync push # send the changes to the blog
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`init` proposes the current directory as the profile's folder; pressing Enter
|
|
75
|
+
accepts it. Each post becomes a Markdown file under `content/` with a YAML
|
|
76
|
+
header, and its images go in `content/images/`.
|
|
77
|
+
|
|
78
|
+
## Everyday commands
|
|
79
|
+
|
|
80
|
+
```console
|
|
81
|
+
wpsync profiles # list profiles; * marks the current one
|
|
82
|
+
wpsync ls # local posts, without contacting the blog
|
|
83
|
+
wpsync show hello # one post's details and issues
|
|
84
|
+
wpsync create -o # start a new private post and open it
|
|
85
|
+
wpsync open idea # open a post in your editor
|
|
86
|
+
wpsync pull # bring changes from the blog
|
|
87
|
+
wpsync diff # what push would change, read-only
|
|
88
|
+
wpsync push hello # send one post
|
|
89
|
+
wpsync delete hello # delete a post, keeping it in .trash/
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
A new post is private until you set `status: public` in its header. Pull asks
|
|
93
|
+
before replacing a file you edited, and push asks before replacing a post that
|
|
94
|
+
also changed on WordPress. Push deletes nothing on the blog unless you pass
|
|
95
|
+
`-p`, and a deleted post is kept in `.trash/`, where `restore` brings it back.
|
|
96
|
+
|
|
97
|
+
## Documentation
|
|
98
|
+
|
|
99
|
+
- [Profiles and credentials](https://github.com/ediril/wpsync/blob/main/docs/profiles.md):
|
|
100
|
+
Application Passwords, profiles, and running commands from anywhere.
|
|
101
|
+
- [Post files](https://github.com/ediril/wpsync/blob/main/docs/post-files.md):
|
|
102
|
+
the header and body format, images, starting a post, and opening it in an
|
|
103
|
+
editor.
|
|
104
|
+
- [Pull and push](https://github.com/ediril/wpsync/blob/main/docs/push-and-pull.md):
|
|
105
|
+
what each changes, how they protect local and remote work, when they ask,
|
|
106
|
+
and deleting posts.
|
|
107
|
+
- [Listing posts and diff](https://github.com/ediril/wpsync/blob/main/docs/listing-and-diff.md):
|
|
108
|
+
`ls`, `show`, issues, and `diff`'s status markers.
|
|
109
|
+
- [Development and maintenance](https://github.com/ediril/wpsync/blob/main/docs/development.md):
|
|
110
|
+
testing local changes, switching installs, and releasing.
|
|
111
|
+
|
|
112
|
+
## Command behavior
|
|
113
|
+
|
|
114
|
+
Commands accept any unique prefix, such as `wpsync di`. An ambiguous prefix
|
|
115
|
+
fails and lists the commands it could mean.
|
|
116
|
+
|
|
117
|
+
`show`, `open`, `diff`, and `push` take one post by ID, slug, file name, title,
|
|
118
|
+
or path. A file name needs no folder: `vibing` or `vibing.md` finds
|
|
119
|
+
`content/2019/vibing.md`, looking in the current folder first and then in every
|
|
120
|
+
folder under `content/`. A name that matches several files lists them. `pull`
|
|
121
|
+
takes an ID, a slug, a file name ending in `.md`, or a path.
|
|
122
|
+
|
|
123
|
+
Use `wpsync -h` and `wpsync COMMAND -h` for built-in help, and `wpsync --legend`
|
|
124
|
+
for the diff and ls symbols. `wpsync -v` and `wpsync --version` print the
|
|
125
|
+
installed version.
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
WPSync is source-available under the [PolyForm Strict License 1.0.0](https://github.com/ediril/wpsync/blob/main/LICENSE).
|
|
130
|
+
Use is free of charge for the purposes permitted by that license, including:
|
|
131
|
+
|
|
132
|
+
- Any noncommercial purpose.
|
|
133
|
+
- The personal uses listed in the license, such as personal study and hobby
|
|
134
|
+
projects, without any anticipated commercial application.
|
|
135
|
+
- Use by charitable organizations, educational institutions, public research
|
|
136
|
+
organizations, public safety or health organizations, environmental protection
|
|
137
|
+
organizations, and government institutions, regardless of funding source or
|
|
138
|
+
obligations resulting from funding.
|
|
139
|
+
|
|
140
|
+
This license grants no rights to modify or redistribute WPSync or create works
|
|
141
|
+
based on it. The full license governs; this summary does not grant additional
|
|
142
|
+
permissions.
|
|
143
|
+
|
|
144
|
+
Commercial use outside those permissions requires a separate paid license.
|
|
145
|
+
Contact [Emrah Diril](mailto:emrah@diril.org) for pricing and a commercial
|
|
146
|
+
agreement before beginning such use.
|
|
147
|
+
|
|
148
|
+
WPSync is source-available, not open source.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
wpsync/__init__.py,sha256=h7AUkanGARL3xd1iZZGnD9sYWTnrP2PbjDpCs60_2kw,72
|
|
2
|
+
wpsync/__main__.py,sha256=L0ADr7xVmp8tCOMDFJG_PuT7rRKNSPGxBjwQce_avWo,54
|
|
3
|
+
wpsync/cli.py,sha256=qpsXunlaEPRCVNVkDjhFLNfkO0oRXV6EfNHxJJfArCY,52857
|
|
4
|
+
wpsync/config.py,sha256=9nTLJyaCfDGmnnTNuEFi5YAcm40zXbkdi8BZrBV4ro8,6717
|
|
5
|
+
wpsync/documents.py,sha256=aaIw4UQNXxJTjF1DWqeYWnfU-_UOXSvocK6mlYPVExE,10048
|
|
6
|
+
wpsync/editors.py,sha256=T3gQkjYeS3C1-94kzjYtIeTmWzoI9KEtBRgu7Rs6qc8,2198
|
|
7
|
+
wpsync/media.py,sha256=CVJWuuhFX9BvKB0xjopFDJ1SyjQ5cdy3qa7wc-lnyIc,5831
|
|
8
|
+
wpsync/posts.py,sha256=qL8d3j4jqkuoRpKYtnG-D9kJQp5RNpbKafnMdj4pHYU,1805
|
|
9
|
+
wpsync/pull.py,sha256=Zr4kBMOOt8rx7c4qA8spNP2Ib63nWlpVbKFVgfgPBA0,15227
|
|
10
|
+
wpsync/push.py,sha256=TMfIB5DPgKFssuBAH3Eawd2_zKb-y_DzkVLb5J5ps-Q,10651
|
|
11
|
+
wpsync/state.py,sha256=1JcRptxp2La-X4KRY5iImS55FEJfcc-jV2RWH2EYAG4,6962
|
|
12
|
+
wpsync/storage.py,sha256=F_CyrNt0-coAwnfAXF_FSjICQYHWz9vkyPZZzNzI6Oc,871
|
|
13
|
+
wpsync/sync.py,sha256=U2XcOBXaY3uK4VH3SXgVqSudHKfn3xNV-tJgSO80JOY,17052
|
|
14
|
+
wpsync/trash.py,sha256=4P2SP3tiDllP1SexQWas7spLc1BZKEEQl1BmXURVGMw,4717
|
|
15
|
+
wpsync/markup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
wpsync/markup/dom.py,sha256=qUIRWQxOIQNOaqt0uCiTJRIcc3WLY6VN2H6blZkqwlc,12760
|
|
17
|
+
wpsync/markup/markdown.py,sha256=Ago9Tm5vYu7k5Dp71PgDxEKIMfZllqIyC7de6Omf5bE,20044
|
|
18
|
+
wpsync/wordpress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
wpsync/wordpress/autop.py,sha256=SH8VbyzwRzaT3nAMWtd0v2JORK-TlKdc7-fIDwSq3SY,4569
|
|
20
|
+
wpsync/wordpress/client.py,sha256=UX_RcyTn00VbZ7unrjiXyMjY3tvWVLXr13VZ4GMqjoY,8154
|
|
21
|
+
wpsync/wordpress/content.py,sha256=izpYXEG2YN29jL9q5koZJ_dH8Et7PPOQtPh9K66qvW4,21930
|
|
22
|
+
wpsync/wordpress/remote.py,sha256=4fX_mLfxvbixHKlNoSaixQRsfVj5YEhpxe0IsAHebpk,9651
|
|
23
|
+
wpsync-1.17.2.dist-info/METADATA,sha256=XfO1sgmFklN-OnK3bobcIwYjd3LPEXeTRqBWHY5RNQc,6324
|
|
24
|
+
wpsync-1.17.2.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
25
|
+
wpsync-1.17.2.dist-info/entry_points.txt,sha256=vxdrj2fGSestteIcsV-YFPZZCnfgRyyMtoDSOpu__1c,43
|
|
26
|
+
wpsync-1.17.2.dist-info/licenses/LICENSE,sha256=bDodBwKuB9ac4hmr-Ft6p24gB8j6ICzQxvII5lT7mD8,3625
|
|
27
|
+
wpsync-1.17.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Copyright (c) 2026 Emrah Diril
|
|
2
|
+
|
|
3
|
+
# PolyForm Strict License 1.0.0
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/strict/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose, other than distributing the software or making changes or new works based on the software.
|
|
14
|
+
|
|
15
|
+
## Patent License
|
|
16
|
+
|
|
17
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
18
|
+
|
|
19
|
+
## Noncommercial Purposes
|
|
20
|
+
|
|
21
|
+
Any noncommercial purpose is a permitted purpose.
|
|
22
|
+
|
|
23
|
+
## Personal Uses
|
|
24
|
+
|
|
25
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
26
|
+
|
|
27
|
+
## Noncommercial Organizations
|
|
28
|
+
|
|
29
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
30
|
+
|
|
31
|
+
## Fair Use
|
|
32
|
+
|
|
33
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
34
|
+
|
|
35
|
+
## No Other Rights
|
|
36
|
+
|
|
37
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
38
|
+
|
|
39
|
+
## Patent Defense
|
|
40
|
+
|
|
41
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
42
|
+
|
|
43
|
+
## Violations
|
|
44
|
+
|
|
45
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
46
|
+
|
|
47
|
+
## No Liability
|
|
48
|
+
|
|
49
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
50
|
+
|
|
51
|
+
## Definitions
|
|
52
|
+
|
|
53
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
54
|
+
|
|
55
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
56
|
+
|
|
57
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
58
|
+
|
|
59
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
60
|
+
|
|
61
|
+
**Use** means anything you do with the software requiring one of your licenses.
|