How to use the memacs.lib.orgformat.OrgFormat.link function in memacs

To help you get started, we’ve selected a few memacs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github novoid / Memacs / memacs / filenametimestamps.py View on Github external
def __write_file(self, file, link, timestamp):
        """
        write entry to org file (omit replacement of spaces in file names)
        """
        output = OrgFormat.link(link="file:" + link, description=file, replacespaces=False)
        properties = None
        if not self._args.omit_drawers:
            # we need optional data for hashing due it can be, that more
            # than one file have the same timestamp
            properties = OrgProperties(data_for_hashing=output)
        self._writer.write_org_subitem(timestamp=timestamp,
                                       output=output,
                                       properties=properties)