Skip to content

Latest commit

 

History

History
57 lines (35 loc) · 1.12 KB

README.md

File metadata and controls

57 lines (35 loc) · 1.12 KB

Simplify Apt scripts!

This is a simple program that simplifies the usage of apt declaratively, scripts are easier now!

Usage

Import Apt class

 from apt import Apt

Create an object from Apt class

update = Apt(option="rup", assume_yes=False)

Call the exec() method

update.exec()

Easy! You just updated your repos.

What if I want to install a package?

Use this then

apt_in = Apt(option="in", assume_yes=False)

And now use

apt_in.change("gimp")

That installs gimp.

If you want to remove a package it's the same syntax as before but pass "rm" to option argument instead.

For multiple packages pass a string like this "package1 package2 package3"

What if I don't want confirmation?

Just change the assume_yes argument to True, simple.

Another possible options for option argument:

  • up : Updates packages(sudo apt upgrade)
  • dup : Updates every package(sudo apt full-upgrade)
  • li : Lists every package(sudo apt list) Probably someday I will extend this one

Use exec() method for these ones. For rm and in use change(packages)