Show HN: CheesyMamas v1.1 – Git Diff 面板最终确定并添加 Bash 支持
1 分•作者: LambriniWorks•6 个月前
上周我分享了 Cheesy Mamas 的第一个版本,这是一个用 Python 和 PyQt6 编写的本地文本编辑器。它完全离线运行,没有插件、遥测、账户或同步功能。其重点是直接编辑,界面内置了 Git 和 Bash 支持。最初的帖子悄然流传开来。我花了一些时间,根据大家的反馈准备了下一个版本。<p>这个新版本增加了可用的 deb 包。它将编辑器系统范围地安装,带有启动器、图标和桌面条目。编辑器使用中继文件支持单实例行为,因此从文件管理器或终端启动会在现有窗口中打开一个新标签。此版本还添加了一个可用的运行按钮。Python 脚本直接运行,C 文件使用 gcc 编译和执行,LaTeX 使用 pdflatex 运行。还有一个 Bash 按钮,允许您粘贴 Bash 指令以按命令运行,或随时添加新指令。<p>Git 系统是投入最多工作的地方。原始视图已扩展为每个打开文件旁边的完整提交历史面板。您可以选择任何提交来查看该时间点的文件版本。当您这样做时,编辑器会逐行与您当前在内存中的工作版本进行比较。更改的行在上下文中突出显示,可以通过单击一下单独恢复。绿色表示新增,黄色表示已更改,红色表示已删除。这允许本地、隔离的编辑,而无需暂存不相关的文件或启动单独的 diff 工具。右键单击提交会打开一个上下文菜单,用于复制该版本、查看完整 diff 或恢复整个文件。您还可以从编辑器中删除提交。<p>现在有一个并排比较视图。当您单击提交时,编辑器会拆分视图,并在您的工作文件旁边的辅助窗格中加载历史版本。diff 高亮显示器直观地显示两个窗格之间的已删除、插入和修改的块。这允许快速的视觉扫描和块级恢复,而不会丢失您的工作位置。两个编辑器独立滚动。您可以在主窗格中编写和运行,同时参考前一个窗格。<p>没有插件系统,也没有后台索引。代码足够短,可以阅读,并且该应用程序旨在自我解释。您可以阅读源代码并在无需构建步骤的情况下运行它。它使用 Python 3 和 PyQt6 编写,并使用手动 deb 结构打包。唯一的依赖项是 python3 和 python3-pyqt6,如果您想运行 git 并能够编译 LaTeX,您将需要 git 和 pdflatex。它已经在现代 Debian 和 Ubuntu 系统上进行了测试。<p>该项目在此处提供,包括源代码和安装程序,该项目一直在开发中。如果您有其他功能请求,请评论。<p>未来升级:<p>1. 在单击“运行”按钮时,可以通过复选框保持终端打开或关闭,以便于调试。<p>2. 一个“变体”按钮,允许您创建程序的“变体”,其中包含可热插拔的 def、类或值,用于研发或工业环境。<p><a href="https://osf.io/5xs9a/" rel="nofollow">https://osf.io/5xs9a/</a>
查看原文
I shared the first version of Cheesy Mamas last week, it is a local only text editor written in Python with PyQt6. It runs entirely offline and has no plugins, telemetry, accounts, or sync. The focus is on direct editing with Git and Bash support built into the interface. That original post quietly made its way around. I took a few days to get the next version ready based on what people responded to.<p>This new release adds a working deb package. It installs the editor system wide with a launcher, icon, and desktop entry. The editor supports single instance behavior using a relay file, so launching from the file manager or terminal opens a new tab in the existing window. This version also adds a working run button. Python scripts are run directly, C files are compiled and executed with gcc and LaTeX runs with pdflatex. There is also a Bash button that allows you to paste in Bash instructions to run on command or to add new instructions at any time.<p>The Git system is where most of the work went. The original view has been expanded into a full commit history panel next to each open file. You can select any commit to view the version of the file at that point. When you do, the editor performs a line by line diff against your current working version in memory. The changed lines are highlighted in context and can be reverted individually with a single click. Green is new, yellow is changed, red is deleted. This allows local, isolated edits without having to stage unrelated files or launch a separate diff tool. Right clicking a commit opens a context menu to copy that version, view the full diff, or revert the whole file. You can also delete commits from the editor.<p>There is now a full side by side comparison view. When you click a commit, the editor splits the view and loads the historical version in a secondary pane beside your working file. The diff highlighter visually shows deleted, inserted, and modified blocks between the two panes. This allows for fast visual scanning and block level recovery without losing your working position. The two editors scroll independently. You can write and run in the main pane while referring to the previous one.<p>There is no plugin system and no background indexing. The code is short enough to read and the app is designed to explain itself. You can read the source and run it without a build step. It is written in Python 3 using PyQt6 and packaged using a manual deb structure. The only dependencies are python3 and python3-pyqt6, and if you would like to run git and be able to compile LaTeX you will need git and pdflatex. It has been tested on modern Debian and Ubuntu systems.<p>The project is available here along with the source and installer, project is always in development. If you have additional requests for features, please comment.<p>Future upgrades:<p>1. Ability to keep terminal open or closed with a check box when clicking the 'run' button for easy debug.<p>2. A 'variate' button that allows you to create a 'variant' of the program with hot swappable defs, classes or values for research and development or industrial settings.<p><a href="https://osf.io/5xs9a/" rel="nofollow">https://osf.io/5xs9a/</a>