GithubHelp home page GithubHelp logo

wabri / yapi Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 1.0 246 KB

Yet Another Package Installer

Home Page: https://yetanotherpackageinstaller.github.io/

License: GNU General Public License v3.0

Shell 44.84% Python 55.16%
debian installer-script yapi linux-packages installer package-manager scripts-collection installer-tools debian-packages debian-linux

yapi's Introduction

YAPI - Yet Another Package Installer

Open Source Love

Build Status Issues Stars Forks GitHub contributors

GitHub license

YAPI is a simple package installer made in python for version 3.x. It's free, open-source, and works on Debian distributions. The project is currently in an early stage of development.


Install

To install YAPI you can use wget:

wget https://raw.githubusercontent.com/YetAnotherPackageInstaller/YAPI/install.sh -O - | sudo bash -

This script clones the repository, delete all the useless files and set up basic arguments of configuration.

You can also clone the repository, edit the configuration by yourself (wiki page are not available yet) and run

./install.sh

Usage

To use YAPI, run the yapi.sh shell script:

./yapi.sh

Or use the short method with the name of the package you want to install:

./yapi.sh install <package_name>

To call yapi like this:

yapi <command> <package>

You need to set in the config.ini file the argument "want_soft_link =" with "yes" value and run again install.py with this command:

python3 install.py

Help

To run yapi with the terminal question installer:

yapi console  

To recreate the cache:

yapi cache  

To install one of the packages:

yapi install <package_to_install> 

To pull the newest yapi version from github:

yapi update  

To get information about yapi:

yapi help  

Usage without clone or download

If you dont want to download YAPI but you need one of the packages, you can use the package manager to install a package with this command:

wget https://raw.githubusercontent.com/YetAnotherPackageInstaller/YAPI/master/scripts/<package_name>.sh -O - | sudo bash -

How to add new script

There is a format for the install scripts:

# <description of package> - <reference site of package>
<bash commands>

An example of this format is test.sh:

# Description of package - https://github.com/YetAnotherPackageInstaller/YAPI
echo "Hello world!"

If you want to add one script you need to mantain this standard. This is because the packages list on yapi.py is generated with this information, taken directly from the scripts.


How To Contribute

Contributions are always welcome, either reporting issues/bugs or forking the repository and then issuing pull requests when you have completed some additional coding that you feel will be beneficial to the main project. If you are interested in contributing in a more dedicated capacity, then please contact us.


License

YAPI source code is released under the GNU General Public License v3.0. Please see LICENSE for complete licensing information.


Contributors:

Wabri, IanDuncanT

yapi's People

Contributors

andrea-garritano avatar ianduncant avatar wabri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yapi's Issues

Modules into modules

Move the modules directories to a modules directory

The modules are:

  • cache
  • configuration
  • interfaces
  • languages
  • utility

All imports must be restored and the language packs functionality need some tests.

Big refactor

It is necessary to divide python scripts into submodules, in order to have more order (tongue twister).

Examples:

  1. language_pack_manager.py move into LanguagePackManager directory
  2. script_runner.py move into ScriptRunner directory
  3. and so on

i think only the yapi.py and main scripts need to stay on root directory.

Invalid argument - update

The command:
yapi update
doesnt update yapi but the scripts directory, so it is necessary to create new script for update yapi or rename the argument or both.

Configuration consequences - cache_manager.py

Travis problem

The usage of configuration throw some error in travis build because path of yapi_dir are not valid maybe create a better installer where ask the path is the way to solve that, or get the path where yapi are stored and run in travis.

yapi shortcut install

Need shortcut to install know packages, something like:
python3 yapi.py install atom

Travis execution

I want travis to test the installation of all the packages. Need to create a bash script to put all the package installations and allow travis to execute them all. Like this:

yapi.sh install atom
yapi.sh install discord
and so on

Create bash alias to run YAPI

Create aliases to run yapi instead of starting sh and running yapi.sh. Alias should be yapi. An example of the alias in use would be "yapi install test".

Key error SCRIPT-RUNNER

The config file needs to be edited to fix the section or value of script-runner and may need to be updated in code. This needs to be fixed before merging other pull requests because they feature this issue.

Need a refactor

The yapi script has start to become a little confusing, so it needs a refactoring.

Travis CI

Need to setup travis ci for testing

Catch error if script doesn't work

I want output of the script to be more complete, especially if there was a error during the execution.
I think this can be made using:
echo $?
but actually i don't know where to put this.

Installer console

Need a console installer to set up config.ini something like console_installer.py

  1. os detection and request
  2. language request
  3. request the directory of where yapi must be install
  4. request if keep cache
  5. request if soft link is need

