fossasia / susi_server

SUSI.AI server backend - the Artificial Intelligence server for personal assistants https://susi.ai
GNU Lesser General Public License v2.1
2.51k stars 1.08k forks source link

Store skills in genereal/[cat name]/[skill name] and include images #1352

Open mariobehling opened 5 years ago

mariobehling commented 5 years ago

The stored skill info is inconsistently stored. Images are not stored with the skill. Please store the skill text and the image in a subfolder of the chosen category to keep follow the approach of "seperating concerns".

Compare: https://github.com/fossasia/susi_skill_data/tree/master/models/general/Knowledge/en

Orbiter commented 5 years ago

I suggest that the folder for the skill get named like the current skill file name - without the '.txt' extension - and that the files inside the folder then have standard names, like "skill.txt" and "image.jpg"

fragm3 commented 5 years ago

We need to store skills in a folder consisting of skill and image it is using. Check https://github.com/fossasia/susi_skill_data/tree/master/models/general/Communication/en, if the skill has a conflicting image name, the problem can arise due to the current structure. It would be better to store each skill in a separate folder consisting of text and image as pointed by @mariobehling

mariobehling commented 5 years ago

Good point. Though I am not certain if folder names support all kinds of names in all kinds of languages. So, let's follow the approach outlined by Orbiter. But also not that images can also be in other formats like png.

mariobehling commented 5 years ago

@fragm3 What is your idea for a solution if people create a skill with the same name?

fragm3 commented 5 years ago

@mariobehling for that we require a database to store unique id for distinguishing between different skills