rename project, fix bug & optional output path

This commit is contained in:
2023-06-05 08:24:25 +02:00
parent c977c9e754
commit bf30e40759
21 changed files with 82 additions and 78 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
#
# FSRImageVideoUpscalerFrontend - .gitignore
# FSRSimpleMediaScalerLiteFrontend - .gitignore
#
# Created by Janis Hutz 05/24/2023, Licensed under the GPL V3 License
# https://janishutz.com, development@janishutz.com

View File

@@ -631,7 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
A simple PyQT5 frontend to upscale both videos and images
A simple Electron GUI and Python CLI to upscale your videos using different
upscaling engines.
Copyright (C) 2023 Janis Hutz
This program is free software: you can redistribute it and/or modify
@@ -652,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
ImageVideoUpscalerFrontend Copyright (C) 2023 Janis Hutz
SimpleMediaScalerLiteFrontend Copyright (C) 2023 Janis Hutz
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

View File

@@ -1,31 +1,31 @@
<div id="title" align="center">
<img src="./logo.png" width="300">
<h1>ImageVideoUpscalerFrontend</h1>
<h1>SimpleMediaScalerLiteFrontend</h1>
</div>
<div id="badges" align="center">
<img src="https://img.shields.io/github/license/simplePCBuilding/ImageVideoUpscaler.svg">
<img src="https://img.shields.io/github/repo-size/simplePCBuilding/ImageVideoUpscaler.svg">
<img src="https://img.shields.io/tokei/lines/github/simplePCBuilding/ImageVideoUpscaler">
<img src="https://img.shields.io/github/languages/top/simplePCBuilding/ImageVideoUpscaler">
<img src="https://img.shields.io/github/directory-file-count/simplePCBuilding/ImageVideoUpscaler.svg">
<img src="https://img.shields.io/github/license/simplePCBuilding/SimpleMediaScalerLite.svg">
<img src="https://img.shields.io/github/repo-size/simplePCBuilding/SimpleMediaScalerLite.svg">
<img src="https://img.shields.io/tokei/lines/github/simplePCBuilding/SimpleMediaScalerLite">
<img src="https://img.shields.io/github/languages/top/simplePCBuilding/SimpleMediaScalerLite">
<img src="https://img.shields.io/github/directory-file-count/simplePCBuilding/SimpleMediaScalerLite.svg">
<br>
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/simplePCBuilding/ImageVideoUpscaler">
<img alt="GitHub watchers" src="https://img.shields.io/github/watchers/simplePCBuilding/ImageVideoUpscaler">
<img src="https://img.shields.io/github/issues-pr-raw/simplePCBuilding/ImageVideoUpscaler">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/simplePCBuilding/ImageVideoUpscaler">
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/simplePCBuilding/ImageVideoUpscaler">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/simplePCBuilding/SimpleMediaScalerLite">
<img alt="GitHub watchers" src="https://img.shields.io/github/watchers/simplePCBuilding/SimpleMediaScalerLite">
<img src="https://img.shields.io/github/issues-pr-raw/simplePCBuilding/SimpleMediaScalerLite">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/simplePCBuilding/SimpleMediaScalerLite">
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/simplePCBuilding/SimpleMediaScalerLite">
<br>
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/simplePCBuilding/ImageVideoUpscaler/total?label=Downloads (total)">
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/downloads/simplePCBuilding/ImageVideoUpscaler/latest/total?label=Downloads (latest)">
<img src="https://img.shields.io/github/release/simplePCBuilding/ImageVideoUpscaler.svg">
<img src="https://img.shields.io/github/package-json/v/simplePCBuilding/ImageVideoUpscaler.svg?label=Development Version">
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/simplePCBuilding/SimpleMediaScalerLite/total?label=Downloads (total)">
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/downloads/simplePCBuilding/SimpleMediaScalerLite/latest/total?label=Downloads (latest)">
<img src="https://img.shields.io/github/release/simplePCBuilding/SimpleMediaScalerLite.svg">
<img src="https://img.shields.io/github/package-json/v/simplePCBuilding/SimpleMediaScalerLite.svg?label=Development Version">
</div>
An Electron App with Python CLI to upscale images and videos using multiple different upscaling engines.
# NEW NAME & LOGO NEEDED!
If you have suggestions for a name, please let us know [here](https://github.com/simplePCBuilding/ImageVideoUpscaler/issues/16). If you want to contribute a new logo, please open a PR and add it, or just let us know in the beforementioned issue.
If you have suggestions for a name, please let us know [here](https://github.com/simplePCBuilding/SimpleMediaScalerLite/issues/16). If you want to contribute a new logo, please open a PR and add it, or just let us know in the beforementioned issue.
# Functionality
This app allows you to fully automatically upscale a single file or a full on folder with one of many different engines.
@@ -44,9 +44,9 @@ This app allows you to fully automatically upscale a single file or a full on fo
This App also features a CLI interface.
```
usage: imagevideoupscaler-cli.py [-h] [-i INPUTFILE] [-o OUTPUTFILE] [-s SCALEFACTOR] [-S SHARPENING] [-T THREADS] [-E ENGINE] [-M MODE] [-F FILETYPE] [-d DETAILS] [-p] [-v]
usage: SimpleMediaScalerLite-cli.py [-h] [-i INPUTFILE] [-o OUTPUTFILE] [-s SCALEFACTOR] [-S SHARPENING] [-T THREADS] [-E ENGINE] [-M MODE] [-F FILETYPE] [-d DETAILS] [-p] [-v]
ImageVideoUpscaler - CLI, a CLI application to upscale videos and images using different upscaling engines.
SimpleMediaScalerLite - CLI, a CLI application to upscale videos and images using different upscaling engines.
options:
-h, --help show this help message and exit

View File

@@ -1,5 +1,5 @@
'''
* FSRImageVideoUpscalerFrontend - handler.py
* FSRSimpleMediaScalerLiteFrontend - handler.py
*
* Created by Janis Hutz 03/14/2023, Licensed under the GPL V3 License
* https://janishutz.com, development@janishutz.com
@@ -43,7 +43,7 @@ class Handler:
def handler( self, filepath, scalefactor, output_path, sharpening, filetype, engine, mode, threads=4 ):
# Function to be called when using this class as this function automatically determines if file is video or image
print( '\n\n ImageVideoUpscaler - V1.1.0\n\n(c) 2023 ImageVideoUpscaler contributors\n\n\n\n' );
print( '\n\n SimpleMediaScalerLite - V1.1.0\n\n(c) 2023 SimpleMediaScalerLite contributors\n\n\n\n' );
if self.os_type == 'linux':
self.tmppath = config['PathSettings']['tmpPathLinux']

View File

@@ -1,5 +1,5 @@
"""
* ImageVideoUpscaler - pluginDownloader.py
* SimpleMediaScalerLite - pluginDownloader.py
*
* Created by Janis Hutz 05/31/2023, Licensed under the GPL V3 License
* https://janishutz.com, development@janishutz.com

View File

@@ -1,5 +1,5 @@
[PathSettings]
defaultOutputPath = $HOME/FSRImageVideoUpscaler/
defaultOutputPath = $HOME/FSRSimpleMediaScalerLite/
tmpPathLinux = /tmp/
tmpPathWindows = C:\temp

View File

@@ -1,4 +1,4 @@
# imagevideoupscaler
# SimpleMediaScalerLite
## Project setup
```

View File

@@ -1,11 +1,11 @@
{
"name": "imagevideoupscaler",
"name": "SimpleMediaScalerLite",
"version": "2.0.0-dev1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "imagevideoupscaler",
"name": "SimpleMediaScalerLite",
"version": "2.0.0-dev1",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",

View File

@@ -1,10 +1,10 @@
{
"name": "imagevideoupscaler",
"name": "SimpleMediaScalerLite",
"version": "2.0.0-dev1",
"maintainers": [
"Janis Hutz <development@janishutz.com>"
],
"description": "An Electron frontend to the ImageVideoUpscaler-CLI",
"description": "An Electron frontend to the SimpleMediaScalerLite-CLI",
"homepage": "https://janishutz.com/scaler.html",
"author": {
"name": "Janis Hutz",
@@ -13,7 +13,7 @@
},
"license": "GPL-3.0-or-later",
"bugs": {
"url": "https://github.com/simplePCBuilding/FSRImageVideoUpscalerFrontend/issues"
"url": "https://github.com/simplePCBuilding/FSRSimpleMediaScalerLiteFrontend/issues"
},
"private": true,
"scripts": {

View File

@@ -1,5 +1,5 @@
/*
* ImageVideoUpscaler - upscalingHandler.js
* SimpleMediaScalerLite - upscalingHandler.js
*
* Created by Janis Hutz 06/03/2023, Licensed under the GPL V3 License
* https://janishutz.com, development@janishutz.com
@@ -24,9 +24,9 @@ class UpscalingHandler {
let baseCommand = '';
// Create cli command to upscale
if ( this.os === 'linux' ) {
baseCommand = './imagevideoupscaler';
baseCommand = './smuL-cli';
} else if ( this.os === 'win32' ) {
baseCommand = 'imagevideoupscaler';
baseCommand = 'smuL-cli';
}
@@ -55,11 +55,11 @@ class UpscalingHandler {
child.on( 'error', ( error ) => {
console.log( 'An error occurred' + error );
new Notification( { title: `ImageVideoUpscaler - Error whilst upscaling', body: 'Your upscaling Job encountered an error whilst upscaling. (Error message: ${ error.message }).`} )
new Notification( { title: `SimpleMediaScalerLite - Error whilst upscaling', body: 'Your upscaling Job encountered an error whilst upscaling. (Error message: ${ error.message }).`} )
} );
child.on( 'close', ( code ) => {
new Notification( { title: `ImageVideoUpscaler - Job complete', body: 'Your Upscaling job has completed successfully (Code ${ code }). You may find its output here: ` + options.OutputFile } )
new Notification( { title: `SimpleMediaScalerLite - Job complete', body: 'Your Upscaling job has completed successfully (Code ${ code }). You may find its output here: ` + options.OutputFile } )
} );
}

View File

@@ -1,8 +1,8 @@
<template>
<div class="about">
<img src="@/assets/logo.png">
<h1>About ImageVideoUpscaler</h1>
<p>ImageVideoUpscaler is an application that allows you to upscale your videos and / or images. It uses an Electron GUI (Graphical User Interface) and a Python CLI (Command Line Interface).</p>
<h1>About SimpleMediaScalerLite</h1>
<p>SimpleMediaScalerLite is an application that allows you to upscale your videos and / or images. It uses an Electron GUI (Graphical User Interface) and a Python CLI (Command Line Interface).</p>
<div class="version-info">
<h3>You are currently running version {{ appVersion }}. {{ versionNotice[ isUpToDate ] }}.</h3>
</div>
@@ -20,7 +20,7 @@ export default {
}
},
mounted () {
fetch( 'https://api.github.com/repos/simplePCBuilding/ImageVideoUpscaler/releases/latest' ).then( res => {
fetch( 'https://api.github.com/repos/simplePCBuilding/SimpleMediaScalerLite/releases/latest' ).then( res => {
res.json().then( data => {
this.latestVersion = data.tag_name;
if ( data.tag_name != this.appVersion ) {

View File

@@ -1,6 +1,6 @@
<template>
<div class="home">
<h1>ImageVideoUpscaler</h1>
<h1>SimpleMediaScalerLite</h1>
<label for="algorithm">Upscaler engine</label><br>
<select name="engine" id="engine" v-model="upscaleSettings.engine">

View File

@@ -1,5 +1,5 @@
{
"name": "imagevideoupscaler",
"name": "SimpleMediaScalerLite",
"version": "2.0.0",
"description": "A frontend to upscale your videos and images using different upscale engines",
"main": "index.js",
@@ -8,7 +8,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/simplePCBuilding/FSRImageVideoUpscalerFrontend.git"
"url": "git+https://github.com/simplePCBuilding/FSRSimpleMediaScalerLiteFrontend.git"
},
"keywords": [
"upscaler",
@@ -21,8 +21,8 @@
"author": "Janis Hutz",
"license": "GPL-3.0-or-later",
"bugs": {
"url": "https://github.com/simplePCBuilding/FSRImageVideoUpscalerFrontend/issues",
"url": "https://github.com/simplePCBuilding/FSRSimpleMediaScalerLiteFrontend/issues",
"email": "development@janishutz.com"
},
"homepage": "https://github.com/simplePCBuilding/FSRImageVideoUpscalerFrontend#readme"
"homepage": "https://github.com/simplePCBuilding/FSRSimpleMediaScalerLiteFrontend#readme"
}

View File

@@ -3,14 +3,14 @@
cd ..
# Compile for Linux
pyinstaller imagevideoupscaler.spec
cp -rv ./dist/imagevideoupscaler/* ./frontend/
pyinstaller smuL-cli.spec
cp -rv ./dist/smuL-cli/* ./frontend/
# Copy python files
cp -rv ./bin ./frontend/
cp -rv ./config ./frontend/
cp -v ./imagevideoupscaler-cli.py ./frontend/
cp -v ./smuL-cli.py ./frontend/
cp -v ./LICENSE ./frontend/
cp -v ./logo.png ./frontend/
@@ -33,9 +33,9 @@ rm -rf ./dist
printf '\n\n==> Finished Linux packaging, preparing Windows\n\n'
# Compile for Windows
wine python -m PyInstaller imagevideoupscaler.spec
cp -rv ./dist/imagevideoupscaler/* ./frontend/
cp -v ./imagevideoupscaler-cli.py ./frontend/
wine python -m PyInstaller smuL-cli.spec
cp -rv ./dist/smuL-cli/* ./frontend/
cp -v ./smuL-cli.py ./frontend/
# package for Windows (includes GUI & CLI)
cd frontend
@@ -44,7 +44,7 @@ npm run electron:build -- --win nsis
rm -rf ./bin
rm -rf ./config
rm -rf ./lib-dynload
rm ./image*
rm ./smuL*
rm ./_*
rm ./py*
rm ./lib*

View File

@@ -3,14 +3,14 @@
cd ..
# Compile for Linux
pyinstaller imagevideoupscaler.spec
cp -r ./dist/imagevideoupscaler/* ./frontend/
pyinstaller smuL-cli.spec
cp -r ./dist/smuL-cli/* ./frontend/
# Copy python files
cp -r ./bin ./frontend/
cp -r ./config ./frontend/
cp ./imagevideoupscaler-cli.py ./frontend/
cp ./smuL-cli.py ./frontend/
cp ./LICENSE ./frontend/
cp ./logo.png ./frontend/
@@ -22,11 +22,10 @@ npm run electron:build -- --linux deb rpm
rm -rf ./bin
rm -rf ./config
rm -rf ./libdynload
rm ./image*
rm ./smuL*
rm ./lib*
rm ./ld*
rm ./base_library.zip
rm ./imagevideoupscaler-cli.py
rm ./LICENSE
cd ..

View File

@@ -3,13 +3,13 @@
cd ..
# Compile for Windows
wine python -m PyInstaller imagevideoupscaler.spec
cp -r ./dist/imagevideoupscaler/* ./frontend/
wine python -m PyInstaller smuL-cli.spec
cp -r ./dist/smuL-cli/* ./frontend/
# Copy python files
cp -rv ./bin ./frontend/
cp -rv ./config ./frontend/
cp -v ./imagevideoupscaler-cli.py ./frontend/
cp -v ./smuL-cli.py ./frontend/
cp -v ./LICENSE ./frontend/
cp -v ./logo.png ./frontend/
@@ -20,7 +20,7 @@ npm run electron:build -- --win nsis
rm -rf ./bin
rm -rf ./config
rm -rf ./lib-dynload
rm ./image*
rm ./smuL*
rm ./_*
rm ./py*
rm ./lib*

View File

@@ -3,13 +3,13 @@
cd ..
# Compile for Linux
pyinstaller imagevideoupscaler.spec
cp -r ./dist/imagevideoupscaler/* ./frontend/
pyinstaller smuL-cli.spec
cp -r ./dist/smuL-cli/* ./frontend/
# Copy python files
cp -r ./bin ./frontend/
cp -r ./config ./frontend/
cp ./imagevideoupscaler-cli.py ./frontend/
cp ./smuL-cli.py ./frontend/
cp ./LICENSE ./frontend/
cp ./logo.png ./frontend/

View File

@@ -6,7 +6,7 @@ rm -rf ./bin
rm -rf ./config
rm -rf ./lib-dynload
rm -rf ./libdynload
rm ./image*
rm ./smuL*
rm ./lib*
rm ./ld*
rm ./base_library.zip

View File

@@ -1,5 +1,5 @@
"""
* FSRImageVideoUpscalerFrontend - fsrimagevideoupscaler-cli.py
* FSRSimpleMediaScalerLiteFrontend - fsrSimpleMediaScalerLite-cli.py
*
* Created by Janis Hutz 03/15/2023, Licensed under the GPL V3 License
* https://janishutz.com, development@janishutz.com
@@ -23,21 +23,21 @@ for engine in engineList:
allowedFiletypes = [ 'png', 'jpg' ];
def performChecks ( args, ap ):
def performChecks ( args, ap, output ):
if ( args.details == None or args.details == '' ):
if ( not args.printengines ):
if ( not args.version ):
# Check if input and output file arguments are available
if ( args.inputfile == None or args.inputfile == '' or args.outputfile == None or args.outputfile == '' ):
print( '\n\n ==> ERROR: Input and output file required! <==\n\n' )
if ( args.inputfile == None or args.inputfile == '' ):
print( '\n\n ==> ERROR: Input file required! <==\n\n' )
ap.print_usage();
return False
# check if output file exists and if, prompt user if it should be overwritten and remove if, if yes
if ( os.path.exists( args.outputfile ) ):
if ( os.path.exists( output ) ):
doReplace = input( '--> File already exists. Do you want to replace it? (Y/n) ' ).lower()
if ( doReplace == 'y' or doReplace == '' ):
os.remove( args.outputfile );
os.remove( output );
else:
print( '\n==> Refusing to Upscale video. Please delete the file or specify another filepath! <==' )
return False
@@ -108,7 +108,7 @@ def performChecks ( args, ap ):
print( '\n\n' )
if __name__ == '__main__':
ap = argparse.ArgumentParser( description='ImageVideoUpscaler - CLI, a CLI application to upscale videos and images using different upscaling engines.' )
ap = argparse.ArgumentParser( description='SimpleMediaScalerLite - CLI, a CLI application to upscale videos and images using different upscaling engines.' )
ap.add_argument( '-i', '--inputfile', help='File path for the video / image to be upscaled' )
ap.add_argument( '-o', '--outputfile', help='Output file path for the video / image that was upscaled' )
ap.add_argument( '-s', '--scalefactor', help='Scale factor for the video / image. Can be a integer from -4 to 4' )
@@ -127,7 +127,11 @@ if __name__ == '__main__':
multiprocessing.freeze_support();
if ( performChecks( args, ap ) ):
output = args.outputfile;
if ( args.outputfile == None or args.outputfile == '' ):
output = args.inputfile[ :len( args.inputfile ) - 4 ] + '_upscaled' + args.inputfile[ len( args.inputfile ) - 4: ]
if ( performChecks( args, ap, output ) ):
mode = 'fsr'
if ( args.mode != None ):
mode = args.mode
@@ -136,7 +140,7 @@ if __name__ == '__main__':
if ( engineInfo[ args.engine ][ 'cliModeOptions' ][ option ][ 'default' ] ):
mode = option
break
handler.handler( args.inputfile, args.scalefactor, args.outputfile, args.sharpening, args.filetype, args.engine, mode, args.threads )
print( '\n\n---------------------------------------------------------------------------------\n\nDONE \n\n\n\nImageVideoUpscalerFrontend V1.1.0\n\nCopyright 2023 FSRImageVideoUpscalerFrontend contributors\nThis application comes with absolutely no warranty to the extent permitted by applicable law\n\n\n\nOutput was written to ' + args.outputfile + '\n\n\n' )
handler.handler( args.inputfile, args.scalefactor, output, args.sharpening, args.filetype, args.engine, mode, args.threads )
print( '\n\n---------------------------------------------------------------------------------\n\nDONE \n\n\n\nSimpleMediaScalerLiteFrontend V1.1.0\n\nCopyright 2023 FSRSimpleMediaScalerLiteFrontend contributors\nThis application comes with absolutely no warranty to the extent permitted by applicable law\n\n\n\nOutput was written to ' + output + '\n\n\n' )

View File

@@ -5,7 +5,7 @@ block_cipher = None
a = Analysis(
['imagevideoupscaler-cli.py'],
['SimpleMediaScalerLite-cli.py'],
pathex=[],
binaries=[],
datas=[],
@@ -26,7 +26,7 @@ exe = EXE(
a.scripts,
[],
exclude_binaries=True,
name='imagevideoupscaler',
name='SimpleMediaScalerLite-cli',
debug=False,
bootloader_ignore_signals=False,
strip=False,
@@ -46,5 +46,5 @@ coll = COLLECT(
strip=False,
upx=True,
upx_exclude=[],
name='imagevideoupscaler',
name='SimpleMediaScalerLite-cli',
)

View File

@@ -1,4 +1,4 @@
# Writing plugins for ImageVideoUpscaler
# Writing plugins for SimpleMediaScalerLite
Your plugin has to fulfill the following requirements:
- Name of class it exposes has to be [name of engine]Scaler. The name of the file should be just the name of the engine in all lower case.