lib/strings.py: added unesc_quotes() and helper functions
lib/strings.py: added json_decode()
moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).
strings.py: Added join()
strings.py: Replaced no longer used contains_any() with find_any(), which returns any found substring, or None if none of the substrings were found
strings.py: concat(): Fixed bug where end index of returned str0 portion would wrap around to a negative number if str1 itself was too long, causing incorrect truncation
strings.py: json_encode(): Fixed bug where '\n' and '\r' also needed to be encoded
strings.py: Added regexp_repl_esc()
strings.py: Added replace_all() and replace_all_re(), as well as flip_map() for use with maps for these functions
strings.py: Added json_encode()
strings.py: Added esc_quotes()
strings.py: remove_prefix(), remove_suffix(): Added require param to raise aan exception if the string does not have the given prefix/suffix
strings.py: concat(): Apply length limits by shrinking max_len by new raw_extra_len() of the strings. This also fixes a bug where multi-byte characters in str0 were not properly taken into account, leading to overly long strings. Added doc comment.
strings.py: Added raw_extra_len()
strings.py: concat(): Perform substring operation on Unicode strings so that substring does not split Unicode characters. Still use to_raw_str() to calculate the str1 length because Unicode characters can be multi-byte, and length limits often apply to the byte length, not the character length.
strings.py: Added isspace_none_str to support clone-safe sentinel str values that pass isspace()
strings.py: Added none_str and helper class NonInternedStr to support sentinel str values
strings.py: concat(): Convert args to raw (non-Unicode) strings first, so that multi-byte Unicode sequences are considered by # of bytes instead of # of chars. This is necessary because PostgreSQL truncates identifiers by # of bytes instead of # of chars, so that identifiers will actually be less than 63 chars long when some chars were multi-byte.
strings.py: ustr(): Call str() method manually like urepr() to avoid Unicode errors when the returning string is non-ASCII
strings.py: Added urepr() and use it in repr_no_u(), to better support repr() return values with non-ASCII characters. Avoiding repr() also provides a more complete stack trace in the case of such errors.
strings.py: Added indent()
strings.py: Added join_lines()
strings.py: Added first_word()
strings.py, sql_gen.py: Renamed add_suffix() to concat() to reflect that this is a fixed-length replacement for +
strings.py: Added to_raw_str()
strings.py: Added esc_for_mogrify()
strings.py: Added add_suffix()
strings.py: repr_no_u(): Fixed bug where "u" prefix was removed even in reprs of non-strings
strings.py: as_*table(): Added ustr param to override the method (by default ustr()) used to convert each value to a string
strings.py: Added repr_no_u()
strings.py: Split as_table() into as_table() and as_inline_table() depending on whether the table needs to be inlined in an ordered list item or not
strings.py: as_table(): Changed to use
formatting because Redmine tables can't be embedded in ordered lists without restarting the numbering
strings.py: as_table(): Fixed bug where table was not ended properly, by adding a space after the last \n and having rstrip() string only newlines
strings.py: Added as_tt() and as_table()
strings.py: as_code(): Added multiline param to disable multiline formatted output
strings.py: Added as_code()
strings.py: Removed no longer used DebugPrintable (that functionality is now in objects.BasicObject)
strings.py: Added DebugPrintable
strings.py: remove_prefix(), remove_suffix(): Added removed_ref param
strings.py: Added contains_any()
strings.py: Added is_ctrl() and strip_ctrl()
strings.py: Added with_prefixes()
strings.py: Added extract_line_ending() and remove_line_ending(). ensure_newl(): Use new remove_line_ending(). Moved Parsing section to top since it is used by the other sections.
strings.py: Added overlaps()
strings.py: Added split(), remove_prefix(), remove_suffix(), and remove_prefixes(). Added section comments.
strings.py: Added single_space()
strings.py: Added unicode_reader for later use in handling Unicode characters in map spreadsheets
strings.py: Added ustr() (like built-in str() but converts to unicode object)
strings.py: Added one_line() function to make a string all on one line
strings.py: Renamed one_line() to remove_extra_newl() to better reflect what it does
strings.py: Added is_multiline() and one_line() for removing extra newlines from single-line strings
strings.py: Added std_newl() to convert line endings and cleanup() to process strings with extra or nonstandard whitespace
strings.py: Added ensure_newl()
Moved everything in scripts to root. inputs_Makefile: Don't run "all" when installing.
map: Fixed bugs to enable mapping straight from CSV to a database. Still need a way to set plot.authorPlotCode for specimens data.