Continued development. Implemented simple install script
This commit is contained in:
parent
d61fd52d65
commit
3eca31e88c
|
@ -1 +1 @@
|
|||
0.0.2
|
||||
0.0.3
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
INSTDIR="$HOME/.local/share/applications"
|
||||
mkdir -p "$INSTDIR/patreon-dl-gui" &> /dev/null
|
||||
echo "cp ./`ls *.bin` $INSTDIR/patreon-dl-gui/"
|
||||
cp ./`ls *.bin` $INSTDIR/patreon-dl-gui/
|
||||
echo "cp ./`ls *.png` $INSTDIR/patreon-dl-gui/"
|
||||
cp ./`ls *.png` $INSTDIR/patreon-dl-gui/
|
||||
|
||||
if [ ! -f "$INSTDIR/patreon-dl-gui/`ls *.json`" ]; then
|
||||
echo "cp ./`ls *.json` $INSTDIR/patreon-dl-gui/"
|
||||
cp ./`ls *.json` $INSTDIR/patreon-dl-gui/
|
||||
fi
|
||||
|
||||
if [ -e $INSTDIR/patreon-dl ]; then
|
||||
rm $INSTDIR/patreon-dl
|
||||
fi
|
||||
|
||||
echo "ln -s $INSTDIR/patreon-dl-gui/`ls *.bin` $INSTDIR/patreon-dl"
|
||||
ln -s $INSTDIR/patreon-dl-gui/`ls *.bin` $INSTDIR/patreon-dl
|
||||
cat ./patreon-dl-gui.desktop | sed -e "s|{HOME}|$HOME|g" > $INSTDIR/patreon-dl-gui.desktop
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Version=0.0.2
|
||||
Name=Pateon DL
|
||||
Comment=Download videos from Patreon
|
||||
Exec={HOME}/.local/share/applications/patreon-dl
|
||||
Icon={HOME}/.local/share/applications/patreon-dl-gui/patreon-dl.png
|
||||
Terminal=false
|
||||
StartupWMClass=FLTK
|
||||
Type=Application
|
||||
Categories=media
|
||||
MimeType=application/octet-stream
|
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
|
@ -87,12 +87,17 @@ func ProcPatreon(fn func(string), config *config.Config, playlistURL string, out
|
|||
|
||||
fileSize := GetFileSize("Temp file", tmpfile)
|
||||
if maxSize > 0 && fileSize > int64(maxSize) {
|
||||
fmt.Printf("File size (%v) exceeds thresshold (%v); initiating re-encode...", fileSize, int64(maxSize))
|
||||
fn(Format("File size (%v) exceeds thresshold (%v); initiating re-encode...", fileSize, int64(maxSize)))
|
||||
time.Sleep(time.Duration(sleepTimeout) * time.Second)
|
||||
if err = Encode(config.FFMpegBin, []string{tmpfile}); err != nil {
|
||||
fn(Format("Error: %v", err))
|
||||
time.Sleep(time.Duration(sleepTimeout) * time.Second)
|
||||
}
|
||||
} else {
|
||||
fmt.Printf("File size (%v) does not exceed max file size (%v); continuing...\n", fileSize, maxSize)
|
||||
fmt.Printf("File size (%v) does not exceed thresshold (%v); continuing...\n", fileSize, maxSize)
|
||||
fn(Format("File size (%v) does not exceed thresshold (%v); continuing...\n", fileSize, maxSize))
|
||||
time.Sleep(time.Duration(sleepTimeout) * time.Second)
|
||||
}
|
||||
|
||||
fmt.Printf("Renaming '%s' to '%s'\n", tmpfile, outfile)
|
||||
|
|
|
@ -102,12 +102,17 @@ func ProcVimeo(fn func(string), config *config.Config, playlistURL string, outfi
|
|||
|
||||
fileSize := GetFileSize("Temp file", tmpfile)
|
||||
if maxSize > 0 && fileSize > int64(maxSize) {
|
||||
fmt.Printf("File size (%v) exceeds thresshold (%v); initiating re-encode...", fileSize, int64(maxSize))
|
||||
fn(Format("File size (%v) exceeds thresshold (%v); initiating re-encode...", fileSize, int64(maxSize)))
|
||||
time.Sleep(time.Duration(sleepTimeout) * time.Second)
|
||||
if err = Encode(config.FFMpegBin, []string{tmpfile}); err != nil {
|
||||
fn(Format("Error: %v", err))
|
||||
time.Sleep(time.Duration(sleepTimeout) * time.Second)
|
||||
}
|
||||
} else {
|
||||
fmt.Println("File size does not exceed max file size; continuing...")
|
||||
fmt.Printf("File size (%v) does not exceed thresshold (%v); continuing...\n", fileSize, maxSize)
|
||||
fn(Format("File size (%v) does not exceed thresshold (%v); continuing...\n", fileSize, maxSize))
|
||||
time.Sleep(time.Duration(sleepTimeout) * time.Second)
|
||||
}
|
||||
|
||||
fmt.Printf("Renaming '%s' to '%s'...\n", tmpfile, outfile)
|
||||
|
|
|
@ -28,7 +28,7 @@ endif
|
|||
publish:
|
||||
ifneq ("$(wildcard ./bin/${BINNAME}-linux-${VERSION}.bin)","")
|
||||
mkdir -p ${PUBDIR}
|
||||
tar -cf ${PUBDIR}/${BINNAME}-linux-${VERSION}.tar -C ./bin/ ${BINNAME}-linux-${VERSION}.bin config.json
|
||||
tar -cf ${PUBDIR}/${BINNAME}-linux-${VERSION}.tar -C ./bin/ ${BINNAME}-linux-${VERSION}.bin config.json install.sh patreon-dl-gui.desktop patreon-dl.png
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Version=0.0.2
|
||||
Name=Pateon DL
|
||||
Comment=Download videos from Patreon
|
||||
Exec=/home/cdmnky/.bin/patreon-dl/patreon-dl-gui
|
||||
Icon=/home/cdmnky/Documents/System76/Icons/patreon.png
|
||||
Terminal=false
|
||||
StartupWMClass=FLTK
|
||||
Type=Application
|
||||
Categories=media
|
||||
MimeType=application/octet-stream
|
Loading…
Reference in New Issue