rmountjoy92 / VectorCloud

A web interface for Anki Vector
GNU General Public License v3.0
123 stars 19 forks source link

Store applications outside VectorCloud project #3

Open irongomme opened 5 years ago

irongomme commented 5 years ago

What do you think about storing applications in another repository(ies), to let contributors manage new vector applications or applications updates in an external space for it ? In this way, application import could be loaded from a dedicated catalog, without storing them in this web interface repo.

rmountjoy92 commented 5 years ago

That was my eventual goal for the app store, storing them locally a was a temporary fix. I'm just unsure where/how to host them. Do you know way I could store them for free and download them to the packages folder using a python package (preferably from the standard library)?

irongomme commented 5 years ago

I have some ideas :

1 - I've opened a ticket in anki forum : https://forums.anki.com/t/community-scripts-hub/25692 : Then VectorCloud could load apps from an official community catalog

2 - Another way could be having another github project (Vector scripts hub) and use it as a catalog : Storing each github vector script project as a submodule. In this way, each project could be added with pull requests. VectorCloud could scan all vector apps in this new github project and sync regularly.

I start the debate, maybe someone else could have better solutions for that ;-)

rmountjoy92 commented 5 years ago

yeah the only thing that makes me a little nervous about making it publicly editable is god forbid someone wanna be hacker replaces a line of code with something destructive. It could go unnoticed, someone could download it, run it and brick their computer.

irongomme commented 5 years ago

You mean that you could be responsible of the contributors packages ?

rmountjoy92 commented 5 years ago

Nah I'm saying there would need to be some kind of authentication system where only the person that added the package can edit it and newly submitted apps need to be checked to make sure their not malicious.

irongomme commented 5 years ago

For exemple, I like the idea of Ansible Galaxy. Ansible is a server automation tool, and everyone can share small piece of logic to add into a personnal project, and this is done with dedicated website : https://galaxy.ansible.com Everery share is done by linking a personnal github repo in. Then other users can star, see the code, download code, etc... I think this would be a great system for vector packages

rmountjoy92 commented 5 years ago

I will look into this, thanks!

irongomme commented 5 years ago

Hi, I'm learning flask, and i've began a project to accomplish this feature : https://github.com/irongomme/heyvector

For the beginning I've planned to :

This not yet ready, but soon ! ;-)

rmountjoy92 commented 5 years ago

Awesome! This is exciting! So if your application could send back a list of dictionary-like objects for each application with the following fields:

    id = unique key e.g. 1
    script_name = application name
    author = application author
    website = author website
    description = application description
    icon = icon file in package
    download_link = where I could have VectorCloud look for the .zip

and I could use

for app in apps_from_heyvector:
    script_name = app.script_name

it would be super easy to implement this.

irongomme commented 5 years ago

Yep, that could be something like that ! I'm thinking about some requirements to restrict package imports, like include a meta file in the each github project (like your ini file in each script exemple). Like that, I could easily distribute it in a json object.