bookmark tools have been improved for parsing links and generating a firefox compatible
web page. new fortunes. differ has had some knowledge of git repositories added.
clam changes assorted.
#define INCREM_N_GO { curr_index++; continue; }
// puts the current character on the intermediate string.
-#define ADD_INTERMEDIATE \
- intermediate_text += full_contents[curr_index]
+#define ADD_INTERMEDIATE { \
+ char add_in = full_contents[curr_index]; \
+ if ( (add_in == '<') || (add_in == '>') ) { \
+ add_in = '-'; \
+ } \
+ intermediate_text += add_in; \
+}
// returns a character in lower-case, if 'a' is in upper case.
char normalize_char(char a)
/* clean naughty characters out of the names. */ \
CLEAN_UP_NAUGHTY(url_string); \
CLEAN_UP_NAUGHTY(name_string); \
- if (url_string.ends(name_string)) { \
- /* handle the name being boring. replace with the intermediate text. */ \
- MAKE_MORE_ENGLISH(intermediate_text); \
- strain_out_html_codes(intermediate_text); \
- CLEAN_UP_NAUGHTY(intermediate_text); \
- if (intermediate_text.length()) \
- name_string = intermediate_text; \
- } \
/* output a link in the HOOPLE format. */ \
astring to_write = "\"L\",\""; \
to_write += translate_web_chars(name_string); \
output_file.write(to_write); \
_link_count++; \
}
+//was after second clean up naughty
+/*argh yuck... if (url_string.ends(name_string)) { \
+ / * handle the name being boring. replace with the intermediate text. * / \
+ MAKE_MORE_ENGLISH(intermediate_text); \
+ strain_out_html_codes(intermediate_text); \
+ CLEAN_UP_NAUGHTY(intermediate_text); \
+ if (intermediate_text.length()) \
+ name_string = intermediate_text; \
+ } \
+*/
// writes out the current section in the HOOPLE format.
// currently the parent category is set to Root.
CLEAN_UP_NAUGHTY(last_heading); /* clean the name. */ \
/* output a category definition. */ \
astring to_write = "\"C\",\""; \
- to_write += last_heading; \
+ to_write += translate_web_chars(last_heading); \
to_write += "\",\""; \
to_write += abbreviate_category(last_parents.top()); \
to_write += "\"\n"; \
{
astring to_return = vervoom;
to_return.replace_all("&", "&");
+ to_return.replace_all("ä", "ä");
+ to_return.replace_all("©", "(c)");
+ to_return.replace_all("é", "é");
+ to_return.replace_all("«", "--");
+ to_return.replace_all("‘", "'");
+ to_return.replace_all("“", "'");
+ to_return.replace_all("—", "--");
+ to_return.replace_all("–", "--");
+ to_return.replace_all(" ", " ");
+ to_return.replace_all("»", "--");
+ to_return.replace_all("”", "'");
+ to_return.replace_all("’", "'");
+
to_return.replace_all("%7E", "~");
+ to_return.replace_all("%28", "(");
+ to_return.replace_all("%29", ")");
return to_return;
}
#ifdef DEBUG_LINK_PARSER
LOG("into the not an '<a' case");
#endif
- intermediate_text += '<';
- JUMP_TO_CHAR('>', true);
+// intermediate_text += '<';
+ JUMP_TO_CHAR('>', false);
continue;
}
#ifdef DEBUG_LINK_PARSER
// found an a, but make sure that's the only character in the word.
curr_index++;
if (!parser_bits::white_space(full_contents[curr_index])) {
- intermediate_text += "<a";
- JUMP_TO_CHAR('>', true);
+// intermediate_text += "<a";
+ JUMP_TO_CHAR('>', false);
continue;
}
// this looks like an address so find the start of the href.
using namespace textual;
using namespace timely;
-#define DEBUG_MARKS
+//#define DEBUG_MARKS
// uncomment to have more debugging noise.
#undef BASE_LOG
#include <basis/guards.h>
#include <basis/utf_conversion.h>
#include <configuration/application_configuration.h>
+#include <filesystem/filename.h>
#include <loggers/critical_events.h>
#include <stdio.h>
PROJECT = clam_tools
TYPE = application
DEFINITIONS += __BUILD_STATIC_APPLICATION__
-LIBS_USED += pthread
+
+# why was that there?
+#LIBS_USED += pthread
+#
+
ifeq "$(OMIT_VERSIONS)" ""
SOURCE += clamtools_version.rc
endif
practitioner of initial perspective.(p.117)
-- H.H. the Dalai Lama, "The Path to Enlightenment", edited and translated
by Glenn H. Mullin, published by Snow Lion Publications
+~
+ When doing lamrim meditations, it is important to know clearly the state of
+mind you want to reach as a conclusion to the meditation. Lamrim texts
+describe the purpose of each meditation, and we want to make sure that our
+mind arrives at that conclusion and not at an incorrect or irrelevant
+conclusion. For example, when meditating on the disadvantages of the self-
+centered thought, our mind may twist that meditation and conclude, "I'm a
+horrible person because I'm so selfish." This is the wrong conclusion to reach
+from that meditation. The Buddha didn't teach the disadvantages of self-
+centeredness so that we would deride ourselves.
+ If you meditate on a lam rim topic and arrive at an incorrect conclusion,
+the meditation hasn't been done correctly. In the above case, thinking, "I'm
+a bad person because I'm so selfish," indicates that we have misunderstood the
+purpose of the meditation and probably have fallen into an old pattern of
+putting ourselves down. Stop and ask yourself,
+ "What conclusion does the Buddha want me to reach from this meditation? He
+wants me to ascertain that the self-centered mind is the actual 'enemy' that
+destroys my happiness. Self-centeredness is not an intrinsic part of me; it
+is not who I am. It's an incorrect, but deeply entrenched, thought that
+creates problems for me. I can free myself from it. Since I want to be
+happy, I will realize this selfish attitude for what it is and will stop
+following it! Instead, I will cultivate love and compassion for all beings."
+ This is the conclusion you want to reach.(p.58)
+ -- Bhikshuni Thubten Chodron, "Guided Meditations on the Stages of the
+ Path", foreword by His Holiness the Dalai Lama, published by Snow Lion
+~
+ Greed is a form of desire. However, it is an exaggerated form of desire,
+based on overexpectation. The true antidote of greed is contentment.
+ For a practicing Buddhist, for a Dharma practitioner, many practices can act
+as a kind of counterforce to greed: the realization of the value of seeking
+liberation or freedom from suffering, recognizing the underlying
+unsatisfactory nature of one's existence, and so on. These views also help an
+individual to counteract greed. But in terms of an immediate response to
+greed, one way is to reflect upon the excesses of greed, what it does to one
+as an individual, where it leads. Greed leads one to a feeling of
+frustration, disappointment, a lot of confusion, and a lot of problems.
+ When it comes to dealing with greed, one thing which is quite characteristic
+is that although it arises from the desire to obtain something, it is not
+satisfied by obtaining it. Therefore, it becomes limitless or boundless, and
+that leads to trouble. The interesting thing about greed is that although the
+underlying motive is to seek satisfaction, as I pointed out, even after
+obtaining the object of one's desire, one is still not satisfied. On the
+other hand, if one has a strong sense of contentment, it doesn't matter
+whether one obtains the object or not; either way, one is still content.(p.32)
+ -- H.H. the Dalai Lama, "Healing Anger: The Power of Patience from a
+ Buddhist Perspective", translated by Geshe Thupten Jinpa, published by
+ Snow Lion Publications
[version]
# specifies the version of the code that is being constructed here.
major=2
-minor=108
-revision=87
+minor=130
+revision=1
build=0
# specifies the remainder of the version record info.
company=Feisty Meow Concerns, Ltd.
-copyright=(C) 1987-2010 Chris Koeritz & Others, under GNU GPL License
+copyright=(C) 1987-$now Chris Koeritz & Others, under GNU GPL License
legal_info=This software is free to copy under the terms of the GNU GPL (or the GNU Library License if you prefer). See http://www.gnu.org/licenses/gpl.html for more info. We suggest peaceful purposes that help all sentient beings.
product_name=feisty_meow
web_site=http://feistymeow.org
require "inc_num.pl";
use Cwd;
+use File::Which;
#hmmm: maybe move this to a utility script file.
$null_log = "/dev/null";
#print "excludes list=@excludes\n";
# generic versions work on sane OSes.
-$find_tool = `which find`; chop $find_tool;
-$tar_tool = `which tar`; chop $tar_tool;
-
-# pick a more specific version for windows.
-if ( ("$OS" =~ /[wW][iI][nN]/) || ("$OS" =~ /[Oo][Ss]2/)
- || ("$OS" =~ /[Dd][Oo][Ss]/) ) {
- $top_level = "$BUILD_TOP";
- $msys_folder = "$top_level/build/msys/bin";
- $find_tool = "$msys_folder/find.exe";
- $tar_tool = "$msys_folder/tar.exe";
-}
-
+$find_tool = which('find');
+$tar_tool = which('tar');
#print "find tool: $find_tool\n";
#print "tar tool: $tar_tool\n";
# a timestamp and hostname.
sub snarf_prefix {
local($base) = @_;
- local($extra_path) = "";
+ $date_tool = "date";
+
if ($OS =~ /win/i) {
- if (length($MINGBIN)) {
- # we rely on the ming binary path on windows, since otherwise a strange
- # interaction between perl and windowz causes 'date' to use the retarded
- # windows date program, even with the ming binaries in the path before
- # the windows directory.
- $extra_path = "$MINGBIN/";
-#print "ming path here is:\n$MINGBIN\n";
- } else {
- # just hope that this is running under msys in our build bin.
- $extra_path = "$HOME/hoople2/build/msys/bin/";
- }
+ # just hope that this is running under msys in our build bin.
+ $date_tool = "$PRODUCTION_DIR/msys/bin/date";
}
- local($date_part) = `${extra_path}date +%Y-%m-%d-%H%M`;
+ local($date_part) = `$date_tool +%Y-%m-%d-%H%M`;
while ($date_part =~ /[\r\n]$/) { chop $date_part; }
local($host) = &short_hostname();
while ($host =~ /[\r\n]$/) { chop $host; }
LOCAL_HEADERS += $(THIRD_PARTY_DIR)/openssl/include
LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/openssl/lib
LIBS_USED += libeay32.lib
+ $(shell cp $(THIRD_PARTY_DIR)/openssl/lib/*dll $(EXECUTABLE_DIR) )
endif
endif
-$(HIDESH)$(CLAM_DIR)/cpp/preconditions.sh
@touch $@
# @echo dep adds: $(DEPENDENCY_ADDITIONS)
+ @echo clam bin here is $(CLAM_BIN)
@$(CLAM_BIN)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS)
# $(CATCHER)$(CLAM_BIN)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS)
@echo $@ >$(SUBMAKE_FLAG)
# set the CPU to a default if it has not been set previously.
ifeq "$(BASE_CPU)" ""
- ifneq "$(OP_SYSTEM)" "WIN32"
- BASE_CPU := $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686)
- endif
- ifeq "$(BASE_CPU)" ""
+# ifneq "$(OP_SYSTEM)" "WIN32"
+ BASE_CPU := $(shell machine 2>/dev/null || arch 2>/dev/null || uname -m 2>/dev/null || echo i686)
+# endif
+
+# ifeq "$(BASE_CPU)" ""
# BASE_CPU := $(shell uname -m)
- BASE_CPU := $(shell arch)
- ifeq "$(BASE_CPU)" ""
- # failed to get the cpu type.
- BASE_CPU := x86
- endif
- endif
+# BASE_CPU := $(shell arch)
+# ifeq "$(BASE_CPU)" ""
+# # failed to get the cpu type.
+# BASE_CPU := x86
+# endif
+# endif
endif
# COMPILER is a flag that specifies the compiler that will be used to build
# "THIRD_PARTY_DIR" is the root of our support libraries.
export THIRD_PARTY_DIR
ifeq "$(THIRD_PARTY_DIR)" ""
- export THIRD_PARTY_DIR := $(shell bash -c '\
- if [ -d "$(REPOSITORY_DIR)/3rdparty" ]; then \
- echo "$(REPOSITORY_DIR)/3rdparty"; \
- elif [ -d "$(REPOSITORY_DIR)/libraries/3rdparty" ]; then \
- echo "$(REPOSITORY_DIR)/libraries/3rdparty"; \
- else \
- echo ""; \
- fi')
+ export THIRD_PARTY_DIR := "$(PRODUCTION_DIR)/3rdparty"
endif
# "OUTPUT_ROOT" is the root of all output directories for objects and other
endif
# "CLAM_BIN" points at the location for helper binaries and shell scripts.
-ifeq "$(OP_SYSTEM)" "UNIX"
- export CLAM_BIN = $(PRODUCTION_DIR)/clam_bin
-endif
+export CLAM_BIN = $(PRODUCTION_DIR)/clam_bin
# "CURRENT_DIR" is the directory where this make was started.
export CURRENT_DIR := $(shell pwd)
# shell startup. that can be added manually by editing your .bashrc file.
# read the examples/bashrc_user file for more details.
-YETI_CORE_SCRIPTS_DIR="$(dirname "$0" | tr '\\\\' '/' )"
+ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && \pwd )"
+YETI_CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
THIS_TOOL_NAME="$(basename "$0")"
-# check this scripts directory; do we find this script there?
-pushd "/" &>/dev/null # jump to root so relative paths have to fail.
-if [ ! -f "$YETI_CORE_SCRIPTS_DIR/$THIS_TOOL_NAME" ]; then
- echo "This script must be run using its full pathname. This enables the script to"
- echo "locate the proper folders. Please try again with the full path, e.g.:"
- echo " bash /home/fred/codeplex/$THIS_TOOL_NAME"
- exit 1
-fi
-popd &>/dev/null
-
-# set up the yeti dir if it's not already defined.
+## check this scripts directory; do we find this script there?
+#pushd "/" &>/dev/null # jump to root so relative paths have to fail.
+#if [ ! -f "$YETI_CORE_SCRIPTS_DIR/$THIS_TOOL_NAME" ]; then
+# echo "This script must be run using its full pathname. This enables the script to"
+# echo "locate the proper folders. Please try again with the full path, e.g.:"
+# echo " bash /home/fred/codeplex/$THIS_TOOL_NAME"
+# exit 1
+#fi
+#popd &>/dev/null
+
+# set up the yeti dir.
pushd "$YETI_CORE_SCRIPTS_DIR/../.." &>/dev/null
export YETI_DIR="$(pwd)"
popd &>/dev/null
# signals that we're doing a fresh build to the variables script.
export INCLUDED_FROM_BOOTSTRAP=true
# pull in our build variables using the path to this script.
-export BUILD_SCRIPTS_DIR="$(dirname "$0")"
+export BUILD_SCRIPTS_DIR="$( \cd "$(\dirname "$0")" && \pwd )"
+echo build script initial from bootstrap: $BUILD_SCRIPTS_DIR
BUILD_SCRIPTS_DIR="$(echo $BUILD_SCRIPTS_DIR | tr '\\\\' '/' )"
+echo build script after: $BUILD_SCRIPTS_DIR
# drop any previous version of the repository variable.
unset REPOSITORY_DIR
-source "$BUILD_SCRIPTS_DIR/build_variables.sh"
+source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
##############
bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean
# recreate our useful waste directories and other things...
-source "$BUILD_SCRIPTS_DIR/build_variables.sh"
+source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
toolset_names=(makedep value_tagger version_stamper vsts_version_fixer write_build_config short_path sleep_ms zap_process playsound create_guid)
# use the first real parameter since this is probably the 'source' version.
export BUILD_SCRIPTS_DIR="$(dirname "$PARM_1")"
THIS_TOOL_NAME="$(basename "$PARM_1")"
+echo sourced version buildscriptsdir is $BUILD_SCRIPTS_DIR
else
# use the zeroth parameter, since we know nothing more about our name.
export BUILD_SCRIPTS_DIR="$(dirname "$PARM_0")"
THIS_TOOL_NAME="$(basename "$PARM_0")"
+echo bashed version buildscriptsdir is $BUILD_SCRIPTS_DIR
fi
BUILD_SCRIPTS_DIR="$(echo $BUILD_SCRIPTS_DIR | tr '\\\\' '/' )"
-echo buildsc is $BUILD_SCRIPTS_DIR
+echo post tr buildscriptsdir is $BUILD_SCRIPTS_DIR
+
# figure out the other paths based on where we found this script.
export BUILDING_HIERARCHY="$(echo "$BUILD_SCRIPTS_DIR" | sed -e 's/\(.*\)\/[^\/]*/\1/')"
export CLAM_DIR="$BUILD_SCRIPTS_DIR/../clam"
# first the scripts directory; do we find this script there?
if [ ! -f "$BUILD_SCRIPTS_DIR/$THIS_TOOL_NAME" ]; then
- echo "This script must be run using its full pathname. This enables the script to"
- echo "locate the proper build folders. Please try again with the full path, e.g.:"
- echo " bash /home/fred/codeplex/scripts/generator/$THIS_TOOL_NAME"
-# exit 1
+ echo "This script cannot locate the proper build folders. The crucial path"
+ echo "variable seems to be '$BUILD_SCRIPTS_DIR', which"
+ echo "does not seem to contain '$THIS_TOOL_NAME' (this"
+ echo "script's apparent name)."
fi
# next the clam directory; is the main variables file present there?
echo "The clam directory could not be located under our build tools hierarchy."
echo "Please examine the configuration and make sure that this script is in a"
echo "directory that resides at the same height as the 'clam' directory."
-# exit 1
fi
# now compute some more paths with a bit of "heuristics" for where we can
if [ ! -d "$TOOL_SOURCES/dependency_tool" -o ! -d "$TOOL_SOURCES/clam_tools" ]; then
echo "This script cannot locate the tool source code folder. This is where the"
echo "dependency_tool and clam_tools folders are expected to be."
-# exit 1
fi
fi
export BUILD_PARAMETER_FILE="$PRODUCTION_DIR/feisty_meow_config.ini"
if [ ! -f "$BUILD_PARAMETER_FILE" ]; then
echo "Cannot find a useful build configuration file."
-# exit 1
fi
# pick the executable's file ending based on the platform.
elif [ "$OPERATING_SYSTEM" == "WIN32" ]; then export EXE_ENDING=.exe;
else
echo "The OPERATING_SYSTEM variable is unset or unknown. Bailing out."
-# exit 1
fi
+# we should have established our internal variables now, so let's try
+# using them.
+export PATH=$BINARY_DIR:$PATH
+
# load up the helper variables for visual studio on winders.
if [ "$OPERATING_SYSTEM" == "WIN32" ]; then
source "$BUILD_SCRIPTS_DIR/vis_stu_vars.sh"
export WindowsSdkDir="$PLATFORM_DIR"
#echo platform dir is $PLATFORM_DIR
+#echo "path before is $PATH"
export PATH="$DevEnvDir:$VCINSTALLDIR/BIN:$VSxTOOLS:$VSxTOOLS/bin:$FrameworkDir/$FrameworkVersion:$FrameworkDir/v3.5:$VCINSTALLDIR/VCPackages:$VSINSTALLDIR/Common7/Tools:$PLATFORM_DIR/bin:$PATH"
-#$FrameworkSDKDir/bin
+#echo "path after is $PATH"
export INCLUDE="$VCINSTALLDIR/ATLMFC/INCLUDE:$VCINSTALLDIR/INCLUDE:$PLATFORM_DIR/include"
#:$FrameworkSDKDir/include"
# warning that seems to be erroneously bitching about backslashes.
#echo framedir now $FrameworkDir
-#echo "path now is $PATH"
local($src, $dest) = @_;
if ($src =~ /\/CVS$/) { return; } # skip comparing repositories.
+#hmmm: why is only CVS spelled out here? what about the others?
if (! -d $src) {
print "$src is not a directory.\n";
# print "name is $name and to compare is $compare_name.\n";
local($new_name) = $src . "/" . $name;
if ( (-d $new_name) && ($name ne ".") && ($name ne "..")
- && ($name ne ".svn") ) {
+ && ($name ne ".svn")
+ && ($name ne ".git")
+ && ($name ne "CVS") ) {
# print "recursing on: source $name and destination $compare_name.\n";
&recurse_dirs($new_name, $compare_name);
}