wpsync 1.2.1__tar.gz → 1.12.7__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.
Potentially problematic release.
This version of wpsync might be problematic. Click here for more details.
- {wpsync-1.2.1 → wpsync-1.12.7}/.gitignore +3 -2
- wpsync-1.12.7/PKG-INFO +148 -0
- wpsync-1.12.7/README.md +125 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/pyproject.toml +9 -1
- wpsync-1.12.7/src/wpsync/cli.py +1290 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/config.py +12 -7
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/documents.py +21 -7
- wpsync-1.12.7/src/wpsync/editors.py +68 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/markup/dom.py +64 -6
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/media.py +57 -6
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/posts.py +9 -7
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/pull.py +190 -69
- wpsync-1.12.7/src/wpsync/push.py +315 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/state.py +51 -9
- wpsync-1.12.7/src/wpsync/sync.py +424 -0
- wpsync-1.12.7/src/wpsync/trash.py +144 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/wordpress/client.py +45 -20
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/wordpress/content.py +44 -7
- wpsync-1.12.7/src/wpsync/wordpress/remote.py +256 -0
- wpsync-1.12.7/website/README.md +37 -0
- wpsync-1.2.1/PKG-INFO +0 -312
- wpsync-1.2.1/README.md +0 -293
- wpsync-1.2.1/src/wpsync/cli.py +0 -740
- wpsync-1.2.1/src/wpsync/sync.py +0 -260
- wpsync-1.2.1/src/wpsync/wordpress/remote.py +0 -100
- {wpsync-1.2.1 → wpsync-1.12.7}/LICENSE +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/build_backend/versioning.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/__init__.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/__main__.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/markup/__init__.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/markup/markdown.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/storage.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/wordpress/__init__.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/src/wpsync/wordpress/autop.py +0 -0
- {wpsync-1.2.1 → wpsync-1.12.7}/version.json +0 -0
wpsync-1.12.7/PKG-INFO
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wpsync
|
|
3
|
+
Version: 1.12.7
|
|
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.
|
wpsync-1.12.7/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# WPSync
|
|
2
|
+
|
|
3
|
+
WPSync (`wpsync`) is a command-line tool for managing blog posts as local
|
|
4
|
+
Markdown files: map a folder to a blog, pull its posts, edit them in any
|
|
5
|
+
editor, preview the differences, and push the changes back. WordPress is the
|
|
6
|
+
first supported platform. Website: [wpsync.dev](https://wpsync.dev).
|
|
7
|
+
|
|
8
|
+
WPSync is pre-alpha software. Profiles, pull, diff, and push work today;
|
|
9
|
+
commands and the post file format may change before a stable release.
|
|
10
|
+
|
|
11
|
+
## Who is it for?
|
|
12
|
+
|
|
13
|
+
WPSync is for people who would rather write blog posts in a Markdown editor,
|
|
14
|
+
such as VS Code or Obsidian, than in the WordPress editor.
|
|
15
|
+
|
|
16
|
+
Your files are the source of truth. Keep them in Git, edit them offline, and see
|
|
17
|
+
exactly what a push will change before anything reaches the blog.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
WPSync requires Python 3.11 or newer. Install it from PyPI with uv:
|
|
22
|
+
|
|
23
|
+
```console
|
|
24
|
+
uv tool install wpsync
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Upgrade later with:
|
|
28
|
+
|
|
29
|
+
```console
|
|
30
|
+
uv tool upgrade wpsync
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
WPSync signs in with a WordPress Application Password, created in the WordPress
|
|
36
|
+
dashboard under **Users > Profile > Application Passwords**; the site must use
|
|
37
|
+
HTTPS. WPSync reads the password from an environment variable named after the
|
|
38
|
+
profile and never stores it.
|
|
39
|
+
|
|
40
|
+
From the folder you want to use for the blog:
|
|
41
|
+
|
|
42
|
+
```console
|
|
43
|
+
wpsync init myblog --site https://example.com --username emrah
|
|
44
|
+
export MYBLOG_WP_PASSWORD='abcd efgh ijkl mnop qrst uvwx'
|
|
45
|
+
wpsync pull # download posts and images into content/
|
|
46
|
+
wpsync open hello-world # edit a post in Obsidian or VS Code
|
|
47
|
+
wpsync diff # see what push would change
|
|
48
|
+
wpsync push # send the changes to the blog
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`init` proposes the current directory as the profile's folder; pressing Enter
|
|
52
|
+
accepts it. Each post becomes a Markdown file under `content/` with a YAML
|
|
53
|
+
header, and its images go in `content/images/`.
|
|
54
|
+
|
|
55
|
+
## Everyday commands
|
|
56
|
+
|
|
57
|
+
```console
|
|
58
|
+
wpsync profiles # list profiles; * marks the current one
|
|
59
|
+
wpsync ls # local posts, without contacting the blog
|
|
60
|
+
wpsync show hello # one post's details and issues
|
|
61
|
+
wpsync create -o # start a new private post and open it
|
|
62
|
+
wpsync open idea # open a post in your editor
|
|
63
|
+
wpsync pull # bring changes from the blog
|
|
64
|
+
wpsync diff # what push would change, read-only
|
|
65
|
+
wpsync push hello # send one post
|
|
66
|
+
wpsync delete hello # delete a post, keeping it in .trash/
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
A new post is private until you set `status: public` in its header. Pull asks
|
|
70
|
+
before replacing a file you edited, and push asks before replacing a post that
|
|
71
|
+
also changed on WordPress. Push deletes nothing on the blog unless you pass
|
|
72
|
+
`-p`, and a deleted post is kept in `.trash/`, where `restore` brings it back.
|
|
73
|
+
|
|
74
|
+
## Documentation
|
|
75
|
+
|
|
76
|
+
- [Profiles and credentials](https://github.com/ediril/wpsync/blob/main/docs/profiles.md):
|
|
77
|
+
Application Passwords, profiles, and running commands from anywhere.
|
|
78
|
+
- [Post files](https://github.com/ediril/wpsync/blob/main/docs/post-files.md):
|
|
79
|
+
the header and body format, images, starting a post, and opening it in an
|
|
80
|
+
editor.
|
|
81
|
+
- [Pull and push](https://github.com/ediril/wpsync/blob/main/docs/push-and-pull.md):
|
|
82
|
+
what each changes, how they protect local and remote work, when they ask,
|
|
83
|
+
and deleting posts.
|
|
84
|
+
- [Listing posts and diff](https://github.com/ediril/wpsync/blob/main/docs/listing-and-diff.md):
|
|
85
|
+
`ls`, `show`, issues, and `diff`'s status markers.
|
|
86
|
+
- [Development and maintenance](https://github.com/ediril/wpsync/blob/main/docs/development.md):
|
|
87
|
+
testing local changes, switching installs, and releasing.
|
|
88
|
+
|
|
89
|
+
## Command behavior
|
|
90
|
+
|
|
91
|
+
Commands accept any unique prefix, such as `wpsync di`. An ambiguous prefix
|
|
92
|
+
fails and lists the commands it could mean.
|
|
93
|
+
|
|
94
|
+
`show`, `open`, `diff`, and `push` take one post by ID, slug, file name, title,
|
|
95
|
+
or path. A file name needs no folder: `vibing` or `vibing.md` finds
|
|
96
|
+
`content/2019/vibing.md`, looking in the current folder first and then in every
|
|
97
|
+
folder under `content/`. A name that matches several files lists them. `pull`
|
|
98
|
+
takes an ID, a slug, a file name ending in `.md`, or a path.
|
|
99
|
+
|
|
100
|
+
Use `wpsync -h` and `wpsync COMMAND -h` for built-in help, and `wpsync --legend`
|
|
101
|
+
for the diff and ls symbols. `wpsync -v` and `wpsync --version` print the
|
|
102
|
+
installed version.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
WPSync is source-available under the [PolyForm Strict License 1.0.0](https://github.com/ediril/wpsync/blob/main/LICENSE).
|
|
107
|
+
Use is free of charge for the purposes permitted by that license, including:
|
|
108
|
+
|
|
109
|
+
- Any noncommercial purpose.
|
|
110
|
+
- The personal uses listed in the license, such as personal study and hobby
|
|
111
|
+
projects, without any anticipated commercial application.
|
|
112
|
+
- Use by charitable organizations, educational institutions, public research
|
|
113
|
+
organizations, public safety or health organizations, environmental protection
|
|
114
|
+
organizations, and government institutions, regardless of funding source or
|
|
115
|
+
obligations resulting from funding.
|
|
116
|
+
|
|
117
|
+
This license grants no rights to modify or redistribute WPSync or create works
|
|
118
|
+
based on it. The full license governs; this summary does not grant additional
|
|
119
|
+
permissions.
|
|
120
|
+
|
|
121
|
+
Commercial use outside those permissions requires a separate paid license.
|
|
122
|
+
Contact [Emrah Diril](mailto:emrah@diril.org) for pricing and a commercial
|
|
123
|
+
agreement before beginning such use.
|
|
124
|
+
|
|
125
|
+
WPSync is source-available, not open source.
|
|
@@ -25,6 +25,12 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: 3",
|
|
26
26
|
]
|
|
27
27
|
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://wpsync.dev"
|
|
30
|
+
Changelog = "https://github.com/ediril/wpsync/blob/main/CHANGELOG.md"
|
|
31
|
+
Issues = "https://github.com/ediril/wpsync/issues"
|
|
32
|
+
Repository = "https://github.com/ediril/wpsync.git"
|
|
33
|
+
|
|
28
34
|
[project.scripts]
|
|
29
35
|
wpsync = "wpsync.cli:main"
|
|
30
36
|
|
|
@@ -58,9 +64,11 @@ line-length = 88
|
|
|
58
64
|
select = ["E", "F", "I", "UP"]
|
|
59
65
|
|
|
60
66
|
[tool.uv]
|
|
61
|
-
# The version comes from version.json
|
|
67
|
+
# The version comes from version.json, Git history, and the script that combines
|
|
68
|
+
# them, so rebuild when any of them changes.
|
|
62
69
|
cache-keys = [
|
|
63
70
|
{ file = "pyproject.toml" },
|
|
64
71
|
{ file = "version.json" },
|
|
72
|
+
{ file = "build_backend/*.py" },
|
|
65
73
|
{ git = { commit = true } },
|
|
66
74
|
]
|