bear_backup.py
def zip_note(self, filename=None):
        """Adds the note to a zipfile in bearnote format.

        The bearnote format is almost identical to the textbundle format,
        except that asset (image and pdf) links aren't markdown images,
        they're just `[path/to/file]` (without backticks)
        """
        if filename is None:
            filename = self.filename()
        filename = pathlib.Path(filename).with_suffix(".bearnote")
        zip_file = zipfile.ZipFile(str(filename), "w",
                               compression=zipfile.ZIP_DEFLATED)
        # Add info.json
        zip_file.writestr(os.path.join(filename, "info.json"), json.dumps({
            "type": "public.plain-text",
            "version": "2"
        }))
        # Add text
        zip_file.writestr(os.path.join(filename, "text.txt"),
                          self.text_with_converted_asset_paths())
        # Add assets
        for filename in self.asset_filenames():
            zip_file.write(filename,
                           os.path.join(filename,
                                        self.convert_asset_path(filename)))
Adds the note to a zipfile in bearnote format.

        The bearnote format is almost identical to the textbundle format,
        except that asset (image and pdf) links aren't markdown images,
        they're just `[path/to/file]` (without backticks)
        
Adds the note to a zipfile in bearnote format.
The bearnote format is almost identical to the textbundle format,
except that asset (image and pdf) links aren't markdown images,
they're just `[path/to/file]` (without backticks)
Adds the note to a zipfile in bearnote format . The bearnote format is almost identical to the textbundle format except that asset ( image and pdf ) links aren ' t markdown images they ' re just ` [ path / to / file ] ` ( without backticks )
def zip_note(self, filename=None):
        if filename is None:
            filename = self.filename()
        filename = pathlib.Path(filename).with_suffix(".bearnote")
        zip_file = zipfile.ZipFile(str(filename), "w",
                               compression=zipfile.ZIP_DEFLATED)
        zip_file.writestr(os.path.join(filename, "info.json"), json.dumps({
            "type": "public.plain-text",
            "version": "2"
        }))
        zip_file.writestr(os.path.join(filename, "text.txt"),
                          self.text_with_converted_asset_paths())
        for filename in self.asset_filenames():
            zip_file.write(filename,
                           os.path.join(filename,
                                        self.convert_asset_path(filename)))
def zip_note ( self , filename = None ) : if filename is None : filename = self . filename ( ) filename = pathlib . Path ( filename ) . with_suffix ( ".bearnote" ) zip_file = zipfile . ZipFile ( str ( filename ) , "w" , compression = zipfile . ZIP_DEFLATED ) zip_file . writestr ( os . path . join ( filename , "info.json" ) , json . dumps ( { "type" : "public.plain-text" , "version" : "2" } ) ) zip_file . writestr ( os . path . join ( filename , "text.txt" ) , self . text_with_converted_asset_paths ( ) ) for filename in self . asset_filenames ( ) : zip_file . write ( filename , os . path . join ( filename , self . convert_asset_path ( filename ) ) )
Adds the note to a zipfile in bearnote format.
Adds the note to a zipfile in bearnote format .
"""Adds the note to a zipfile in bearnote format.

        The bearnote format is almost identical to the textbundle format,
        except that asset (image and pdf) links aren't markdown images,
        they're just `[path/to/file]` (without backticks)
        """ # Add info.json # Add text # Add assets
self
filename