Skip to content

Commit

Permalink
Merge pull request #393 from ogri-la/6.1.0
Browse files Browse the repository at this point in the history
6.1.0
  • Loading branch information
torkus authored Mar 19, 2023
2 parents 55d940b + ed827e2 commit 7ab2ac2
Show file tree
Hide file tree
Showing 18 changed files with 225 additions and 89 deletions.
File renamed without changes.
12 changes: 12 additions & 0 deletions AppImage/strongbox.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
# https://specifications.freedesktop.org/desktop-entry-spec/1.0/
Type=Application
Version=1.0
Name=Strongbox
GenericName=addon manager
Comment=World of Warcraft addon manager
Exec=AppRun
Terminal=false
Categories=Game;PackageManager;Java;
Icon=strongbox
Keywords=warcraft;wow;world of warcraft;elvui;tukui;wowinterface;github;
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file. This change
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 6.1.0 - 2023-03-19

### Added

* filtering search results by tag can now be switched between inclusive ('any of', default) and exclusive ('all of').
* embedded font for glyphs used in the uber and star buttons for systems running with minimal fonts.
- https://github.com/ogri-la/strongbox/issues/384
* an app launcher to desktop environments that support them.
- for me, `strongbox` was found under the `Games` menu item.
- only for installations via the AUR
- the `.desktop` file can be found here: https://github.com/ogri-la/strongbox-pkgbuild/blob/master/strongbox.desktop

### Changed

* search results filtered by tag are no longer sampled when no search input is available.
- this means you can now browse addons by tags alone if there are more addons that can fit on a single page of results.
* glyphs used for the uber and star buttons switched to their close equivalents in the new embedded font
- they're a little chunkier now but also look a little better in my estimation.
* moved some files used for building the AppImage from the root into a directory called `AppImage`.

### Fixed

* page >1 of search results that were then filtered further may have displayed the 'mascot' screen (ᕙ[°▿°]ᕗ)
- this was because the pagination wasn't being reset and there was no 'page N' for the given set of filters.
- the 'mascot' screen is still (deliberately) displayed in rare cases.
* characters in multi-line messages in the notice logger no longer get their descenders ('y', 'g', 'p', etc) truncated.
* ignored addons in the addon detail pane now display mutual dependencies (if any).
* 'WoW' column text was black with a dark background in dark mode, making the value illegible.

## 6.0.0 - 2022-11-10

