Package: invesytoolbox
invesytoolboxA set of useful tools, created for my own convenience.Why "invesy"? Invesy (from GermanInhaltsverwaltungssystem == content management system) is a closed source cms I created with Thomas Macher. It's only used in-house, that's why we didn't bother making it open source.Invesy runs on Zope, so most of the individual website's logic runs in restricted Python. That's one reason for this toolbox: providing a set of useful functions in one single package which can be allowed in our restricted Python environment without having to allow a long list of external packages. Also some packages, while being importable, contain functions or methods not usable in restricted Python (like bs4's prettify).That's also why all date and time functions also take into account the old DateTime (as opposed to datetime) package, on which Zope is still relying upon heavily.The documentation can be foundhere.History0.0.21 (2023-05-21)New functionunravel_duration: turns a duration string (for ex. '5T23:05:20') into a list or dictionary.0.0.20 (2023-05-06)New functionadd_time: adds (or subtracts) time to (or from) datetime and DateTime0.0.19 (2023-04-07)Corrected bug infetch_holidays(argumentlengthresulted in an error)0.0.18 (2023-04-07)new functionchange_h_tags(in new moduleitb_html)0.0.17 (2023-03-01)new functioncompare_phonenumbers: compares two phone numbers after normalizing them (process_phonenumber).0.0.16map_special_chars: works now.0.0.15could_be_a_name: can now handle names with multiple parts like "Robert De La Mancha". Per word, 2 capitals are allowed (i.e. "MacArthur" or "DeLa Cruz)0.0.14could_be_a_nameandsort_names: now working also with prename-only and prenames including a hyphen.0.0.13get_dateformatnow also processes timestr_to_dtnow checks for valid stringis_valid_datetime_string: wrapper for checking withstr_to_dtremove_timefrom datetime or DateTime0.0.12removed documentation from the README file, instead a link to the gitlab pagesmap_specialCharsnow recognizes Unicode character U+0308 (UTF-8 cc 88 = "COMBINING DIAERESIS").any_2booleanget_dateformat: argumentcheckonlydata functions: argumentjson_datachanged tometadata(it's a dictionary)0.0.11BeautifulSoup and nameparser added to requirements.txtRemoved "Date" conversions (modified DateTime) because it's a bad ideanormalize_name(using nameparser) added toitb_text_namecapitalize_namerewritten (now quasi a wrapper for normalize_name)could_be_a_namerewritten usingnormalize_name(nameparser)0.0.10check_spamfor web formsdictlist_2datatypes: iterates through a list of dictionaries and appliesdict_2datatypesprettify_html: providesprettifyfrom BeautifulSoup, because it can't be used directly from restricted Python.could_be_a_name: checks if a string could be a name0.0.9change_query_stringrespects Zope parameter converters (likeparamname:int)0.0.8New submodule wwwchange_query_string0.0.7shorter submodule names (no _tools suffix)is_holidayworks without argumentcreate_email_message: new argumentencodingprocess_phonenumbers: cleaned up argumentsDT_date: strip a DateTime of its time (get a "naked" date)could_be_a_name: check if a string could possibly be a name0.0.6renamedcapitalize_texttocapitalize_nameand removed name argumentadded Sphinx documentation0.0.5 (2022-06-11)removedterminal_tools(will be included in a separate package)0.0.4 (2022-06-09)better formatted README0.0.3 (2022-06-09)updated README (list of functions and a short description)0.0.2 (2022-06-09)removed VERSION file0.0.1 (2022-06-09)first version