From: Chris Koeritz Date: Thu, 9 Nov 2017 23:09:52 +0000 (-0500) Subject: some more renaming to challenge our update script X-Git-Tag: 2.140.90~7 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=931c5cb63fa4cd34379d0c010aaee18ad9909d8b;p=feisty_meow.git some more renaming to challenge our update script --- diff --git a/documentation/doc_fodder/bash_tools.html b/documentation/doc_fodder/bash_tools.html deleted file mode 100644 index 655b028c..00000000 --- a/documentation/doc_fodder/bash_tools.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - Feisty Meow Concerns Bash Scripts - - - - -

 

-
- - - - - - -
-
-

Feisty Meow ConcernsOpen Source Bash Scripts

-

GPL-Licensed Bash Code
-

-
-
Contributed by Chris Koeritz (Koeritz@Gruntose.COM)
-See the GNU Public -License for details of licensing.
-
-

Caveats: please refer to the Perl -Scripts page which shares the same constraints as these Bash -Scripts do.
-

- Direct Cognition: -View the scripts directory itself rather than navigating with the links -below: scripts. -
    -
-
-
-

 

-
- - - - - - -
-

Assorted Bash Script Files

-
-

uhh.sh

-
This documentation page isn't quite ready yet.
-In fact, this file is still in its very first few iterations and is -pretty -limited so far...
-
-

-

movie_seeker.sh -/ movie_stripper.sh -/ show_stripper.sh
-

-
Some manipulation methods for a -particular type of movie and TV show database.  These expect a db -in the form of a CSV file with three fields per line: (1) index number, -(2) show or movie name and (3) show episode title.  The third -field is defined as blank for movies.  The movie_seeker finds a -given movie (or pattern) in the database.  The movie_stripper -pulls out all the unique movie or show names in the database.  The -show_stripper pulls out the episode names for a particular show name -(or pattern).
-
-

call_movie_seeker.sh -/ call_movie_stripper.sh -/ call_show_stripper.sh
-

-
These are CGI correspondents to -the above movie database searches.  They're used on the Gruntose -web site.
-
-
-
-
-
-
-
-
-
- - diff --git a/documentation/doc_fodder/perl_tools.html b/documentation/doc_fodder/perl_tools.html deleted file mode 100644 index 8eaad288..00000000 --- a/documentation/doc_fodder/perl_tools.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - - - - Feisty Meow Concerns Perl Scripts - - - - -

 

-
- - - - - - -
-
-

Feisty Meow Concerns Codebase Open Source Perl -Scripts

-

Some Hopefully Useful GPL-Licensed Perl Code
-

-
-
Contributed by Chris Koeritz (Koeritz@Gruntose.COM)
-See the GNU Public -License for details of licensing.
-
-

Caveats:

-
    -
  1. No warranty, express, implied or imagined, is offered for -these files.  If you destroy your life by running one of them, I -will have sympathy, but that's about it.
  2. -
  3. Some of these shell scripts depend on environment variables.  -The most frequent case of this is FEISTY_MEOW_APEX, which should point to the -top-level -directory where the Feisty Meow scripts are stored on your -machine.   This variable is set by default when the scripts are in -the ~/feisty_meow folder.  Consult your operating -system documentation if you are -unfamiliar with the concept or management of environment variables.
  4. -
  5. These files are provided as possibly useful shell scripts -rather than as full-fledged reusable and object oriented components.
  6. -
  7. Improvements and contributions are gladly accepted.  -They will be processed as fast as our schedule permits.  Please -send any changes to the Gruntose Curator at fred@gruntose.com .
  8. -
  9. These files are mostly portable between Unix and the -various Windoze OSes, but in many cases you may want to fix the -defaults or path names to make them more suitable for your own needs.
  10. -
  11. Some of the scripts invoke external programs that are -available for most Unixes.  For Windoze users, a set of GNU Unix -utilities is available at "http://www.mingw.org/".
  12. -
  13. An alternative, but not recommended, GNU suite is -at "http://www.cygwin.com/".
  14. -
  15. Direct Cognition: -View the scripts directory itself rather than navigating with the links -below: scripts.
  16. -
