Skip to content

iWisp360/apt-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

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)

About

Simple Apt tools to use with your scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages