瀏覽代碼

[+] Get ascii lines

Azalea (on HyDEV-Daisy) 3 年之前
父節點
當前提交
3f0331a307
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      hyfetch/neofetch_util.py

+ 10 - 0
hyfetch/neofetch_util.py

@@ -11,3 +11,13 @@ def get_command_path() -> str:
     :return: Command path
     """
     return pkg_resources.resource_filename(__name__, 'scripts/neofetch_mod.sh')
+
+
+def get_distro_ascii_lines() -> int:
+    """
+    Get how many lines are in the distro ascii
+
+    :return: Number of lines
+    """
+    out = check_output([get_command_path(), "print_ascii"])
+    return len(out.decode().strip().split('\n'))