拆分 ikiwiki
我正在尝试将一个 ikiwiki 分成两个 wiki。
页面
pageA1,pageA2,...,pageB1,pageB2,...
假设我有一个名为 myiki 的 ikiwiki(比较 来自 ikiwiki.info 的这个问题),其中包含现在的 我想要有两个名为 myikiA
和 myikiB
的 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
containspageA1,pageA2,...
The history ofmyikiA
should contain the whole history of those pages, but no history ofpageB1,pageB2,...
and:
myikiB
contains pageB1,pageB2,...
The history ofmyikiB
should contain the whole history of those pages but no history ofpageA1,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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当
find
找到foo/
时,它会对其调用rm -rf
,然后尝试输入它来查找更多文件。您可以让 find 删除该目录,然后使用-prune
忽略它。<代码>查找 . -name foo* -exec rm -r -f {} \; -修剪
When
find
findsfoo/
, it callsrm -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