This commit is contained in:
Aaron Liu 2024-02-01 18:20:49 -05:00
commit 8d785902e6
No known key found for this signature in database
GPG key ID: 2D4DA57B12065A35
4 changed files with 23 additions and 6 deletions

View file

@ -1,4 +1,4 @@
name: TerminalImageViewer CI name: Build and run
on: on:
push: push:
@ -8,15 +8,24 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Install dependencies - name: Install dependencies
run: sudo apt-get install -qy imagemagick run: sudo apt-get install -qy imagemagick
- name: Validate gcc version
run: |
if [[ $(gcc --version | awk '/gcc/ && ($3+0)>13{print "gcc-13+"}') != "gcc-13+" ]]; then
# Script courtesy of https://stackoverflow.com/a/67791068/16134571
sudo apt install gcc-13 g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
sudo update-alternatives --set gcc /usr/bin/gcc-13
fi
- name: Build - name: Build
run: make -C src run: make -C src
- name: Test - name: Test
run: ./src/tiv -w 80 -h 24 /usr/share/pixmaps/debian-logo.png run: |
images=('/usr/local/share/icons/hicolor/128x128/apps/microsoft-edge.png' '/usr/local/share/icons/hicolor/128x128/apps/CMakeSetup.png' '/usr/local/doc/cmake/html/_static/file.png' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/tagmanager/cuteanimals/res/drawable/cat_1.jpg' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/wallet/res/drawable-ldpi/icon.png' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/wallet/res/drawable-hdpi/icon.png' '/usr/share/plymouth/themes/spinner/watermark.png' '/usr/share/apache2/icons/apache_pb.png' '/usr/share/doc/libpng-dev/examples/pngtest.png')
./src/tiv -w 160 -h 48 ${images[ $RANDOM % ${#images[@]} ]} # Get random image
./src/tiv -w 160 -h 48 /usr/share/pixmaps # Dir mode

4
.gitignore vendored
View file

@ -47,6 +47,10 @@ x64/
*.vcxproj.* *.vcxproj.*
###Visual Studio Code###
.vscode/
###Java### ###Java###
# Compiled class file # Compiled class file

View file

@ -25,6 +25,7 @@ The shell will expand wildcards. By default, thumbnails and file names will be d
- 2021-05-22: We now support Apple Clang, thanks to the C++ filesystem library being no longer experimental. Issue forms have also been added to the GitHub repository. - 2021-05-22: We now support Apple Clang, thanks to the C++ filesystem library being no longer experimental. Issue forms have also been added to the GitHub repository.
- 2023-09-29: Today marks the 40th anniversary of the GNU project. If you haven't learned the news concerning it and Stallman, please do. In project news, @aaronliu0130 will probably be developing this project from now on as the original author has moved on to better things to do. Support for MSVC has been added and the repository is now under an Apache 2.0 or GPL3 dual license. CI building for each release will hopefully be setup soon. The main program has also adopted a mostly Google code-style because I (aaron) think it simply makes sense. - 2023-09-29: Today marks the 40th anniversary of the GNU project. If you haven't learned the news concerning it and Stallman, please do. In project news, @aaronliu0130 will probably be developing this project from now on as the original author has moved on to better things to do. Support for MSVC has been added and the repository is now under an Apache 2.0 or GPL3 dual license. CI building for each release will hopefully be setup soon. The main program has also adopted a mostly Google code-style because I (aaron) think it simply makes sense.
`SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later` `SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later`
- 2024-02-01: We are currently working on splitting the source code into library-agnostic library files and a client that uses CImg.
## Installation ## Installation
@ -103,3 +104,7 @@ If multiple images match the filename spec, thumbnails are shown.
For the example below, the top image was generated with the character optimization disabled via the `-0` option. For the example below, the top image was generated with the character optimization disabled via the `-0` option.
![Comparison](https://i.imgur.com/OzdCeh6.png) ![Comparison](https://i.imgur.com/OzdCeh6.png)
## Licensing
You are free to use this code under either the GPL (3 or later) or the Apache 2.0. We also use the CImg library, which is licensed under either [CeCILL 2.0](https://spdx.org/licenses/CECILL-2.0.html) (close to GPL and compatible with it) or [CeCILL-C](https://spdx.org/licenses/CECILL-C) (close to LGPL and compatible with Apache).

View file

@ -40,7 +40,6 @@
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
#include <functional>
// This #define tells CImg that we use the library without any display options -- // This #define tells CImg that we use the library without any display options --
// just for loading images. // just for loading images.