<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>File Versions on Jingyuan</title>
        <link>https://jingyuan-zheng.github.io/tags/file-versions/</link>
        <description>Recent content in File Versions on Jingyuan</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-US</language>
        <copyright>Jingyuan Zheng</copyright>
        <lastBuildDate>Thu, 22 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jingyuan-zheng.github.io/tags/file-versions/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Review File Versions on Mac with Compare Files Viewer</title>
            <link>https://jingyuan-zheng.github.io/p/compare-files-viewer/</link>
            <pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate>
            <guid>https://jingyuan-zheng.github.io/p/compare-files-viewer/</guid>
            <description>&lt;img src=&#34;https://jingyuan-zheng.github.io/img/compare-files-viewer/featured.png&#34; alt=&#34;Featured image of post Review File Versions on Mac with Compare Files Viewer&#34; /&gt;&lt;p&gt;Compare Files Viewer is a native Mac app for reviewing file-comparison results produced by a Shortcut or another tool.&lt;/p&gt;&#xA;&lt;p&gt;A folder full of “final”, “final-2”, and “final-revised” files creates two questions: how are they related, and which version should you open first? A readable comparison report can help, especially when its conclusion is accompanied by paths, dates, hashes, or text differences.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/CompareFilesViewer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Compare Files Viewer&lt;/a&gt; provides that presentation layer. It &lt;strong&gt;does not compare files itself&lt;/strong&gt;. Another producer must inspect the files and send a result payload.&lt;/p&gt;&#xA;&lt;h2 id=&#34;build-the-viewer&#34;&gt;Build the viewer&#xA;&lt;/h2&gt;&lt;p&gt;The project requires macOS 14 or later and Xcode Command Line Tools. There is currently no packaged GitHub Release.&lt;/p&gt;&#xA;&lt;p&gt;Download the source and build from its root:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;swift build -c release&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;The release executable is available under &lt;code&gt;.build/release/&lt;/code&gt;. To inspect the repository&amp;rsquo;s example report:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.build/release/CompareFilesViewer --file ExamplePayload.json&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;Example paths may not exist on your Mac. The sample demonstrates the report format rather than comparing your own documents.&lt;/p&gt;&#xA;&lt;p&gt;On your first look, start with the proposed main version and version order, then open Details to see the evidence behind that suggestion. This lets you understand the window before deciding whether to connect your own comparison workflow. The sample does not read any “final” files in your folder.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-a-report-can-show&#34;&gt;What a report can show&#xA;&lt;/h2&gt;&lt;p&gt;The payload contains &lt;code&gt;files&lt;/code&gt;, &lt;code&gt;analysis&lt;/code&gt;, and optional &lt;code&gt;local_evidence&lt;/code&gt;. Depending on the producer, the viewer can display:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The overall relationship and confidence.&lt;/li&gt;&#xA;&lt;li&gt;A recommended main version and proposed version order.&lt;/li&gt;&#xA;&lt;li&gt;Finder icons, paths, file sizes, and modification times.&lt;/li&gt;&#xA;&lt;li&gt;Local SHA-256 metadata, text differences, or image-comparison evidence.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A Details sheet and Reveal in Finder actions make it easier to investigate the reasoning. English and Simplified Chinese interfaces are supported.&lt;/p&gt;&#xA;&lt;p&gt;The usefulness of those fields depends on the upstream comparison. A missing hash is not proof of difference; an AI-generated grouping is not the same as byte-for-byte equality.&lt;/p&gt;&#xA;&lt;p&gt;Imagine two reports that differ by one number. The newer modification date tells you which one to open first, but the actual difference and the files’ origins decide which to keep. If the producer supplied only dates, the viewer cannot invent a text diff or hash as missing evidence.&lt;/p&gt;&#xA;&lt;h2 id=&#34;connect-your-own-producer&#34;&gt;Connect your own producer&#xA;&lt;/h2&gt;&lt;p&gt;The app accepts a JSON file through &lt;code&gt;--file&lt;/code&gt;, JSON text through &lt;code&gt;--json&lt;/code&gt;, or a payload on stdin. Use &lt;code&gt;ExamplePayload.json&lt;/code&gt; as the schema reference when writing a Shortcut or script.&lt;/p&gt;&#xA;&lt;p&gt;The repository includes the viewer source and &lt;code&gt;ExamplePayload.json&lt;/code&gt;, but no importable &lt;strong&gt;Compare Files.shortcut&lt;/strong&gt; file. To compare your own files, you first need a Shortcut or script that produces this JSON report. Opening the viewer alone will not run a comparison.&lt;/p&gt;&#xA;&lt;p&gt;This is therefore most useful if you already have a comparison workflow and want a clearer native result window.&lt;/p&gt;&#xA;&lt;h2 id=&#34;read-the-sample-as-a-worked-example&#34;&gt;Read the sample as a worked example&#xA;&lt;/h2&gt;&lt;p&gt;The repository groups &lt;code&gt;report.pdf&lt;/code&gt;, &lt;code&gt;report-v2.pdf&lt;/code&gt;, and &lt;code&gt;report-final.pdf&lt;/code&gt;. It proposes a main version and an order, with explanations such as an added chapter and changed page count. Start by checking whether the files belong to the same subject, then examine what changed. The word “final” is a useful label, not evidence on its own.&lt;/p&gt;&#xA;&lt;p&gt;Open Details and compare paths, sizes, and modification times. A “final” copy in Downloads may be an older attachment resent by a colleague. A cloud-folder copy may contain comments that never reached the main draft. Paths explain where material came from; differences explain what it contains. Both matter when deciding what to keep.&lt;/p&gt;&#xA;&lt;p&gt;The example uses demonstration paths and abbreviated hash values. It helps you understand the interface; it cannot establish anything about files on your Mac. Replacing a sample filename only edits the report. It does not ask the viewer to analyze the newly named document.&lt;/p&gt;&#xA;&lt;h2 id=&#34;understand-the-different-kinds-of-evidence&#34;&gt;Understand the different kinds of evidence&#xA;&lt;/h2&gt;&lt;p&gt;A complete file hash can establish byte equality. A text hash concerns extracted text, which is a narrower question. Two PDFs can contain the same text while differing in layout, annotations, or embedded images. Decide whether your task concerns the words or the whole document before treating a text match as sufficient.&lt;/p&gt;&#xA;&lt;p&gt;Text differences may also be excerpts. The sample records added and removed line counts, a few example lines, and a flag showing that samples were truncated. Use those excerpts to locate changes, then inspect the original context. A changed number means little until you know whether it is a price, date, reference, or page number.&lt;/p&gt;&#xA;&lt;p&gt;The main-version recommendation helps set a reading order. It need not collapse every useful file into one survivor. An editable source, an annotated review copy, and a PDF prepared for sending can serve different purposes. Keeping those roles clear can be more useful than naming one universal “best” version.&lt;/p&gt;&#xA;&lt;h2 id=&#34;connect-a-producer-through-a-saved-report-first&#34;&gt;Connect a producer through a saved report first&#xA;&lt;/h2&gt;&lt;p&gt;For your first integration, let the producer save a JSON file and open it with &lt;code&gt;--file&lt;/code&gt;. This separates the analysis from display: if something looks wrong, you can inspect the input without debugging both stages at once. Move to a stdin pipeline only after the saved-file workflow works reliably.&lt;/p&gt;&#xA;&lt;p&gt;Follow &lt;code&gt;ExamplePayload.json&lt;/code&gt;: &lt;code&gt;files&lt;/code&gt; describes the items, &lt;code&gt;analysis&lt;/code&gt; holds relationships and recommendations, and &lt;code&gt;local_evidence&lt;/code&gt; carries evidence actually collected. Leave unavailable evidence absent rather than inventing plausible explanations. Use real source paths so Reveal in Finder can take you to the documents.&lt;/p&gt;&#xA;&lt;p&gt;If the viewer reports a loading or parsing error, check that the report file exists, contains valid JSON, and follows the expected structure. Distinguish the path supplied to &lt;code&gt;--file&lt;/code&gt; from the document paths inside that file. One opens the report; the others locate the compared material. Both layers must be correct for the handoff to be useful.&lt;/p&gt;&#xA;&lt;h2 id=&#34;decide-what-main-version-really-means&#34;&gt;Decide what “main version” really means&#xA;&lt;/h2&gt;&lt;p&gt;Modification time alone does not establish the best version. Copying and exporting can change dates, while two documents can differ in small but important edits. Treat the recommendation as a place to start reviewing.&lt;/p&gt;&#xA;&lt;p&gt;Open the proposed main file, verify the differences that matter, and retain originals until you have confirmed the relationship. The viewer does not merge documents or provide a reason to delete alternatives automatically.&lt;/p&gt;&#xA;&lt;p&gt;The app itself makes no network requests and does not upload selected files. Privacy and AI policies belong to the producer that generated the payload.&lt;/p&gt;&#xA;&lt;p&gt;For first understanding an unfamiliar format, see &lt;a class=&#34;link&#34; href=&#34;https://jingyuan-zheng.github.io/p/what-file-is-this/&#34; &gt;What File Is This&lt;/a&gt;. For consistent names after the review, &lt;a class=&#34;link&#34; href=&#34;https://jingyuan-zheng.github.io/p/auto-filename-helper/&#34; &gt;Auto Filename Helper&lt;/a&gt; is a separate workflow. The &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/CompareFilesViewer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;README and example payload&lt;/a&gt; are the starting point for integration.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
