Repository navigation
Releases
v0.3.1
Fixes push treating a mistyped page title as "nothing to push".
Fixed
-
pushreports titles that aren't tracked. Given a title that isn't in
the working tree, for example a typo,pushused to skip it silently, print
"no local changes to push" and exit 0, so the edit was never published and
nothing said so. It now names the title and exits 1:push: "Main Pgae" is not tracked (run 'wikisync pull' first)This applies in a preview or with
--apply, alongside other pages, and in an
empty folder. (#24, #36)
v0.3.0
wikisync now works with any MediaWiki wiki the same way: there is no default
wiki, and each working folder remembers the one it was pulled from.
Documentation is now at https://cameronbrooks11.github.io/wikisync/.
Changed
-
No default wiki. wikisync no longer assumes Appropedia. The first
pull
into an empty folder needs--host(and--pathifapi.phpisn't under
/w/). After that,pullandpushin the folder use the wiki recorded in
its manifest, and refuse a different--hostor--path, so a folder only
ever talks to one wiki. (#32)Upgrading: folders you already pulled into record their wiki, so they keep
working with no--host. Only a first pull into a new folder changes:wikisync pull --host www.appropedia.org --dir ./pages "Page" -
just test-liveneedsWIKISYNC_TEST_HOST. (#32)
Added
v0.2.1
Fixes large pages being reported as missing in a multi-page pull.
Fixed
- Pulling many large pages no longer drops some of them. MediaWiki caps an
API response at 8 MiB. When a batch of 50 pages went over it, wikisync 0.2.0
reported the pages left out of the response as "page does not exist" and still
exited 0. On Appropedia's 50 pages of 200 kB or more, 0.2.0 pulled 30 and
skipped 20; 0.2.1 pulls all 50. No local file was overwritten by the bug:
pages reported missing were skipped. (#19)
v0.2.0
Pull a whole set of pages at once, and push --apply is no longer
experimental.
Added
-
Pull by category or prefix. (#17)
wikisync pull --dir ./pages --category "Simple living" wikisync pull --dir ./pages --prefix "User:You/"
Both can be repeated and combined with page titles. Subcategories aren't
followed. -
Pull everything you're tracking again with a bare
wikisync pull --dir ./pages. Files with unpulled local changes are still left alone. (#17) -
Translations are skipped by default. Many Appropedia category members are
machine translations (Page/es,Page/ar, …). A category or prefix pull keeps
only pages in the wiki's own language unless you pass--all-languages; on
Appropedia,Category:Simple livinggives 6 pages, with 15 translations
skipped. A page you name explicitly is always pulled. (#17) -
A safety limit. A category or prefix selection over 500 pages (after
translations are left out) is refused before anything is downloaded. Raise it
with--max. (#17) -
Pages are fetched 50 per request, so large pulls take few requests. (#17)
Changed
v0.1.2
Pulled pages are now laid out like the wiki, so namespaced pages are easy to
find and open in an editor.
Changed
-
Namespace and subpage folders.
pullwrites each page into a folder per
namespace, with subpages as subfolders. Main-namespace pages stay at the
root. (#14)Page v0.1.1 v0.1.2 User:CameronBrooks11/wikisyncUser%3ACameronBrooks11%2Fwikisync.wikiUser/CameronBrooks11/wikisync.wikiUser talk:ExampleUser_talk%3AExample.wikiUser_talk/Example.wikiWelcome to AppropediaWelcome_to_Appropedia.wikiunchanged The namespace comes from the wiki itself, so a colon in a main-namespace
title stays part of the filename. -
Upgrading moves nothing. A page you pulled with an earlier version keeps
its existing path when you pull it again. Only newly pulled pages use folders.
Safety
- Titles come from the wiki, so wikisync checks them before writing. A title
that can't be laid out safely as folders (one containing..or an empty
segment) is saved as a single file with its slashes encoded. No title can
write outside the folder you pulled into. - If two pages would map to the same file (for example
User:fooand a
main-namespace pageUser/foo), the second is refused rather than
overwriting the first.
Status
push --apply is still experimental: it's tested against MediaWiki 1.45 in
CI, but not yet against Appropedia itself (#12).
v0.1.1
Fixes a push --apply bug in v0.1.0 that could leave a page impossible to push.
Upgrade if you use --apply.
Fixed
- A page could become permanently unpushable. When an edit changed nothing on
the wiki (for example, an editor added a final newline, which MediaWiki trims
on save), v0.1.0 recorded revision 0 as the page's baseline. Every later push
of that page was then refused withremote moved to rev N (baseline rev 0).
pushnow reads back the revision the wiki actually stored and records that.
(#9) - The baseline drifted from the wiki.
pushrecorded the text it sent, not
the text MediaWiki saved. After a push, the baseline and your local file now
match what the wiki stored. Behaviour change: your local file may be
rewritten slightly, e.g. trailing whitespace removed. (#9) - Unhelpful errors. API errors now show MediaWiki's own code and message
(e.g.readapidenied) instead ofno page in response. (#10)
Added
- Per-wiki credentials.
push --applyreadsWIKISYNC_USERNAME_<WIKI>and
WIKISYNC_PASSWORD_<WIKI>, with<WIKI>derived from the host
(www.appropedia.org→APPROPEDIA), falling back toWIKISYNC_USERNAME/
WIKISYNC_PASSWORD. It reports which variable it logged in from. (#11)
Testing
- The push round-trip now runs against a throwaway MediaWiki 1.45 in Docker on
every change. It checks sync state after each push, that a repeated push is a
no-op, that a null edit creates no revision, and thatpushrefuses to
overwrite a change made on the wiki (#10). Run it locally with
just test-integration, or against a real wiki withjust test-live(#7).
Status
push --apply is still experimental: it is tested against MediaWiki 1.45
in CI, but not yet against Appropedia itself (#12). pull, status, diff and
push preview mode have been run against Appropedia.
v0.1.0
Note:
push --apply(publishing to a wiki) is experimental in this
release. It is covered by unit tests but has not yet been verified against a
live wiki.pull,status,diffandpushpreview mode (the default) have
been run against Appropedia.
Changelog
- 4a8ab47: feat: add push command (#6) (Cameron Brooks 95648474+CameronBrooks11@users.noreply.github.com)
- b2d9631: refactor: rewrite wikisync in Go (#5) (Cameron Brooks 95648474+CameronBrooks11@users.noreply.github.com)
- 347b170: feat: add baseline snapshots and offline diff (#4) (Cameron Brooks 95648474+CameronBrooks11@users.noreply.github.com)
- 5afa8e8: fix: harden pull against data loss on re-pull (#3) (Cameron Brooks 95648474+CameronBrooks11@users.noreply.github.com)
- 8945b58: feat: add status command (#2) (Cameron Brooks 95648474+CameronBrooks11@users.noreply.github.com)
- 44d68e5: feat: implement pull command and add PyPI release workflow (#1) (Cameron Brooks 95648474+CameronBrooks11@users.noreply.github.com)
- cf99bd1: chore: scaffold wikisync project (Cameron Brooks 95648474+CameronBrooks11@users.noreply.github.com)