def ipfs_publish(self, lib):
        with tempfile.NamedTemporaryFile() as tmp:
            self.ipfs_added_albums(lib, tmp.name)
            try:
                cmd = "ipfs add -q ".split()
                cmd.append(tmp.name)
                output = util.command_output(cmd)
            except (__HOLE__, subprocess.CalledProcessError) as err:
                msg = "Failed to publish library. Error: {0}".format(err)
                self._log.error(msg)
                return False
            self._log.info("hash of library: {0}", output)
dataset/ETHPy150Open beetbox/beets/beetsplug/ipfs.py/IPFSPlugin.ipfs_publish