Configuration consequences - console_interface.py

In the PR #55 I'm working on configuration files, when this PR will be merged is necessary to modify the console_interface.py.

Config extractor

Python scripts become unreadable due to configparser import, it is necessary something like language_pack_manager.py created in #69

Config file

Using configparser python library create a new file called config.ini where put all the configurations used on yapi.

Travis configuration failed

The travis build with python3.7 throw this error:
Unable to download 3.7 archive. The archive may not exist. Please consider a different version.
Maybe need a previous version of python3.

Need a cache

Need some sort of cache for list packages, maybe using pickle?

Need a GUI

An example:

something

It doesn't have to be exactly like that, but these components are definitely necessary:

  • packages list
  • a list of commands
  • an output
  • an input field

Desktop entries scripts

The desktop entries need to be added in user share or in local share directory. Maybe adding a new question in the installer and ask where to put the desktop entry: ~/.local/share/applications or /usr/share/applications

Configuration consequences - readme_updater.py

Yapi Search functionality

Create the search functionality like the script search.py on rewrite.

This module must search on the online repository for the script that is given by the argument.

Usage YAPI Readme

Need something like "Packages Supported" auto creations for "usage" command help. To make this work it is needed to change the signature of start and end of autocreations for package supported:

  • "<!--readme_update start -->" become "<!--readme_update start packages -->"
  • "<!--readme_update end -->" become "<!--readme_update end packages -->"

And add this new 2 line below "usage":

  • "<!--readme_update start help -->"
  • "<!--readme_update end help -->"

This 2 lines need in readme_update to know where put the options: https://github.com/YetAnotherPackageInstaller/YAPI/blob/5890f6c4900195ec1d6832ce602515cc9ff39b2f/yapi.py#L15

NB: for now the "usage" is only in a feature branch wabri-patch-36-command-yapi

visual studio code

# Visual Studio Code is a lightweight but powerful source code editor - https://code.visualstudio.com/
wget -O visualstudiocode.deb https://go.microsoft.com/fwlink/?LinkID=760868
sudo dpkg -i visualstudiocode.deb
rm -r visualstudiocode.deb

NOT TESTED

AttributeError for yapi GUI

I installed all the dependencies, but when i tried to run this is the output:

Traceback (most recent call last):
  File "/home/wabri/git/YAPI/env/lib/python3.5/site-packages/toga_gtk/app.py", line 116, in _startup
    self.startup()
  File "/home/wabri/git/YAPI/env/lib/python3.5/site-packages/toga/interface/app.py", line 144, in startup
    self.main_window.content = self._startup_method(self)
  File "/home/wabri/git/YAPI/user_interface.py", line 41, in build
    box.style.update(direction=COLUMN, padding_top=10)
AttributeError: 'CSS' object has no attribute 'update'

and this is the line where the error was thorwn:
https://github.com/YetAnotherPackageInstaller/YAPI/blob/bc1c63ae5ddb8b7fde73dba4207578d5e7114bbf/user_interface.py#L41

User interface

Need a better GUI with more functionality and better installation

Error for Install argument feature

If an unknown package is executed with install, for example:
python3 yapi.py install unknown_package
the script throw FileNotFoundError.
Maybe a better output can be made, something like:
No package with this name
And then the list of the packages.

Install YAPI

How can we manage the installation yapi on a new computer?
How about new script called install.sh to run with:
wget https://raw.githubusercontent.com/Wabri/YAPI/install.sh -O - | sudo bash -
something like this:

git clone https://github.com/Wabri/YAPI.git --depth 1
sudo ln -s ~/YAPI/yapi.sh /usr/local/bin/yapi

Package Reorganization by Type - DanerSound

I would suggest reorganizing the installation packages by TYPE, for example, if a person is looking only for text editors, or software development packages, in this way the list is packages if more short in the client-view.

New argument -> config

Add a new argument for yapi called config, this new argument must give the actual configuration for yapi and ask if some of config value needs to be change. if config is follow by one or more of this "--<field_name>=<field_new_value>" it means that field must change with that value. in this case is not necessary to run the console request previously explained.

examples:

  • yapi config --platform=darwin
  • yapi config --want_soft_link=True --keep_cache=False
  • yapi config --ignore=test.sh,atom.sh,pycharm.sh --installed=atom,pycharm

The last one is give a particular example of list of value, is probably necessary to update this line of yapi.py:
https://github.com/YetAnotherPackageInstaller/YAPI/blob/6ca5410572d9df4ff6e7a8c78cdef1db3ead6eea/yapi.py#L54
or prevent the change of this line by split the value list in argument of config with a space between the comma and the next character.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.