diff --git a/HistContext/.gitignore b/HistContext/.gitignore new file mode 100644 index 000000000..791dd4b13 --- /dev/null +++ b/HistContext/.gitignore @@ -0,0 +1,4 @@ +*bak +locale/ +*2024* +da.po diff --git a/HistContext/HistContext.gpr.py b/HistContext/HistContext.gpr.py new file mode 100644 index 000000000..3a7ec826c --- /dev/null +++ b/HistContext/HistContext.gpr.py @@ -0,0 +1,19 @@ +register(GRAMPLET, + id="HistContext", + name=_("Historical Context"), + description = _("Displaying a historical context"), + status = STABLE, + version = '0.2.10', + fname="HistContext.py", + height = 20, + detached_width = 510, + detached_height = 480, + expand = True, + gramplet = "HistContext", + gramplet_title=_("Historical Context"), + gramps_target_version="5.2", +# help_url="https://github.com/kajmikkelsen/TimeLineGramplet", + help_url="Addon:Historical_Context", + navtypes=["Person","Dashboard"], + include_in_listing = True, + ) diff --git a/HistContext/HistContext.py b/HistContext/HistContext.py new file mode 100644 index 000000000..eef5bfac6 --- /dev/null +++ b/HistContext/HistContext.py @@ -0,0 +1,330 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2024 Kaj Mikkelsen +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +#---------------------------------------------------------------------------- +""" + Historical Context - a plugin for showing historical events + Will show the person in a historical context + """ + +# File: HistContext.py +#from gramps.gen.plug import Gramplet + +import os +import logging +import glob +import gi +from gramps.gen.plug import Gramplet +from gramps.gen.const import GRAMPS_LOCALE as glocale +from gramps.gen.utils.db import (get_birth_or_fallback, get_death_or_fallback) +from gramps.gui.display import display_url +from gramps.gui.dialog import ErrorDialog +from gramps.gen.plug.menu import EnumeratedListOption,BooleanOption,StringOption + + +from gi.repository import Pango +gi.require_version('Gtk', '3.0') +from gi.repository import Gtk + +#------------------------------------------------------------------------ +# +# GRAMPS modules +# +#------------------------------------------------------------------------ + +local_log = logging.getLogger('HistContext') +local_log.setLevel(logging.WARNING) + +try: + _trans = glocale.get_addon_translator(__file__) +except ValueError: + _trans = glocale.translation +_ = _trans.gettext +lang = glocale.lang +local_log.info('Sprog = %s',lang) + + +class HistContext(Gramplet): + """ + class for showing a timeline + """ + def init(self): + self.model = Gtk.ListStore(str, str, str,str,str) + self.gui.WIDGET = self.build_gui() + self.gui.get_container_widget().remove(self.gui.textview) + self.gui.get_container_widget().add(self.gui.WIDGET) + self.gui.WIDGET.show() + self.model.clear() + + + def build_options(self): + """ + Build the configuration options. + """ + files = [] + + self.opts = [] + + name = _("Filter string ") + opt = StringOption(name, self.__start_filter_st) + self.opts.append(opt) + name = _("Use filter ") + opt = BooleanOption(name,self.__use_filter) + self.opts.append(opt) + name =_("Hide outside life span ") + opt = BooleanOption(name,self.__hide_it) + self.opts.append(opt) + name = _("Files") + flnam = os.path.join(os.path.dirname(__file__), '*.txt') + files = [f for f in glob.glob(flnam)] + opt = EnumeratedListOption(name,self.__sel_file) + for filnm in files: + opt.add_item(filnm,os.path.basename(filnm)) + self.opts.append(opt) + name =_("Foreground color items in lifespan") + opt = StringOption(name,self.__fg_sel) + self.opts.append(opt) + name =_("Background color items in lifespan") + opt = StringOption(name,self.__bg_sel) + self.opts.append(opt) + name =_("Foreground color items outside lifespan") + opt = StringOption(name,self.__fg_not_sel) + self.opts.append(opt) + name =_("Background color items outside lifespan") + opt = StringOption(name,self.__bg_not_sel) + self.opts.append(opt) + if self.dbstate.db.is_open(): + for tag_handle in self.dbstate.db.get_tag_handles(sort_handles=True): + tag = self.dbstate.db.get_tag_from_handle(tag_handle) + tag_name = tag.get_name() + list(map(self.add_option, self.opts)) + + def save_options(self): + """ + Save gramplet configuration data. + """ + self.__start_filter_st = self.opts[0].get_value() + self.__use_filter = self.opts[1].get_value() + self.__hide_it = self.opts[2].get_value() + self.__sel_file = self.opts[3].get_value() + self.__fg_sel = self.opts[4].get_value() + self.__bg_sel = self.opts[5].get_value() + self.__fg_not_sel = self.opts[6].get_value() + self.__bg_not_sel = self.opts[7].get_value() + local_log.info('1 stored Filename = %s',self.__sel_file) + + def save_update_options(self, obj): + """ + Save a gramplet's options to file. + """ + self.save_options() + self.gui.data = [ + self.__start_filter_st, + self.__use_filter, + self.__hide_it, + self.__sel_file, + self.__fg_sel, + self.__bg_sel, + self.__fg_not_sel, + self.__bg_not_sel, + + ] + local_log.info('3 stored Filename = %s',self.__sel_file) + self.update() + + def on_load(self): + """ + Load stored configuration data. + """ + local_log.info('Antal = %d',len(self.gui.data)) + if len(self.gui.data) == 8: + self.__start_filter_st = self.gui.data[0] + self.__use_filter = (self.gui.data[1] == 'True') + self.__hide_it = (self.gui.data[2] == 'True') + self.__sel_file = self.gui.data[3] + self.__fg_sel = self.gui.data[4] + self.__bg_sel = self.gui.data[5] + self.__fg_not_sel = self.gui.data[6] + self.__bg_not_sel = self.gui.data[7] + else: + self.__start_filter_st = "Census" + self.__use_filter = True + self.__hide_it = True + self.__sel_file = os.path.join(os.path.dirname(__file__),'default_data_v1_0.txt') + self.__fg_sel = '#000000' + self.__bg_sel = '#ffffff' + self.__fg_not_sel = '#000000' + self.__bg_not_sel = '#ededed' + local_log.info('2 stored Filename = %s',self.__sel_file) + + + def get_birth_year(self): + """ + returning the years of birth and death of the active person + """ + birthyear = 0 + deathyear = 0 + active_person = self.get_active_object("Person") + if active_person: +# navn = active_person.get_primary_name().get_name() + birth = get_birth_or_fallback(self.dbstate.db, active_person) + if birth: + birthdate = birth.get_date_object() + if birthdate: + birthyear = birthdate.to_calendar("gregorian").get_year() + local_log.info ("Født: %s",birthyear) + death = get_death_or_fallback(self.dbstate.db, active_person) + if death: + deathdate = death.get_date_object() + if deathdate: + deathyear = deathdate.to_calendar("gregorian").get_year() + local_log.info ("Død: %s",deathyear) + + else: + local_log.info ("no active person") + if (birthyear > 0) and (deathyear == 0): + deathyear = birthyear+100 + if (deathyear > 0) and (birthyear == 0): + birthyear = deathyear - 100 + return birthyear, deathyear + + def load_file(self,flnm): + """ + loading the file into the treeview + """ + local_log.info('FILENANME %s',flnm) + birthyear,deathyear = self.get_birth_year() + linenbr = 0 + with open(flnm,encoding='utf-8') as myfile: + for line in myfile: + linenbr += 1 + line = line.rstrip()+';' + words = line.split(';') + if len(words) != 5: + if len(line) > 10: + errormessage = _(': not four semicolons in : "')+line+'i" File: '+flnm + errormessage = str(linenbr)+errormessage + ErrorDialog(_('Error:'),errormessage) + else: + words[2] = words[2].replace('"','') + if words[1] == '': + end_year = words[0] + else: + end_year = words[1] + + if ((int(words[0]) >= int(birthyear)) and (int(words[0]) <= int(deathyear))) or \ + ((int(end_year) >= int(birthyear)) and (int(end_year) <= int(deathyear))): + mytupple = (words[0],words[1],words[2],words[3],self.__fg_sel,self.__bg_sel) + hide_this = False + else: + hide_this = self.__hide_it + mytupple = (words[0],words[1],words[2],words[3],self.__fg_not_sel,self.__bg_not_sel) + if not hide_this: + if self.__use_filter: + if not words[2].startswith(self.__start_filter_st): + local_log.info('appending %s',words[2]) + self.model.append(mytupple) + else: + local_log.info('appending %s',words[2]) + self.model.append(mytupple) + + + + def main(self): + local_log.info('testing string %s ',self.__start_filter_st) + local_log.info('testing boolean %r ',self.__use_filter) + self.model.clear() + flnm = self.__sel_file + if not os.path.exists(flnm): + flnm = os.path.join(os.path.dirname(__file__), 'default'+'_data_v1_0.txt') + + if os.path.exists(flnm): + if os.path.isfile(flnm): + self.load_file(flnm) + else: + self.set_text('No file '+flnm) + else: + self.set_text('No path '+flnm) + def_flnm = os.path.join(os.path.dirname(__file__), 'custom_v1_0.txt') + if flnm != def_flnm: + if os.path.exists(def_flnm): + if os.path.isfile(def_flnm): + self.load_file(def_flnm) + + def active_changed(self, handle): + """ + Called when the active person is changed. + """ + local_log.info('Active changed') + self.update() + + def act(self,tree_view,path, column): + """ + Called when the user double-click a row + """ + tree_iter = self.model.get_iter(path) + url = self.model.get_value(tree_iter, 3) + if url.startswith("https://"): + display_url(url) + else: + errormessage = _('Cannot open URL: ')+url + ErrorDialog(_('Error:'),errormessage) + + + + + def build_gui(self): + """ + Build the GUI interface. + """ + tip = _("Double click row to follow link") + self.set_tooltip(tip) + self.model = Gtk.ListStore(str,str,str,str,str,str) + top = Gtk.TreeView() + top.connect("row-activated", self.act) + renderer = Gtk.CellRendererText() + renderer.set_property('ellipsize', Pango.EllipsizeMode.END) + + column = Gtk.TreeViewColumn(_('From'), renderer, text=0,foreground=4,background=5) + column.set_expand(False) + column.set_resizable(True) + column.set_sizing(Gtk.TreeViewColumnSizing.FIXED) + column.set_fixed_width(50) + column.set_sort_column_id(0) + top.append_column(column) + renderer = Gtk.CellRendererText() + + column = Gtk.TreeViewColumn(_('To'), renderer, text=1,foreground=4,background=5) + column.set_sort_column_id(1) + column.set_fixed_width(50) + top.append_column(column) + + column = Gtk.TreeViewColumn(_('Text'), renderer, text=2,foreground=4,background=5) + column.set_sort_column_id(2) + column.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE) + top.append_column(column) + +# column = Gtk.TreeViewColumn(_('Link'), renderer, text=3,foreground=4,background=5) +# column.set_sort_column_id(3) +# column.set_fixed_width(150) +# top.append_column(column) + self.model.set_sort_column_id(0,Gtk.SortType.ASCENDING) + top.set_model(self.model) + return top diff --git a/HistContext/MANIFEST b/HistContext/MANIFEST new file mode 100644 index 000000000..80e9dca0a --- /dev/null +++ b/HistContext/MANIFEST @@ -0,0 +1,5 @@ +HistContext/README.md +HistContext/gramplet.png +HistContext/option.png +HistContext/option1.png + diff --git a/HistContext/README.md b/HistContext/README.md new file mode 100644 index 000000000..66597d66f --- /dev/null +++ b/HistContext/README.md @@ -0,0 +1,52 @@ +### Histtory Context gramplet + +![](./gramplet.png) +Gramplet to display historical events with the year they happened, and optionally the year they ended. + +A double-click on a row will open your browser at the provided Link + +The gramplet works on the People and the Relationship Category view and will use the birth and death of the active person. + +If either of the dates are missing the gramplet assumes a life span of 100 years + +The data for the gramplet comes from a CSV file, which can be edited with a normal editor. + +The Format is: + +`from;to;event;link to event` + +example: + +1789;1797;George Washington;https://en.wikipedia.org/wiki/George_Washington + +The file name is `_data_v1_0.txt `e.g. `da_DK_data_v1_0.txt` for Denmark +Currently only four files are provided, `da_DK_data_v1_0.txt` and `en_US_data_v1_0.txt` which simply is a list of American presidents. + +The third is `deafult_data_v1_0.txt`which will be used, if there isn't any data file for your language. + +The fourth file is `custom_v1_0.txt`which can be used for adding your own data, which will be merged into the view. + +## Options + +The options can be accessed by the settings for the view: + +![Options](./options1.png "Options") + +![Options](./options.png "Options") + +1 This string can be used to filter out text. If you set this to "Cen" all lines where the tect starts with "Cen" will be filtered out (e.g.Census as well as "Century" + +2 If you check this box, your filter will be active + +3 This checkbox decides whether you will see all events or only those in your cative persons life span + +4 File name for the file, which holds the events. If you have created a custom file named `custom_v1_0.txt` this will be merged into the list. + +5 The foreground color for lines within a persons life span. There is a lot of applications, which let you convert a chosen colour to a HTML text string. I use KcolorChooser + +6 The background colour for lines within the active persons life span + +7 The foreground colour for lines outside the active persons life span + +8 The background colour for lines outside the active persons life span + diff --git a/HistContext/da_DK_data_v1_0.txt b/HistContext/da_DK_data_v1_0.txt new file mode 100644 index 000000000..3d0858f09 --- /dev/null +++ b/HistContext/da_DK_data_v1_0.txt @@ -0,0 +1,51 @@ +1708;;"Lov mod tiggeri";https://danmarkshistorien.dk/vis/materiale/fattiglovene-fra-1708-og-forbuddet-mod-tiggeri +1728;1728;"Købehavns Brand";https://da.wikipedia.org/wiki/K%C3%B8benhavns_brand_1728 +1733;1788;"Stavnsbåndet indføres";https://da.wikipedia.org/wiki/Stavnsb%C3%A5ndet +1769;;Folketælling; +1784;1833;Landboreformerne;https://da.wikipedia.org/wiki/Landboreformerne +1787;;Folketælling; +1801;;Folketælling; +1801;1814;Englandskrigene;https://da.wikipedia.org/wiki/Englandskrigene +1801;;"Slaget på Reden";https://da.wikipedia.org/wiki/Slaget_p%C3%A5_Reden +1807;;"Københavns Bombardement";https://da.wikipedia.org/wiki/K%C3%B8benhavns_bombardement +1810;;Jordemoderloven;https://www.carlsbergfondet.dk/da/Nyheder/Formidling/Maanedensforsker/Anne%20Loekke +1813;;Statsbankerotten;https://da.wikipedia.org/wiki/Statsbankerotten +1814;;"Folkeskolen oprettes";https://da.wikipedia.org/wiki/Folkeskolen +1834;;Folketælling; +1840;;Folketælling; +1844;;"Første danske jernbane";https://denstoredanske.lex.dk/Danmarks_jernbaner +1845;;Folketælling; +1846;;"Første private bank";https://da.wikipedia.org/wiki/Fyens_Disconto_Kasse +1848;1851;1. Slesvigske krig;https://da.wikipedia.org/wiki/Tre%C3%A5rskrigen +1849;;"Grundloven af 1849";https://natmus.dk/historisk-viden/danmark/nationalstaten-1849-1915/det-nye-folkestyre/grundloven-1849/ +1850;;Folketælling; +1854;;"Den første danske telegraf";https://www.enigma.dk/artikel/telegrafapparatet-kom-til-danmark +1855;;"Åndsvageforsorgens begyndelse";https://www.forsorgshistorien.dk/historie +1855;;Folketælling; +1860;;Folketælling; +1864;1864;2. Slesvigske krig;https://da.wikipedia.org/wiki/2._Slesvigske_Krig +1870;;Folketælling; +1877;;"Første danske telefon";https://natmus.dk/museer-og-slotte/nationalmuseet/omstillingen/telefonens-historie/ +1880;;Folketælling; +1890;;Folketælling; +1901;;Systemskiftet;https://natmus.dk/historisk-viden/danmark/nationalstaten-1849-1915/det-nye-folkestyre/systemskiftet-1901/ +1901;;Folketælling; +1905;;"Første traktor i Danmark";https://denstoredanske.lex.dk/traktor +1906;;Folketælling; +1911;;Folketælling; +1914;1918;"1. Verdenskrig";https://da.wikipedia.org/wiki/1._verdenskrig +1915;;"Kvinder og tyende får valgret til folketinget";https://faktalink.dk/folkeskolens-historiekanon-21-kvinders-valgret +1916;;Folketælling; +1918;1920;"Den spanske syge";https://da.wikipedia.org/wiki/Den_spanske_syge +1921;;Folketælling; +1925;;Folketælling; +1930;;Folketælling; +1933;;"Socialreformen, nogle fattige får stemmeret";https://danmarkshistorien.dk/vis/materiale/socialreformen-af-1933 +1935;;Folketælling; +1940;1945;Besættelsestiden;https://natmus.dk/historisk-viden/danmark/besaettelsestiden-1940-1945/besaettelsen-kort-fortalt/da-danmark-blev-besat/ +1940;;Folketælling; +1945;;Folketælling; +1950;;Folketælling; +1953;;"Grundloven af 1953";https://danmarkshistorien.dk/vis/materiale/danmarks-riges-grundlov-af-5-juni-1953 +1955;;Folketælling; +1960;;Folketælling; diff --git a/HistContext/default_data_v1_0.txt b/HistContext/default_data_v1_0.txt new file mode 100644 index 000000000..b00971c81 --- /dev/null +++ b/HistContext/default_data_v1_0.txt @@ -0,0 +1,67 @@ +1520;1527;Smallpox (New World);https://wikipedia.org/wiki/Smallpox +1629;1631;Great Bubonic Plague of Milan (Italy);https://wikipedia.org/wiki/Italian_plague_of_1629%E2%80%931631 +1665;1666;Great Bubonic Plague of London (England);https://wikipedia.org/wiki/Great_Plague_of_London +1720;1722;Great Bubonic Plague of Marseille (France);https://wikipedia.org/wiki/Great_Plague_of_Marseille +1750;;Peak of the Little Ice Age;https://wikipedia.org/wiki/Little_Ice_Age +1755;;The Lisbon earthquake occurs;https://wikipedia.org/wiki/1755_Lisbon_earthquake +1756;1763;The Seven Years' War is fought among European powers;https://wikipedia.org/wiki/Seven_Years%27_War +1769;1770;James Cook explores and maps New Zealand and Australia;https://wikipedia.org/wiki/James_Cook +1773;;16 December, the Boston Tea Party.;https://wikipedia.org/wiki/Boston_Tea_Party +1775;1783;American Revolutionary War;https://wikipedia.org/wiki/American_Revolutionary_War +1783;;Montgolfier brothers invent hot air balloon;https://wikipedia.org/wiki/Hot_air_balloon +1789;1799;French Revolution;https://wikipedia.org/wiki/French_Revolution +1789;;Declaration of the Rights of Man and of the Citizen adopted;https://wikipedia.org/wiki/Declaration_of_the_Rights_of_Man_and_of_the_Citizen +1793;1793;Yellow Fever Epidemic (Philadelphia);https://wikipedia.org/wiki/Yellow_Fever_Epidemic_of_1793 +1796;;Edward Jenner invents the first smallpox vaccination;https://wikipedia.org/wiki/Smallpox_vaccine +1803;1815;Napoleonic Wars;https://wikipedia.org/wiki/Napoleonic_Wars +1804;;First steam locomotive;https://wikipedia.org/wiki/Steam_locomotive +1816;;The year without a summer;https://wikipedia.org/wiki/Year_Without_a_Summer +1817;1824;First Cholera Pandemic (Asia, Europe);https://wikipedia.org/wiki/Cholera_outbreaks_and_pandemics +1820;1842;Industrial revolution - child labor;https://wikipedia.org/wiki/Industrial_Revolution +1825;;First public railway;https://wikipedia.org/wiki/Stockton_and_Darlington_Railway +1827;;Nicéphore Niépce invents photography.;https://wikipedia.org/wiki/Nic%C3%A9phore_Ni%C3%A9pce +1830;;Beginning of Church of Christ of Latter Day Saints;https://wikipedia.org/wiki/Church_of_Christ_(Latter_Day_Saints) +1831;1836;Charles Darwin's journey aboard HMS Beagle;https://wikipedia.org/wiki/Charles_Darwin +1837;;Telegraphy patented.;https://wikipedia.org/wiki/Telegraphy +1842;;Anaesthesia used for the first time;https://wikipedia.org/wiki/Anesthesia +1845;1849;The Great Famine of Ireland leads to the Irish diaspora;https://wikipedia.org/wiki/Great_Famine_(Ireland) +1845;;Lunacy Act;https://wikipedia.org/wiki/Lunacy_Act_1845 +1855;1860;Third Bubonic Plague Pandemic (China, India, worldwide);https://wikipedia.org/wiki/Third_plague_pandemic +1859;1869;Suez Canal constructed;https://wikipedia.org/wiki/Suez_Canal +1861;1865;American Civil War;https://wikipedia.org/wiki/American_Civil_War +1863;; Formation of the International Red Cross;https://wikipedia.org/wiki/International_Red_Cross_and_Red_Crescent_Movement +1864;; First Geneva Convention;https://wikipedia.org/wiki/First_Geneva_Convention +1869;;Dmitri Mendeleev created the Periodic table;https://wikipedia.org/wiki/Periodic_table +1871;1914;Second Industrial Revolution;https://wikipedia.org/wiki/Second_Industrial_Revolution +1877;;Thomas Edison invents the phonograph;https://wikipedia.org/wiki/Phonograph +1886;;Karl Benz sells the first commercial automobile;https://wikipedia.org/wiki/Car +1889;1890;Russian Flu (Worldwide);https://wikipedia.org/wiki/1889%E2%80%931890_pandemic +1893;;New Zealand becomes the first country to enact women's suffrage;https://wikipedia.org/wiki/Women%27s_suffrage +1895;;Wilhelm Röntgen identifies x-rays;https://wikipedia.org/wiki/X-ray +1901;; Guglielmo Marconi received the first transatlantic radio signal.;https://wikipedia.org/wiki/Guglielmo_Marconi +1903;;First controlled heavier-than-air flight of the Wright brothers;https://wikipedia.org/wiki/Wright_brothers +1908;;Ford model T invented;https://wikipedia.org/wiki/Ford_Model_T +1908;;Messina earthquake;https://wikipedia.org/wiki/1908_Messina_earthquake +1911;; Roald Amundsen first reaches the South Pole;https://wikipedia.org/wiki/Roald_Amundsen +1912;;Sinking of the RMS Titanic;https://wikipedia.org/wiki/Sinking_of_the_Titanic +1914;1918;WWI;https://wikipedia.org/wiki/World_War_I +1917;;Russian Revolution;https://wikipedia.org/wiki/Russian_Revolution +1918;1920;Spanish Flu (Worldwide);https://wikipedia.org/wiki/Spanish_flu +1918;;Spanish flu pandemic;https://wikipedia.org/wiki/Spanish_flu +1919;; Treaty of Versailles;https://wikipedia.org/wiki/Treaty_of_Versailles +1927;;First nonstop flight from New York City to Paris;https://wikipedia.org/wiki/Charles_Lindbergh +1927;;World population reaches two billion;https://wikipedia.org/wiki/World_population +1928;;Discovery of penicilin;https://wikipedia.org/wiki/Penicillin +1933;1945;Hitler is ruling Germany;https://wikipedia.org/wiki/F%C3%BChrer +1938;;Kristallnacht;https://wikipedia.org/wiki/Kristallnacht +1939;1945;WWII;https://wikipedia.org/wiki/World_War_II +1944;;First computer Colossus;https://wikipedia.org/wiki/Colossus_computer +1952;; polio vaccine;https://wikipedia.org/wiki/Polio_vaccine +1957;1958;Asian Flu (Worldwide);https://wikipedia.org/wiki/Asian_flu +1968;1969;Hong Kong Flu (Worldwide);https://wikipedia.org/wiki/Hong_Kong_flu +1981;;HIV/AIDS (Worldwide);https://wikipedia.org/wiki/HIV/AIDS +2002;2003;SARS (Asia, worldwide);https://wikipedia.org/wiki/SARS +2009;2010;Swine Flu (Worldwide);https://wikipedia.org/wiki/2009_flu_pandemic +2014;2016;Ebola (West Africa);https://wikipedia.org/wiki/Ebola_virus_disease +2015;2016;Zika Virus (Americas);https://wikipedia.org/wiki/Zika_virus +2019;;COVID-19 (Worldwide);https://wikipedia.org/wiki/COVID-19_pandemic diff --git a/HistContext/en_US_data_v1_0.txt b/HistContext/en_US_data_v1_0.txt new file mode 100644 index 000000000..75f68f08b --- /dev/null +++ b/HistContext/en_US_data_v1_0.txt @@ -0,0 +1,47 @@ +1789;1797;George Washington (USA President #1);https://wikipedia.org/wiki/George_Washington +1797;1801;John Adams (USA President #2);https://wikipedia.org/wiki/John_Adams +1801;1809;Thomas Jefferson (USA President #3);https://wikipedia.org/wiki/Thomas_Jefferson +1809;1817;James Madison (USA President #4);https://wikipedia.org/wiki/James_Madison +1817;1825;James Monroe (USA President #5);https://wikipedia.org/wiki/James_Monroe +1825;1829;John Quincy Adams (USA President #6);https://wikipedia.org/wiki/John_Quincy_Adams +1829;1837;Andrew Jackson (USA President #7);https://wikipedia.org/wiki/Andrew_Jackson +1837;1841;Martin Van Buren (USA President #8);https://wikipedia.org/wiki/Martin_Van_Buren +1841;1841;William H. Harrison (USA President #9);https://wikipedia.org/wiki/William_Henry_Harrison +1841;1845;John Tyler (USA President #10);https://wikipedia.org/wiki/John_Tyler +1845;1849;James K. Polk (USA President #11);https://wikipedia.org/wiki/James_K._Polk +1849;1850;Zachary Taylor (USA President #12);https://wikipedia.org/wiki/Zachary_Taylor +1850;1853;Millard Fillmore (USA President #13);https://wikipedia.org/wiki/Millard_Fillmore +1853;1857;Franklin Pierce (USA President #14);https://wikipedia.org/wiki/Franklin_Pierce +1857;1861;James Buchanan (USA President #15) (USA President #14);https://wikipedia.org/wiki/James_Buchanan +1861;1865;Abraham Lincoln (USA President #16);https://wikipedia.org/wiki/Abraham_Lincoln +1865;1869;Andrew Johnson (USA President #17);https://wikipedia.org/wiki/Andrew_Johnson +1869;1877;Ulysses S. Grant (USA President #18);https://wikipedia.org/wiki/Ulysses_S._Grant +1877;1881;Rutherford B. Hayes (USA President #19);https://wikipedia.org/wiki/Rutherford_B._Hayes +1881;1881;James A. Garfield (USA President #20);https://wikipedia.org/wiki/James_A._Garfield +1881;1885;Chester A. Arthur (USA President #21);https://wikipedia.org/wiki/Chester_A._Arthur +1885;1889;Grover Cleveland (USA President #22);https://wikipedia.org/wiki/Grover_Cleveland +1889;1893;Benjamin Harrison (USA President #23);https://wikipedia.org/wiki/Benjamin_Harrison +1893;1897;Grover Cleveland (USA President #24);https://wikipedia.org/wiki/Grover_Cleveland +1897;1901;William McKinley (USA President #25);https://wikipedia.org/wiki/William_McKinley +1901;1909;Theodore Roosevelt (USA President #26);https://wikipedia.org/wiki/Theodore_Roosevelt +1909;1913;William Howard Taft (USA President #27);https://wikipedia.org/wiki/William_Howard_Taft +1913;1921;Woodrow Wilson (USA President #28;https://wikipedia.org/wiki/Woodrow_Wilson +1921;1923;Warren G. Harding (USA President #29);https://wikipedia.org/wiki/Warren_G._Harding +1923;1929;Calvin Coolidge (USA President #30);https://wikipedia.org/wiki/Calvin_Coolidge +1929;1933;Herbert Hoover (USA President #31);https://wikipedia.org/wiki/Herbert_Hoover +1933;1945;Franklin D. Roosevelt (USA President #32);https://wikipedia.org/wiki/Franklin_D._Roosevelt +1945;1953;Harry S. Truman (USA President #33);https://wikipedia.org/wiki/Harry_S._Truman +1953;1961;Dwight D. Eisenhower (USA President #34);https://wikipedia.org/wiki/Dwight_D._Eisenhower +1961;1963;John F. Kennedy (USA President #35);https://wikipedia.org/wiki/John_F._Kennedy +1963;1969;Lyndon B. Johnson (USA President #36);https://wikipedia.org/wiki/Lyndon_B._Johnson +1969;1974;Richard Nixon (USA President #37);https://wikipedia.org/wiki/Richard_Nixon +1974;1977;Gerald Ford (USA President #38);https://wikipedia.org/wiki/Gerald_Ford +1977;1981;James (Jimmy) Carter (USA President #39);https://wikipedia.org/wiki/Jimmy_Carter +1981;1989;Ronald Reagan (USA President #40);https://wikipedia.org/wiki/Ronald_Reagan +1989;1993;George H.W. Bush (USA President #41);https://wikipedia.org/wiki/George_H._W._Bush +1993;2001;William (Bill) Clinton (USA President #42);https://wikipedia.org/wiki/Bill_Clinton +2001;2009;George W. Bush (USA President #43);https://wikipedia.org/wiki/George_W._Bush +2009;2017;Barack Obama (USA President #44);https://wikipedia.org/wiki/Barack_Obama +2017;2021;Donald Trump (USA President #45);https://wikipedia.org/wiki/Donald_Trump +2021;2025;Joe Biden (USA President #46);https://wikipedia.org/wiki/Joe_Biden + diff --git a/HistContext/gramplet.png b/HistContext/gramplet.png new file mode 100644 index 000000000..3c68c79f2 Binary files /dev/null and b/HistContext/gramplet.png differ diff --git a/HistContext/gramplet1.png b/HistContext/gramplet1.png new file mode 100644 index 000000000..277a70e28 Binary files /dev/null and b/HistContext/gramplet1.png differ diff --git a/HistContext/options.png b/HistContext/options.png new file mode 100644 index 000000000..137037796 Binary files /dev/null and b/HistContext/options.png differ diff --git a/HistContext/options1.png b/HistContext/options1.png new file mode 100644 index 000000000..3bbfa094c Binary files /dev/null and b/HistContext/options1.png differ diff --git a/HistContext/pandemi_v1_0.txt b/HistContext/pandemi_v1_0.txt new file mode 100644 index 000000000..6cecd1f11 --- /dev/null +++ b/HistContext/pandemi_v1_0.txt @@ -0,0 +1,17 @@ +1520;1527;Smallpox (New World);https://wikipedia.org/wiki/Smallpox +1629;1631;Great Bubonic Plague of Milan (Italy);https://wikipedia.org/wiki/Italian_plague_of_1629%E2%80%931631 +1665;1666;Great Bubonic Plague of London (England);https://wikipedia.org/wiki/Great_Plague_of_London +1720;1722;Great Bubonic Plague of Marseille (France);https://wikipedia.org/wiki/Great_Plague_of_Marseille +1793;1793;Yellow Fever Epidemic (Philadelphia);https://wikipedia.org/wiki/Yellow_Fever_Epidemic_of_1793 +1817;1824;First Cholera Pandemic (Asia, Europe);https://wikipedia.org/wiki/Cholera_outbreaks_and_pandemics +1855;1860;Third Bubonic Plague Pandemic (China, India, worldwide);https://wikipedia.org/wiki/Third_plague_pandemic +1889;1890;Russian Flu (Worldwide);https://wikipedia.org/wiki/1889%E2%80%931890_pandemic +1918;1920;Spanish Flu (Worldwide);https://wikipedia.org/wiki/Spanish_flu +1957;1958;Asian Flu (Worldwide);https://wikipedia.org/wiki/Asian_flu +1968;1969;Hong Kong Flu (Worldwide);https://wikipedia.org/wiki/Hong_Kong_flu +1981;;HIV/AIDS (Worldwide);https://wikipedia.org/wiki/HIV/AIDS +2002;2003;SARS (Asia, worldwide);https://wikipedia.org/wiki/SARS +2009;2010;Swine Flu (Worldwide);https://wikipedia.org/wiki/2009_flu_pandemic +2014;2016;Ebola (West Africa);https://wikipedia.org/wiki/Ebola_virus_disease +2015;2016;Zika Virus (Americas);https://wikipedia.org/wiki/Zika_virus +2019;;COVID-19 (Worldwide);https://wikipedia.org/wiki/COVID-19_pandemic diff --git a/HistContext/po/da-local.po b/HistContext/po/da-local.po new file mode 100644 index 000000000..5c34ebba8 --- /dev/null +++ b/HistContext/po/da-local.po @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-03 15:46+0100\n" +"PO-Revision-Date: 2024-11-03 15:50+0100\n" +"Last-Translator: Kaj Mikkelsen \n" +"Language-Team: \n" +"Language: da_DK\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#: HistContext.gpr.py:3 HistContext.gpr.py:13 +msgid "Historical Context" +msgstr "Historisk Sammhæng" + +#: HistContext.gpr.py:4 +msgid "Displaying a historical context" +msgstr "Viser den historiske sammenhæng" + +#: HistContext.py:85 +msgid "Filter string " +msgstr "Filter streng " + +#: HistContext.py:88 +msgid "Use filter " +msgstr "Benyt filter " + +#: HistContext.py:91 +msgid "Hide outside life span " +msgstr "Skjul udenfor livsforløb " + +#: HistContext.py:94 +msgid "Files" +msgstr "Filer" + +#: HistContext.py:101 +msgid "Foreground color items in lifespan" +msgstr "Forgrundsfarve indefor livsforløb" + +#: HistContext.py:104 +msgid "Background color items in lifespan" +msgstr "Baggrundsfarve indefor livsforløb" + +#: HistContext.py:107 +msgid "Foreground color items outside lifespan" +msgstr "Forgrundsfarve udenfor livsforløb" + +#: HistContext.py:110 +msgid "Background color items outside lifespan" +msgstr "Baggrundsfarve udenfor livsforløb" + +#: HistContext.py:222 +msgid ": not four semicolons in : \"" +msgstr ": ikke fire semikoloner i :\"" + +#: HistContext.py:224 HistContext.py:288 +msgid "Error:" +msgstr "Fejl:" + +#: HistContext.py:287 +msgid "Cannot open URL: " +msgstr "Kan ikke åbne URL: " + +#: HistContext.py:297 +msgid "Double click row to follow link" +msgstr "Dobbeltklik for at følge linket" + +#: HistContext.py:305 +msgid "From" +msgstr "Fra år" + +#: HistContext.py:314 +msgid "To" +msgstr "Til år" + +#: HistContext.py:319 +msgid "Text" +msgstr "Tekst" diff --git a/HistContext/po/template.pot b/HistContext/po/template.pot new file mode 100644 index 000000000..73af3ebfe --- /dev/null +++ b/HistContext/po/template.pot @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-03 15:46+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: HistContext.gpr.py:3 HistContext.gpr.py:13 +msgid "Historical Context" +msgstr "" + +#: HistContext.gpr.py:4 +msgid "Displaying a historical context" +msgstr "" + +#: HistContext.py:85 +msgid "Filter string " +msgstr "" + +#: HistContext.py:88 +msgid "Use filter " +msgstr "" + +#: HistContext.py:91 +msgid "Hide outside life span " +msgstr "" + +#: HistContext.py:94 +msgid "Files" +msgstr "" + +#: HistContext.py:101 +msgid "Foreground color items in lifespan" +msgstr "" + +#: HistContext.py:104 +msgid "Background color items in lifespan" +msgstr "" + +#: HistContext.py:107 +msgid "Foreground color items outside lifespan" +msgstr "" + +#: HistContext.py:110 +msgid "Background color items outside lifespan" +msgstr "" + +#: HistContext.py:222 +msgid ": not four semicolons in : \"" +msgstr "" + +#: HistContext.py:224 HistContext.py:288 +msgid "Error:" +msgstr "" + +#: HistContext.py:287 +msgid "Cannot open URL: " +msgstr "" + +#: HistContext.py:297 +msgid "Double click row to follow link" +msgstr "" + +#: HistContext.py:305 +msgid "From" +msgstr "" + +#: HistContext.py:314 +msgid "To" +msgstr "" + +#: HistContext.py:319 +msgid "Text" +msgstr "" diff --git a/HistContext/uk_UA_data_v1_0.txt b/HistContext/uk_UA_data_v1_0.txt new file mode 100644 index 000000000..8633aeca2 --- /dev/null +++ b/HistContext/uk_UA_data_v1_0.txt @@ -0,0 +1,14 @@ +1600;1648;Повстання козаків під проводом Северина Наливайка;https://uk.wikipedia.org/wiki/Северин_Наливайко Повстання козаків на території сучасної України проти польського панування. Було придушене, а Наливайко страчений. +1648;1657;Хмельниччина (Національно-визвольна війна);https://uk.wikipedia.org/wiki/Національно-визвольна_війна_українського_народу Національно-визвольна війна під проводом Богдана Хмельницького, яка призвела до створення Гетьманщини в Лівобережній Україні. +1654;1654;Переяславська рада;https://uk.wikipedia.org/wiki/Переяславська_рада Збори козацької старшини на чолі з Богданом Хмельницьким, де ухвалено рішення про приєднання до Московського царства. +1708;1709;Мазепинське повстання;https://uk.wikipedia.org/wiki/Іван_Мазепа Гетьман Іван Мазепа підняв повстання проти Московії і перейшов на бік Карла XII під час Північної війни. +1764;1764;Скасування Гетьманщини в Україні;https://uk.wikipedia.org/wiki/Скасування_Гетьманщини Катерина II скасувала Гетьманщину в Лівобережній Україні, встановивши централізоване управління. +1775;1775;Зруйнування Запорозької Січі;https://uk.wikipedia.org/wiki/Зруйнування_Запорозької_Січі Запорозька Січ була ліквідована російськими військами за наказом Катерини II, що завершило еру козаччини. +1783;1783;Закріпачення селян Лівобережної України;https://uk.wikipedia.org/wiki/Закріпачення_селян_в_Україні Указ Катерини II закріпив селян Лівобережжя, прирівнюючи їх до кріпаків Російської імперії. +1846;1847;Кирило-Мефодіївське братство;https://uk.wikipedia.org/wiki/Кирило-Мефодіївське_братство Таємна організація української інтелігенції, яка прагнула відновити незалежність України. +1861;1861;Скасування кріпацтва в Україні;https://uk.wikipedia.org/wiki/Скасування_кріпацтва_в_Російській_імперії Маніфест Олександра II скасував кріпацтво в Україні, надавши селянам свободу, але без земельної власності. +1917;1917;Проголошення Української Народної Республіки;https://uk.wikipedia.org/wiki/Українська_Народна_Республіка Центральна Рада проголосила створення УНР, незалежної держави на території сучасної України. +1921;1921;Ризький мирний договір;https://uk.wikipedia.org/wiki/Ризький_мирний_договір Українські землі були розділені між Польщею та Радянською Росією, що завершило польсько-радянську війну. +1932;1933;Голодомор в Україні;https://uk.wikipedia.org/wiki/Голодомор Масовий голод, викликаний примусовою колективізацією та конфіскацією зерна радянською владою, що призвело до загибелі мільйонів українців. +1941;1945;Україна у Другій світовій війні;https://uk.wikipedia.org/wiki/Україна_у_Другій_світовій_війні Територія України стала одним із головних театрів воєнних дій у боротьбі між нацистською Німеччиною та Радянським Союзом. +1991;1991;Проголошення незалежності України;https://uk.wikipedia.org/wiki/Акт_проголошення_незалежності_України Верховна Рада проголосила незалежність України від Радянського Союзу, що підтверджено референдумом 1 грудня 1991 року.