展示HN:CheesyMamas v1.1 – Git差异面板已完成,新增Bash支持

1作者: LambriniWorks大约 7 小时前原帖
我上周分享了Cheesy Mamas的第一个版本,这是一款仅限本地使用的文本编辑器,使用Python和PyQt6编写。它完全离线运行,没有插件、遥测、账户或同步功能。重点是直接编辑,并在界面中内置了对Git和Bash的支持。最初的帖子悄然传播。我花了几天时间根据大家的反馈准备下一个版本。 这个新版本增加了一个可用的deb包。它可以在系统范围内安装编辑器,并提供启动器、图标和桌面条目。编辑器支持单实例行为,使用中继文件,因此从文件管理器或终端启动时,会在现有窗口中打开一个新标签。这个版本还增加了一个可用的运行按钮。Python脚本可以直接运行,C文件通过gcc编译并执行,LaTeX使用pdflatex运行。还有一个Bash按钮,允许你粘贴Bash指令以便于命令执行,或者随时添加新的指令。 Git系统是大部分工作集中所在。原始视图已扩展为每个打开文件旁边的完整提交历史面板。你可以选择任何提交以查看该时点的文件版本。当你这样做时,编辑器会对你当前内存中的工作版本逐行进行差异比较。更改的行在上下文中高亮显示,可以通过单击单独还原。绿色表示新增,黄色表示更改,红色表示删除。这允许进行本地、独立的编辑,而无需暂存无关文件或启动单独的差异工具。右键单击提交会打开上下文菜单,可以复制该版本、查看完整差异或还原整个文件。你也可以从编辑器中删除提交。 现在有了完整的并排比较视图。当你点击一个提交时,编辑器会分割视图,并在你的工作文件旁边的次要窗格中加载历史版本。差异高亮显示器在两个窗格之间直观地显示删除、插入和修改的块。这允许快速的视觉扫描和块级恢复,而不会丢失你的工作位置。两个编辑器可以独立滚动。你可以在主窗格中编写和运行,同时参考之前的版本。 没有插件系统,也没有后台索引。代码足够简短,易于阅读,应用程序设计得可以自我解释。你可以阅读源代码并在没有构建步骤的情况下运行它。它是使用Python 3和PyQt6编写的,并使用手动deb结构进行打包。唯一的依赖是python3和python3-pyqt6,如果你想运行git并能够编译LaTeX,你还需要git和pdflatex。它已在现代Debian和Ubuntu系统上进行了测试。 该项目在这里可用,包括源代码和安装程序,项目始终在开发中。如果你有其他功能请求,请留言。 未来的升级计划: 1. 能够在点击“运行”按钮时通过复选框选择保持终端打开或关闭,以便于调试。 2. 一个“变体”按钮,允许你创建程序的“变体”,可以热插拔定义、类或值,适用于研究开发或工业设置。 <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 &#x27;run&#x27; button for easy debug.<p>2. A &#x27;variate&#x27; button that allows you to create a &#x27;variant&#x27; of the program with hot swappable defs, classes or values for research and development or industrial settings.<p><a href="https:&#x2F;&#x2F;osf.io&#x2F;5xs9a&#x2F;" rel="nofollow">https:&#x2F;&#x2F;osf.io&#x2F;5xs9a&#x2F;</a>