chapisha/create/create.py
def add_contributor(self, contributor: Contributor):
        """
        Add a contributor to the list of those supporting the creation of the work. `contributor` is defined as a dict:
        
        .. code-block:: python

            contributor = {
                "role": "artist",
                "name": "Great Artist",
                "year": "2021",
                "terms": "Public Domain."
            }

        Parameters
        ----------
        contributor: Contributor
            Include the types of contributor who supported the creation of the work. `role`: `artist`, `editor`, `translator`.

        Raises
        ------
        PermissionError: if metadata not yet validated.
        """
        if not self.work_name or not self.metadata:
            e = "`set_metadata` before adding contributors, or add the contributors when you set the metadata."
            raise PermissionError(e)
        if self.metadata.contributor is None:
            self.metadata.contributor = []
        self.metadata.contributor.append(Contributor(**contributor))
        _c.save_json(self.metadata.dict(by_alias=True), self.directory / _c.DEFAULT_METADATA_SETTINGS, overwrite=True)

        Add a contributor to the list of those supporting the creation of the work. `contributor` is defined as a dict:
        
        .. code-block:: python

            contributor = {
                "role": "artist",
                "name": "Great Artist",
                "year": "2021",
                "terms": "Public Domain."
            }

        Parameters
        ----------
        contributor: Contributor
            Include the types of contributor who supported the creation of the work. `role`: `artist`, `editor`, `translator`.

        Raises
        ------
        PermissionError: if metadata not yet validated.
        
Add a contributor to the list of those supporting the creation of the work. `contributor` is defined as a dict:
code-block:: python



Parameters

Contributor
Include the types of contributor who supported the creation of the work.

Raises

if metadata not yet validated.
Add a contributor to the list of those supporting the creation of the work . ` contributor ` is defined as a dict : code - block :: python Parameters Contributor Include the types of contributor who supported the creation of the work . Raises if metadata not yet validated .
def add_contributor(self, contributor: Contributor):
        if not self.work_name or not self.metadata:
            e = "`set_metadata` before adding contributors, or add the contributors when you set the metadata."
            raise PermissionError(e)
        if self.metadata.contributor is None:
            self.metadata.contributor = []
        self.metadata.contributor.append(Contributor(**contributor))
        _c.save_json(self.metadata.dict(by_alias=True), self.directory / _c.DEFAULT_METADATA_SETTINGS, overwrite=True)
def add_contributor ( self , contributor : Contributor ) : if not self . work_name or not self . metadata : e = "`set_metadata` before adding contributors, or add the contributors when you set the metadata." raise PermissionError ( e ) if self . metadata . contributor is None : self . metadata . contributor = [ ] self . metadata . contributor . append ( Contributor ( ** contributor ) ) _c . save_json ( self . metadata . dict ( by_alias = True ) , self . directory / _c . DEFAULT_METADATA_SETTINGS , overwrite = True )
Add a contributor to the list of those supporting the creation of the work.
Add a contributor to the list of those supporting the creation of the work .
"""
        Add a contributor to the list of those supporting the creation of the work. `contributor` is defined as a dict:
        
        .. code-block:: python

            contributor = {
                "role": "artist",
                "name": "Great Artist",
                "year": "2021",
                "terms": "Public Domain."
            }

        Parameters
        ----------
        contributor: Contributor
            Include the types of contributor who supported the creation of the work. `role`: `artist`, `editor`, `translator`.

        Raises
        ------
        PermissionError: if metadata not yet validated.
        """
self
contributor
Contributor