restructured repo

This commit is contained in:
Amy de Buitléir 2023-06-13 20:33:24 +01:00
parent bea4055fc9
commit 285f60104b
22 changed files with 167 additions and 313 deletions

View file

@ -1,3 +0,0 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p cowsay
cowsay "Pretty cool, huh?"

View file

@ -1,4 +1,4 @@
== Nix-shell shebangs
= Nix-shell shebangs
You can use `nix-shell` to run scripts in arbitrary languages, providing
the necessary dependencies. This is particularly convenient for
@ -9,32 +9,6 @@ The script should start with two "`shebang`" (`#!`) commands. The first
should invoke `nix-shell`. The second should declares the scrpt
interpreter and any dependencies. Here are some examples.
=== A Bash script depending on a package in the nixpkgs repo.
include::bash-with-nix-pkg/main-generated.adoc[leveloffset=+1]
Script:
[source,bash,linenums]
....
include::bash-with-nixpkg.sh[]
....
Output:
....
$# ./bash-with-nixpkg.sh
....
=== A Python script depending on a package in the nixpkgs repo.
Script:
[source,bash,linenums]
....
include::python-with-nixpkg.sh[]
....
Output:
....
$# ./python-with-nixpkg.sh
....
include::python-with-nix-pkg/main-generated.adoc[leveloffset=+1]

View file

@ -1,11 +0,0 @@
#! /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)