Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,13 @@ Once you have set up a useful combination, save it so you can reload it in one c

## Importing GSAK's saved filters

**File → Import GSAK Filters…** turns the filters you saved in GSAK into OpenSAK filter profiles. It is the companion of *Import from GSAK Database*: that one imports caches out of a cache database (`sqlite.db3`), this one imports filters out of GSAK's settings database (`gsak.db3`, normally `%AppData%\GSAK\gsak.db3`). A GSAK backup `.zip` works too — the `gsak.db3` inside it is found automatically.
**File → Import from GSAK Database…** also turns the filters you saved in GSAK into OpenSAK filter profiles. The filters live in GSAK's settings database (`gsak.db3`, normally `%AppData%\GSAK\gsak.db3`), and the import offers them — with the **Also import the saved GSAK filters** box ticked — whenever it finds that file:

Pick the file, tick the filters you want (all of them are ticked to begin with; the search box narrows the list, and **Select all / Select none** apply to what the search currently shows), and press **Start import**. Existing profiles of the same name are kept and reported as skipped unless you tick **Overwrite filter profiles that already exist**.
- **A GSAK backup `.zip`**: every database in the backup is listed, and the `gsak.db3` inside it supplies the filters and user locations.
- **A single `sqlite.db3`**: that database is imported; the filters are offered too when a `gsak.db3` sits in the GSAK folder the database belongs to.
- **`gsak.db3` itself**: no caches are imported, only the saved filters and user locations.

After the caches (if any) are imported, the filter list opens with the file already chosen. Tick the filters you want (all of them are ticked to begin with; the search box narrows the list, and **Select all / Select none** apply to what the search currently shows), and press **Start import**. Existing profiles of the same name are kept and reported as skipped unless you tick **Overwrite filter profiles that already exist**.

### Where each GSAK condition ends up

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ OpenSAK works with standard **GPX files** and **Pocket Query ZIP files** — the
If your Pocket Queries arrive by e-mail, OpenSAK can fetch them straight from your mailbox. Set up the mailbox under **Settings → Settings… → PQ Email**, then use **File → Check for PQ Email…**. The password is kept in your operating system's keyring, never in plain text.

### Coming from GSAK
You can import a GSAK database directly with **File → Import from GSAK Database…** — including personal notes, corrected coordinates, child waypoints, attributes and the full log history. Point it at a GSAK backup `.zip` to see every database in the backup and import the ones you pick, each as its own OpenSAK database. **File → Import GSAK Filters…** turns your saved GSAK filters into OpenSAK filter profiles. OpenSAK also uses the same GPX/PQ format as GSAK, so your Pocket Queries import as usual.
You can import a GSAK database directly with **File → Import from GSAK Database…** — including personal notes, corrected coordinates, child waypoints, attributes and the full log history. Point it at a GSAK backup `.zip` to see every database in the backup and import the ones you pick, each as its own OpenSAK database. The same import also turns your saved GSAK filters and user locations (from `gsak.db3`) into OpenSAK filter profiles and home locations — pick a backup, or `gsak.db3` on its own if you only want those. OpenSAK also uses the same GPX/PQ format as GSAK, so your Pocket Queries import as usual.

---

Expand Down
6 changes: 6 additions & 0 deletions src/opensak/gui/dialogs/gsak_import_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ def _setup_ui(self) -> None:
layout = QVBoxLayout(self)
layout.setSpacing(10)

# What each kind of file brings in: backup, single sqlite.db3, gsak.db3.
intro = QLabel(tr("gsak_import_intro"))
intro.setWordWrap(True)
intro.setStyleSheet(hint_style(font_size=None))
layout.addWidget(intro)

file_lbl = QLabel(tr("gsak_import_select_file_label"))
layout.addWidget(file_lbl)

Expand Down
16 changes: 0 additions & 16 deletions src/opensak/gui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,6 @@ def _setup_menu(self) -> None:
self._act_gsak_import.triggered.connect(self._open_gsak_import_dialog)
file_menu.addAction(self._act_gsak_import)

