diff --git a/Publishing-your-cog.md b/Publishing-your-cog.md new file mode 100644 index 0000000..fd55324 --- /dev/null +++ b/Publishing-your-cog.md @@ -0,0 +1,29 @@ +## Publishing your cog + +In order to be published, your cog must: +* Not conflict with any of the standard modules +* Not be too heavy +* Have decent instructions +* Not generate/tamper with any data outside its own subfolder in data + +Once you're sure that your cog meets the requirements, this is how you proceed: +* Make a folder with the same name as the cog. (example.py -> example) +* Put your cog (py file) inside it. +* Any data that your cog needs must be in a folder called "data" inside that folder +* If your cog doesn't need additional files in order to work, don't make a data subfolder +* No multiple *.py files in the root folder + +Example: +testcog/testcog.py +testcog/data/text.json +testcog/data/text2.json + +When the user installs your cog, the installer will take care of taking your data files and put them in /data/yourcog/, so you can expect them to be there once your cog gets installed. + +Now it's time to make the info.json. This is what the installer uses to get informations about the cog and display them to user before installation (name, author, description...). Also, it lists any file that your cog package contains. + +[Download this script](https://gist.githubusercontent.com/Twentysix26/09071dbf2cbacd298fab/raw/1fa78a5cc0ce19480ec97eddbbd4ad008f93f1f6/info_maker.py) (CTRL + S) and save it into your folder. Run it and *follow the instructions*. Once you're done, if everything went smooth your folder should contain an info.json. Delete the script "info_maker.py" in case you haven't already. + +Now, you either: +* [Make a pull request on github](https://github.com/Twentysix26/Red-Cogs), of course by cloning the repo and putting the folder you just created inside the "cogs" folder +* Or zip the folder and send it to the staff/dev on the server \ No newline at end of file