Skip to content

Commit

Permalink
bump version to 6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leovan committed Aug 19, 2023
1 parent 33e42eb commit 43f2e6e
Show file tree
Hide file tree
Showing 102 changed files with 856 additions and 647 deletions.
53 changes: 44 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build latest version
on: [push]
jobs:
build-macos-x64:
build-macos-x86_64:
runs-on: macOS-latest
steps:
- name: Check out code
Expand All @@ -17,17 +17,17 @@ jobs:

- name: Build and package
run: |
chmod +x ./building/build_macos_x64.sh
./building/build_macos_x64.sh
chmod +x ./building/build_macos.sh
./building/build_macos.sh x86_64
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: SciHubEVA-macOS-x64-latest
path: dist-macOS-x64/SciHubEVA-x64-latest.dmg
name: SciHubEVA-macOS-x86_64-latest
path: dist-macOS-x86_64/SciHubEVA-x86_64-latest.dmg

build-windows-x64:
build-windows-x86_64:
runs-on: windows-latest
steps:
- name: Check out code
Expand All @@ -39,11 +39,46 @@ jobs:
python-version: '3.10'

- name: Build and package
run: ./building/build_windows_x64.ps1
run: ./building/build_windows.ps1 x86_64
shell: powershell

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: SciHubEVA-Windows-x64-latest
path: dist-Windows-x64/SciHubEVA-x64-latest.exe
name: SciHubEVA-Windows-x86_64-latest
path: dist-Windows-x86_64/SciHubEVA-x86_64-latest.exe

