Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SUpload
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Volkor Barbarian Warrior
SUpload
Commits
95db9617
Unverified
Commit
95db9617
authored
4 years ago
by
Volkor Barbarian Warrior
Browse files
Options
Downloads
Patches
Plain Diff
Initial feature - will review tomorrow :p
parent
67a77100
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+7
-2
7 additions, 2 deletions
README.md
supload.conf
+6
-1
6 additions, 1 deletion
supload.conf
supload.sh
+23
-3
23 additions, 3 deletions
supload.sh
with
36 additions
and
6 deletions
README.md
+
7
−
2
View file @
95db9617
...
...
@@ -28,6 +28,7 @@ sudo make install
## Optional dependencies
-
maim OR scrot (optional, needed for screenshots)
-
[
ffcast
](
https://github.com/minos-org/ffcast/
)
(
needed
for video recording)
-
xclip (optional, needed for clipboard)
-
libnotify (optional, needed for notifications)
...
...
@@ -40,10 +41,11 @@ Usage: supload [OPTIONS] [FILE]
Options:
-f
Safe
for
work mode,
(
uses volkor.me
)
-h
Show this menu
-d
Use custom domain use
-d
<domain>
-o
Automatically open
in
browser
-s
Screenshot mode
(
maim Selection
)
-g
Screen Recording Mode
(
ffcast
)
-V
Verbose
(
debug mode
)
-v
Shows current version of SUpload
Examples:
...
...
@@ -62,6 +64,9 @@ $ supload -fos
# Screenshot and debug output
$
supload
-Vs
# Record and Upload video (make sure to press q to end recording (or type ffcast -k in another terminal :p))
$
supload
-g
```
## Configuration
...
...
This diff is collapsed.
Click to expand it.
supload.conf
+
6
−
1
View file @
95db9617
...
...
@@ -3,7 +3,12 @@
## Uncomment the below settings to override the defaults!
## file naming scheme
#file_format="date +%F-%T.png"
#photo_format="date +%F-%T.png"
#video_format="date +%F-%T.mp4"
## ffmpeg config for screen recording (1st line is cpu, second is nvidia gpu encoding)
#ffmpeg_config="-preset veryfast -vcodec libx264 -tune zerolatency -b:v 3M"
#ffmpeg_config="-preset llhq -vcodec h264_nvenc -tune zerolatency -b:v 3M" # I can't actually test this, because nvidia drivers broke
## directory to save screenshots (To disable file saving, put it in /tmp, where it will be deleted on reboot)
#file_dir="${HOME}/Pictures/screenshots"
...
...
This diff is collapsed.
Click to expand it.
supload.sh
+
23
−
3
View file @
95db9617
...
...
@@ -13,7 +13,9 @@ nc='\033[0m'
debug
=
false
domain
=
"https://volkor.me"
sshot
=
"maim"
file_format
=
"date +%F-%T.png"
photo_format
=
"date +%F-%T.png"
video_format
=
"date +%F-%T.mp4"
ffmpeg_config
=
"-pix_fmt yuv420p -preset ultrafast -vcodec libx264 -tune zerolatency -b:v 3M"
file_dir
=
"
${
HOME
}
/Pictures/screenshots"
browser
=
false
clipboard
=
true
...
...
@@ -48,6 +50,7 @@ Options:
-h Show this menu
-o Automatically open in browser
-s Screenshot mode (maim Selection)
-g Screen Recording Mode (ffcast)
-V Verbose (debug mode)
-v Shows current version of SUpload
...
...
@@ -128,7 +131,7 @@ upload_finished() {
exit
0
}
while
getopts
"d:hosvV"
opt
;
do
while
getopts
"d:hos
g
vV"
opt
;
do
case
$opt
in
d
)
## TODO: Check if the args are actually set.
...
...
@@ -143,6 +146,9 @@ while getopts "d:hosvV" opt; do
s
)
screenshot
=
true
;;
g
)
video
=
true
;;
V
)
debug
=
true
;;
...
...
@@ -159,9 +165,10 @@ done
file
=
"
${
*
:
$OPTIND
}
"
$debug
&&
echo
-e
"
${
r
}
DEBUG:
${
nc
}
OPTIONS:
$*
"
# Screenshot
if
[
"
$screenshot
"
=
"true"
]
;
then
echo
"Click and hold to select screenshot area or click for window."
screen_path
=
"
$file_dir
/
$(
$
file
_format
)
"
screen_path
=
"
$file_dir
/
$(
$
photo
_format
)
"
$debug
&&
echo
-e
"
${
r
}
DEBUG:
${
nc
}
SCREEN_PATH:
$screen_path
"
case
$sshot
in
...
...
@@ -183,6 +190,19 @@ if [ "$screenshot" = "true" ] ; then
upload_file
"
${
screen_path
}
"
fi
# Video
if
[
"
$video
"
=
"true"
]
;
then
video_path
=
"
$file_dir
/
$(
$video_format
)
"
$debug
&&
echo
-e
"
${
r
}
DEBUG:
${
nc
}
VIDEO_PATH:
$video_path
"
echo
-e
"
${
r
}
WARNING: PRESS
${
nc
}
q
${
r
}
to end screen recording!
${
nc
}
"
if
!
ffcast
-s
ffmpeg
--
"
${
ffmpeg_config
}
${
video_path
}
"
;
then
echo
-e
"
${
r
}
ERROR:
${
nc
}
Failed to take screenshot (ffcast crashed/user exited)"
exit
1
fi
upload_file
"
${
video_path
}
"
fi
if
[
"
$1
"
=
""
]
;
then
echo
-e
"
${
r
}
ERROR:
${
nc
}
You must supply either STDIN (-) or a file!"
exit
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment