datalad create -c yoda datalad installdatalad save -m "..."datalad run
for i in recordings/longnow/Long_Now__Seminars*/*.mp3; do
# get the filename
base=\$(basename "\$i");
# strip the extension
base=\${base%.mp3};
# date as yyyy-mm-dd
printf "\${base%%__*}\t" | tr '_' '-';
# name and title without underscores
printf "\${base#*__}\n" | tr '_' ' ';
done
⮊ A for loop in shell, will print each file name as
Date - Speaker - Title to the terminal.
⮊ Redirection to a file with > writes the stream to a file instead of the terminal.
⮊ Note: This could be any script or shell command!
commit f4a35c8841062eb58f65dbf3cde70ccdc3c9df68 (HEAD -> master)
Author: Adina Wagner adina.wagner@t-online.de
Date: Mon Nov 11 09:55:02 2019 +0100
[DATALAD RUNCMD] create a list of podcast titles
=== Do not change lines below ===
{
"chain": [],
"cmd": "bash code/list_titles.sh > recordings/podcasts.tsv",
"dsid": "02a84dae-faf5-11e9-ba9f-e86a64c8054c",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
diff --git a/recordings/podcasts.tsv b/recordings/podcasts.tsv
new file mode 100644
index 0000000..f691b53
--- /dev/null
+++ b/recordings/podcasts.tsv
@@ -0,0 +1,206 @@
+2003-11-15 Brian Eno The Long Now
+2003-12-13 Peter Schwartz The Art Of The Really Long View
+2004-01-10 George Dyson There s Plenty of Room at the Top Long term Thinking About Large scale Computing
[...]
It follows logically: If a command does not lead to any modification in a dataset, it will not be recorded!
datalad rerun f4a35c884106HEAD, ..., or
by giving a range of commits.datalad run records a commands impact on a dataset.datalad rerun can take any previous datalad run commit hash and re-execute it.datalad diff and git diff are useful helpers to explore changes between version states of a dataset.... but there is more that this command can do for you:
"convert -resize 400x400 recordings/longnow/.datalad/feed_metadata/logo_salt.jpg recordings/salt_logo_small.jpg"
[INFO ] == Command start (output follows) =====
convert-im6.q16: unable to open image `recordings/longnow/.datalad/feed_metadata/logo_salt.jpg': No such file or directory @ error/blob.c/OpenBlob/2874.
convert-im6.q16: no images defined `recordings/salt_logo_small.jpg' @ error/convert.c/ConvertImageCommand/3258.
[INFO ] == Command exit (modification check follows) =====
[INFO ] The command had a non-zero exit code. If this is expected, you can save the changes with 'datalad save -d . -r -F .git/COMMIT_EDITMSG'
CommandError: command 'convert -resize 400x400 recordings/longnow/.datalad/feed_metadata/logo_salt.jpg recordings/salt_logo_small.jpg' failed with exitcode 1
Failed to run 'convert -resize 400x400 recordings/longnow/.datalad/feed_metadata/logo_salt.jpg recordings/salt_logo_small.jpg' under '/demo/DataLad-101'. Exit code=1.
datalad unlock can unlock content for modification.datalad save will lock content again.Easy provanance capture!
--input and --outputdatalad run records a commands impact on a dataset.cp) in a datalad run,
and (later) also scripts of yoursdatalad run:
$ cat << EOT > notes.txt
One can create a new dataset with 'datalad create [--description] PATH'.
The dataset is created empty
EOT
<< characters redirect the stream into standard input for the cat command> character redirects the standard output of cat and writes it into a new file notes.txtWhy is it used?