Commit Graph

  • 90915a7209
    add a KeyValueParser for parsing simple key/value strings master Tomasz Sowa 2023-11-07 03:54:34 +0100
  • df24be199d
    add QT Creator files to .gitignore Tomasz Sowa 2023-10-22 23:36:47 +0200
  • 21614a5309
    fix: memory leak in the HTMLParser when a compact mode was used Tomasz Sowa 2023-10-18 18:33:52 +0200
  • 57f49cdcb6
    fix: memory leak in the SpaceParser Tomasz Sowa 2023-10-18 16:51:52 +0200
  • e94589d6b5
    add a Date::CompareDate(...) and Date::CompareTime(...) methods Tomasz Sowa 2023-09-07 04:41:41 +0200
  • 09215ef5f2
    add Space::to_date(...) methods Tomasz Sowa 2023-07-18 18:22:13 +0200
  • 2c4bfe085b
    add == and != operators to the TextStreamBase<> class Tomasz Sowa 2023-07-14 09:07:57 +0200
  • 172c2fcee7
    add to_str(...) methods to the TextStreamBase<> class Tomasz Sowa 2023-07-14 07:42:09 +0200
  • 78d31861de
    add some wide/utf8 convertion methods Tomasz Sowa 2023-07-14 07:41:14 +0200
  • 7e92b5d9d7
    add HTMLParser::parse_xml(...) methods Tomasz Sowa 2023-07-04 22:58:43 +0200
  • cbaf57bec3
    add some constants to the Date class Tomasz Sowa 2023-07-04 22:57:50 +0200
  • 987d9c845c
    declare esc_to_csv() method with a wstring Tomasz Sowa 2023-05-27 18:18:00 +0200
  • 96a3a564cf add a virtual dctor to BaseParser() Tomasz Sowa 2022-12-23 04:38:03 +0100
  • 379adf6a69 allow to parse a time decimal fraction in ParseTime() method Tomasz Sowa 2022-12-23 02:15:11 +0100
  • 3b3c04b85d fix: rename Toul -> to_ul in PatternReplacer Tomasz Sowa 2022-11-16 16:14:16 +0100
  • b3137a7607 rename functions for converting strings to integers to snake case Tomasz Sowa 2022-11-14 03:20:17 +0100
  • f97c06d441 add a check_time_zone parameter when parsing a date Tomasz Sowa 2022-10-22 16:26:14 +0200
  • e501a3f4a3 remove FileLog::synchro_lock() and FileLog::synchro_unlock() Tomasz Sowa 2022-09-01 07:32:48 +0200
  • ce0348b2d7 add to Space methods which takes a Stream as an argument Tomasz Sowa 2022-08-20 00:26:12 +0200
  • 7eba07a439 fix(Space): increment value object iterator in get_space_nc Tomasz Sowa 2022-08-10 12:40:46 +0200
  • 663233fe2a let all utf8/wide functions can be available just by including utf8/utf8.h Tomasz Sowa 2022-07-30 03:31:18 +0200
  • 84e9e6f98f add methods to Space that take a pointer to a string along with the length Tomasz Sowa 2022-07-30 03:12:38 +0200
  • 9a596dd097 fix: return a correct value from Log::size and Log::capacity Tomasz Sowa 2022-07-30 02:45:19 +0200
  • aa97fe2811 add methods for trimming \r\n from the end of a string Tomasz Sowa 2022-07-30 02:43:29 +0200
  • d13c10c604 add methods for converting from hex string to bytes Tomasz Sowa 2022-07-26 05:14:35 +0200
  • a524dfa2a7 add Space::to_float(...), to_double(...) and to_long_double(...) methods Tomasz Sowa 2022-07-08 21:59:39 +0200
  • 4b68eba6d2 add LICENSE file Tomasz Sowa 2022-07-03 11:02:16 +0200
  • b81daf9fb6 set 2-Clause BSD licence in *.cpp files Tomasz Sowa 2022-06-30 13:44:21 +0200
  • 74230d667b change headerfile_picotools_* macros to headerfile_pikotools_* Tomasz Sowa 2022-06-30 12:45:08 +0200
  • dad8042c41 add pikotools/version.h file Tomasz Sowa 2022-06-30 12:44:06 +0200
  • cadba907b2 change licence from 3-Clause BSD to 2-Clause BSD Tomasz Sowa 2022-06-30 12:09:22 +0200
  • 4933378ed6 make depend Tomasz Sowa 2022-06-26 05:40:44 +0200
  • 4f07c00217 Merge branch 'api2021' Tomasz Sowa 2022-06-25 17:52:42 +0200
  • 44bda888b5 fix: do not unescape xml sequences in filter mode Tomasz Sowa 2022-06-01 05:17:30 +0200
  • 68fe25c8bf add limits when parsing a json/space format Tomasz Sowa 2022-05-30 01:01:14 +0200
  • a40bab0445 add Space::get_table_item() method Tomasz Sowa 2022-05-30 00:55:38 +0200
  • c3b7ab5793 add min_width parameter to methods converting int to string Tomasz Sowa 2022-05-28 06:06:32 +0200
  • 5d2788d0d8 add Log::put_multiline() methods Tomasz Sowa 2022-05-25 19:57:35 +0200
  • 72c10b20fb flush logs when printing to stdout Tomasz Sowa 2022-04-27 22:07:58 +0200
  • 3173042229 make depend Tomasz Sowa 2022-04-26 23:47:27 +0200
  • 5253963c84 fix: put a white char before an opening tag in tree mode if it was in the source html Tomasz Sowa 2022-02-08 16:34:54 +0100
  • 0100c7e453 fix: check correctly for new lines when filtering html Tomasz Sowa 2022-02-08 14:52:50 +0100
  • ac3c59323b add methods: try_esc_to_json(wchar_t val, stream) try_esc_to_xml(...) try_esc_to_csv(...) Tomasz Sowa 2022-02-04 14:19:54 +0100
  • 3b9b464bb7 fix: add typename keyword in TextStreamBase<> in some places Tomasz Sowa 2022-02-03 19:21:22 +0100
  • 6b97b1b74a fix: correctly escape json/xml/csv wide strings Tomasz Sowa 2022-02-03 19:08:21 +0100
  • 03b159d9be add a listener callback when parsing xml tags htmlparserlistener Tomasz Sowa 2022-01-21 01:09:49 +0100
  • fd1a8270cd read CDATA as an ordinary text Tomasz Sowa 2022-01-18 19:36:40 +0100
  • b781948f21 HTMLParser now parses correctly such entities: &amp; &lt; &gt; &quot; &apos; Tomasz Sowa 2021-12-02 17:44:41 +0100
  • 2dadfc0809 added: HTMLParser::ItemParsedListener listener with an item_parsed(...) method which is called when a tag is parsed by the parser Tomasz Sowa 2021-11-30 16:27:27 +0100
  • bb9205a55e added: Space::Space(const Date & date), Space::set(const Date & date), Space::add(const Date & date), Space::add(const wchar_t * field, const Date & date) Tomasz Sowa 2021-11-05 09:27:32 +0100
  • 5eff9a5f4f Space::to_bool() return true now when a string/object or table is non empty Tomasz Sowa 2021-10-20 08:30:57 +0200
  • c54c398828 fixed in HTMLParser: </nofilter> tag was printed Tomasz Sowa 2021-10-13 00:40:55 +0200
  • 17d2c0fb25 - added some converting methods: esc_to_json(...), esc_to_xml(...), esc_to_csv() (convert/misc.h) - BaseParser: added possibility to read from TextStream and WTextStream - HTMLParser: added filter(const WTextStream & in, Stream & out, ...) method - added utf8_stream.h with one method: template<typename StreamIteratorType> size_t utf8_to_int( StreamIteratorType & iterator_in, StreamIteratorType & iterator_end, int & res, bool & correct) Tomasz Sowa 2021-10-12 19:53:11 +0200
  • 4902eb6037 fixed: in HTMLParser::CheckClosingTags() don't return immediately if stack_len is equal to 2 Tomasz Sowa 2021-10-03 13:22:49 +0200
  • 5e4c7e9929 make depend Tomasz Sowa 2021-10-02 21:01:19 +0200
  • abe349be34 small refactoring in HTMLParser Tomasz Sowa 2021-10-02 21:01:09 +0200
  • f23cabfb2f added to HTMLParser: filter_file(...) methods for filtering from a file Tomasz Sowa 2021-10-02 20:34:19 +0200
  • 5b2583b566 fixed in HTMLParser: sometimes a closing item left on the stack, for stack_len < 3 there was not PopStack() called Tomasz Sowa 2021-10-02 18:45:02 +0200
  • 2cc9dd69a3 make depend Tomasz Sowa 2021-08-12 21:53:52 +0200
  • 2576eb12d1 HTMLParser: start working on xml mode added methods: Status parse_xml_file(const char * file_name, Space & out_space, bool compact_mode = false, bool clear_space = true); Status parse_xml_file(const std::string & file_name, Space & out_space, bool compact_mode = false, bool clear_space = true); Status parse_xml_file(const wchar_t * file_name, Space & out_space, bool compact_mode = false, bool clear_space = true); Status parse_xml_file(const std::wstring & file_name, Space & out_space, bool compact_mode = false, bool clear_space = true); Tomasz Sowa 2021-08-10 21:56:04 +0200
  • b1cc64a29b added a compact_mode option when creating a space output Tomasz Sowa 2021-08-10 01:45:10 +0200
  • b8a03bf852 HTMLParser: added possibility to parse html to Space class added method: HTMLParser::parse_html(const wchar_t * in, Space & space) Tomasz Sowa 2021-08-07 21:21:16 +0200
  • 7fcfdac52f Space: added pretty_print parameter to some json serializing methods Tomasz Sowa 2021-08-07 21:19:38 +0200
  • 8c5ede5cf3 HTMLParser: for <script> and <!- (comments) we copy the content without parsing Tomasz Sowa 2021-08-07 02:13:13 +0200
  • fdfd0b1385 renamed: HTMLFilter -> HTMLParser Tomasz Sowa 2021-08-06 17:10:19 +0200
  • f6df8bc1bc HTMLFilter: added a std::vector<int> stack for a current white mode - white chars mode can be changed by such tags: <textarea>, <pre>, <script>, <nofilter> Tomasz Sowa 2021-07-21 15:57:46 +0200
  • c0e940c500 fixed improper new line character after <single/> items, added Item::new_line_before flag Tomasz Sowa 2021-07-21 11:30:49 +0200
  • 4f8ae6ce29 some work in HTMLFilter - instead of directly using pchar pointer now we use pointers/streams from BaseParser - removed support for putting a white char in long words: removed BreakWord(size_t break_after_) method - changed the way how white characters are treated: added white_chars_mode(int mode) method mode 0: WHITE_MODE_ORIGIN mode 1: WHITE_MODE_SINGLE_LINE mode 2: WHITE_MODE_TREE Tomasz Sowa 2021-07-20 20:48:01 +0200
  • 7ce07c57f5 added a base class for parsers: BaseParser (convert/baseparser.h|cpp) there are methods for reading from string/files there those methods were moved from SpaceParser and CSVParser fixed: CSVParser didn't set input_as_utf8 flag Tomasz Sowa 2021-07-17 14:38:22 +0200
  • 2a3f43c5c3 added BBCODEParser (html/bbcodeparser.h|cpp) - copied from winix project Tomasz Sowa 2021-07-17 13:54:03 +0200
  • bdb2616f32 added: HTMLFilter (html/htmlfilter.h|cpp) - copied from winix project Tomasz Sowa 2021-07-17 13:35:10 +0200
  • 6c41e0a803 Merge branch 'api2021' Tomasz Sowa 2021-07-06 22:45:54 +0200
  • 1e5598cde1 added to Date: SerializeMonthAsRoman(Stream & out, int month) - serialize month in Roman numerals added a param: 'bool roman_month' to some serialize methods Tomasz Sowa 2021-07-06 21:44:04 +0200
  • 198945c97b PatternReplacerBase: to_string() changed to to_str() Tomasz Sowa 2021-07-06 21:42:42 +0200
  • 34f1fc04cf added Space::remove(size_t table_index) for removing a table item fixed: pretty printing for Space format Tomasz Sowa 2021-06-29 23:25:31 +0200
  • 8997284b16 added trim(...) functions to convert/text.h Tomasz Sowa 2021-06-29 23:23:35 +0200
  • e31ef3c6c4 make depend Tomasz Sowa 2021-06-27 22:34:05 +0200
  • e0d6e7fcb1 added to Space: Space & get_add_space(const wchar_t * field); Space & get_add_space(const std::wstring & field); Tomasz Sowa 2021-06-27 15:58:53 +0200
  • 009e240a8d fixed some memory leaks in Space, pointers in tables and objects were not correctly 'deleted', affected methods: set_empty_table() set_empty_object() add(const wchar_t * field, Space && space) copy_value_object(const Value & value_from) copy_value_table(const Value & value_from) initialize_value_object_if_needed(ObjectType && obj) initialize_value_table_if_needed(TableType && tab) add_generic(const wchar_t * field, const ArgType & val) Tomasz Sowa 2021-06-27 15:41:38 +0200
  • 4a1630b1ea removed support for so called child objects from Space (this was an old feature of Space struct, now not needed) Space::get_object_field(...) renamed to Space::get_space(...) Tomasz Sowa 2021-06-26 22:56:12 +0200
  • 8ec9350d52 added two functions to utf8: template<typename StreamType> bool utf8_to_wide(const Stream & stream, StreamType & res, bool clear = true, int mode = 1); template<typename StreamType> bool wide_stream_to_utf8(const Stream & stream, StreamType & utf8, bool clear = true, int mode = 1); Tomasz Sowa 2021-06-25 19:10:01 +0200
  • 792057a869 make depend Tomasz Sowa 2021-06-24 21:18:48 +0200
  • 4d9f5f6c55 Log class has the Stream class as a base class now - implemented some missing operators<<(...) - removed Manipulators: l1, l2, l3, l4, lend, lsave - PascalCase to snake_case in Log Tomasz Sowa 2021-06-24 20:52:48 +0200
  • 2b6789754f implemented pretty printing in Space::serialize_to_json_stream(StreamType & str, bool pretty_print, int level) Tomasz Sowa 2021-06-23 21:54:34 +0200
  • 3c0b59e115 added to Space: long double to Space::Value and methods for converting from/to long double Tomasz Sowa 2021-06-23 17:01:43 +0200
  • c1f1dc96df added Space::serialize_to_string(StreamType & stream) template Tomasz Sowa 2021-06-22 17:52:55 +0200
  • 99fbdc1635 in Log::~Log(): removed call to save_log_and_clear() Tomasz Sowa 2021-06-20 18:19:53 +0200
  • 4a2a99a77d removed a comment Tomasz Sowa 2021-06-20 17:39:37 +0200
  • 0865c41e48 make depend Tomasz Sowa 2021-06-20 16:47:12 +0200
  • ac407b2362 macro renamed: PT_HAS_MORM -> PT_HAS_MORM_LIBRARY TextStream::to_string(...) is now TextStream::to_str(...) added: std::string TextStream::to_str() const; added: std::wstring TextStream::to_wstr() const; Tomasz Sowa 2021-06-20 16:46:08 +0200
  • 819c49e638 added class Stream (textstream/stream.h) which acts as a base class for TextStream TextStream is making conversions wide/utf8 now Tomasz Sowa 2021-06-20 14:13:23 +0200
  • 865837d911 fixed in Space::find_child_space_const(...) - clang address sanitizer reports stack-use-after-scope we have got a reference to a Space instead of a pointer and a local object was created and returned Tomasz Sowa 2021-06-18 18:52:24 +0200
  • 6d2503ae0e make depend Tomasz Sowa 2021-06-16 23:44:21 +0200
  • 06e0f13df9 added a comment in textstream.h Tomasz Sowa 2021-06-16 17:44:24 +0200
  • 8b0ed5e750 added to TextStream: TextStreamBase & operator<<(unsigned char); TextStreamBase & operator<<(bool); TextStreamBase & operator<<(short); TextStreamBase & operator<<(unsigned short); TextStreamBase & operator<<(float); TextStreamBase & operator<<(long double); Tomasz Sowa 2021-06-15 19:54:50 +0200
  • 55f6bda3ab Merge branch 'api2021' added support for surrogate pairs when reading \uHHHH format added support to parse \u{H...} format (only if parsing Space format) and some fixes Tomasz Sowa 2021-06-14 13:51:53 +0200
  • 4d70ae9e87 fixed: using size() when serializing strings - this allows to serialize a string which contain a null character fixed: printing null character in space format: \u0000 (before was \0 which is not correct in json) fixed: in serialize_string_buffer(const char * input_str, ...) a temporary fixed was used when copying input string added support for surrogate pairs when reading \uHHHH format added support to parse \u{H...} format (only if parsing Space format) Tomasz Sowa 2021-06-14 13:48:32 +0200
  • 848cdf9c03 Merge pull request 'api2021 part I' (#4) from api2021 into master Tomasz Sowa 2021-05-27 10:37:35 +0200
  • 49c2b478c0 fixed return value from Space::add_child_space() Tomasz Sowa 2021-05-21 17:32:10 +0200
  • 5ce36ea844 changed the way how child_spaces are created in Space class - removed child_spaces and name pointers - now a table with child spaces is created under "child_spaces" object field - a name of the child space is stored in "name" field of the child object Tomasz Sowa 2021-05-21 17:13:11 +0200