-
-
-

 

-
- - - - - - -
-

Library Files
-

-
-

diff_lib.pl

-
The "differ" utilities can be used to compare two -directories of text or binary files against each other.  The two -directories are presumably close in contents.  This can be useful -when one is revising a set of files and wants to synchronize an older -copy against a newer version.  Support for "differ.pl" -is provided -here.
-

filename_helper.pl

-
Contains a handy set of utilities for manipulating -filenames.  These can help to make perl scripts portable across -the two well-known types of filename separators ('/' and '\').  -They also provide support for ripping up filenames into their -components.
-

inc_num.pl

-
This is a simple utility that manages a file with a -number in it.  This is somewhat more useful than it sounds.  -Functions are provided to get the current number and to change the -number.
-

-

shared_snarfer.pl

-
This library supports the "snarf" utilities.  -The -utilities manipulate archive files with the ".snarf" extension.  -These -packed -snarf files are compressed chunks of directory hierarchies.  Bob -files -are useful because they track a number per distinct "snarf" types that -is -used to make uniquely named new archives of the appropriate type.  -This -number is an ever increasing integer that's stored in a well-known -(configurable) location.  When a snarf file is unpacked (using the -"unsnarf" tool), the number is updated on the local machine so that the -next generated file will -be one greater than the previous number.  If one is travelling -between -two machines with the same snarf file, this will have the effect of -keeping -the number updated on both sides. -
-

zap_the_dir.pl

-
Support for the zapdirs utility.  This library -cleans out the directory that it is passed by removing files that are -not considered important (using "filename_helper.pl -").  The list of important files is something you might want to -look at to ensure that you won't get burned by zapdirs.
-
-
-
-

 

-
- - - - - - -
-

Applications

-
-

add_cr.pl

-
Processes Unix format text files for pcdos by -forcing the line endings to be Carriage Return plus Line Feed (CRLF).
-

-

cgi_display.pl

-
Turns the files passed on the command line into a -stream of CGI compatible text output. The javascript show_file method -(see the -source for this page) is preferred since it is lighter weight and -doesn't -need cgi, but there are some situations where cgi is the only option -(older -browsers or requirements of no javascript).
-

-

change_endings.pl

-
Replaces the suffix of all filenames in the current -directory -with a different suffix.  Suffix here is defined as the set of -characters -after the last period ('.') in the name.  Note this will not work -for -names without suffices.
-

-

cpdiff.pl

-
Copies files from a source directory into a -destination directory.  The files are only copied when they are -missing in the destination or when the destination version has -different contents.  The syntax looks like this:
-    cpdiff  source  destination
-The assumption is that the files in the source directory are somehow -better, newer or more complete than the set of files in the destination.
-
-

cpdiffnow.pl

-
Similar to cpdiff, but this utility sets the -destination file's time stamp to "now".  This should cause the new -or changed files in the destination directory to be more recent than -anything else in there.  This is helpful sometimes for forcing -compilation of modified source files.
-
- -

-

differ.pl

-
Compares two directory hierarchies and the files -they -contain.  The first parameter is a directory -to compare against "this" directory; -every subdirectory "here" will be traversed in order to build the -output file that shows the differences.  An optional second -argument can be used to specify a different directory than the current -one as the source of the comparison (the first argument is always the -destination of the comparison).
-

filedump.pl

-
Collects the contents of the files whose names are -passed on the command line into one gigundo stream which is passed to -standard output. The output can be piped into another file as desired.
-

generate_aliases.pl

-
Performs some useful activities for the shell -environment.  Using the environment variable for FEISTY_MEOW_SCRIPTS (which -is set in the appropriate startup files to be the shell scripts -directory, where all this stuff lives), generate_aliases will create -all of the aliases files for the combinations of operating systems and -types of shells supported.  Currently this includes Linux, Unix, -PCDOS, OS/2 and MS-WIN32 (9x, NT, 2K, XP, etc) for -supported operating systems.  The shell languages supported are -dos's command, nt's cmd, unix's sh and bash, and perl.  This script will also look for -any files ending in ".sh" or ".pl" and it will create aliases for them -in forms appropriate to the different shells.  The .zz_feisty_loading -subdirectory is created under the home directory as a storage place for the generated script -files.
-

-

new_sig.pl

-
Generates a signature file from the nechung -database -using the 'nechung' application.  See the Feisty Meow Concerns Codebase for the nechung -application. - The database for nechung resides in the whole Feisty Meow Concerns code package in "feisty_meow/infobase".
-

-

renlower.pl

-
Renames all of the files passed on the command line -such that they are only in lower-case.  Useful if you're tired of -passing mistakenly re-capitalized names from a defective 8.3 OS (e.g. -Doze95/98) to -a file system where you care about the case.
-

runner.pl

-
Finds all executable files in the current directory -(and subdirectories) and runs them.  The output of the programs is -sent to standard output.  Standard error is used to report which -file is being worked on, plus the running programs' own standard error -streams are merged into runner's standard error stream.  This -makes it nice to do something like:
-       runner >runs.log
-where the runs.log file will contain the output of each program that -was executed and the console will be sent messages as each program is -started and finished (and errors show up at the console also).
-
-

safedel.pl

-
Makes deleting files and directories a little less -nerve-wracking.  If you substitute safedel as an alias for rm or -del or deltree or whatever, it will make a zipped backup of the items -before they are actually deleted.  Safedel keeps track of a number -that is attached to each zip to enforce uniquely numbered -archives.  They are stored in a directory named "zz_safedel_keep" -that is stored under the temorary directory (specified by the -environment -variable named TMP).  A report of the contents of the compressed -trash -is appended to a file named "zz_safedel.rpt" in the TMP directory.  -Occasional -cleaning of the deleted files folder is recommend, but this utility has -saved -my various parts several times already.
-

-

-

snarf_linux_config.pl

-
A snarf utility that packages up the -important configuration files in a Linux installation.
-

-

snarf_light.pl

-
A selective snarf of the source hierarchy.  -This -collects the code that I manage.  As such, this is probably -irrelevant to anyone but CAK.
-

snarf_notes.pl

-
Gathers all "important" files from the home -directory. - This -is somewhat personally tuned but it includes files and directories that -have -"project", "notes", or "crucial" in their name.
-

-

snarf_src.pl

-
A source code grabbing snarfer.  The entire -source -code hierarchy is snarfed.  Note that one should edit the -hierarchy -location to make it appropriate for your local source code.
- -

summing_dir.pl

-
Offers a directory listing along with total file -sizes -and disk free space.
-
-
-

synch_build.pl

-
This is a helper utility that synchronizes the binary -outputs from a build process with an existing installed location.  Given a target directory, the executable -programs and dynamic libraries that exist there will be synchronized -with the build repository's versions.  This is kind of a quickie -upgrade process, as long as the files in the target location are not -locked by other processes.
-
-

unsnarf.pl

-
Uses the snarfer utilities to undo a previously -snarfed file.  A folder named "snarf_BASE" is created for the -contents, where BASE -is replaced with the basename of the snarf file (that is, without the -".snarf" -suffix).  The number that tracks the snarf files of this type is -updated -such that the next snarf file will be at least one higher than this -snarf's -sorta -unique number.  The number will be managed correctly if you're -always -unsnarfing the most recent snarf files before creating any new snarfs.
-

-

whack_forever.pl

-
Since all of my file deletion commands are aliases -to safedel, it is hard to actually remove a -file.  If I'm really really sure that a file or directory needs to -be -permanently deleted, then this command can be used.  It shows the -names -it is removing also, but it does _not_ ask for confirmation.
-

-

y2038_check.pl

-
Tests the system for survival -past the year 2038, which is when the Unix time scale runs out of bits -for the number of seconds since 1970 measured in a 32 bit integer.
-
-

zapdirs.pl

-
Removes empty directories and directories -containing only -unimportant crud (see "filename_helper.pl").  -If there are no arguments, then the current directory is cleaned up; -any subdirectories -will be traversed into and removed if it seems appropriate.  -Otherwise, -zapdirs operates on the arguments passed to it as if they are directory -names -to be cleaned.
-
-
-

 

-
- - diff --git a/documentation/doc_fodder/readme.txt b/documentation/doc_fodder/readme.txt deleted file mode 100644 index 7194c944..00000000 --- a/documentation/doc_fodder/readme.txt +++ /dev/null @@ -1,3 +0,0 @@ - - -these are bits of documentation that could be scavenged. diff --git a/documentation/history_anat.txt b/documentation/history_anat.txt index 216407a7..6f727015 100644 --- a/documentation/history_anat.txt +++ b/documentation/history_anat.txt @@ -74,7 +74,7 @@ octopi/ Octopus design pattern and CROMP protocol reference implementations. Assorted applications based on these. -database/ +infabase/ Some files considered critical to the operations of Feisty Meow Concerns Ltd. This includes the database of fortunes used by the Nechung Oracle Program. diff --git a/scripts/core/common.alias b/scripts/core/common.alias index bb3f4a5a..1a830c84 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -40,6 +40,7 @@ else fi # re-use work we did on 'exp' macro for the longer windows command. define_yeti_alias explorer=exp +define_yeti_alias fix_ssh_perms='chmod 700 $HOME/.ssh ; chmod 600 $HOME/.ssh/*' define_yeti_alias halt='sudo shutdown -h now' define_yeti_alias i=inventory define_yeti_alias l='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl' diff --git a/scripts/database/call_movie_seeker.sh b/scripts/database/call_movie_seeker.sh deleted file mode 100644 index 1240c709..00000000 --- a/scripts/database/call_movie_seeker.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# processes cgi request and passes it on to the real script. - -movie_name="$(echo $QUERY_STRING | sed -e "s/^[^=][^=]*=\(.*\)$/\1/" | sed -e "s/\+/ /g")" -vids="$DOCUMENT_ROOT/Info/Quartz/video/video_tapes.csv" - -randof="$(mktemp "$TMP/zz_randocgi.XXXXXX")" - -bash movie_seeker.sh "$vids" "$movie_name" &>"$randof" - -if [ -s "$randof" ]; then - - echo "Content-type: text/plain" - echo "" - echo "" - cat "$randof" - -else - - echo "Content-type: text/html" - echo "" - echo "" - cat /home/www-data/feisty_meow/infobase/pictures/no_matches.html - -fi - -rm "$randof" - - diff --git a/scripts/database/call_movie_stripper.sh b/scripts/database/call_movie_stripper.sh deleted file mode 100644 index c8dd9fa1..00000000 --- a/scripts/database/call_movie_stripper.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# processes cgi request and passes it on to the real script. - -vids="$DOCUMENT_ROOT/Info/Quartz/video/video_tapes.csv" - -echo "Content-type: text/plain" -echo "" -echo "" -bash movie_stripper.sh "$vids" "$movie_name" - diff --git a/scripts/database/call_show_stripper.sh b/scripts/database/call_show_stripper.sh deleted file mode 100644 index 7a662475..00000000 --- a/scripts/database/call_show_stripper.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# processes cgi request and passes it on to the real script. - -show_name="$(echo $QUERY_STRING | sed -e "s/^[^=][^=]*=\(.*\)$/\1/" | sed -e "s/\+/ /g")" -vids="$DOCUMENT_ROOT/Info/Quartz/video/video_tapes.csv" - -randof="$(mktemp "$TMP/zz_randocgi.XXXXXX")" - -bash show_stripper.sh "$vids" "$show_name" &>"$randof" - -if [ -s "$randof" ]; then - - echo "Content-type: text/plain" - echo "" - echo "" - cat "$randof" - -else - - echo "Content-type: text/html" - echo "" - echo "" - cat /home/www-data/feisty_meow/infobase/pictures/no_matches.html - -fi - -rm "$randof" - diff --git a/scripts/database/movie_seeker.sh b/scripts/database/movie_seeker.sh deleted file mode 100644 index eccd0e58..00000000 --- a/scripts/database/movie_seeker.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -if [ -z "$1" -o -z "$2" ]; then - echo You must supply a file name that has a movie database in it and a movie - echo or show name to search for. Example: - echo 'movie_seeker "$HOME/moviedb.txt" "star trek"' - exit 2 -fi -SEEKING="$2" -if [ -z "$SEEKING" ]; then - SEEKING='.\\*' -fi -#echo "pattern is $SEEKING" -cat "$1" | grep -v '","[^"]*","[^"]' | sed -e 's/^\"\([a-zA-Z0-9][a-zA-Z0-9 ]*\)\",\"\([^\"][^\"]*\)\".*$/\2 [\1]/' | grep -i "$SEEKING" | sort | uniq - diff --git a/scripts/database/movie_stripper.sh b/scripts/database/movie_stripper.sh deleted file mode 100644 index b8c961ff..00000000 --- a/scripts/database/movie_stripper.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -if [ -z "$1" ]; then - echo You must supply a file name to strip out the unique movie or show - echo names from... - exit 2 -fi -cat "$1" | sed -e 's/^\"\([a-zA-Z0-9][a-zA-Z0-9 ]*\)\",\"\([^\"][^\"]*\)\".*$/\2/' | sort | uniq - - diff --git a/scripts/database/show_stripper.sh b/scripts/database/show_stripper.sh deleted file mode 100644 index ee719ee3..00000000 --- a/scripts/database/show_stripper.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -if [ -z "$1" -o -z "$2" ]; then - echo "This program accepts a file name with CSV formatted movie database" - echo "information and extracts a particular show's episodes. You need to" - echo "provide the file name as the first parameter and the show name as" - echo "the second parameter." - exit 2 -fi -cat "$1" | grep -i "$2" | sed -n -e 's/^\"\([a-zA-Z0-9][a-zA-Z0-9 ]*\)\",\"\([^\"][^\"]*\)\",\"\([^\"][^\"]*\)\"$/"\2" -- \3 [\1]/p' | grep -i ".*$2.* -- " | sort | uniq - - diff --git a/scripts/rip_burn/blu_burn.sh b/scripts/rip_burn/blu_burn.sh index 096b47d3..33317c0e 100644 --- a/scripts/rip_burn/blu_burn.sh +++ b/scripts/rip_burn/blu_burn.sh @@ -1,5 +1,7 @@ #!/bin/bash +# burns a bluray disc image onto a physical medium. + function show_usage() { echo "This script needs two parameters, (1) an ISO file that provides the" diff --git a/scripts/show_db/call_movie_seeker.sh b/scripts/show_db/call_movie_seeker.sh new file mode 100644 index 00000000..1240c709 --- /dev/null +++ b/scripts/show_db/call_movie_seeker.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# processes cgi request and passes it on to the real script. + +movie_name="$(echo $QUERY_STRING | sed -e "s/^[^=][^=]*=\(.*\)$/\1/" | sed -e "s/\+/ /g")" +vids="$DOCUMENT_ROOT/Info/Quartz/video/video_tapes.csv" + +randof="$(mktemp "$TMP/zz_randocgi.XXXXXX")" + +bash movie_seeker.sh "$vids" "$movie_name" &>"$randof" + +if [ -s "$randof" ]; then + + echo "Content-type: text/plain" + echo "" + echo "" + cat "$randof" + +else + + echo "Content-type: text/html" + echo "" + echo "" + cat /home/www-data/feisty_meow/infobase/pictures/no_matches.html + +fi + +rm "$randof" + + diff --git a/scripts/show_db/call_movie_stripper.sh b/scripts/show_db/call_movie_stripper.sh new file mode 100644 index 00000000..c8dd9fa1 --- /dev/null +++ b/scripts/show_db/call_movie_stripper.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# processes cgi request and passes it on to the real script. + +vids="$DOCUMENT_ROOT/Info/Quartz/video/video_tapes.csv" + +echo "Content-type: text/plain" +echo "" +echo "" +bash movie_stripper.sh "$vids" "$movie_name" + diff --git a/scripts/show_db/call_show_stripper.sh b/scripts/show_db/call_show_stripper.sh new file mode 100644 index 00000000..7a662475 --- /dev/null +++ b/scripts/show_db/call_show_stripper.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# processes cgi request and passes it on to the real script. + +show_name="$(echo $QUERY_STRING | sed -e "s/^[^=][^=]*=\(.*\)$/\1/" | sed -e "s/\+/ /g")" +vids="$DOCUMENT_ROOT/Info/Quartz/video/video_tapes.csv" + +randof="$(mktemp "$TMP/zz_randocgi.XXXXXX")" + +bash show_stripper.sh "$vids" "$show_name" &>"$randof" + +if [ -s "$randof" ]; then + + echo "Content-type: text/plain" + echo "" + echo "" + cat "$randof" + +else + + echo "Content-type: text/html" + echo "" + echo "" + cat /home/www-data/feisty_meow/infobase/pictures/no_matches.html + +fi + +rm "$randof" + diff --git a/scripts/show_db/movie_seeker.sh b/scripts/show_db/movie_seeker.sh new file mode 100644 index 00000000..eccd0e58 --- /dev/null +++ b/scripts/show_db/movie_seeker.sh @@ -0,0 +1,14 @@ +#!/bin/bash +if [ -z "$1" -o -z "$2" ]; then + echo You must supply a file name that has a movie database in it and a movie + echo or show name to search for. Example: + echo 'movie_seeker "$HOME/moviedb.txt" "star trek"' + exit 2 +fi +SEEKING="$2" +if [ -z "$SEEKING" ]; then + SEEKING='.\\*' +fi +#echo "pattern is $SEEKING" +cat "$1" | grep -v '","[^"]*","[^"]' | sed -e 's/^\"\([a-zA-Z0-9][a-zA-Z0-9 ]*\)\",\"\([^\"][^\"]*\)\".*$/\2 [\1]/' | grep -i "$SEEKING" | sort | uniq + diff --git a/scripts/show_db/movie_stripper.sh b/scripts/show_db/movie_stripper.sh new file mode 100644 index 00000000..b8c961ff --- /dev/null +++ b/scripts/show_db/movie_stripper.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [ -z "$1" ]; then + echo You must supply a file name to strip out the unique movie or show + echo names from... + exit 2 +fi +cat "$1" | sed -e 's/^\"\([a-zA-Z0-9][a-zA-Z0-9 ]*\)\",\"\([^\"][^\"]*\)\".*$/\2/' | sort | uniq + + diff --git a/scripts/show_db/show_stripper.sh b/scripts/show_db/show_stripper.sh new file mode 100644 index 00000000..ee719ee3 --- /dev/null +++ b/scripts/show_db/show_stripper.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [ -z "$1" -o -z "$2" ]; then + echo "This program accepts a file name with CSV formatted movie database" + echo "information and extracts a particular show's episodes. You need to" + echo "provide the file name as the first parameter and the show name as" + echo "the second parameter." + exit 2 +fi +cat "$1" | grep -i "$2" | sed -n -e 's/^\"\([a-zA-Z0-9][a-zA-Z0-9 ]*\)\",\"\([^\"][^\"]*\)\",\"\([^\"][^\"]*\)\"$/"\2" -- \3 [\1]/p' | grep -i ".*$2.* -- " | sort | uniq + +