build-linux-x86_64:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install system packages
run: |
sudo apt update
sudo apt install -y curl librsvg2-bin libfuse2 libgl1-mesa-dev libxcb* libxau-dev liblzma-dev libegl-dev
- name: Install appimagetool
run: |
mkdir -p $HOME/.local/bin
curl -L https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -o $HOME/.local/bin/appimagetool-x86_64.AppImage
chmod +x $HOME/.local/bin/appimagetool-x86_64.AppImage
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build and package
run: |
chmod +x ./building/build_linux.sh
./building/build_linux.sh x86_64
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: SciHubEVA-Linux-x86_64-latest
path: dist-Linux-x86_64/SciHubEVA-x86_64-latest.AppImage
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ dist-*/**
i18n/*_zh_HK.ts
i18n/*_zh_TW.ts
*.bak
building/macOS/scihubeva.rb
building/Windows/scihubeva.json
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [6.2.0](https://github.com/leovan/SciHubEVA/compare/v6.2.0...v6.1.0) (2023-08-19)

### Features

- Add Linux building target with AppImage.
- Add macOS arm64 building target.
- Add Windows scoop install support.

### Bug Fixes

- Fix error opening downloaded file link in log on different OS.

## [6.1.0](https://github.com/leovan/SciHubEVA/compare/v6.1.0...v6.0.0) (2023-05-25)

### Bug Fixes
Expand Down Expand Up @@ -224,7 +236,7 @@ _This is a hotfix version._

### Features

- Update Sci-Hub API which supports search string now.
- Update Sci-Hub API which supports title searching now.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2023 范叶亮 Leo Van
Copyright (c) 2018-2023 Leo Van

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
70 changes: 44 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,41 @@

## Introduction

**Sci-Hub EVA** is a cross-platform [Sci-Hub](https://en.wikipedia.org/wiki/Sci-Hub) GUI application written in Python and Qt.
**Sci-Hub EVA** is a cross-platform [Sci-Hub](https://en.wikipedia.org/wiki/Sci-Hub) GUI application powered by Python and Qt.

## Usage

![Application macOS EN](docs/scihub-eva-application-macos-en-light-theme.png)
![](docs/images/scihub-eva-application-macos-en-light-theme.png)

Click `OPEN` button to choose where to save the downloaded files. Click `SHOW` button will open the directory where you set.
Click `Open` button to choose where to save the downloaded files. Click `Show` button will open the directory where you set.

Fill the query and click `RAMPAGE` button, then it will search the query and download the file. Currently, you can fill the query with `URL`, `DOI`, `PMID` or search string.
Fill the `Query` and click `Rampage` button, then it will search and download the file. Currently, you can fill the query with `URL`, `PMID`, `DOI` or title.

Range pattern in query is supported, e.g. `00.000/{1-99}` will download `00.000/1`, `00.000/2`, ... `00.000/99`. Zero padded format range pattern is allowed, e.g. `00.000/{01-99}` will download `00.000/01`, `00.000/02`, ... `00.000/99`.

Also you can download with a query list file, in which each line represents a query. Click `LOAD` button to load the query list file.
Also you can download with a query list file, in which each line represents a query. Click `Load` button to load the query list file.

Right clicking the log area will popup menu, you can open the log file or log directory.

Click `GEAR` icon button, it will open `Preferences` dialog, and you can change options in it.
Click <img style="width: 24px; vertical-align: middle;" src="images/icons/information.svg"> will show the `About` dialog.

![Preferences System macOS EN](docs/scihub-eva-preferences-system-macos-en.png)
Click <img style="width: 24px; vertical-align: middle;" src="images/icons/preferences.svg"> will open the `Preferences` dialog.

![](docs/images/scihub-eva-preferences-appearance-macos-en.png)

You can change language manually. Light and dark theme are supported, also you can choose `System` to fit system theme automatically. Changes will take effect after restart.

![Preferences File macOS EN](docs/scihub-eva-preferences-file-macos-en.png)
![](docs/images/scihub-eva-preferences-file-macos-en.png)

You can change filename prefix format with supported keywords. Setting overwrite existing file to `No` will add a timestamp suffix in filename to avoid overwriting previous downloaded files.

![Preferences Network macOS EN](docs/scihub-eva-preferences-network-macos-en.png)
![](docs/images/scihub-eva-preferences-network-macos-en.png)

Due to the unstable Sci-Hub host accessibility, it may fail to download PDFs sometimes, you can change and add other Sci-Hub URLs, or set a proxy server.

Sometimes, you need enter the captcha to continue the download.
![](docs/images/scihub-eva-captcha-macos-en.png)

![Captcha_MACOS_EN](docs/scihub-eva-captcha-macos-en.png)
Sometimes, you may need enter the captcha to continue.

## Internationalization Support

Expand All @@ -56,8 +58,8 @@ Sometimes, you need enter the captcha to continue the download.

<table border="0">
<tr align="center">
<td><img src="docs/scihub-eva-application-macos-en-light-theme.png" /></td>
<td><img src="docs/scihub-eva-application-macos-en-dark-theme.png" /></td>
<td><img src="docs/images/scihub-eva-application-macos-en-light-theme.png" /></td>
<td><img src="docs/images/scihub-eva-application-macos-en-dark-theme.png" /></td>
</tr>
<tr align="center">
<td>Light Theme</td>
Expand All @@ -70,8 +72,21 @@ Sometimes, you need enter the captcha to continue the download.

<table border="0">
<tr align="center">
<td><img src="docs/scihub-eva-application-windows-en-light-theme.png" /></td>
<td><img src="docs/scihub-eva-application-windows-en-dark-theme.png" /></td>
<td><img src="docs/images/scihub-eva-application-windows-en-light-theme.png" /></td>
<td><img src="docs/images/scihub-eva-application-windows-en-dark-theme.png" /></td>
</tr>
<tr align="center">
<td>Light Theme</td>
<td>Dark Theme</td>
</tr>
</table>

### Linux

<table border="0">
<tr align="center">
<td><img src="docs/images/scihub-eva-application-linux-en-light-theme.png" /></td>
<td><img src="docs/images/scihub-eva-application-linux-en-dark-theme.png" /></td>
</tr>
<tr align="center">
<td>Light Theme</td>
Expand All @@ -83,31 +98,34 @@ Sometimes, you need enter the captcha to continue the download.

### macOS

- Install with [DMG file](https://github.com/leovan/SciHubEVA/releases).
- Install from brew cask.
`brew install --cask scihubeva`
- Install with [dmg file](https://github.com/leovan/SciHubEVA/releases).
- Install with brew: `brew install --cask scihubeva`.

### Windows

- Install with [EXE setup file](https://github.com/leovan/SciHubEVA/releases).
- Install with [setup file](https://github.com/leovan/SciHubEVA/releases).
- Install with scoop: `scoop bucket add extras && scoop install scihubeva`.

### Linux

- Run the [AppImage file](https://github.com/leovan/SciHubEVA/releases). Using [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) is recommended.

> **Note**
> Tested only on Ubuntu 20.04 and Ubuntu 22.04.
## Building

See [`building/README.md`](building/README.md)

## Licenses

[SciHubEVA](https://github.com/leovan/SciHubEVA): The MIT License (MIT)

[PySide6](https://doc.qt.io/qtforpython): GNU Lesser General Public License (LGPL)

Icons: GNU General Public License 3.0 (GPL-3.0), modified from [Numix Circle](https://github.com/numixproject/numix-icon-theme-circle).
The MIT License (MIT)

## Acknowledgement

Supported by JetBrains Free License Programs for Open Source Development.

<div>
<a href="https://www.jetbrains.com/?from=SciHubEVA" target="_blank"><img src="docs/jetbrains.svg" width=100 height=100></a>
<a href="https://www.jetbrains.com/?from=SciHubEVA" target="_blank"><img src="docs/icon-pycharm.svg" width=100 height=100></a>
<a href="https://www.jetbrains.com/?from=SciHubEVA" target="_blank"><img src="docs/images/jetbrains.svg" width=100 height=100></a>
<a href="https://www.jetbrains.com/?from=SciHubEVA" target="_blank"><img src="docs/images/icon-pycharm.svg" width=100 height=100></a>
</div>
16 changes: 8 additions & 8 deletions SciHubEVA.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<file>images/SciHubEVA-background-dark.png</file>
<file>images/SciHubEVA-background-light.png</file>
<file>images/SciHubEVA-icon.png</file>
<file>images/icons/box_important.svg</file>
<file>images/icons/cancel.svg</file>
<file>images/icons/edit_file.svg</file>
<file>images/icons/ethernet_on.svg</file>
<file>images/icons/help.svg</file>
<file>images/icons/info.svg</file>
<file>images/icons/monitor.svg</file>
<file>images/icons/settings.svg</file>
<file>images/icons/appearance.svg</file>
<file>images/icons/error.svg</file>
<file>images/icons/file.svg</file>
<file>images/icons/information.svg</file>
<file>images/icons/network.svg</file>
<file>images/icons/preferences.svg</file>
<file>images/icons/question.svg</file>
<file>images/icons/warning.svg</file>
</qresource>
</RCC>
16 changes: 3 additions & 13 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,22 @@
from scihub_eva.utils.preferences_utils import *
from scihub_eva.utils.sys_utils import *
from scihub_eva.utils.path_utils import *
from scihub_eva.utils.ui_utils import *
from scihub_eva.ui.scihub_eva import UISciHubEVA


def main():
multiprocessing.freeze_support()

app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
os.environ['QT_QUICK_CONTROLS_CONF'] = (
PREFERENCES_DIR / 'qtquickcontrols2.conf').resolve().as_posix()

if is_windows():
os.environ['QSG_RHI_BACKEND'] = 'opengl'

os.environ['QT_ENABLE_GLYPH_CACHE_WORKAROUND'] = '1'
os.environ['QML_USE_GLYPHCACHE_WORKAROUND'] = '1'
argv = [app_path, '--ignore-gpu-blacklist', '--enable-gpu-rasterization']

if is_app_dark_theme():
os.environ['QT_QUICK_CONTROLS_MATERIAL_BACKGROUND'] = '#3F3F3F'
else:
os.environ['QT_QUICK_CONTROLS_MATERIAL_BACKGROUND'] = '#FFFFFF'
set_ui_env()

QCoreApplication.setOrganizationName(ORGANIZATION_NAME)
QCoreApplication.setOrganizationDomain(ORGANIZATION_DOMAIN)
QCoreApplication.setApplicationName(APPLICATION_NAME)

argv = [app_path, '--ignore-gpu-blacklist', '--enable-gpu-rasterization']
app = QGuiApplication(argv)

lang = Preferences.get_or_default(SYSTEM_LANGUAGE_KEY, SYSTEM_LANGUAGE)
Expand Down
8 changes: 8 additions & 0 deletions building/Linux/AppRun-x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

APP_DIR=$(dirname $0)

export LD_LIBRARY_PATH=${APP_DIR}:$LD_LIBRARY_PATH
export LD_PRELOAD="/lib/x86_64-linux-gnu/libstdc++.so.6"

${APP_DIR}/SciHubEVA
Binary file added building/Linux/SciHubEVA-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions building/Linux/tech.leovan.SciHubEVA.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Sci-Hub EVA
Comment=A cross-platform Sci-Hub GUI application powered by Python and Qt
Categories=Utility;
Icon=tech.leovan.SciHubEVA
Exec=SciHubEVA
Terminal=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2018-2023 Leo Van -->
<component type="desktop-application">
<id>tech.leovan.SciHubEVA</id>

<name>Sci-Hub EVA</name>
<summary>A cross-platform Sci-Hub GUI application powered by Python and Qt</summary>
<summary xml:lang="zh">一个由 Python 和 Qt 驱动的跨平台的 Sci-Hub GUI 程序</summary>
<developer_name>Leo Van</developer_name>
<url type="homepage">https://github.com/leovan/SciHubEVA</url>

<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>

<description>
<p>
Sci-Hub EVA is a cross-platform Sci-Hub GUI application powered by Python and Qt.
</p>
<p xml:lang="zh">
Sci-Hub EVA 一个由 Python 和 Qt 驱动的跨平台的 Sci-Hub GUI 程序。
</p>
</description>

<launchable type="desktop-id">tech.leovan.SciHubEVA.desktop</launchable>

<screenshots>
<screenshot type="default">
<image>https://github.com/raw/leovan/SciHubEVA/main/docs/images/scihub-eva-application-linux-en-light-theme.png</image>
</screenshot>
<screenshot>
<image>https://github.com/raw/leovan/SciHubEVA/main/docs/images/scihub-eva-application-linux-en-dark-theme.png</image>
</screenshot>
</screenshots>
</component>
Loading

0 comments on commit 43f2e6e

Please sign in to comment.