TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Track Office files in Git and view diffs of them in online repo hosts

1 点作者 TomasHubelbauer超过 7 年前
<a href="https:&#x2F;&#x2F;github.com&#x2F;TomasHubelbauer&#x2F;modern-office-git-diff" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TomasHubelbauer&#x2F;modern-office-git-diff</a><p>Hey everyone, I made this tool which allows one to use it as a Git hook which will then extract modern Office files (ZIP archives of XML files) to directories named by them and take advantage of GitHub&#x2F;GitLab&#x2F;Whatever&#x27;s online diff when inspecting PRs and commits to a repository.<p>Diffing Office files was not an unsolved problem before, I cite some prior art, but I&#x27;ve decided to take a different route by tracking both the compressed binary files and the uncompressed plain text files in a folder in the repository. This way the diffs can be viewed in online Git hosting services.<p>I document features and drawbacks of this approach in my repo. It&#x27;s certainly not efficient, but it solves a different need (the ability to get to the diff in minimal amount of steps) than other solutions and that&#x27;s why I found it interesting to work on.<p>Diffs of both the actual XML files (all information, but too much cruft to get a mental picture of the files text content) and TXT files that contain only concatenated text node values of the files in order to get a view of content changes only are available.<p>In the future I&#x27;ll work on making this tool faster by skipping unchanged files instead of regenerating them each file, making this suitable for Git repos that track a large number of Office files. I won&#x27;t worry about the space inefficiency, because I think Git does a good job of compressing the plain text files anyway and there&#x27;s not much that can be done in this regard on top of that because of the way the tool works.

暂无评论

暂无评论