mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-01-27 17:07:13 +08:00
initial commit
This commit is contained in:
parent
488af7abac
commit
db6fb2e69c
2 changed files with 14 additions and 0 deletions
11
source/shebangs/python-with-nix-pkg/my-script.sh
Executable file
11
source/shebangs/python-with-nix-pkg/my-script.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 -p python3Packages.html-sanitizer
|
||||
|
||||
from html_sanitizer import Sanitizer
|
||||
sanitizer = Sanitizer() # default configuration
|
||||
|
||||
original='<span style="font-weight:bold">some text</span>'
|
||||
print('original: ', original)
|
||||
|
||||
sanitized=sanitizer.sanitize(original)
|
||||
print('sanitized: ', sanitized)
|
||||
Loading…
Add table
Add a link
Reference in a new issue