diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c57067 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +./automation/bundle.tar.gz diff --git a/Pu240_798-811_TitovAA/166-74_h_Pu240_20-21/pattern_for_x.txt b/Pu240_798-811_TitovAA/166-74_h_Pu240_20-21/pattern_for_x.txt deleted file mode 100644 index 8963b5d..0000000 --- a/Pu240_798-811_TitovAA/166-74_h_Pu240_20-21/pattern_for_x.txt +++ /dev/null @@ -1,2 +0,0 @@ -RowBox[{"x", "=", - RowBox[{"Plot", "[", diff --git a/Pu240_798-811_TitovAA/174-66_h_Pu240_2-3/h_174-66_Pu240_2-3_фитирование.nb.old b/Pu240_798-811_TitovAA/174-66_h_Pu240_2-3/h_174-66_Pu240_2-3_фитирование.nb similarity index 100% rename from Pu240_798-811_TitovAA/174-66_h_Pu240_2-3/h_174-66_Pu240_2-3_фитирование.nb.old rename to Pu240_798-811_TitovAA/174-66_h_Pu240_2-3/h_174-66_Pu240_2-3_фитирование.nb diff --git a/automation/build_bundle.zsh b/automation/build_bundle.zsh new file mode 100755 index 0000000..1780d86 --- /dev/null +++ b/automation/build_bundle.zsh @@ -0,0 +1,36 @@ +#!/bin/zsh + +BOLD='\033[1m' +REGULAR='\033[0m' + +target_dir="Pu240_798-811_TitovAA" + +target_path=$(find ../ -type d -name "$target_dir" -print -quit) +read -r "USER_AGREE?%B$target_path%b will be used as bundle source [Y/n]: " + +USER_AGREE="${USER_AGREE:l}" + +if [[ "$USER_AGREE" == "q" ]]; then + print "Bundle\'s making canceled" + exit +fi + +if ! [[ -z "$USER_AGREE" || "$USER_AGREE" == "y" || "$USER_AGREE" == "yes" ]]; then + read -r "target_path?Enter path to bundle source: " +fi + +dirname="${target_path:A:t}" +tmp_dir=$(mktemp -d /tmp/XXXXX) +#tmp_dir="/tmp/bundle" +cp -r "$target_path" "$tmp_dir" + +for dir in "$tmp_dir/$dirname"/*(/); do + find "$dir" -type f -iname "rename*" -exec rm -f {} \; + /usr/bin/env python ./clean_wolfram_notebook.py "$dir"/* --in-place +done + +find "$tmp_dir" -type f -iname "*.bak" -exec rm -f {} \; + +tar -cvzf bundle.tar.gz -C "$tmp_dir" "$dirname" + +rm -rf "$tmp_dir" diff --git a/automation/bundle.tar.gz b/automation/bundle.tar.gz new file mode 100644 index 0000000..9c014e0 Binary files /dev/null and b/automation/bundle.tar.gz differ