├── .github └── workflows │ └── flatpak.yml ├── .gitignore ├── COPYING ├── README.md ├── Wike.doap ├── com.github.hugolabe.Wike.json ├── data ├── com.github.hugolabe.Wike.SearchProvider.ini ├── com.github.hugolabe.Wike.SearchProvider.service.in ├── com.github.hugolabe.Wike.desktop.in ├── com.github.hugolabe.Wike.gresource.xml ├── com.github.hugolabe.Wike.gschema.xml ├── com.github.hugolabe.Wike.metainfo.xml.in ├── gtk │ ├── about.ui │ ├── bookmarks-menu.ui │ ├── bookmarks-row.ui │ ├── bookmarks.ui │ ├── dialogs.ui │ ├── help-overlay.ui │ ├── history-row.ui │ ├── history.ui │ ├── langlinks-row.ui │ ├── langlinks.ui │ ├── languages-row.ui │ ├── languages.ui │ ├── menu-article.ui │ ├── menu-main.ui │ ├── menu-view.ui │ ├── page-status.ui │ ├── page.ui │ ├── prefs.ui │ ├── search-row.ui │ ├── search-settings-row.ui │ ├── search-settings.ui │ ├── search.ui │ ├── style-dark.css │ ├── style-sepia.css │ ├── style.css │ ├── theme-switcher.ui │ ├── toc-row.ui │ ├── toc.ui │ ├── window.ui │ └── zoom-level.ui ├── icons │ ├── com.github.hugolabe.Wike-symbolic.svg │ ├── com.github.hugolabe.Wike.svg │ └── scalable │ │ ├── actions │ │ ├── app-remove-symbolic.svg │ │ ├── bookmark-new-symbolic.svg │ │ ├── checkmark-symbolic.svg │ │ ├── document-open-recent-symbolic.svg │ │ ├── edit-select-all-symbolic.svg │ │ ├── edit-select-none-symbolic.svg │ │ ├── find-location-symbolic.svg │ │ ├── language-symbolic.svg │ │ ├── list-remove-all-symbolic.svg │ │ ├── network-error-symbolic.svg │ │ ├── printer-symbolic.svg │ │ ├── selection-mode-symbolic.svg │ │ ├── system-search-symbolic.svg │ │ ├── tab-new-symbolic.svg │ │ ├── user-bookmarks-symbolic.svg │ │ ├── view-list-symbolic.svg │ │ └── view-reveal-symbolic.svg │ │ └── emblems │ │ ├── af.svg │ │ ├── am.svg │ │ ├── an.svg │ │ ├── ang.svg │ │ ├── ar.svg │ │ ├── arz.svg │ │ ├── as.svg │ │ ├── az.svg │ │ ├── ba.svg │ │ ├── be.svg │ │ ├── bg.svg │ │ ├── bn.svg │ │ ├── bo.svg │ │ ├── br.svg │ │ ├── bs.svg │ │ ├── ca.svg │ │ ├── ce.svg │ │ ├── ceb.svg │ │ ├── ckb.svg │ │ ├── cs.svg │ │ ├── cv.svg │ │ ├── cy.svg │ │ ├── da.svg │ │ ├── de.svg │ │ ├── el.svg │ │ ├── en.svg │ │ ├── eo.svg │ │ ├── es.svg │ │ ├── et.svg │ │ ├── eu.svg │ │ ├── fa.svg │ │ ├── fi.svg │ │ ├── fo.svg │ │ ├── fr.svg │ │ ├── fy.svg │ │ ├── ga.svg │ │ ├── gl.svg │ │ ├── gu.svg │ │ ├── gv.svg │ │ ├── he.svg │ │ ├── hi.svg │ │ ├── hif.svg │ │ ├── hr.svg │ │ ├── ht.svg │ │ ├── hu.svg │ │ ├── hy.svg │ │ ├── ia.svg │ │ ├── id.svg │ │ ├── io.svg │ │ ├── is.svg │ │ ├── it.svg │ │ ├── ja.svg │ │ ├── jv.svg │ │ ├── ka.svg │ │ ├── kk.svg │ │ ├── km.svg │ │ ├── kn.svg │ │ ├── ko.svg │ │ ├── ku.svg │ │ ├── ky.svg │ │ ├── la.svg │ │ ├── lb.svg │ │ ├── lt.svg │ │ ├── lv.svg │ │ ├── mg.svg │ │ ├── mk.svg │ │ ├── ml.svg │ │ ├── mn.svg │ │ ├── ms.svg │ │ ├── my.svg │ │ ├── ne.svg │ │ ├── nl.svg │ │ ├── nn.svg │ │ ├── no.svg │ │ ├── noflag.svg │ │ ├── oc.svg │ │ ├── or.svg │ │ ├── pl.svg │ │ ├── pt.svg │ │ ├── qu.svg │ │ ├── ro.svg │ │ ├── ru.svg │ │ ├── scn.svg │ │ ├── sco.svg │ │ ├── se.svg │ │ ├── sh.svg │ │ ├── si.svg │ │ ├── simple.svg │ │ ├── sk.svg │ │ ├── sl.svg │ │ ├── so.svg │ │ ├── sq.svg │ │ ├── sr.svg │ │ ├── sv.svg │ │ ├── sw.svg │ │ ├── ta.svg │ │ ├── tg.svg │ │ ├── th.svg │ │ ├── tl.svg │ │ ├── tr.svg │ │ ├── tt.svg │ │ ├── uk.svg │ │ ├── ur.svg │ │ ├── uz.svg │ │ ├── vi.svg │ │ ├── vo.svg │ │ ├── war.svg │ │ ├── yi.svg │ │ ├── zh-min-nan.svg │ │ ├── zh-yue.svg │ │ └── zh.svg ├── languages │ ├── languages.json │ └── languages.min.json ├── meson.build ├── screenshots │ ├── wike-01.png │ ├── wike-02.png │ ├── wike-03.png │ ├── wike-04.png │ └── wike-05.png └── styles │ ├── dark.css │ ├── dark.min.css │ ├── sepia.css │ ├── sepia.min.css │ ├── view.css │ └── view.min.css ├── meson.build ├── po ├── LINGUAS ├── POTFILES ├── ar.po ├── bg.po ├── bn.po ├── ca.po ├── cs.po ├── de.po ├── el.po ├── es.po ├── eu.po ├── fa.po ├── fi.po ├── fr.po ├── gl.po ├── he.po ├── hi.po ├── hr.po ├── hu.po ├── ia.po ├── id.po ├── it.po ├── ja.po ├── meson.build ├── nl.po ├── oc.po ├── pl.po ├── pt_BR.po ├── ru.po ├── sv.po ├── ta.po ├── tr.po ├── uk.po ├── ur.po ├── vi.po ├── wike.pot ├── zh_CN.po └── zh_TW.po └── src ├── __init__.py ├── application.py ├── bookmarks.py ├── data.py ├── history.py ├── langlinks.py ├── languages.py ├── menu.py ├── meson.build ├── page.py ├── prefs.py ├── search.py ├── toc.py ├── view.py ├── wike-sp.in ├── wike.in ├── wikipedia.py └── window.py /.github/workflows/flatpak.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: [master] 4 | pull_request: 5 | name: CI 6 | jobs: 7 | flatpak: 8 | name: "Flatpak" 9 | container: 10 | image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 11 | options: --privileged 12 | strategy: 13 | matrix: 14 | variant: 15 | - arch: x86_64 16 | runner: ubuntu-24.04 17 | - arch: aarch64 18 | runner: ubuntu-24.04-arm 19 | runs-on: ${{ matrix.variant.runner }} 20 | steps: 21 | - uses: actions/checkout@v4 22 | - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 23 | with: 24 | bundle: com.github.hugolabe.Wike.flatpak 25 | manifest-path: com.github.hugolabe.Wike.json 26 | cache-key: flatpak-builder-${{ github.sha }} 27 | arch: ${{ matrix.variant.arch }} 28 | verbose: true 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .flatpak-builder 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![GNOME Circle](https://gitlab.gnome.org/Teams/Circle/-/raw/master/assets/button/badge.svg)](https://circle.gnome.org) 2 | [![Please do not theme this app](https://stopthemingmy.app/badge.svg)](https://stopthemingmy.app) 3 | 4 | Wike 5 | 6 | # Wike 7 | 8 | Search and read Wikipedia articles 9 | 10 | ![](data/screenshots/wike-01.png) 11 | 12 | ## Description 13 | 14 | *Wike* is a Wikipedia reader for the GNOME Desktop. 15 | Provides access to all the content of this online encyclopedia in a native application, with a simpler and distraction-free view of articles. 16 | 17 | ### Features 18 | 19 | - Open multiple articles in tabs 20 | - More than 300 languages 21 | - Search suggestions 22 | - Bookmarks management 23 | - History of recent articles 24 | - Table of contents 25 | - Text search in articles 26 | - Print articles 27 | - Light, dark and sepia themes 28 | - Desktop and mobile layouts 29 | - GNOME Shell search integration 30 | 31 | ## Install 32 | 33 | ### Flatpak 34 | 35 | This is the official package. You can install it from Flathub. 36 | 37 | Download on Flathub 38 | 39 | ### Snap 40 | 41 | Get it from the Snap Store. 42 | 43 | Get it from the Snap Store 44 | 45 | ### Other installation methods 46 | 47 | |Distro|Package Name/Link|Maintainer| 48 | |:----:|:----:|:----:| 49 | | Arch Linux (AUR) | [`wike`](https://aur.archlinux.org/packages/wike/) | [Mark Wagie](https://github.com/yochananmarqos) | 50 | | Ubuntu (official package) | [`wike`](https://launchpad.net/ubuntu/+source/wike) | [Matthias Geiger](https://github.com/werdahias) | 51 | | Ubuntu (PPA) | [`wike`](https://code.launchpad.net/~apandada1/+archive/ubuntu/wike) | [Archisman Panigrahi](https://github.com/archisman-panigrahi) | 52 | | Debian Linux (bookworm and later) | [`wike`](https://tracker.debian.org/pkg/wike) | [Matthias Geiger](https://github.com/werdahias) | 53 | | Fedora Linux | [`wike`](https://src.fedoraproject.org/rpms/wike) | [Gustavo Costa](https://github.com/xfgusta) | 54 | 55 | ## Build 56 | 57 | *Wike* can be built and run with [GNOME Builder](https://wiki.gnome.org/Apps/Builder). 58 | 59 | 1. Open GNOME Builder 60 | 2. Click the **Clone Repository** button 61 | 3. Enter `https://github.com/hugolabe/wike.git` in the field **Repository URL** 62 | 4. Click the **Clone Project** button 63 | 5. Click the **Run** button to start building application 64 | 65 | ## Translations 66 | 67 | You can help translate *Wike* on the [POEditor](https://poeditor.com/join/project?hash=kNgJu4MAum) platform. 68 | 69 | ## License 70 | 71 | *Wike* is released under the terms of the [GNU General Public License V3](https://www.gnu.org/licenses/gpl-3.0.html). 72 | 73 | All content provided by the app comes from [Wikipedia.org](https://www.wikipedia.org/) and is available under [Creative Commons Attribution-ShareAlike License 4.0](https://creativecommons.org/licenses/by-sa/4.0/) unless otherwise noted. 74 | *Wike* is an independent development not endorsed by or affiliated with the [Wikimedia Foundation](https://wikimediafoundation.org/). 75 | 76 | *Wike* uses a subset of [circle-flags](https://github.com/HatScripts/circle-flags) icons, copyright by [HatScripts](https://github.com/HatScripts), and released under the [MIT license](https://opensource.org/license/mit/). 77 | -------------------------------------------------------------------------------- /Wike.doap: -------------------------------------------------------------------------------- 1 | 6 | 7 | Wike 8 | Search and read Wikipedia articles 9 | 10 | 11 | 12 | Python 13 | GTK 4 14 | Libadwaita 15 | 16 | 17 | 18 | Hugo Olabera 19 | 20 | 21 | 22 | hugolabe 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /com.github.hugolabe.Wike.json: -------------------------------------------------------------------------------- 1 | { 2 | "app-id" : "com.github.hugolabe.Wike", 3 | "runtime" : "org.gnome.Platform", 4 | "runtime-version" : "48", 5 | "sdk" : "org.gnome.Sdk", 6 | "command" : "wike", 7 | "finish-args" : [ 8 | "--share=network", 9 | "--share=ipc", 10 | "--socket=fallback-x11", 11 | "--socket=wayland", 12 | "--socket=pulseaudio", 13 | "--device=dri" 14 | ], 15 | "modules" : [ 16 | { 17 | "name" : "wike", 18 | "buildsystem" : "meson", 19 | "builddir" : true, 20 | "run-tests" : true, 21 | "sources" : [ 22 | { 23 | "type" : "dir", 24 | "path" : "." 25 | } 26 | ] 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /data/com.github.hugolabe.Wike.SearchProvider.ini: -------------------------------------------------------------------------------- 1 | [Shell Search Provider] 2 | DesktopId=com.github.hugolabe.Wike.desktop 3 | BusName=com.github.hugolabe.Wike.SearchProvider 4 | ObjectPath=/com/github/hugolabe/Wike/SearchProvider 5 | Version=2 6 | -------------------------------------------------------------------------------- /data/com.github.hugolabe.Wike.SearchProvider.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=com.github.hugolabe.Wike.SearchProvider 3 | Exec=@pkgdatadir@/wike-sp 4 | -------------------------------------------------------------------------------- /data/com.github.hugolabe.Wike.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Wike 3 | Comment=Search and read Wikipedia articles 4 | Icon=com.github.hugolabe.Wike 5 | Exec=wike 6 | Terminal=false 7 | Type=Application 8 | StartupNotify=true 9 | Categories=Network;GTK; 10 | # Translators: Do not translate or localize the semicolons 11 | Keywords=Wikipedia;Encyclopedia; 12 | # Translators: Do not translate or transliterate this text 13 | X-Purism-FormFactor=Workstation;Mobile; 14 | -------------------------------------------------------------------------------- /data/com.github.hugolabe.Wike.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | "en" 7 | Default search language 8 | 9 | 10 | 11 | true 12 | Show search suggestions 13 | 14 | 15 | 16 | false 17 | Allow live search on desktop 18 | 19 | 20 | 21 | true 22 | Keep a list of recent articles 23 | 24 | 25 | 26 | false 27 | Clear cookies and cache data when Wike is closed 28 | 29 | 30 | 31 | 0 32 | On start load this page (0-Main, 1-Random, 2-Last article, 3-Restore open articles) 33 | 34 | 35 | 36 | "" 37 | Last Wikipedia uri loaded 38 | 39 | 40 | 41 | {} 42 | Last open tabs with Wikipedia uri and title 43 | 44 | 45 | 46 | false 47 | Hide tabbar also in desktop mode 48 | 49 | 50 | 51 | 3 52 | Choose theme (0-Light, 1-Dark, 2-Sepia, 3-System) 53 | 54 | 55 | 56 | 100 57 | Article view magnification level in percent 58 | 59 | 60 | 61 | true 62 | Show flag icons for languages 63 | 64 | 65 | 66 | false 67 | Show preview popups in article links 68 | 69 | 70 | 71 | false 72 | Use custom font in article view 73 | 74 | 75 | 76 | "Sans" 77 | Font family for custom font 78 | 79 | 80 | 81 | 16 82 | Base font size in pixels 83 | 84 | 85 | 86 | false 87 | Sidepanel is pinned 88 | 89 | 90 | 91 | "toc" 92 | Last sidepanel page selected 93 | 94 | 95 | 96 | 0 97 | Language links to show (0-User, 1-All) 98 | 99 | 100 | 101 | 0 102 | Days to show in history (0-Today, 1-Week, 2-Month, 3-All) 103 | 104 | 105 | 106 | 900 107 | Horizontal size of window 108 | 109 | 110 | 111 | 700 112 | Vertical size of window 113 | 114 | 115 | 116 | false 117 | Window is maximized 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /data/gtk/about.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | com.github.hugolabe.Wike 12 | Wike 13 | Hugo Olabera 14 | 3.1.1 15 | Search and read Wikipedia articles 16 | https://hugolabe.github.io/Wike/ 17 | translator-credits 18 | Copyright © 2021-24 Hugo Olabera 19 | GTK_LICENSE_GPL_3_0 20 | 21 | 22 | -------------------------------------------------------------------------------- /data/gtk/bookmarks-menu.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | Create New List… 15 | bookmarks.create-list 16 | 17 |
18 | 19 |
20 | 21 | Rename List… 22 | bookmarks.rename-list 23 | 24 | 25 | Clear List… 26 | bookmarks.clear-list 27 | 28 |
29 | 30 |
31 |
32 | -------------------------------------------------------------------------------- /data/gtk/bookmarks-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 67 | 68 | -------------------------------------------------------------------------------- /data/gtk/bookmarks.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 131 | 132 | -------------------------------------------------------------------------------- /data/gtk/dialogs.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | New Bookmarks List 13 | create 14 | cancel 15 | 340 16 | 17 | 18 | 19 | 20 | List Name 21 | true 22 | 23 | 24 | 25 | 26 | 27 | Cancel 28 | Create List 29 | 30 | 31 | 32 | 33 | 34 | Rename Bookmarks List 35 | rename 36 | cancel 37 | 340 38 | 39 | 40 | 41 | 42 | List Name 43 | true 44 | 45 | 46 | 47 | 48 | 49 | Cancel 50 | Rename List 51 | 52 | 53 | 54 | 55 | 56 | Clear Bookmarks List? 57 | All bookmarks in the list will be removed permanently. 58 | clear 59 | cancel 60 | 61 | 62 | Also delete the list 63 | 64 | 65 | 66 | Cancel 67 | Clear List 68 | 69 | 70 | 71 | 72 | 73 | Clear History? 74 | The history of visited articles will be deleted permanently. 75 | clear 76 | cancel 77 | 78 | Cancel 79 | Clear History 80 | 81 | 82 | 83 | 84 | 85 | Clear Personal Data? 86 | Cookies and cache data will be deleted permanently. 87 | clear 88 | cancel 89 | 90 | Cancel 91 | Clear Data 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /data/gtk/history-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 86 | 87 | -------------------------------------------------------------------------------- /data/gtk/history.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 123 | 124 | -------------------------------------------------------------------------------- /data/gtk/langlinks-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 64 | 65 | -------------------------------------------------------------------------------- /data/gtk/langlinks.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 96 | 97 | -------------------------------------------------------------------------------- /data/gtk/languages-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 61 | 62 | -------------------------------------------------------------------------------- /data/gtk/languages.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 105 | 106 | -------------------------------------------------------------------------------- /data/gtk/menu-article.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | horizontal-buttons 15 | 16 | Print 17 | printer-symbolic 18 | win.print-page 19 | 20 | 21 | Search Text 22 | system-search-symbolic 23 | win.search-text 24 | 25 |
26 | 27 | 28 |
29 | 30 | Main Page 31 | win.main-page 32 | 33 | 34 | Random Article 35 | win.random-article 36 | 37 |
38 | 39 | 40 |
41 | 42 | Open in Browser 43 | win.open-browser 44 | 45 | 46 | Copy Link to Clipboard 47 | win.copy-link 48 | 49 |
50 | 51 |
52 |
53 | -------------------------------------------------------------------------------- /data/gtk/menu-main.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | Preferences 16 | app.prefs 17 | 18 | 19 | Keyboard Shortcuts 20 | win.show-help-overlay 21 | 22 | 23 | About Wike 24 | app.about 25 | 26 |
27 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /data/gtk/menu-view.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | theme_switcher 16 | 17 |
18 | 19 | 20 |
21 | 22 | zoom_level 23 | 24 |
25 | 26 | 27 |
28 | Show 29 | 30 | Language Flags 31 | view.show-flags 32 | 33 | 34 | Link Previews 35 | view.preview-popups 36 | 37 |
38 | 39 |
40 |
41 | -------------------------------------------------------------------------------- /data/gtk/page-status.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 66 | 67 | -------------------------------------------------------------------------------- /data/gtk/page.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 71 | 72 | -------------------------------------------------------------------------------- /data/gtk/prefs.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 132 | 133 | -------------------------------------------------------------------------------- /data/gtk/search-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 23 | 24 | -------------------------------------------------------------------------------- /data/gtk/search-settings-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 54 | 55 | -------------------------------------------------------------------------------- /data/gtk/search-settings.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 83 | 84 | -------------------------------------------------------------------------------- /data/gtk/search.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 81 | 82 | -------------------------------------------------------------------------------- /data/gtk/style-dark.css: -------------------------------------------------------------------------------- 1 | /* This file is part of Wike (com.github.hugolabe.Wike) 2 | SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | 7 | /* Dark theme */ 8 | 9 | @define-color window_bg_color #242424; 10 | @define-color headerbar_bg_color #242424; 11 | -------------------------------------------------------------------------------- /data/gtk/style-sepia.css: -------------------------------------------------------------------------------- 1 | /* This file is part of Wike (com.github.hugolabe.Wike) 2 | SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | 7 | /* Sepia theme */ 8 | 9 | @define-color window_bg_color #fdf8e8; 10 | @define-color headerbar_bg_color #fdf6e3; 11 | @define-color sidebar_bg_color #e9e3d1; 12 | @define-color sidebar_backdrop_color #e9e3d1; 13 | @define-color secondary_sidebar_bg_color #f1ead8; 14 | @define-color secondary_sidebar_backdrop_color #f1ead8; 15 | @define-color view_bg_color #fefdf6; 16 | @define-color card_bg_color #fefdf6; 17 | @define-color dialog_bg_color #fdf8e8; 18 | @define-color popover_bg_color #fdf8e8; 19 | 20 | @define-color accent_bg_color @orange_4; 21 | @define-color accent_color @orange_5; 22 | -------------------------------------------------------------------------------- /data/gtk/style.css: -------------------------------------------------------------------------------- 1 | /* This file is part of Wike (com.github.hugolabe.Wike) 2 | SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | 7 | /* Theme sitcher */ 8 | 9 | .theme-button radio { 10 | -gtk-icon-source: none; 11 | margin: 1px; 12 | padding: 6px; 13 | min-height: 26px; 14 | min-width: 26px; 15 | border: solid 1px @light_4; 16 | border-radius: 100%; 17 | transition: all 200ms ease-out; 18 | } 19 | 20 | .theme-button:checked radio { 21 | margin: 0; 22 | border-width: 2px; 23 | border-color: @accent_bg_color; 24 | } 25 | 26 | .theme-button image { 27 | margin: 26px 0 0 -26px; 28 | padding: 2px; 29 | min-width: 24px; 30 | min-height: 24px; 31 | color: @accent_fg_color; 32 | background-color: @accent_bg_color; 33 | border-radius: 100%; 34 | opacity: 0; 35 | transform: scale(0.75) translate(-1px, -1px); 36 | transition: all 200ms ease-out; 37 | } 38 | 39 | .theme-button:checked image { 40 | opacity: 1; 41 | } 42 | 43 | .theme-button-system radio { 44 | background: linear-gradient(135deg, @light_1 0%, @light_1 49%, @dark_3 51%, @dark_3 100%); 45 | } 46 | 47 | .theme-button-light radio { 48 | background-color: @light_1; 49 | } 50 | 51 | .theme-button-sepia radio { 52 | background-color: #f4ecd8; 53 | } 54 | 55 | .theme-button-dark radio { 56 | background-color: @dark_3; 57 | } 58 | 59 | /* Sidebar */ 60 | 61 | .navigation-sidebar > row { 62 | min-height: 28px; 63 | } 64 | -------------------------------------------------------------------------------- /data/gtk/theme-switcher.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 94 | 95 | -------------------------------------------------------------------------------- /data/gtk/toc-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 23 | 24 | -------------------------------------------------------------------------------- /data/gtk/toc.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 70 | 71 | -------------------------------------------------------------------------------- /data/gtk/zoom-level.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 47 | 48 | -------------------------------------------------------------------------------- /data/icons/com.github.hugolabe.Wike-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /data/icons/com.github.hugolabe.Wike.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/app-remove-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/bookmark-new-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/checkmark-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/document-open-recent-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/edit-select-all-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/edit-select-none-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/find-location-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/language-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/list-remove-all-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/network-error-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/printer-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/selection-mode-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/system-search-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/tab-new-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/user-bookmarks-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/view-list-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/actions/view-reveal-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/af.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/am.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/an.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ang.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/arz.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/as.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/az.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ba.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/be.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/bg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/bn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/bo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/br.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/bs.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ca.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ce.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ceb.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ckb.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/cs.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/cv.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/cy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/da.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/de.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/el.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/en.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/eo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/es.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/et.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/eu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/fa.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/fi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/fo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/fr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/fy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ga.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/gl.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/gu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/gv.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/he.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/hi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/hif.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/hr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ht.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/hu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/hy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ia.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/id.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/io.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/is.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/it.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ja.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/jv.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ka.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/kk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/km.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/kn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ko.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ku.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ky.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/la.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/lb.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/lt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/lv.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/mg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/mk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ml.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/mn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ms.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/my.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ne.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/nl.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/nn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/no.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/noflag.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/oc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/or.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/pl.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/pt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/qu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ro.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ru.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/scn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sco.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/se.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/si.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/simple.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sl.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/so.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sq.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sv.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/sw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ta.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/tg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/th.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/tl.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/tr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/tt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/uk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/ur.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/uz.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/vi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/vo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/war.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/yi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/zh-min-nan.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/zh-yue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/scalable/emblems/zh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/languages/languages.min.json: -------------------------------------------------------------------------------- 1 | {"ab":"Аҧсшәа","ace":"Acèh","ady":"Адыгабзэ","af":"Afrikaans","ak":"Akan","als":"Alemannisch","alt":"алтай тил","am":"አማርኛ","ami":"Pangcah","an":"Aragonés","ang":"Ænglisc","ar":"العربية","arc":"ܐܪܡܝܐ","ary":"الدارجة","arz":"مصرى","as":"অসমীয়া","ast":"Asturianu","atj":"Atikamekw","av":"Авар","avk":"Kotava","awa":"अवधी","ay":"Aymar aru","az":"Azərbaycanca","azb":"تۆرکجه","ba":"Башҡортса","ban":"Basa Bali","bar":"Boarisch","bat-smg":"Žemaitėška","bcl":"Bikol central","be":"Беларуская","be-tarask":"Беларуская (тарашкевіца)‎","bg":"Български","bh":"भोजपुरी","bi":"Bislama","bjn":"Bahasa banjar","bm":"Bamanankan","bn":"বাংলা","bo":"བོད་ཡིག","bpy":"বিষ্ণুপ্রিয়া মণিপুরী","br":"Brezhoneg","bs":"Bosanski","bug":"ᨅᨔ ᨕᨘᨁᨗ","bxr":"Буряад","ca":"Català","cbk-zam":"Chavacano de zamboanga","cdo":"Mìng-dĕ̤ng-ngṳ̄","ce":"Нохчийн","ceb":"Cebuano","ch":"Chamoru","chr":"Ꮳꮃꭹ","chy":"Tsetsêhestâhese","ckb":"کوردی","co":"Corsu","cr":"Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ","crh":"Qırımtatarca","cs":"Čeština","csb":"Kaszëbsczi","cu":"Словѣньскъ / ⱄⰾⱁⰲⱑⱀⱐⱄⰽⱏ","cv":"Чӑвашла","cy":"Cymraeg","da":"Dansk","dag":"Dagbanli","de":"Deutsch","din":"Thuɔŋjäŋ","diq":"Zazaki","dsb":"Dolnoserbski","dty":"डोटेली","dv":"ދިވެހިބަސް","dz":"ཇོང་ཁ","ee":"Eʋegbe","el":"Ελληνικά","eml":"Emiliàn e rumagnòl","en":"English","eo":"Esperanto","es":"Español","et":"Eesti","eu":"Euskara","ext":"Estremeñu","fa":"فارسی","ff":"Fulfulde","fi":"Suomi","fiu-vro":"Võro","fj":"Na vosa vakaviti","fo":"Føroyskt","fr":"Français","frp":"Arpetan","frr":"Nordfriisk","fur":"Furlan","fy":"Frysk","ga":"Gaeilge","gag":"Gagauz","gan":"贛語","gcr":"Kriyòl gwiyannen","gd":"Gàidhlig","gl":"Galego","glk":"گیلکی","gn":"Avañe'ẽ","gom":"गोंयची कोंकणी / gõychi konknni","gor":"Bahasa hulontalo","got":"𐌲𐌿𐍄𐌹𐍃𐌺","gu":"ગુજરાતી","guw":"Gungbe","gv":"Gaelg","ha":"Hausa","hak":"客家語/hak-kâ-ngî","haw":"Hawaiʻi","he":"עברית","hi":"हिन्दी","hif":"Fiji hindi","hr":"Hrvatski","hsb":"Hornjoserbsce","ht":"Kreyòl ayisyen","hu":"Magyar","hy":"Հայերեն","hyw":"Արեւմտահայերէն","ia":"Interlingua","id":"Bahasa indonesia","ie":"Interlingue","ig":"Igbo","ik":"Iñupiak","ilo":"Ilokano","inh":"Гӏалгӏай","io":"Ido","is":"Íslenska","it":"Italiano","iu":"ᐃᓄᒃᑎᑐᑦ/inuktitut","ja":"日本語","jam":"Patois","jbo":"La .lojban.","jv":"Basa jawa","ka":"ქართული","kaa":"Qaraqalpaqsha","kab":"Taqbaylit","kbd":"Адыгэбзэ","kbp":"Kabɩyɛ","kg":"Kongo","ki":"Gĩkũyũ","kk":"Қазақша","kl":"Kalaallisut","km":"ភាសាខ្មែរ","kn":"ಕನ್ನಡ","ko":"한국어","koi":"Перем коми","krc":"Къарачай-малкъар","ks":"कॉशुर / کٲشُر","ksh":"Ripoarisch","ku":"Kurdî","kv":"Коми","kw":"Kernowek","ky":"Кыргызча","la":"Latina","lad":"Ladino","lb":"Lëtzebuergesch","lbe":"Лакку","lez":"Лезги","lfn":"Lingua franca nova","lg":"Luganda","li":"Limburgs","lij":"Ligure","lld":"Ladin","lmo":"Lumbaart","ln":"Lingála","lo":"ລາວ","lt":"Lietuvių","ltg":"Latgaļu","lv":"Latviešu","mad":"Madhurâ","mai":"मैथिली","map-bms":"Basa banyumasan","mdf":"Мокшень","mg":"Malagasy","mhr":"Олык марий","mi":"Māori","min":"Baso minangkabau","mk":"Македонски","ml":"മലയാളം","mn":"Монгол","mnw":"ဘာသာ မန်","mr":"मराठी","mrj":"Кырык мары","ms":"Bahasa melayu","mt":"Malti","mwl":"Mirandés","my":"မြန်မာဘာသာ","myv":"Эрзянь","mzn":"مازِرونی","na":"Dorerin naoero","nah":"Nāhuatl","nap":"Napulitano","nds":"Plattdüütsch","nds-nl":"Nedersaksies","ne":"नेपाली","new":"नेपाल भाषा","nia":"Li Niha","nl":"Nederlands","nn":"Norsk nynorsk","no":"Norsk","nov":"Novial","nqo":"ߒߞߏ","nrm":"Nouormand","nso":"Sesotho sa leboa","nv":"Diné bizaad","ny":"Chi-chewa","oc":"Occitan","olo":"Livvinkarjala","om":"Oromoo","or":"ଓଡ଼ିଆ","os":"Ирон","pa":"ਪੰਜਾਬੀ","pag":"Pangasinan","pam":"Kapampangan","pap":"Papiamentu","pcd":"Picard","pdc":"Deitsch","pfl":"Pälzisch","pi":"पालि","pih":"Norfuk / pitkern","pl":"Polski","pms":"Piemontèis","pnb":"پنجابی","pnt":"Ποντιακά","ps":"پښتو","pt":"Português","pwn":"Pinayuanan","qu":"Runa simi","rm":"Rumantsch","rmy":"Romani","rn":"Kirundi","ro":"Română","roa-rup":"Armãneashti","roa-tara":"Tarandíne","ru":"Русский","rue":"Русиньскый","rw":"Kinyarwanda","sa":"संस्कृतम्","sah":"Саха тыла","sat":"ᱥᱟᱱᱛᱟᱲᱤ","sc":"Sardu","scn":"Sicilianu","sco":"Scots","sd":"سنڌي","se":"Davvisámegiella","sg":"Sängö","sh":"Srpskohrvatski / српскохрватски","shi":"Taclḥit","shn":"ၽႃႇသႃႇတႆး ","si":"සිංහල","simple":"Simple english","sk":"Slovenčina","skr":"سرائیکی","sl":"Slovenščina","sm":"Gagana samoa","smn":"Anarâškielâ","sn":"Chishona","so":"Soomaaliga","sq":"Shqip","sr":"Српски / srpski","srn":"Sranantongo","ss":"Siswati","st":"Sesotho","stq":"Seeltersk","su":"Basa sunda","sv":"Svenska","sw":"Kiswahili","szl":"Ślůnski","szy":"Sakizaya","ta":"தமிழ்","tay":"Tayal","tcy":"ತುಳು","te":"తెలుగు","tet":"Tetun","tg":"Тоҷикӣ","th":"ไทย","ti":"ትግርኛ","tk":"Türkmençe","tl":"Tagalog","tn":"Setswana","to":"Lea faka-tonga","tpi":"Tok pisin","tr":"Türkçe","trv":"Seediq","ts":"Xitsonga","tt":"Татарча/tatarça","tum":"Chitumbuka","tw":"Twi","ty":"Reo tahiti","tyv":"Тыва дыл","udm":"Удмурт","ug":"ئۇيغۇرچە / uyghurche","uk":"Українська","ur":"اردو","uz":"Oʻzbekcha/ўзбекча","ve":"Tshivenda","vec":"Vèneto","vep":"Vepsän kel’","vi":"Tiếng việt","vls":"West-vlams","vo":"Volapük","wa":"Walon","war":"Winaray","wo":"Wolof","wuu":"吴语","xal":"Хальмг","xh":"Isixhosa","xmf":"მარგალური","yi":"ייִדיש","yo":"Yorùbá","za":"Vahcuengh","zea":"Zeêuws","zh":"中文","zh-classical":"文言","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語","zu":"Isizulu"} -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | gnome.compile_resources( 2 | meson.project_name(), 3 | 'com.github.hugolabe.Wike.gresource.xml', 4 | gresource_bundle: true, 5 | install: true, 6 | install_dir: pkgdatadir 7 | ) 8 | 9 | desktop_file = i18n.merge_file( 10 | input: 'com.github.hugolabe.Wike.desktop.in', 11 | output: 'com.github.hugolabe.Wike.desktop', 12 | type: 'desktop', 13 | po_dir: '../po', 14 | install: true, 15 | install_dir: join_paths(get_option('datadir'), 'applications') 16 | ) 17 | 18 | desktop_utils = find_program('desktop-file-validate', required: false) 19 | if desktop_utils.found() 20 | test('Validate desktop file', desktop_utils, 21 | args: [desktop_file] 22 | ) 23 | endif 24 | 25 | appstream_file = i18n.merge_file( 26 | input: 'com.github.hugolabe.Wike.metainfo.xml.in', 27 | output: 'com.github.hugolabe.Wike.metainfo.xml', 28 | po_dir: '../po', 29 | install: true, 30 | install_dir: join_paths(get_option('datadir'), 'metainfo') 31 | ) 32 | 33 | appstreamcli = find_program('appstreamcli', required: false) 34 | if appstreamcli.found() 35 | test('Validate appstream file', 36 | appstreamcli, 37 | args: ['validate', '--no-net', '--explain', appstream_file], 38 | workdir: meson.current_build_dir() 39 | ) 40 | endif 41 | 42 | install_data('com.github.hugolabe.Wike.gschema.xml', 43 | install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') 44 | ) 45 | 46 | compile_schemas = find_program('glib-compile-schemas', required: false) 47 | if compile_schemas.found() 48 | test('Validate schema file', compile_schemas, 49 | args: ['--strict', '--dry-run', meson.current_source_dir()] 50 | ) 51 | endif 52 | 53 | install_data( 54 | 'com.github.hugolabe.Wike.SearchProvider.ini', 55 | install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'gnome-shell', 'search-providers') 56 | ) 57 | 58 | configure_file( 59 | input: 'com.github.hugolabe.Wike.SearchProvider.service.in', 60 | output: 'com.github.hugolabe.Wike.SearchProvider.service', 61 | configuration: conf, 62 | install: true, 63 | install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'dbus-1', 'services') 64 | ) 65 | 66 | icondir = join_paths(get_option('prefix'), get_option('datadir'), 'icons', 'hicolor') 67 | install_data('icons/com.github.hugolabe.Wike.svg', install_dir: join_paths(icondir, 'scalable/apps')) 68 | install_data('icons/com.github.hugolabe.Wike-symbolic.svg', install_dir: join_paths(icondir, 'symbolic/apps')) 69 | -------------------------------------------------------------------------------- /data/screenshots/wike-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hugolabe/Wike/6e5a3f8ba98b9f2b45b4de58bdb807fd7bdad588/data/screenshots/wike-01.png -------------------------------------------------------------------------------- /data/screenshots/wike-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hugolabe/Wike/6e5a3f8ba98b9f2b45b4de58bdb807fd7bdad588/data/screenshots/wike-02.png -------------------------------------------------------------------------------- /data/screenshots/wike-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hugolabe/Wike/6e5a3f8ba98b9f2b45b4de58bdb807fd7bdad588/data/screenshots/wike-03.png -------------------------------------------------------------------------------- /data/screenshots/wike-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hugolabe/Wike/6e5a3f8ba98b9f2b45b4de58bdb807fd7bdad588/data/screenshots/wike-04.png -------------------------------------------------------------------------------- /data/screenshots/wike-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hugolabe/Wike/6e5a3f8ba98b9f2b45b4de58bdb807fd7bdad588/data/screenshots/wike-05.png -------------------------------------------------------------------------------- /data/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* This file is part of Wike (com.github.hugolabe.Wike) 2 | SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | 7 | /* General */ 8 | 9 | h1 { 10 | color: #2aa !important; 11 | } 12 | 13 | a:not(.image-details a, .drawer a, .wikitable a, .infobox a, .infobox_v2 a, .infobox_v3 a) { 14 | color: #630 !important; 15 | } 16 | 17 | a.new:not(.image-details a, .wikitable a, .infobox a, .infobox_v2 a, .infobox_v3 a) { 18 | color: #066 !important; 19 | } 20 | 21 | #mw-mf-page-center { 22 | background-color: #242424 !important; 23 | } 24 | 25 | .mw-body { 26 | background-color: #dbdbdb !important; 27 | filter: invert(100%); 28 | } 29 | 30 | .mwe-popups { 31 | filter: invert(100%); 32 | } 33 | 34 | /* Images */ 35 | 36 | .thumb img, .mwe-popups-thumbnail { 37 | background-color: #ccc !important; 38 | } 39 | 40 | .gallerybox .thumb { 41 | background-color: #333 !important; 42 | border-color: #111 !important; 43 | } 44 | 45 | img:not(.mwe-math-fallback-image-inline, .mwe-math-fallback-image-display, .leaflet-marker-icon, .wikitable img, .infobox img, .infobox_v2 img, .infobox_v3 img) { 46 | filter: invert(100%); 47 | } 48 | 49 | /* Tables and Infobox */ 50 | 51 | .wikitable, .infobox, .infobox_v2, .infobox_v3 { 52 | background-color: #ccc !important; 53 | filter: invert(100%); 54 | } 55 | 56 | /* Other */ 57 | 58 | .color_swatch, .legend-color { 59 | filter: invert(100%); 60 | } 61 | 62 | .PieChartTemplate, .PieChartTemplate .thumbcaption { 63 | filter: invert(100%); 64 | } 65 | -------------------------------------------------------------------------------- /data/styles/dark.min.css: -------------------------------------------------------------------------------- 1 | h1{color:#2aa!important}a:not(.image-details a,.drawer a,.wikitable a,.infobox a,.infobox_v2 a,.infobox_v3 a){color:#630!important}a.new:not(.image-details a,.wikitable a,.infobox a,.infobox_v2 a,.infobox_v3 a){color:#066!important}#mw-mf-page-center{background-color:#242424!important}.mw-body{background-color:#dbdbdb!important;filter:invert(100%)}.mwe-popups{filter:invert(100%)}.thumb img,.mwe-popups-thumbnail{background-color:#ccc!important}.gallerybox .thumb{background-color:#333!important;border-color:#111!important}img:not(.mwe-math-fallback-image-inline,.mwe-math-fallback-image-display,.leaflet-marker-icon,.wikitable img,.infobox img,.infobox_v2 img,.infobox_v3 img){filter:invert(100%)}.wikitable,.infobox,.infobox_v2,.infobox_v3{background-color:#ccc!important;filter:invert(100%)}.color_swatch,.legend-color{filter:invert(100%)}.PieChartTemplate,.PieChartTemplate .thumbcaption{filter:invert(100%)} -------------------------------------------------------------------------------- /data/styles/sepia.css: -------------------------------------------------------------------------------- 1 | /* This file is part of Wike (com.github.hugolabe.Wike) 2 | SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | 7 | /* General */ 8 | 9 | #mw-mf-page-center { 10 | background-color: #fdf6e3 !important; 11 | } 12 | 13 | .mw-body { 14 | background-color: #fdf6e3 !important; 15 | color: #453530 !important; 16 | } 17 | 18 | /* Main content */ 19 | 20 | .infobox, .infobox_v2, .infobox_v3 { 21 | background-color: #fefcf5 !important; 22 | } 23 | 24 | .gallerybox .thumb, .flexquote { 25 | background-color: #fefcf5 !important; 26 | } 27 | 28 | .wikitable { 29 | background: transparent !important; 30 | } 31 | -------------------------------------------------------------------------------- /data/styles/sepia.min.css: -------------------------------------------------------------------------------- 1 | #mw-mf-page-center{background-color:#fdf6e3!important}.mw-body{background-color:#fdf6e3!important;color:#453530!important}.infobox,.infobox_v2,.infobox_v3{background-color:#fefcf5!important}.gallerybox .thumb,.flexquote{background-color:#fefcf5!important}.wikitable{background:transparent!important} -------------------------------------------------------------------------------- /data/styles/view.css: -------------------------------------------------------------------------------- 1 | /* This file is part of Wike (com.github.hugolabe.Wike) 2 | SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | 7 | /* General */ 8 | 9 | #mw-mf-page-center { 10 | background-color: #fff !important; 11 | } 12 | 13 | #mw-notification-area { 14 | display: none !important; 15 | } 16 | 17 | /* Header and footer */ 18 | 19 | header.header-container, footer.minerva-footer { 20 | display: none !important; 21 | } 22 | 23 | .banner-container { 24 | display: none !important; 25 | } 26 | 27 | /* Pre content */ 28 | 29 | #frb-inline { 30 | display: none !important; 31 | } 32 | 33 | ul#page-actions, .page-actions-menu { 34 | display: none !important; 35 | } 36 | 37 | .pre-content .minerva__tab-container { 38 | display: none !important; 39 | } 40 | 41 | /* Post content */ 42 | 43 | .post-content .language-selector { 44 | display: none !important; 45 | } 46 | 47 | .mw-mf-linked-projects { 48 | display: none !important; 49 | } 50 | 51 | /* Main content */ 52 | 53 | h1 { 54 | color: #c01c28 !important; 55 | font-size: 2em !important; 56 | } 57 | 58 | .section-heading { 59 | border-bottom: none !important; 60 | margin-top: 0.5em !important; 61 | margin-bottom: 0 !important; 62 | font-family: inherit !important; 63 | } 64 | 65 | .hatnote, .rellink, .dablink { 66 | background-color: transparent !important; 67 | padding-left: 0 !important; 68 | font-style: italic !important; 69 | } 70 | 71 | #toc, .toc { 72 | display: none !important; 73 | } 74 | 75 | .mw-editsection, .mw-editsection-like, .cleanup, .ambox, .asbox { 76 | display: none !important; 77 | } 78 | 79 | .sistersitebox, .sisterproject.haudio { 80 | display: none !important; 81 | } 82 | 83 | .boilerplate { 84 | display: none !important; 85 | } 86 | 87 | .noprint.selfref { 88 | display: none !important; 89 | } 90 | 91 | .mwe-popups .mwe-popups-extract { 92 | text-decoration: none !important; 93 | color: #202122 !important; 94 | } 95 | 96 | .mwe-popups .mwe-popups-settings-icon { 97 | display: none !important; 98 | } 99 | 100 | /* Local Wikipedias (es) */ 101 | 102 | .noprint.caja { 103 | display: none !important; 104 | } 105 | -------------------------------------------------------------------------------- /data/styles/view.min.css: -------------------------------------------------------------------------------- 1 | #mw-mf-page-center{background-color:#fff!important}#mw-notification-area{display:none!important}header.header-container,footer.minerva-footer{display:none!important}.banner-container{display:none!important}#frb-inline{display:none!important}ul#page-actions,.page-actions-menu{display:none!important}.pre-content .minerva__tab-container{display:none!important}.post-content .language-selector{display:none!important}.mw-mf-linked-projects{display:none!important}h1{color:#c01c28!important;font-size:2em!important}.section-heading{border-bottom:none!important;margin-top:0.5em!important;margin-bottom:0!important;font-family:inherit!important}.hatnote,.rellink,.dablink{background-color:transparent!important;padding-left:0!important;font-style:italic!important}#toc,.toc{display:none!important}.mw-editsection,.mw-editsection-like,.cleanup,.ambox,.asbox{display:none!important}.sistersitebox,.sisterproject.haudio{display:none!important}.boilerplate{display:none!important}.noprint.selfref{display:none!important}.mwe-popups .mwe-popups-extract{text-decoration:none!important;color:#202122!important}.mwe-popups .mwe-popups-settings-icon{display:none!important}.noprint.caja{display:none!important} -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('wike', 2 | version: '3.1.1', 3 | license: 'GPL3+', 4 | meson_version: '>= 0.60', 5 | default_options: [ 'warning_level=2', ], 6 | ) 7 | 8 | gnome = import('gnome') 9 | i18n = import('i18n') 10 | python = import('python') 11 | 12 | pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) 13 | moduledir = join_paths(pkgdatadir, meson.project_name()) 14 | 15 | conf = configuration_data() 16 | conf.set('PYTHON', python.find_installation().full_path()) 17 | conf.set('VERSION', meson.project_version()) 18 | conf.set('BIN', join_paths(get_option('prefix'), get_option('bindir'), meson.project_name())) 19 | conf.set('pkgdatadir', pkgdatadir) 20 | conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir'))) 21 | 22 | subdir('data') 23 | subdir('src') 24 | subdir('po') 25 | 26 | gnome.post_install( 27 | glib_compile_schemas: true, 28 | gtk_update_icon_cache: true, 29 | update_desktop_database: true, 30 | ) 31 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | ar 2 | bg 3 | bn 4 | ca 5 | cs 6 | de 7 | el 8 | es 9 | eu 10 | fa 11 | fi 12 | fr 13 | gl 14 | he 15 | hi 16 | hr 17 | hu 18 | ia 19 | id 20 | it 21 | ja 22 | nl 23 | oc 24 | pl 25 | pt_BR 26 | ru 27 | sv 28 | ta 29 | tr 30 | uk 31 | ur 32 | vi 33 | zh_CN 34 | zh_TW 35 | -------------------------------------------------------------------------------- /po/POTFILES: -------------------------------------------------------------------------------- 1 | data/com.github.hugolabe.Wike.desktop.in 2 | data/com.github.hugolabe.Wike.metainfo.xml.in 3 | 4 | # GTK UI 5 | 6 | data/gtk/about.ui 7 | data/gtk/bookmarks.ui 8 | data/gtk/bookmarks-menu.ui 9 | data/gtk/bookmarks-row.ui 10 | data/gtk/dialogs.ui 11 | data/gtk/help-overlay.ui 12 | data/gtk/history.ui 13 | data/gtk/history-row.ui 14 | data/gtk/langlinks.ui 15 | data/gtk/langlinks-row.ui 16 | data/gtk/languages.ui 17 | data/gtk/languages-row.ui 18 | data/gtk/menu-article.ui 19 | data/gtk/menu-main.ui 20 | data/gtk/menu-view.ui 21 | data/gtk/page.ui 22 | data/gtk/page-status.ui 23 | data/gtk/prefs.ui 24 | data/gtk/search.ui 25 | data/gtk/search-row.ui 26 | data/gtk/search-settings.ui 27 | data/gtk/search-settings-row.ui 28 | data/gtk/theme-switcher.ui 29 | data/gtk/toc.ui 30 | data/gtk/toc-row.ui 31 | data/gtk/window.ui 32 | data/gtk/zoom-level.ui 33 | 34 | # Source 35 | 36 | src/application.py 37 | src/bookmarks.py 38 | src/data.py 39 | src/history.py 40 | src/langlinks.py 41 | src/languages.py 42 | src/menu.py 43 | src/page.py 44 | src/prefs.py 45 | src/search.py 46 | src/toc.py 47 | src/view.py 48 | src/wike-sp.in 49 | src/wikipedia.py 50 | src/window.py 51 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext(meson.project_name(), preset: 'glib') 2 | -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hugolabe/Wike/6e5a3f8ba98b9f2b45b4de58bdb807fd7bdad588/src/__init__.py -------------------------------------------------------------------------------- /src/languages.py: -------------------------------------------------------------------------------- 1 | # This file is part of Wike (com.github.hugolabe.Wike) 2 | # SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | # SPDX-License-Identifier: GPL-3.0-or-later 4 | 5 | 6 | from gi.repository import Gtk, Adw 7 | 8 | from wike.data import languages 9 | 10 | 11 | # Languages dialog to choose user languages 12 | 13 | @Gtk.Template(resource_path='/com/github/hugolabe/Wike/gtk/languages.ui') 14 | class LanguagesDialog(Adw.Dialog): 15 | 16 | __gtype_name__ = 'LanguagesDialog' 17 | 18 | search_bar = Gtk.Template.Child() 19 | languages_entry = Gtk.Template.Child() 20 | languages_list = Gtk.Template.Child() 21 | select_all_button = Gtk.Template.Child() 22 | select_none_button = Gtk.Template.Child() 23 | selected_label = Gtk.Template.Child() 24 | 25 | # Initialize and connect signals 26 | 27 | def __init__(self, window): 28 | super().__init__() 29 | 30 | self._window = window 31 | 32 | self._languages_changed = False 33 | self._languages_selected = 0 34 | 35 | self.search_bar.set_key_capture_widget(self) 36 | self.languages_list.set_filter_func(self._filter_list) 37 | self._populate() 38 | 39 | self.languages_entry.connect('search-changed', self._languages_entry_changed_cb) 40 | self.languages_list.connect('row-activated', self._languages_list_selected_cb) 41 | self.select_all_button.connect('clicked', self._select_all_button_cb) 42 | self.select_none_button.connect('clicked', self._select_none_button_cb) 43 | self.connect('closed', self._dialog_closed_cb) 44 | 45 | # Filter languages list for languages entry content 46 | 47 | def _filter_list(self, row): 48 | text = self.languages_entry.get_text() 49 | if text == '': 50 | return True 51 | 52 | if row.lang_name.lower().startswith(text.lower()) or row.lang_id.lower().startswith(text.lower()): 53 | return True 54 | else: 55 | return False 56 | 57 | # Populate list of available languages 58 | 59 | def _populate(self): 60 | for lang_id in sorted(languages.wikilangs): 61 | lang_name = languages.wikilangs[lang_id].capitalize() 62 | if lang_id in languages.items: 63 | row = LanguagesRow(lang_name, lang_id, True) 64 | self._languages_selected += 1 65 | else: 66 | row = LanguagesRow(lang_name, lang_id, False) 67 | self.languages_list.append(row) 68 | row.lang_check.connect('toggled', self._language_checkbutton_cb) 69 | 70 | self._set_selected_label() 71 | 72 | # Refresh languages list on languages entry changed 73 | 74 | def _languages_entry_changed_cb(self, languages_entry): 75 | self.languages_list.invalidate_filter() 76 | 77 | # On row selected set language check button 78 | 79 | def _languages_list_selected_cb(self, languages_list, row): 80 | row.lang_check.set_active(not row.lang_check.get_active()) 81 | 82 | # On check button changed update variables 83 | 84 | def _language_checkbutton_cb(self, check_button): 85 | if check_button.get_active(): 86 | self._languages_selected += 1 87 | else: 88 | self._languages_selected -= 1 89 | self._set_selected_label() 90 | 91 | if not self._languages_changed: 92 | self._languages_changed = True 93 | 94 | # On button click check all languages 95 | 96 | def _select_all_button_cb(self, select_all_button): 97 | i = 0 98 | while True: 99 | row = self.languages_list.get_row_at_index(i) 100 | if row: 101 | row.lang_check.set_active(True) 102 | i += 1 103 | else: 104 | break 105 | 106 | # On button click uncheck all languages 107 | 108 | def _select_none_button_cb(self, select_none_button): 109 | i = 0 110 | while True: 111 | row = self.languages_list.get_row_at_index(i) 112 | if row: 113 | row.lang_check.set_active(False) 114 | i += 1 115 | else: 116 | break 117 | 118 | # Update selected languages label 119 | 120 | def _set_selected_label(self): 121 | if self._languages_selected == 1: 122 | self.selected_label.set_label(_('1 language selected')) 123 | else: 124 | self.selected_label.set_label(_('%s languages selected') % self._languages_selected) 125 | 126 | # On dialog closed refresh languages list (if changed) 127 | 128 | def _dialog_closed_cb(self, languages_dialog): 129 | if self._languages_changed: 130 | languages.clear() 131 | 132 | i = 0 133 | while True: 134 | row = self.languages_list.get_row_at_index(i) 135 | if row: 136 | if row.lang_check.get_active(): 137 | languages.items[row.lang_id] = row.lang_name 138 | i += 1 139 | else: 140 | break 141 | 142 | if len(languages.items) == 0: 143 | languages.items['en'] = 'English' 144 | 145 | self._window.search_panel.settings_popover.populate_list() 146 | self._window.langlinks_panel.populate(self._window.page.wikiview.langlinks) 147 | 148 | return False 149 | 150 | 151 | # Row in languages list 152 | 153 | @Gtk.Template(resource_path='/com/github/hugolabe/Wike/gtk/languages-row.ui') 154 | class LanguagesRow(Gtk.ListBoxRow): 155 | 156 | __gtype_name__ = 'LanguagesRow' 157 | 158 | name_label = Gtk.Template.Child() 159 | id_label = Gtk.Template.Child() 160 | lang_check = Gtk.Template.Child() 161 | 162 | # Set row values 163 | 164 | def __init__(self, lang_name, lang_id, checked): 165 | super().__init__() 166 | 167 | self.lang_name = lang_name 168 | self.lang_id = lang_id 169 | 170 | self.name_label.set_label(lang_name) 171 | self.id_label.set_label(lang_id) 172 | self.lang_check.set_active(checked) 173 | -------------------------------------------------------------------------------- /src/meson.build: -------------------------------------------------------------------------------- 1 | configure_file( 2 | input: 'wike.in', 3 | output: 'wike', 4 | configuration: conf, 5 | install: true, 6 | install_dir: get_option('bindir') 7 | ) 8 | 9 | configure_file( 10 | input: 'wike-sp.in', 11 | output: 'wike-sp', 12 | configuration: conf, 13 | install: true, 14 | install_dir: pkgdatadir 15 | ) 16 | 17 | wike_sources = [ 18 | '__init__.py', 19 | 'application.py', 20 | 'bookmarks.py', 21 | 'data.py', 22 | 'history.py', 23 | 'langlinks.py', 24 | 'languages.py', 25 | 'menu.py', 26 | 'page.py', 27 | 'prefs.py', 28 | 'search.py', 29 | 'toc.py', 30 | 'view.py', 31 | 'wikipedia.py', 32 | 'window.py' 33 | ] 34 | 35 | install_data(wike_sources, install_dir: moduledir) 36 | -------------------------------------------------------------------------------- /src/prefs.py: -------------------------------------------------------------------------------- 1 | # This file is part of Wike (com.github.hugolabe.Wike) 2 | # SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | # SPDX-License-Identifier: GPL-3.0-or-later 4 | 5 | 6 | from gi.repository import Gio, Gtk, Adw, WebKit 7 | 8 | from wike.data import settings 9 | from wike.view import network_session 10 | 11 | 12 | # Preferences dialog 13 | 14 | @Gtk.Template(resource_path='/com/github/hugolabe/Wike/gtk/prefs.ui') 15 | class PrefsDialog(Adw.PreferencesDialog): 16 | 17 | __gtype_name__ = 'PrefsDialog' 18 | 19 | start_combo = Gtk.Template.Child() 20 | tabs_switch = Gtk.Template.Child() 21 | desktop_switch = Gtk.Template.Child() 22 | history_switch = Gtk.Template.Child() 23 | clear_history_button = Gtk.Template.Child() 24 | data_switch = Gtk.Template.Child() 25 | clear_data_button = Gtk.Template.Child() 26 | 27 | # Connect signals and bindings 28 | 29 | def __init__(self, window): 30 | super().__init__() 31 | 32 | self._window = window 33 | 34 | settings.bind('on-start-load', self.start_combo, 'selected', Gio.SettingsBindFlags.DEFAULT) 35 | settings.bind('hide-tabs', self.tabs_switch, 'active', Gio.SettingsBindFlags.DEFAULT) 36 | settings.bind('search-desktop', self.desktop_switch, 'active', Gio.SettingsBindFlags.DEFAULT) 37 | settings.bind('keep-history', self.history_switch, 'active', Gio.SettingsBindFlags.DEFAULT) 38 | settings.bind('clear-data', self.data_switch, 'active', Gio.SettingsBindFlags.DEFAULT) 39 | 40 | self.clear_history_button.connect('clicked', self._clear_history_button_cb) 41 | self.clear_data_button.connect('clicked', self._clear_data_button_cb) 42 | 43 | # Show clear history dialog 44 | 45 | def _clear_history_button_cb(self, clear_history_button): 46 | builder = Gtk.Builder() 47 | builder.add_from_resource('/com/github/hugolabe/Wike/gtk/dialogs.ui') 48 | clear_history_dialog = builder.get_object('clear_history_dialog') 49 | 50 | clear_history_dialog.connect('response', self._clear_history_response_cb) 51 | clear_history_dialog.present(self) 52 | 53 | # On response clear history 54 | 55 | def _clear_history_response_cb(self, dialog, response): 56 | if response == 'clear': 57 | self._window.history_panel.clear_history() 58 | 59 | # Show clear personal data dialog 60 | 61 | def _clear_data_button_cb(self, clear_data_button): 62 | builder = Gtk.Builder() 63 | builder.add_from_resource('/com/github/hugolabe/Wike/gtk/dialogs.ui') 64 | clear_data_dialog = builder.get_object('clear_data_dialog') 65 | 66 | clear_data_dialog.connect('response', self._clear_data_response_cb) 67 | clear_data_dialog.present(self) 68 | 69 | # On response clear personal data 70 | 71 | def _clear_data_response_cb(self, dialog, response): 72 | if response == 'clear': 73 | data_manager = network_session.get_website_data_manager() 74 | data_manager.clear(WebKit.WebsiteDataTypes.ALL, 0, None, None, None) 75 | -------------------------------------------------------------------------------- /src/toc.py: -------------------------------------------------------------------------------- 1 | # This file is part of Wike (com.github.hugolabe.Wike) 2 | # SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | # SPDX-License-Identifier: GPL-3.0-or-later 4 | 5 | 6 | import json, urllib.parse 7 | 8 | from gi.repository import Gtk, Adw 9 | 10 | 11 | # TOC (table of contents) panel for sidebar 12 | 13 | @Gtk.Template(resource_path='/com/github/hugolabe/Wike/gtk/toc.ui') 14 | class TocPanel(Adw.Bin): 15 | 16 | __gtype_name__ = 'TocPanel' 17 | 18 | title_label = Gtk.Template.Child() 19 | toc_list = Gtk.Template.Child() 20 | 21 | # Initialize widgets and connect signals 22 | 23 | def __init__(self, window): 24 | super().__init__() 25 | 26 | self._window = window 27 | 28 | self.toc_list.connect('row-activated', self._list_activated_cb) 29 | 30 | # Populate toc list 31 | 32 | def populate(self, title, sections): 33 | while True: 34 | row = self.toc_list.get_row_at_index(0) 35 | if row: 36 | self.toc_list.remove(row) 37 | else: 38 | break 39 | 40 | if sections: 41 | self.title_label.set_label(title) 42 | for section in sections: 43 | row = TocBoxRow(section['anchor'].replace('_', ' '), section['anchor'], section['toclevel']) 44 | self.toc_list.append(row) 45 | else: 46 | self.title_label.set_label('') 47 | 48 | # On list activated load section 49 | 50 | def _list_activated_cb(self, toc_list, row): 51 | if self._window.panel_split.get_collapsed(): 52 | self._window.panel_split.set_show_sidebar(False) 53 | 54 | self._window.page.wikiview.load_section(row.anchor) 55 | 56 | 57 | # Section row in toc list 58 | 59 | @Gtk.Template(resource_path='/com/github/hugolabe/Wike/gtk/toc-row.ui') 60 | class TocBoxRow(Gtk.ListBoxRow): 61 | 62 | __gtype_name__ = 'TocBoxRow' 63 | 64 | section_label = Gtk.Template.Child() 65 | 66 | # Set label text and indent 67 | 68 | def __init__(self, section, anchor, level): 69 | super().__init__() 70 | 71 | self.anchor = anchor 72 | 73 | if level > 1: 74 | self.section_label.add_css_class('caption') 75 | self.section_label.set_label(section) 76 | self.section_label.set_margin_start(3 + (level - 1) * 15) 77 | -------------------------------------------------------------------------------- /src/wike.in: -------------------------------------------------------------------------------- 1 | #!@PYTHON@ 2 | 3 | # This file is part of Wike (com.github.hugolabe.Wike) 4 | # SPDX-FileCopyrightText: 2021-24 Hugo Olabera 5 | # SPDX-License-Identifier: GPL-3.0-or-later 6 | 7 | 8 | import os 9 | import sys 10 | import signal 11 | import gettext 12 | import locale 13 | 14 | 15 | VERSION = '@VERSION@' 16 | pkgdatadir = '@pkgdatadir@' 17 | localedir = '@localedir@' 18 | 19 | sys.path.insert(1, pkgdatadir) 20 | signal.signal(signal.SIGINT, signal.SIG_DFL) 21 | 22 | locale.bindtextdomain('wike', localedir) 23 | locale.textdomain('wike') 24 | gettext.install('wike', localedir) 25 | 26 | if __name__ == '__main__': 27 | import gi 28 | from gi.repository import Gio 29 | 30 | resource = Gio.Resource.load(os.path.join(pkgdatadir, 'wike.gresource')) 31 | resource._register() 32 | 33 | from wike import application 34 | sys.exit(application.main(VERSION)) 35 | -------------------------------------------------------------------------------- /src/wikipedia.py: -------------------------------------------------------------------------------- 1 | # This file is part of Wike (com.github.hugolabe.Wike) 2 | # SPDX-FileCopyrightText: 2021-24 Hugo Olabera 3 | # SPDX-License-Identifier: GPL-3.0-or-later 4 | 5 | 6 | import json, urllib.parse 7 | 8 | from gi.repository import Soup 9 | 10 | 11 | # Create a Soup session and set user agent 12 | 13 | session = Soup.Session.new() 14 | session.set_user_agent('Wike/3.1.1 (https://github.com/hugolabe)') 15 | 16 | # Get Wikipedia random page 17 | 18 | def get_random(lang, callback): 19 | endpoint = 'https://' + lang + '.wikipedia.org/w/api.php' 20 | params = { 'action': 'query', 21 | 'generator': 'random', 22 | 'grnlimit': 1, 23 | 'grnnamespace': 0, 24 | 'prop': 'info', 25 | 'inprop': 'url', 26 | 'format': 'json' } 27 | 28 | _request(endpoint, params, callback, None) 29 | 30 | # Get random result from response data 31 | 32 | def random_result(async_result): 33 | response = session.send_and_read_finish(async_result) 34 | data = response.get_data() 35 | result = json.loads(data) 36 | 37 | pages = result['query']['pages'] 38 | page_props = list(pages.values())[0] 39 | uri = page_props['fullurl'] 40 | return uri 41 | 42 | # Search Wikipedia with a limit of responses 43 | 44 | def search(text, lang, limit, callback): 45 | endpoint = 'https://' + lang + '.wikipedia.org/w/api.php' 46 | params = { 'action': 'opensearch', 47 | 'search': text, 48 | 'limit': limit, 49 | 'namespace': 0, 50 | 'redirects': 'resolve', 51 | 'format': 'json' } 52 | 53 | if callback: 54 | _request(endpoint, params, callback, None) 55 | return 56 | 57 | data = _request(endpoint, params, None, None) 58 | 59 | if data: 60 | result = json.loads(data) 61 | if len(result[1]) > 0: 62 | return result[1], result[3] 63 | 64 | return None 65 | 66 | # Get search results from response data 67 | 68 | def search_result(async_result): 69 | response = session.send_and_read_finish(async_result) 70 | data = response.get_data() 71 | result = json.loads(data) 72 | 73 | if len(result[1]) > 0: 74 | return result[1], result[3] 75 | else: 76 | return None 77 | 78 | # Get various properties for Wikipedia page 79 | 80 | def get_properties(page, lang, callback, user_data): 81 | endpoint = 'https://' + lang + '.wikipedia.org/w/api.php' 82 | params = { 'action': 'parse', 83 | 'prop': 'sections|langlinks', 84 | 'redirects': 1, 85 | 'page': page, 86 | 'format': 'json' } 87 | 88 | _request(endpoint, params, callback, user_data) 89 | 90 | # Get properties result from response data 91 | 92 | def properties_result(async_result): 93 | response = session.send_and_read_finish(async_result) 94 | data = response.get_data() 95 | result = json.loads(data) 96 | 97 | return result['parse'] 98 | 99 | # Perform query to Wikipedia API with given parameters 100 | 101 | def _request(endpoint, params, callback, user_data): 102 | global session 103 | 104 | params_encoded = urllib.parse.urlencode(params, safe='%=&|') 105 | message = Soup.Message.new_from_encoded_form('GET', endpoint, params_encoded) 106 | 107 | if callback: 108 | session.send_and_read_async(message, 0, None, callback, user_data) 109 | return 110 | else: 111 | response = session.send_and_read(message, None) 112 | 113 | if message.get_status() == Soup.Status.OK: 114 | data = response.get_data() 115 | return data 116 | else: 117 | return None 118 | --------------------------------------------------------------------------------