Skip to content

Releases: anki-code/xontrib-macro

0.5.0

21 Jul 11:57
7b82a65
Compare
Choose a tag to compare

Replace docker to open source podman.

0.4.2

10 Jun 21:16
b64bf74
Compare
Choose a tag to compare

DisableInterrupt API fix.

0.4.1

10 Jun 21:07
3b6db49
Compare
Choose a tag to compare

Added signal.DisableInterrupt. This macro allows disabling SIGINT (Ctrl+C) for group of commands.

from xontrib.macro.signal import DisableInterrupt

echo start
with! DisableInterrupt:
    echo 'sleep start'
    sleep 10
    echo 'sleep end'
echo finish

# start
# sleep start
# [Press Ctrl+C]
# KeyboardInterrupt will be raised at the end of current transaction.
# sleep end
# Exception KeyboardInterrupt: KeyboardInterrupt was received during transaction.

0.3.5

16 Mar 08:07
06442ce
Compare
Choose a tag to compare

Fix links.

0.3.4

25 Mar 08:45
9437919
Compare
Choose a tag to compare

Added format to data.Write:

from xontrib.macro.data import Write

with! Write('/tmp/t/hello.xsh', chmod=0o700, replace=True, makedir=True, format={'name': 'world'}, verbose=True):
    echo {name}
    
## Make directories: /tmp/t
## Write to file: /tmp/t/hello.xsh
## Set chmod: rw- --- ---
## Set exec:  rwx --- ---

/tmp/t/hello.xsh
# world

0.3.3

22 Mar 10:08
e269ca8
Compare
Choose a tag to compare

Fix Path.expanduser.

0.3.2

19 Mar 15:51
90d6eb0
Compare
Choose a tag to compare

Added macro.data.XmlBlock.

0.3.1

19 Mar 14:44
a8f0216
Compare
Choose a tag to compare
Update pyproject.toml

0.3.0

19 Mar 14:39
Compare
Choose a tag to compare
xontrib-macro

0.2.0

18 Mar 21:00
738030e
Compare
Choose a tag to compare
  • Now you can run xontrib load macrolib in interactive mode and use completion with with! macrolib.<Tab>.
  • Added macrolib.data.Write and macrolib.data.Replace.
  • macrolib.run_once.RunOnce renamed to macrolib.run.Once.