3

让智能技术服务于日常工作: 从PyAutoGUI到automagica

 2 years ago
source link: http://wwj718.github.io/post/%E7%BC%96%E7%A8%8B/from-pyautogui-to-automagica/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

我很喜欢oakwood主页上的slogan:

Smart solutions for real business problems with tomorrow’s technology.

automagica

automagicaoakwood开源的一个项目, 源码开放在automagica

automagica是一个开源智能机器人过程自动化(SRPA: Smart Robotic Process Automation)平台。

它基于Python和Tensorflow等开源技术,因此可以轻松接入人工智能领域的最新和重大发展,将其用于日常办公。

项目readme里写道:

借助automagica,自动化跨平台流程将变得简易。通过这个项目,我们希望为现有的自动化库提供同意的接口。

从项目的依赖关系中可以看出,它对许多已有的项目做了包装:

install_requires=[
          'socketIO-client==0.7.2',
          'PyAutoGUI==0.9.36',
          'opencv-python==3.4.2.17',
          'sty==1.0.0b2',
          'selenium==3.7.0',
          'pywinauto==0.6.5',
          'pytesseract==0.2.0',
          'openpyxl==2.4.8',
          'python-docx==0.8.6',
          'pywin32==223',
          'PyPDF2==1.26.0',
          'psutil==5.4.6',
          'beautifulsoup4==4.6.0',
          'py-trello==0.13.0'
      ]

可以做些什么

使用automagica我们可以做些什么?

官方给出了一些有趣的例子。

自动去网络搜集资料填入表格

自动化SAP

文件夹和文件操作

automagica还很新,有许多有趣的想象空间,我目前想到最有趣的方向是 构建开发者生态,打造各类自动化和AI插件,来自动化办公领域的重复劳动。

安装 & 使用

automagica还非常早期,官方团队似乎主要在Windows环境下工作(当然大量用户也是有Windows作为办公环境),如果你使用Windows,按照官方文档安装和使用应该问题都不大。

我日常使用MacOS,安装起来,还有些手动工作,我的安装过程为

pip3 install PyAutoGUI pyobjc-core pyobjc --user
pip3 install https://github.com/codelabclub/Automagica/tarball/master --user

我fork了一份Automagica到自己的仓库,fix了MacOS下安装的bug,已经给官方提了pr。

MacOS用户要获得良好使用体验可能还得等上一段时间,使用中的问题也还挺多。

如果你愿意尝鲜而不是成为核心开发者,建议在Windows下试用。

PyAutoGUI

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.

automagica依赖PyAutoGUI.

PyAutoGUI是我非常喜欢的一个项目,之前计划将其整合到codelab-adapater

PyAutoGUI是一个跨平台项目,允许编程人员在代码中控制鼠标和键盘,如此一来,几乎可以做任何的自动化工作。一旦接管了HID设备,计算机就无法区分当前操作对象是人类还是机器。所以理论上可以自动化任何软件。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK