code: def write_publication(self, values):
          
          con = self.connection or self._connect()
          self._initialize(con)
          cur = con.cursor()
  
          values = (values['pub_id'],
                    values['title'],
                    json.dumps(values['authors']),
                    values['journal'],
                    values['volume'],
                    values['number'],
                    values['pages'],
                    values['year'],
                    values['publisher'],
                    values['doi'],
                    json.dumps(values['tags']))
  
          q = self.default + ',' + ', '.join('?' * len(values))
          cur.execute('INSERT OR IGNORE INTO publication VALUES ({})'.format(q),
                      values)
  
          pid = self.get_last_id(cur, table='publication')
  
          if self.connection is None:
              con.commit()
              con.close()
  
          return pid
docs: Write publication info to db
  
          Parameters
          ----------
          values: dict with entries
              {'pub_id': str (short name for publication),
              'authors': list of str ()
              'journal': str,
              'volume': str,
              'number': str,
              'pages': 'str'
              'year': int,
              'publisher': str,
              'doi': str,
              'tags': list of str}