Add a new content provider#
Adding a new content provider allows repo2docker to grab repositories from new locations on the internet. To do so, you should take the following steps:
Sub-class the ContentProvider class. This will give you a skeleton class you can modify to support your new content provider.
Implement a detect() method for the class. This takes an input string (e.g., a URL or path) and determines if it points to this particular content provider. It should return a dictionary (called
specthat will be passed to the
fetch()method. For example, see the ZenodoProvider detect method.
Implement a fetch() method for the class. This takes the dictionary
specas input, and ensures the repository exists on disk (e.g., by downloading it) and returns a path to it. For example, see the ZenodoProvider fetch method.