CVS 关键字替换和 Microsoft Word 文件

发布于 2024-07-14 12:15:11 字数 225 浏览 2 评论 0原文

CVS 具有关键字替换功能:在文本文件中写入 $Header$,当您提交文件时,CVS 会用 $ 等内容替换 $Header$头文件: /repo/src.cpp,v 1.6 2009/03/12 14:53:14 luser Exp $

在处理二进制 Microsoft Word 文件时是否可以获得相同的功能?

谢谢。

CVS has the keyword substitution feature: in a text file you write $Header$ and, when you commit the file, CVS substitutes $Header$ with something like $Header: /repo/src.cpp,v 1.6 2009/03/12 14:53:14 luser Exp $

Is it possible to get the same feature when dealing with a binary Microsoft Word file?

Thank you.

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

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

发布评论

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

评论(3

花开浅夏 2024-07-21 12:15:12

Word 文件的基本问题是它实际上是一个二进制文件(而不是纯文本文件),因此您无法确定像“$Header$”这样的关键字符串不会出现在某处(VB 宏)代码,例如)偶然。 CVS 会扩展该键字符串,突然之间一些明显不相关的东西(例如 VB 宏代码......)停止工作。

The basic problem you have with a Word file is that it is effectively a binary file (as opposed to a plain-text file), so you cannot be sure a key string like "$Header$" doesn't appear somewhere (VB macro code, for example) by accident. CVS would expand that key string, and suddenly something apparently unrelated (VB macro code, for example...) stops working.

西瓜 2024-07-21 12:15:12

使用CVS? 不见得。 即使 $Header$ 没有出现在 Word 文档中的任何位置(如 DevSolar 建议可能),您将该字符串放在哪里? Word 以其专有的二进制格式存储文本,但 CVS 寻找纯文本。

另一方面,我确信您可以通过使用 XML Word 格式或 Word 宏来实现该效果。

Using CVS? Not likely. Even if $Header$ doesn't appear anywhere in your Word document (as DevSolar suggested it might), where do you place that string? Word stores text in its proprietary binary format, but CVS looks for plain text.

On the other hand, I'm sure you can achieve the effect by using either an XML Word format, or a Word macro.

最后的乘客 2024-07-21 12:15:12

使用传统的 .doc 格式似乎几乎不可能。 一些创造性的工作可能允许您创建一个流程,以使用较新的 XML 格式实现这一目标。 即使那样,我也不确定 CVS 是否可以完成这项工作,但在 subversion 中使用提交后挂钩可能会使完成工作更加合理。

Seems almost impossible with the traditional .doc format. Some creative work might allow you to create a process for making it happen with the newer XML format. I'm not sure CVS can do the job even then, but using a post-commit hook in subversion might make it more reasonable to pull off.

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