From c5fafcc0f472b3ba2c1095f494e298e557f96492 Mon Sep 17 00:00:00 2001 From: Phyks Date: Mon, 6 Apr 2015 23:16:16 +0200 Subject: [PATCH] Instructions --- README.md | 7 +++++++ blueprinting.py | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index 0df513e..87538fd 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,13 @@ Hence, it aims at helping you write Ansible scripts quickly from an already runn This script is mostly inspired by [Devstructure's blueprint](https://github.com/devstructure/blueprint). +## Usage + +`pacman.py` is to be considered as a wrapper around useful pacman commands to extract informations on installed packages, installed AUR packages, configuration files etc. + +`blueprinting.py` is the main entry point. For now, it just calls main entry points of `pacman.py` to get useful information on your system, so you should refer to the code in `blueprinting.py` and edit it to do something useful with the returns from these functions. But this script is a Work In Progress and a user interface is planned. + + ## License All the source code I wrote is under a `no-alcohol beer-ware license`. diff --git a/blueprinting.py b/blueprinting.py index 1f84d53..22dc913 100755 --- a/blueprinting.py +++ b/blueprinting.py @@ -3,7 +3,20 @@ import pacman if __name__ == "__main__": + # Packages is a list of installed packages (or groups if all packages of a + # group have been installed) packages = pacman.list_installed_packages() + + # Aur_packages is a list of all packages installed through AUR aur_packages = pacman.list_installed_aur_packages() + + # Modified config_files is a list of all the modified configuration files, + # compared to packages base config modified_config_files = pacman.list_modified_config_files() + + # New config files is a list of all the files under /etc which are not + # coming from any package. + # Will list a bunch of files. Files under /etc/ssl/certs and /etc/certs can + # be ignored. + # Will ignore binary files under /etc by default new_config_files = pacman.list_new_config_files()