self._act_gsak_filter_import = QAction(tr("action_gsak_filter_import"), self)
self._act_gsak_filter_import.triggered.connect(self._open_gsak_filter_import_dialog)
file_menu.addAction(self._act_gsak_filter_import)

self._act_pq_email_check = QAction(tr("action_pq_email_check"), self)
self._act_pq_email_check.triggered.connect(self._open_pq_email_check_dialog)
file_menu.addAction(self._act_pq_email_check)
Expand Down Expand Up @@ -2133,18 +2129,6 @@ def _on_home_points_imported(self) -> None:
recalculate_distances(s.home_lat, s.home_lon)
self._refresh_cache_list()

def _open_gsak_filter_import_dialog(self) -> None:
"""Import GSAK's saved filters as OpenSAK filter profiles.

Unlike the cache import next to it this touches no cache data, so the
cache list and map are left alone — only the toolbar's profile
dropdown has to pick up the new profiles.
"""
from opensak.gui.dialogs.gsak_filter_import_dialog import GsakFilterImportDialog
dlg = GsakFilterImportDialog(self)
dlg.import_completed.connect(self._on_filter_profiles_imported)
dlg.exec()

def _on_filter_profiles_imported(self) -> None:
self._populate_filter_profile_combo(select_name=self._active_filter_name or None)

Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/cs.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
"action_gsak_import": "&Importovat z databáze GSAK…",
"gsak_import_dialog_title": "Import z databáze GSAK",
"gsak_import_select_file_label": "Vyberte zálohu GSAK (.zip) nebo soubor databáze (.db3):",
"gsak_import_intro": "Záloha GSAK (.zip) zobrazí všechny databáze, které obsahuje, a nabídne také import uložených filtrů a uživatelských míst z jejího gsak.db3. Jednotlivý soubor databáze (sqlite.db3) importuje pouze tuto databázi; filtry a místa se nabídnou také, pokud se v příslušné složce GSAK najde gsak.db3. Pokud zvolíte samotný gsak.db3, neimportují se žádné keše, pouze uložené filtry a uživatelská místa.",
"gsak_import_browse_title": "Vybrat zálohu nebo soubor GSAK",
"gsak_import_file_filter": "Záloha nebo databáze GSAK (*.zip *.db3);;Všechny soubory (*)",
"gsak_import_extracting": "Rozbaluji {name}…",
Expand Down Expand Up @@ -1703,7 +1704,6 @@
"file_locations_kind_appimage_icon": "Ikona v nabídce aplikací",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "Importovat &filtry z GSAK…",
"gsak_filter_import_dialog_title": "Import filtrů z GSAK",
"gsak_filter_import_select_file_label": "Vyberte databázi nastavení GSAK (gsak.db3) nebo zálohu (.zip):",
"gsak_filter_import_browse_title": "Vybrat gsak.db3",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/da.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
"action_gsak_import": "&Importer fra GSAK-database…",
"gsak_import_dialog_title": "Importer fra GSAK-database",
"gsak_import_select_file_label": "Vælg en GSAK-backup (.zip) eller databasefil (.db3):",
"gsak_import_intro": "En GSAK-backup (.zip) viser alle de databaser, den indeholder, og tilbyder også at importere de gemte filtre og brugerplaceringer fra dens gsak.db3. En enkelt databasefil (sqlite.db3) importerer kun den database; filtre og placeringer tilbydes også, hvis der findes en gsak.db3 i den GSAK-mappe, den hører til. Vælger du selve gsak.db3, importeres ingen cacher, kun de gemte filtre og brugerplaceringer.",
"gsak_import_browse_title": "Vælg GSAK-backup eller databasefil",
"gsak_import_file_filter": "GSAK-backup eller database (*.zip *.db3);;Alle filer (*)",
"gsak_import_extracting": "Udpakker {name}…",
Expand Down Expand Up @@ -1707,7 +1708,6 @@
"file_locations_kind_appimage_icon": "Ikon i programmenuen",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "Importér GSAK-&filtre…",
"gsak_filter_import_dialog_title": "Importér GSAK-filtre",
"gsak_filter_import_select_file_label": "Vælg GSAK's indstillingsdatabase (gsak.db3) eller en backup (.zip):",
"gsak_filter_import_browse_title": "Vælg gsak.db3",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
"action_gsak_import": "&Aus GSAK-Datenbank importieren…",
"gsak_import_dialog_title": "Aus GSAK-Datenbank importieren",
"gsak_import_select_file_label": "Wählen Sie eine GSAK-Sicherung (.zip) oder Datenbankdatei (.db3):",
"gsak_import_intro": "Eine GSAK-Sicherung (.zip) listet alle enthaltenen Datenbanken auf und bietet zusätzlich an, die gespeicherten Filter und Benutzerstandorte aus ihrer gsak.db3 zu importieren. Eine einzelne Datenbankdatei (sqlite.db3) importiert nur diese Datenbank; Filter und Standorte werden ebenfalls angeboten, wenn im zugehörigen GSAK-Ordner eine gsak.db3 gefunden wird. Wird die gsak.db3 selbst gewählt, werden keine Caches importiert, nur die gespeicherten Filter und Benutzerstandorte.",
"gsak_import_browse_title": "GSAK-Sicherung oder Datenbankdatei auswählen",
"gsak_import_file_filter": "GSAK-Sicherung oder Datenbank (*.zip *.db3);;Alle Dateien (*)",
"gsak_import_extracting": "{name} wird entpackt…",
Expand Down Expand Up @@ -1708,7 +1709,6 @@
"file_locations_kind_appimage_icon": "Symbol im Anwendungsmenü",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "GSAK-&Filter importieren…",
"gsak_filter_import_dialog_title": "GSAK-Filter importieren",
"gsak_filter_import_select_file_label": "GSAK-Einstellungsdatenbank (gsak.db3) oder Backup (.zip) auswählen:",
"gsak_filter_import_browse_title": "gsak.db3 auswählen",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/de_CH.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
"action_gsak_import": "&Aus GSAK-Datenbank importieren…",
"gsak_import_dialog_title": "Aus GSAK-Datenbank importieren",
"gsak_import_select_file_label": "Wählen Sie eine GSAK-Sicherung (.zip) oder Datenbankdatei (.db3):",
"gsak_import_intro": "Eine GSAK-Sicherung (.zip) listet alle enthaltenen Datenbanken auf und bietet zusätzlich an, die gespeicherten Filter und Benutzerstandorte aus ihrer gsak.db3 zu importieren. Eine einzelne Datenbankdatei (sqlite.db3) importiert nur diese Datenbank; Filter und Standorte werden ebenfalls angeboten, wenn im zugehörigen GSAK-Ordner eine gsak.db3 gefunden wird. Wird die gsak.db3 selbst gewählt, werden keine Caches importiert, nur die gespeicherten Filter und Benutzerstandorte.",
"gsak_import_browse_title": "GSAK-Sicherung oder Datenbankdatei auswählen",
"gsak_import_file_filter": "GSAK-Sicherung oder Datenbank (*.zip *.db3);;Alle Dateien (*)",
"gsak_import_extracting": "{name} wird entpackt…",
Expand Down Expand Up @@ -1709,7 +1710,6 @@
"file_locations_kind_appimage_icon": "Symbol im Anwendungsmenü",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "GSAK-&Filter importieren…",
"gsak_filter_import_dialog_title": "GSAK-Filter importieren",
"gsak_filter_import_select_file_label": "GSAK-Einstellungsdatenbank (gsak.db3) oder Backup (.zip) auswählen:",
"gsak_filter_import_browse_title": "gsak.db3 auswählen",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/en.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
"action_gsak_import": "&Import from GSAK Database…",
"gsak_import_dialog_title": "Import from GSAK Database",
"gsak_import_select_file_label": "Select a GSAK backup (.zip) or database file (.db3):",
"gsak_import_intro": "A GSAK backup (.zip) lists all the databases it holds and also offers to import the saved filters and user locations from its gsak.db3. A single database file (sqlite.db3) imports just that database; its filters and locations are offered too if gsak.db3 is found in the GSAK folder it belongs to. Choosing gsak.db3 itself imports no caches, only the saved filters and user locations.",
"gsak_import_browse_title": "Select GSAK backup or database file",
"gsak_import_file_filter": "GSAK backup or database (*.zip *.db3);;All files (*)",
"gsak_import_extracting": "Extracting {name}…",
Expand Down Expand Up @@ -1706,7 +1707,6 @@
"file_locations_kind_appimage_icon": "Application menu icon",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "Import GSAK &Filters…",
"gsak_filter_import_dialog_title": "Import GSAK Filters",
"gsak_filter_import_select_file_label": "Select GSAK's settings database (gsak.db3) or a backup (.zip):",
"gsak_filter_import_browse_title": "Select gsak.db3",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/es.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
"action_gsak_import": "&Importar desde base de datos GSAK…",
"gsak_import_dialog_title": "Importar desde base de datos GSAK",
"gsak_import_select_file_label": "Selecciona una copia de seguridad de GSAK (.zip) o un archivo de base de datos (.db3):",
"gsak_import_intro": "Una copia de seguridad de GSAK (.zip) muestra todas las bases de datos que contiene y ofrece además importar los filtros guardados y las ubicaciones de usuario de su gsak.db3. Un único archivo de base de datos (sqlite.db3) importa solo esa base de datos; sus filtros y ubicaciones también se ofrecen si se encuentra gsak.db3 en la carpeta de GSAK a la que pertenece. Si eliges el propio gsak.db3, no se importa ningún caché, solo los filtros guardados y las ubicaciones de usuario.",
"gsak_import_browse_title": "Seleccionar copia de seguridad o base de datos de GSAK",
"gsak_import_file_filter": "Copia de seguridad o base de datos de GSAK (*.zip *.db3);;Todos los archivos (*)",
"gsak_import_extracting": "Extrayendo {name}…",
Expand Down Expand Up @@ -1708,7 +1709,6 @@
"file_locations_kind_appimage_icon": "Icono del menú de aplicaciones",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "Importar &filtros de GSAK…",
"gsak_filter_import_dialog_title": "Importar filtros de GSAK",
"gsak_filter_import_select_file_label": "Elige la base de configuración de GSAK (gsak.db3) o una copia (.zip):",
"gsak_filter_import_browse_title": "Elegir gsak.db3",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
"action_gsak_import": "&Importer depuis une base GSAK…",
"gsak_import_dialog_title": "Importer depuis une base GSAK",
"gsak_import_select_file_label": "Sélectionnez une sauvegarde GSAK (.zip) ou un fichier de base de données (.db3) :",
"gsak_import_intro": "Une sauvegarde GSAK (.zip) liste toutes les bases de données qu'elle contient et propose aussi d'importer les filtres enregistrés et les emplacements utilisateur de son gsak.db3. Un fichier de base de données seul (sqlite.db3) n'importe que cette base ; ses filtres et emplacements sont aussi proposés si un gsak.db3 se trouve dans le dossier GSAK correspondant. Choisir gsak.db3 lui-même n'importe aucune cache, seulement les filtres enregistrés et les emplacements utilisateur.",
"gsak_import_browse_title": "Sélectionner une sauvegarde ou un fichier GSAK",
"gsak_import_file_filter": "Sauvegarde ou base GSAK (*.zip *.db3);;Tous les fichiers (*)",
"gsak_import_extracting": "Extraction de {name}…",
Expand Down Expand Up @@ -1708,7 +1709,6 @@
"file_locations_kind_appimage_icon": "Icône du menu des applications",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "Importer les &filtres GSAK…",
"gsak_filter_import_dialog_title": "Importer les filtres GSAK",
"gsak_filter_import_select_file_label": "Choisissez la base de configuration GSAK (gsak.db3) ou une sauvegarde (.zip) :",
"gsak_filter_import_browse_title": "Choisir gsak.db3",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/nl.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
"action_gsak_import": "&Importeren uit GSAK-database…",
"gsak_import_dialog_title": "Importeren uit GSAK-database",
"gsak_import_select_file_label": "Selecteer een GSAK-back-up (.zip) of databasebestand (.db3):",
"gsak_import_intro": "Een GSAK-back-up (.zip) toont alle databases die erin zitten en biedt ook aan de opgeslagen filters en gebruikerslocaties uit de bijbehorende gsak.db3 te importeren. Eén databasebestand (sqlite.db3) importeert alleen die database; de filters en locaties worden ook aangeboden als er een gsak.db3 in de bijbehorende GSAK-map staat. Kies je gsak.db3 zelf, dan worden geen caches geïmporteerd, alleen de opgeslagen filters en gebruikerslocaties.",
"gsak_import_browse_title": "Selecteer GSAK-back-up of databasebestand",
"gsak_import_file_filter": "GSAK-back-up of database (*.zip *.db3);;Alle bestanden (*)",
"gsak_import_extracting": "Bezig met uitpakken van {name}…",
Expand Down Expand Up @@ -1705,7 +1706,6 @@
"file_locations_kind_appimage_icon": "Pictogram in het programmamenu",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "GSAK-&filters importeren…",
"gsak_filter_import_dialog_title": "GSAK-filters importeren",
"gsak_filter_import_select_file_label": "Kies GSAK's instellingendatabase (gsak.db3) of een back-up (.zip):",
"gsak_filter_import_browse_title": "gsak.db3 kiezen",
Expand Down
2 changes: 1 addition & 1 deletion src/opensak/lang/pl.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
"action_gsak_import": "&Importuj z bazy danych GSAK…",
"gsak_import_dialog_title": "Import z bazy danych GSAK",
"gsak_import_select_file_label": "Wybierz kopię zapasową GSAK (.zip) lub plik bazy danych (.db3):",
"gsak_import_intro": "Kopia zapasowa GSAK (.zip) pokazuje wszystkie zawarte w niej bazy danych i proponuje też import zapisanych filtrów i lokalizacji użytkownika z jej pliku gsak.db3. Pojedynczy plik bazy danych (sqlite.db3) importuje tylko tę bazę; filtry i lokalizacje są również proponowane, jeśli w odpowiadającym jej folderze GSAK znajduje się gsak.db3. Wybranie samego gsak.db3 nie importuje żadnych skrzynek, tylko zapisane filtry i lokalizacje użytkownika.",
"gsak_import_browse_title": "Wybierz kopię zapasową GSAK lub plik bazy danych",
"gsak_import_file_filter": "Kopia zapasowa lub baza danych GSAK (*.zip *.db3);;Wszystkie pliki (*)",
"gsak_import_extracting": "Rozpakowywanie {name}…",
Expand Down Expand Up @@ -1708,7 +1709,6 @@
"file_locations_kind_appimage_icon": "Ikona w menu aplikacji",

# ── GSAK filter import ────────────────────────────────────────────────────
"action_gsak_filter_import": "Importuj &filtry GSAK…",
"gsak_filter_import_dialog_title": "Import filtrów GSAK",
"gsak_filter_import_select_file_label": "Wybierz bazę ustawień GSAK (gsak.db3) lub kopię zapasową (.zip):",
"gsak_filter_import_browse_title": "Wybierz gsak.db3",
Expand Down
Loading
Loading