### Added
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Arch Linux users can install `strongbox` from the [AUR](https://aur.archlinux.or

For other Linux users:

1. download: [./releases/strongbox](https://github.com/ogri-la/strongbox/releases/download/6.0.0/strongbox)
1. download: [./releases/strongbox](https://github.com/ogri-la/strongbox/releases/download/6.1.0/strongbox)
2. make executable: `chmod +x strongbox`
3. run: `./strongbox`

If you're on macOS or having a problem with the binary or just prefer Java `.jar` files (requires Java 11+):

1. download: [./releases/strongbox-6.0.0-standalone.jar](https://github.com/ogri-la/strongbox/releases/download/6.0.0/strongbox-6.0.0-standalone.jar)
2. run: `java -jar strongbox-6.0.0-standalone.jar`
1. download: [./releases/strongbox-6.1.0-standalone.jar](https://github.com/ogri-la/strongbox/releases/download/6.1.0/strongbox-6.1.0-standalone.jar)
2. run: `java -jar strongbox-6.1.0-standalone.jar`

## Usage

Expand Down
58 changes: 34 additions & 24 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,57 @@ see CHANGELOG.md for a more formal list of changes by release

## done

* remove catalogue building logic
- this now lives in strongbox-catalogue-builder
- update scripts in strongbox-catalogue as well
- strongbox-catalogue is now just a dumb repository of catalogues again
- this will make this a major version release
* fonts are screwy on some systems
- https://github.com/ogri-la/strongbox/issues/384
- embedded an older, smaller, lighter fontawesome and switched the glyphs
- done

* remove wowman/v1 catalogue support
- done

* remove tags
- done

* add github to emergency catalogue
- done

* cleanup
- done

* add 'wotlk support' to comrades.csv
- done
* log pane, bug, the text 'catalogue' is being truncated in multi-line messages
- see screenshot Screenshot at 2022-09-24 08-56-35.png

* added support for dragonflight and six digit interface versions
* dark theme, 'wow' column text is black on black for some reason
- done

* update screenshots
* add a .desktop file for AUR installations
- done

## todo


## todo bucket (no particular order)

* add support for cloning git repositories
- this is to get around addon repositories not uploading 'releases' when tagging
- switch between branches
- switch between tags
- could branches/tags be considered 'releases'?
- and what if we switch to a different branch and the folder structure changes?
- perhaps what we need is a separate place to clone these, and then *copy* them into the addons directory
- only available if local git available
- how to deal with local changes?
- have a policy of wiping out changes. or stashing changes.
- how to deal with repository being a mutual dependency?
- like, some other addon tries to overwrite it with their own version?
- we have ignore rules and pin rules already.
- can pinned addons be replaced? I've forgotten.
- how about a shallow clone?
- just the files are cloned to a directory

* size of addon on disk
- I'd like to see a column with 'size on disk'
- "1024KiB", "1MiB", "1.04MB"
- I'd like to see a total size of all addons in addon dir
- "1024MiB", "1GiB"
- I'd like to see size of disk and free space
- "2TiB of 14TiB free"
- and everything mooshed together
- "1GiB of addons on /dev/foo with 2TiB of 14TiB available"

* wowinterface, fetch addon data from secondary source
- *augment* what is currently implemented with my own source
- failure to fetch this other data shouldn't prevent wowi updates from working normally
- this source is hosted on github as static content, updated daily.

* log pane, bug, the text 'catalogue' is being truncated in multi-line messages
- see screenshot Screenshot at 2022-09-24 08-56-35.png

* 'core/state :db-stats', seems like a nice idea to put more information here
- known-hosts
- num addons per-host
Expand Down
4 changes: 2 additions & 2 deletions build-linux-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ fi
rm -rf ./AppDir
mkdir AppDir
mv "$output_dir" AppDir/usr
cp strongbox.desktop AppDir/
cp AppImage/strongbox.desktop AppDir/
cp resources/strongbox.svg resources/strongbox.png AppDir/
cp AppRun AppDir/
cp AppImage/AppRun AppDir/
du -sh AppDir/
rm -f strongbox.appimage # safer than 'rm -f strongbox'
ARCH=x86_64 ./appimagetool AppDir/ strongbox.appimage
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>ogri-la</groupId>
<artifactId>strongbox</artifactId>
<packaging>jar</packaging>
<version>6.0.0</version>
<version>6.1.0</version>
<name>strongbox</name>
<description>World Of Warcraft Addon Manager</description>
<url>https://github.com/ogri-la/strongbox</url>
Expand All @@ -18,7 +18,7 @@
<url>https://github.com/ogri-la/strongbox</url>
<connection>scm:git:git://github.com/ogri-la/strongbox.git</connection>
<developerConnection>scm:git:ssh://[email protected]/ogri-la/strongbox.git</developerConnection>
<tag>8b30744eb82428c403abdd5af6d636a41af4c091</tag>
<tag>ed0d06e07da058c8b97330a5d5b97a6e033ce9be</tag>
</scm>
<build>
<sourceDirectory>src</sourceDirectory>
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject ogri-la/strongbox "6.0.0"
(defproject ogri-la/strongbox "6.1.0"
:description "World Of Warcraft Addon Manager"
:url "https://github.com/ogri-la/strongbox"
:license {:name "GNU Affero General Public License (AGPL)"
Expand Down
1 change: 1 addition & 0 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ git checkout master
git pull
git checkout develop
git merge master
lein clean

truncate TODO
update CHANGELOG with new sections from bottom
Expand Down
Binary file added resources/fontawesome-4.7.0.ttf
Binary file not shown.
12 changes: 11 additions & 1 deletion src/strongbox/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,33 @@
(doseq [path path-list]
(core/state-bind path listener))))

(defn-spec reset-search-navigation nil?
"returns the search results to page 1"
[]
(swap! core/state assoc-in [:search :page] 0)
nil)

(defn-spec search-add-filter nil?
"adds a new filter to the search `filter-by` state."
[filter-by :search/filter-by, val any?]
(reset-search-navigation)
(case filter-by
:source (swap! core/state assoc-in [:search :filter-by filter-by] (utils/nilable val))
:tag (swap! core/state update-in [:search :filter-by filter-by] conj val))
:tag (swap! core/state update-in [:search :filter-by filter-by] conj val)
:tag-membership (swap! core/state assoc-in [:search :filter-by filter-by] val))
nil)

(defn-spec search-rm-filter nil?
"removes a filter from the search `filter-by` state."
[filter-by :search/filter-by, val any?]
(reset-search-navigation)
(swap! core/state update-in [:search :filter-by filter-by] clojure.set/difference #{val})
nil)

(defn-spec search-toggle-filter nil?
"toggles boolean filters on and off"
[filter-by :search/filter-by]
(reset-search-navigation)
(swap! core/state update-in [:search :filter-by filter-by] not)
nil)

Expand Down
22 changes: 19 additions & 3 deletions src/strongbox/constants.clj
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,32 @@
;; like during testing the formatting of date durations.
(def fake-date "2001-01-01")

(def glyph-map
(def glyph-map--regular
{:tick "\u2714" ;; '✔'
:unsteady "\u2941" ;; '⥁' CLOCKWISE CLOSED CIRCLE ARROW
:warnings "\u2501" ;; '━' heavy horizontal
:errors "\u2A2F" ;; '⨯'
:update "\u21A6" ;; '↦'
:errors "\u2A2F" ;; '⨯' vector or cross product
:update "\u21A6" ;; '↦' rightwards arrow from bar
:ignored "\u26AA" ;; '⚪' medium white circle
:pinned "\u26ab" ;; '⚫' medium black circle
:star "\u2605" ;; '★' black star
:right-arrow "\u2794" ;; '➔' HEAVY WIDE-HEADED RIGHTWARDS ARROW
})

(def glyph-map--fontawesome
{:tick "\uf00c" ;; check
:unsteady "\uf021" ;; arrows rotate
:warnings "\uf068" ;; minus
:errors "\uf00d" ;; xmark
:update "\uf061" ;; arrow-right
:ignored "\uf056" ;; circle minus
:pinned "\uf192" ;; circle dot
:star "\uf005" ;; star
:right-arrow "\uf061" ;; arrow-right
})

(def glyph-map glyph-map--fontawesome)

(def curseforge-cutoff-label "Feb 1st, 2022")

(def releases
Expand Down
23 changes: 16 additions & 7 deletions src/strongbox/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
{:term nil
:filter-by {:source nil
:tag #{}
:tag-membership "any of" ;; "all of"
:user-catalogue false}
:page 0
:results []
Expand Down Expand Up @@ -872,20 +873,28 @@
(utils/in? (:source row) source-list))
constantly-true)

tag-set (:tag filter-by)
tag-filter (if-not (empty? tag-set)
(fn [row]
(if-let [row-tag-set (set (:tag-list row))]
;; if the addon contains *some* of the selected tags, include it
(some tag-set row-tag-set)))
constantly-true)
selected-tag-set (:tag filter-by)
tag-filter (if (empty? selected-tag-set)
constantly-true
(fn [addon]
(let [addon-tag-set (-> addon :tag-list set)
tag-membership (:tag-membership filter-by)]
(cond
;; exclude addon if tags have been selected but it has no tags
(empty? addon-tag-set) false
;; include addon if it contains *some* of the selected tags
(= tag-membership "any of") (some selected-tag-set addon-tag-set)
;; include addon if it contains *all* of the selected tags
(= tag-membership "all of") (clojure.set/subset? selected-tag-set addon-tag-set)
:else false))))

db (->> db
(filter user-catalogue-filter)
(filter host-filter)
(filter tag-filter))

random-sample? (and (nil? uin)
(empty? selected-tag-set)
(not (:user-catalogue filter-by)))]

;; no/empty input, do a random sample
Expand Down
Loading

0 comments on commit 7ab2ac2

Please sign in to comment.