一个简单的python脚本,用ascii艺术和基本系统信息显示os徽标。

pyarche的Python项目详细描述


https://imgs.xkcd.com/comics/automation.png
https://travis-ci.org/walchko/pyarchey.svg?branch=masterLatest VersionDownloadsLicense

这是基于由 Linux、Unix和OSX包管理器。为了避免它们之间的命名冲突, 我叫这个pyarchey

pyarchey是为python 2.7开发和测试的,没有担保人 关于它对Python3.x的适用性。 欢迎。

目前,pyarchey支持arch、fedora、linuxmint、ubuntu、suse、debian的徽标, raspbian、gentoo、openbsd、通用linux和slackware。

[kevin@Tardis soccer2]$ pyarchey -z

                  ##             User: kevin
               ####              Hostname: Tardis.local
               ##                IP: 192.168.1.4 / 58:B0:35:F2:25:D8
       #######    #######        OS: Mac OSX 10.10.5 x86_64
     ######################      Kernel: 14.5.0
    #####################        Uptime: 13 days 14 hrs 45 mins
    ####################         Shell: /bin/bash
    ####################         Processes: 214 running
    #####################        Packages: 113
     ######################      CPU: Intel Core2 Duo P8600 @ 2.40GHz
      ####################       CPU Usage: [17.8, 13.9]
        ################         RAM: 7.0 GB/ 8.0 GB
          ###     ####           Disk: 219.0 / 233.0 GB



pi@calculon ~/github/pyarchey $ pyarchey -z

        .~~.   .~~.      User: pi
       '. \ ' ' / .'     Hostname: calculon
        .~ .~~~..~.      IP: 192.168.1.17 / B8:27:EB:0A:5A:17
       : .~.'~'.~. :     OS: Raspbian 7 (wheezy) armv6l
      ~ (   ) (   ) ~    Kernel: 4.1.6+
     ( : '~'.~.'~' : )   Uptime: 15 days 21 hrs 23 mins
      ~ .~ (   ) ~. ~    Shell: /bin/bash
       (  : '~' :  )     Processes: 73 running
        '~ .~~~. ~'      Packages: 960
            '~'          CPU: ARMv6-compatible processor rev 7 (v6l)
                         CPU Usage: [1.0]
                         RAM: 216.0 MB/ 229.0 MB
                         Disk: 4.0 / 15.0 GB


pi@calculon ~/github/pyarchey $ pyarchey -zj
{"Kernel": "4.1.6+", "Uptime": "15 days 21 hrs 39 mins", "Shell": "/bin/bash",
"Disk": "4.0 / 15.0 GB", "IP": "192.168.1.17 / B8:27:EB:0A:5A:17", "Hostname":
"calculon", "Processes": "73 running", "RAM": "215.0 MB/ 229.0 MB", "User": "pi",
"CPU Usage": "[3.9]", "Packages": 960, "OS": "Raspbian 7 (wheezy) armv6l", "CPU":
"ARMv6-compatible processor rev 7 (v6l)"}

要求

删除了一些自定义代码,并使用psutil提供跨平台 解决方案。

安装

首选方法是使用pypi.org

pip install pyarchey

您也可以这样做:

git clone https://github.com/walchko/pyarchey.git
cd pyarchey
python setup.py install

如果你打算做一些开发,而不是install,你可以做develop

用法

运行:

pyarchey

参数:

-d, --displaydisplay ascii logos for all distributions
-h, --helphelp
-j, --jsonoutput json of system info, nothing is printed to the screen
-z, --zeroconfig
add ^{tt7}$ to a hostname for zeroconfig to find IP address easier

历史记录

据我所知,这是由@djmelik开始的,然后由 @我用叉子叉它的地方。

贡献

  • Dimitris Zlatanidis(DSLACKW)-Slackware支持
  • mikeantonacci-修复选项卡错误
  • Alessandro Barbieri-Gentoo支持

更改

DateVersionNotes
29 Mar 150.4.0Forked
4 Apr 150.5.0Added Apple logo, changed custom code to ^{tt4}$
11 Apr 150.6.0Added commandline args for: displaying ascii logos, json output, zeroconfig
26 Aug 150.6.2Minor fixes
21 Sep 150.6.3OSX now reports OSX version and minor other fixes
22 Sep 150.6.4Arch linux fix
23 Sep 150.6.5Refactoring to remove some command line programs
23 Sep 150.6.6Bug fix
6 Oct 150.6.7Bug fix with Python 3
20 Oct 150.6.8Colored the leaves on Rpi ascii image
3 Jun 160.7Bug fix with Python 3 and some PEP8 fixes

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java JavaFX触控事件未触发Ubuntu 20.04触控笔记本电脑   java如何在AWT中关闭窗口?   java Dagger 2:注入具有构造函数参数的成员   创建对象的Java调用类   对象我想在A.java中添加两个数字,并在B.java中打印结果(如何?)   java如何使用AWS SDK for Android从数字海洋空间下载图像?   java Facebook sdk 4.0.1无法使用Android studio获取某些字段   4分钟后web应用程序(Angular 8和Rest API)中的java自动会话超时   在Eclipse for Java EE developers edition中禁用HTML警告   java按字母顺序排列字符串我错过了什么明显的东西吗?   java在Jshell中println和printf有什么不同