<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>skypiea - 办公自动化</title>
    <link>https://www.skypiea.top/forum.php?mod=forumdisplay&amp;fid=8</link>
    <description>Latest 20 threads of 办公自动化</description>
    <copyright>Copyright(C) skypiea</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Wed, 24 Jun 2026 20:54:19 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>https://www.skypiea.top/static/image/common/logo_88_31.gif</url>
      <title>skypiea</title>
      <link>https://www.skypiea.top/</link>
    </image>
    <item>
      <title>playwright安装</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1521</link>
      <description><![CDATA[uv add pytest-playwright
uv add playwright
playwright install]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Tue, 16 Jun 2026 01:48:31 +0000</pubDate>
    </item>
    <item>
      <title>跳转路径</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1501</link>
      <description><![CDATA[一、核心概念：当前工作目录与路径跳转
在开始学习方法前，需先明确 “当前工作目录（CWD）” 的概念：Python 程序运行时，默认以启动脚本的目录作为当前工作目录，所有相对路径的操作都会基于此目录展开。路径跳转的核心需求分为两类：
切换当前工作目录：改变程序的默 ...]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 03:02:54 +0000</pubDate>
    </item>
    <item>
      <title>拼接路径</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1500</link>
      <description><![CDATA[Python 内置的os.path模块是处理路径的基础工具，其中os.path.join()是专门用于路径拼接的核心函数，能自动适配操作系统的分隔符规则。

import os

# 1. 拼接基础路径和文件名
base_dir = \&quot;/home/user/projects\&quot;
file_name = \&quot;main.py\&quot;
full_path = os.path.join(base_ ...]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 03:02:08 +0000</pubDate>
    </item>
    <item>
      <title>创建文件夹</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1499</link>
      <description><![CDATA[os模块是 Python 与操作系统交互的核心工具，其中os.mkdir()和os.makedirs()是创建文件夹的基础函数，两者适用于不同的层级创建需求，是新手入门的首选。

1. 单级文件夹创建：os.mkdir ()
os.mkdir()（make directory）用于创建单级文件夹，即只能创建路径中的最后一级 ...]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 03:01:45 +0000</pubDate>
    </item>
    <item>
      <title>获取当前路径</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1498</link>
      <description><![CDATA[方法 1：使用 os 模块获取当前路径
import os
# 获取当前工作目录的绝对路径
current_path = os.getcwd()
print(\&quot;当前工作目录：\&quot;, current_path)
需要注意的是，os.getcwd()返回的是程序运行时的工作目录，而非脚本文件本身的存储目录。

import os
# 获取脚本文件的绝 ...]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 02:59:50 +0000</pubDate>
    </item>
    <item>
      <title>[word办公自动化]python-docx docxtpl win32com Jinja2</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1495</link>
      <description><![CDATA[python-docx官方文档：https://python-docx.readthedocs.io/en/latest/
python-docx库是使用 Python 操作 Word 文档的开源包，用于创建和更新 Word(*.docx)文件。python-docx库允许创建新文档，以及对现有文档进行更改，非常好用。在 Python 中，使用python-docx库可以 ...]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 02:58:20 +0000</pubDate>
    </item>
    <item>
      <title>webp转成jpg</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1494</link>
      <description><![CDATA[from PIL import Image
def webp_to_jpg(input_path, output_path):
    image = Image.open(input_path).convert(\&quot;RGB\&quot;)
    image.save(output_path, \&quot;JPEG\&quot;)]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 02:48:02 +0000</pubDate>
    </item>
    <item>
      <title>卸载cygwin</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1493</link>
      <description><![CDATA[第一步：删除Cygwin的根目录
第二步：删除Cygwin的包缓存目录
安装程序会用一个目录来存放下载的包文件。
默认路径通常是 C:%users\\\\AppData\\Local\\Cygwin
 或者你当初运行安装程序时所在的目录。
第三步：清理环境变量 ...]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 02:47:32 +0000</pubDate>
    </item>
    <item>
      <title>selenium加载edge驱动</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1484</link>
      <description><![CDATA[from selenium import webdriver
option=webdriver.EdgeOptions()
driver = webdriver.Edge(r\'D:\\edge驱动\\edgedriver_win64\\msedgedriver.exe\', options=option)        #这里添加的是driver的绝对路径
driver.get(\'https://www.csdn.net/\')]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 02:36:26 +0000</pubDate>
    </item>
    <item>
      <title>pyautogui对屏幕指定区域截屏</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1476</link>
      <description><![CDATA[import pyautogui
import time

def capture_area(x1, y1, x2, y2,no):
    \&quot;\&quot;\&quot;根据坐标截图并保存\&quot;\&quot;\&quot;
    try:
        # 确保坐标有效性
        left = min(x1, x2)
        top = min(y1, y2)
        right = max(x1, x2)
        bottom = max(y1, y2)

        # ..]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 02:31:19 +0000</pubDate>
    </item>
    <item>
      <title>pyautogui实时获取鼠标位置</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=1475</link>
      <description><![CDATA[import pyautogui
import time

def get_mouse_position():
    try:
        while True:
            x, y = pyautogui.position()
            print(f\&quot;\\r当前鼠标坐标: X={x} Y={y}\&quot;, end=\&quot;\&quot;, flush=True)
            time.sleep(0.1)
    except KeyboardInter]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Sat, 23 May 2026 02:31:02 +0000</pubDate>
    </item>
    <item>
      <title>办公自动化QQ群：770822907</title>
      <link>https://www.skypiea.top/forum.php?mod=viewthread&amp;tid=136</link>
      <description><![CDATA[办公自动化QQ群：770822907
欢迎加入交流]]></description>
      <category>办公自动化</category>
      <author>skypiea</author>
      <pubDate>Tue, 14 Apr 2026 15:04:13 +0000</pubDate>
    </item>
  </channel>
</rss>