拆分 ikiwiki

发布于 2024-12-20 11:56:11 字数 1161 浏览 5 评论 0原文

我正在尝试将一个 ikiwiki 分成两个 wiki。

页面

pageA1,pageA2,...,pageB1,pageB2,...

假设我有一个名为 myiki 的 ikiwiki(比较 来自 ikiwiki.info 的这个问题),其中包含现在的 我想要有两个名为 myikiAmyikiB 的 wiki,这样:

  • myikiA 包含第A1页,第A2页,...
    myikiA 的历史记录应包含这些页面的完整历史记录,但不包含 pageB1,pageB2,... 的历史记录

,并且:

  • myikiB 包含 pageB1 ,pageB2,...
    myikiB 的历史记录应包含这些页面的完整历史记录,但不包含 pageA1,pageA2,... 的历史记录

在第一步中,我复制了我的 scrdir 并尝试像这样删除名为 foo 的页面(请注意,在 scrdir 中有名为 foo.mdwn 的文件,并且目录 foo 作为好吧)。
为此,我执行了以下命令:

sudo git filter-branch --tree-filter 'find . -name foo* -exec rm -r -f  {} \;' --prune-empty -f HEAD

Rewrite 3cbc4646145e31cf7ce23d5e8397baaebab64c60 (179/1439)find: `./index/testdir/foo': No such file or directory
tree filter failed: find . -name foo* -exec rm -r -f  {} \;

知道它有什么问题吗?

有没有一种方法可以提供页面列表并按上述方式拆分 wiki?

I am trying to split an ikiwiki into two wikis.

Suppose I have an ikiwiki called myiki (compare this question from ikiwiki.info), which contains the pages

pageA1,pageA2,...,pageB1,pageB2,...

now I want to have two wikis called myikiA and myikiB, such that:

  • myikiA contains pageA1,pageA2,...
    The history of myikiA should contain the whole history of those pages, but no history of pageB1,pageB2,...

and:

  • myikiB contains pageB1,pageB2,...
    The history of myikiB should contain the whole history of those pages but no history of pageA1,pageA2,...

In a first step I made a copy of my scrdir and tried to remove a page named foo like this (note that in the scrdir there are files called foo.mdwn and directories foo as well).
To do so, I did this command:

sudo git filter-branch --tree-filter 'find . -name foo* -exec rm -r -f  {} \;' --prune-empty -f HEAD

Rewrite 3cbc4646145e31cf7ce23d5e8397baaebab64c60 (179/1439)find: `./index/testdir/foo': No such file or directory
tree filter failed: find . -name foo* -exec rm -r -f  {} \;

Any Idea what's wrong with it?

Is there a way to give a list of pages and split the wiki as described above?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

茶底世界 2024-12-27 11:56:11

find 找到 foo/ 时,它会对其调用 rm -rf,然后尝试输入它来查找更多文件。您可以让 find 删除该目录,然后使用 -prune 忽略它。

<代码>查找 . -name foo* -exec rm -r -f {} \; -修剪

When find finds foo/, it calls rm -rf on it and then tries to enter it to find more files. You can cause find to remove the directory and then ignore it using -prune.

find . -name foo* -exec rm -r -f {} \; -prune

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文