[dokuwiki] Review / suggestions on git-remote-dokuwiki

  • From: Kevin Lyda <kevin@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 17 Feb 2020 09:55:13 +0000

I have an initial pass[1] at a git remote[2] for dokuwiki.  It will do
fetches, but not pushes yet. It's loosely modeled on Git-Mediawiki[3]
but I'm so far including less options.

This will allow you to do things like:

```
git clone -c remote.origin.dwUser=USER \
          -c remote.origin.dwPassword=PASSWORD \
          dokuwiki::https://dokuwiki.example.com/ dokuwiki-site
```

And then, once you've done that, you can keep `dokuwiki-site/` up to
date by running `git pull`.

Not yet done is the ability to do `git push`. Before I go too far into
that I'd like some feedback on the decisions I've made so far.

One issue is that I'm also pulling down attachments but don't really
have a way to identify them. So for now I've pulled attachments down and
marked them as executable (755 in unix permissions) while the files are
just normal (644). As an alternative I could put all attachments in
a separate directory.

Secondly the Dokuwiki API call `dokuwiki.getPagelist` doesn't list out
pages that have been deleted. It will record deletions if the page has
been recreated, but it won't return the final deleted page.  I'm tracking
that via a git notes blob that has a list of all pages the past fetch saw,
but I'm wondering if there might be other ways to get this information?

I know it's not yet packaged correctly - it's been a while since I
did perl so trying to figure out the packaging framework again.  No
need for feedback there unless someone wants to do it all for me!
The important file is `git-remote-dokuwiki` which needs to be in
`$PATH` to work.

Would appreciate any feedback or suggestions.

[1]: https://github.com/lyda/git-remote-dokuwiki
[2]: https://git-scm.com/docs/git-remote-helpers
[3]: https://github.com/Git-Mediawiki/Git-Mediawiki
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: