-
Notifications
You must be signed in to change notification settings - Fork 0
tarstall as an API ish
Ever since tarstall/hamstall 1.3 (The Great Restructuring), tarstall was split more consistently into different files, the breakdown of which can be found below:
tarstall_execs/tarstall
: The main tarstall executable. Handles nearly all of user interaction.
prog_manage.py
: Handles the majority of tarstall's operations.
config.py
: A helper for prog_manage.py
(mainly), handling things such as file management, managing things in the database, and other configuration/file I/O functions.
generic.py
: A helper for tarstall's interaction with the end-user. Partially an extension of tarstall_execs/tarstall
and partially a generic helper for user interaction. It mainly asks users questions and tracks installation progress of programs with progress().
Writing a Frontend:
If, for some reason, you want to create a frontend for tarstall, tarstall is now built (as of 1.3, as mentioned above), to support that! Every function in tarstall has docstrings, allowing you to easily determine what a function does. When writing a frontend, you'll want to basically rewrite tarstall_execs/tarstall
and generic.py
. You'll want to mostly, if not entirely, make calls to prog_manage.py
, calling functions such as pre_install(), pathify(), and more. Any database information can be grabbed from config.py
. Put simply: tarstall_execs/tarstall
and generic.py
act as the frontend, while prog_manage.py
and config.py
act as the backend.