<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts on gpchn 栖息地</title><link>https://gpchn.252123.xyz/posts/</link><description>Recent content in Posts on gpchn 栖息地</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 27 Jul 2025 22:05:12 +0000</lastBuildDate><atom:link href="https://gpchn.252123.xyz/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>PyWebview 打包安卓全过程记录</title><link>https://gpchn.252123.xyz/posts/pywebview-%E6%89%93%E5%8C%85%E5%AE%89%E5%8D%93%E5%85%A8%E8%BF%87%E7%A8%8B%E8%AE%B0%E5%BD%95/</link><pubDate>Sun, 27 Jul 2025 22:05:12 +0000</pubDate><guid>https://gpchn.252123.xyz/posts/pywebview-%E6%89%93%E5%8C%85%E5%AE%89%E5%8D%93%E5%85%A8%E8%BF%87%E7%A8%8B%E8%AE%B0%E5%BD%95/</guid><description>&lt;p>用 PyWebview 写完应用，打包成 Android APK 是最后一步。官方文档给了方向，但细节需要自己摸索。以下是我验证过的完整流程。&lt;/p>
&lt;h2 id="1-准备-linux-环境">1. 准备 Linux 环境&lt;/h2>
&lt;p>Android 打包依赖 Buildozer，它只能跑在 Linux 上。Windows 用户可通过 WSL 搭建环境。&lt;/p></description></item><item><title>Python 中良好的码风是什么样的</title><link>https://gpchn.252123.xyz/posts/python-%E4%B8%AD%E8%89%AF%E5%A5%BD%E7%9A%84%E7%A0%81%E9%A3%8E%E6%98%AF%E4%BB%80%E4%B9%88%E6%A0%B7%E7%9A%84/</link><pubDate>Sat, 15 Mar 2025 15:38:13 +0000</pubDate><guid>https://gpchn.252123.xyz/posts/python-%E4%B8%AD%E8%89%AF%E5%A5%BD%E7%9A%84%E7%A0%81%E9%A3%8E%E6%98%AF%E4%BB%80%E4%B9%88%E6%A0%B7%E7%9A%84/</guid><description>&lt;p>我当前在 Python 脚本里保持的骨架大致如下：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#!/usr/bin/env python3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># coding=utf-8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">main&lt;/span>():
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> __name__ &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#e6db74">&amp;#34;__main__&amp;#34;&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> main()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>下面逐条解释这些选择，以及我在缩进、引号、空白上的习惯。&lt;/p>
&lt;h2 id="shebang">shebang&lt;/h2>
&lt;p>&lt;code>#!/usr/bin/env python3&lt;/code> 只在 Unix/类 Unix 系统上生效，Windows 会直接忽略这一行。它的作用是让内核用 &lt;code>env&lt;/code> 找到 &lt;code>python3&lt;/code> 来执行脚本，而不是硬编码 &lt;code>/usr/bin/python3&lt;/code> 这样可能不存在的路径。对要用 &lt;code>./script.py&lt;/code> 直接跑脚本的人来说，这行算基本礼貌，省去先敲 &lt;code>python3&lt;/code> 的步骤。&lt;/p></description></item><item><title>用 oh-my-posh 美化 CMD 和 PowerShell</title><link>https://gpchn.252123.xyz/posts/%E7%94%A8-oh-my-posh-%E7%BE%8E%E5%8C%96-cmd-%E5%92%8C-powershell/</link><pubDate>Sun, 09 Feb 2025 15:04:12 +0000</pubDate><guid>https://gpchn.252123.xyz/posts/%E7%94%A8-oh-my-posh-%E7%BE%8E%E5%8C%96-cmd-%E5%92%8C-powershell/</guid><description>&lt;p>我平时在 Linux 上用 zsh，配上 oh-my-zsh 和 powerlevel10k 主题，几乎是一键起飞，颜值和效率都在线。&lt;/p>
&lt;p>&lt;img alt="oh-my-zsh" loading="lazy" src="../posts/%E7%94%A8-oh-my-posh-%E7%BE%8E%E5%8C%96-cmd-%E5%92%8C-powershell/1.webp">&lt;/p>
&lt;p>但 Windows 这边嘛……很多人到了 CMD 或者 PowerShell 就随缘了，顶多装个 Windows Terminal 就开干。其实只要用对工具，Windows 终端也能做到和 zsh 一样美观。这个工具就是 &lt;a href="https://ohmyposh.dev/">oh-my-posh&lt;/a>。&lt;/p></description></item><item><title>配置文件语言，怎么选才不后悔？</title><link>https://gpchn.252123.xyz/posts/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%AD%E8%A8%80%E6%80%8E%E4%B9%88%E9%80%89%E6%89%8D%E4%B8%8D%E5%90%8E%E6%82%94/</link><pubDate>Sat, 25 Jan 2025 21:21:23 +0000</pubDate><guid>https://gpchn.252123.xyz/posts/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%AD%E8%A8%80%E6%80%8E%E4%B9%88%E9%80%89%E6%89%8D%E4%B8%8D%E5%90%8E%E6%82%94/</guid><description>&lt;p>配置文件这种东西，没人喜欢专门去学它。你打开一个陌生的项目，看到满屏的缩进、引号、中括号，第一反应大概率是——这写的什么天书？&lt;/p>
&lt;p>但偏偏每个项目用的语言还不一样。JSON、XML、INI、YAML、TOML……名字一个比一个抽象，语法一个比一个有个性。没办法，还是得认一认。&lt;/p></description></item><item><title>垃圾佬福音：如何用200元凑出一台电脑</title><link>https://gpchn.252123.xyz/posts/%E5%9E%83%E5%9C%BE%E4%BD%AC%E7%A6%8F%E9%9F%B3%E5%A6%82%E4%BD%95%E7%94%A8200%E5%85%83%E5%87%91%E5%87%BA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91/</link><pubDate>Mon, 28 Aug 2023 00:14:10 +0000</pubDate><guid>https://gpchn.252123.xyz/posts/%E5%9E%83%E5%9C%BE%E4%BD%AC%E7%A6%8F%E9%9F%B3%E5%A6%82%E4%BD%95%E7%94%A8200%E5%85%83%E5%87%91%E5%87%BA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91/</guid><description>&lt;p>&lt;em>终于选好了配置、买好了零件、装好了电脑，然后暑假就要结束力（悲）&lt;/em>&lt;/p>
&lt;h2 id="话不多说先上配置">话不多说先上配置&lt;/h2>
&lt;p>&lt;img alt="配置单" loading="lazy" src="../posts/%E5%9E%83%E5%9C%BE%E4%BD%AC%E7%A6%8F%E9%9F%B3%E5%A6%82%E4%BD%95%E7%94%A8200%E5%85%83%E5%87%91%E5%87%BA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91/1.webp">&lt;/p>
&lt;p>&lt;img alt="系统显示" loading="lazy" src="../posts/%E5%9E%83%E5%9C%BE%E4%BD%AC%E7%A6%8F%E9%9F%B3%E5%A6%82%E4%BD%95%E7%94%A8200%E5%85%83%E5%87%91%E5%87%BA%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91/5.webp">&lt;/p>
&lt;p>不得不说 e3 神教嘎嘎香，160 块钱能有这性能，传送门2、CS:GO、半条命、泰拉瑞亚、求生之路2 这种低配游戏毫无压力（虽然我也没试过，但根据配置要求来看是这样的）&lt;/p></description></item><item><title>白嫖服务器 + .link 顶级域名</title><link>https://gpchn.252123.xyz/posts/%E7%99%BD%E5%AB%96%E6%9C%8D%E5%8A%A1%E5%99%A8-link-%E9%A1%B6%E7%BA%A7%E5%9F%9F%E5%90%8D/</link><pubDate>Wed, 19 Jul 2023 13:33:10 +0000</pubDate><guid>https://gpchn.252123.xyz/posts/%E7%99%BD%E5%AB%96%E6%9C%8D%E5%8A%A1%E5%99%A8-link-%E9%A1%B6%E7%BA%A7%E5%9F%9F%E5%90%8D/</guid><description>&lt;p>&lt;em>观前提示：Vercel 和 GitHub 在国内被墙了，没有梯子就歇菜吧&lt;/em>&lt;/p>
&lt;h1 id="注册域名">注册域名&lt;/h1>
&lt;p>首先来到白嫖域名的网站：&lt;a href="https://www.dynadot.com/register-your-free-link-domain">https://www.dynadot.com/register-your-free-link-domain&lt;/a>&lt;/p>
&lt;p>&lt;img alt="检查域名可用性" loading="lazy" src="../posts/%E7%99%BD%E5%AB%96%E6%9C%8D%E5%8A%A1%E5%99%A8-link-%E9%A1%B6%E7%BA%A7%E5%9F%9F%E5%90%8D/1.webp">&lt;/p>
&lt;p>在搜索框里填上你想要注册的域名，如果可以注册就会是图中的样式，点 Next&lt;/p></description></item></channel></rss>