Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
owo.sh
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
whats-this
owo.sh
Commits
da7354b4
Commit
da7354b4
authored
6 years ago
by
okashi
Browse files
Options
Downloads
Patches
Plain Diff
Initial support for the new API routes.
parent
1e48b65c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/owo
+10
-3
10 additions, 3 deletions
bin/owo
with
10 additions
and
3 deletions
bin/owo
+
10
−
3
View file @
da7354b4
...
@@ -34,7 +34,7 @@ FULLSCREEN_SCREENSHOT=${OWO_FULLSCREEN_SCREENSHOT:-0}
...
@@ -34,7 +34,7 @@ FULLSCREEN_SCREENSHOT=${OWO_FULLSCREEN_SCREENSHOT:-0}
CURSOR
=
${
OWO_CURSOR
:-
1
}
CURSOR
=
${
OWO_CURSOR
:-
1
}
KEY
=
${
OWO_KEY
:-}
KEY
=
${
OWO_KEY
:-}
RECORD_FRAMERATE
=
${
OWO_RECORD_FRAMERATE
:-
15
}
RECORD_FRAMERATE
=
${
OWO_RECORD_FRAMERATE
:-
15
}
ASSOCIATED
=
${
OWO_ASSOCIATED
:-
0
}
# Tasks #
# Tasks #
UPLOAD
=(
)
UPLOAD
=(
)
SCREENSHOT
=
SCREENSHOT
=
...
@@ -743,7 +743,11 @@ prepare_file_links() {
...
@@ -743,7 +743,11 @@ prepare_file_links() {
upload
()
{
upload
()
{
# TODO: posix-compat and tempdir
# TODO: posix-compat and tempdir
local
jsontemp
=
$(
mktemp
$TMPDIR
/outXXXXXXX.json
)
local
jsontemp
=
$(
mktemp
$TMPDIR
/outXXXXXXX.json
)
local
apiurl
=
"
$API_BASE
/upload/pomf?key=
$KEY
"
if
[[
$ASSOCIATED
=
1
]]
;
then
local
apiurl
=
"
$API_BASE
/upload/pomf/associated?key=
$KEY
"
else
local
apiurl
=
"
$API_BASE
/upload/pomf?key=
$KEY
"
fi
local
cmdline
=
"curl -s -w '%{http_code}' -o >(cat >&3 >
$jsontemp
) -H 'User-Agent:
$USERAGENT
' '
$apiurl
'"
local
cmdline
=
"curl -s -w '%{http_code}' -o >(cat >&3 >
$jsontemp
) -H 'User-Agent:
$USERAGENT
' '
$apiurl
'"
local
mime
local
mime
local
rc
local
rc
...
@@ -1056,7 +1060,8 @@ usage() {
...
@@ -1056,7 +1060,8 @@ usage() {
echoerr
" --record-framerate <framerate> set recording framerate"
echoerr
" --record-framerate <framerate> set recording framerate"
echoerr
" --domain <domain> domain to use for resulting uploads"
echoerr
" --domain <domain> domain to use for resulting uploads"
echoerr
" --screenshots-dir <directory> permanently save screenshots, empty to disable, will be created if doesn't exist"
echoerr
" --screenshots-dir <directory> permanently save screenshots, empty to disable, will be created if doesn't exist"
# echoerr " --record-format recorder format"
echoerr
" --associated-uploads Associate your upload to your account in the database.
# echoerr "
--record-format
recorder format
"
}
}
version() {
version() {
...
@@ -1132,6 +1137,7 @@ while getopts_long :vhu:cfsrl: opt \
...
@@ -1132,6 +1137,7 @@ while getopts_long :vhu:cfsrl: opt \
shorten 1
\
shorten 1
\
screeenshots-dir 1
\
screeenshots-dir 1
\
record-format 1
\
record-format 1
\
associated-uploads 0
\
"" "
$@
"
"" "
$@
"
do
do
case "
$opt
" in
case "
$opt
" in
...
@@ -1157,6 +1163,7 @@ do
...
@@ -1157,6 +1163,7 @@ do
r|record ) RECORD=1 ;;
r|record ) RECORD=1 ;;
l|shorten ) SHORTEN="
$OPTLARG
" ;;
l|shorten ) SHORTEN="
$OPTLARG
" ;;
screenshots-dir ) SCREENSHOTS_DIR="
$OPTLARG
" ;;
screenshots-dir ) SCREENSHOTS_DIR="
$OPTLARG
" ;;
associated-uploads ) ASSOCIATED=1 ;;
record-format ) fail "
this option hasn
't been implemented yet" ;;
record-format ) fail "
this option hasn
't been implemented yet" ;;
: ) logfail "$OPTLERR"; usage; exit 1 ;;
: ) logfail "$OPTLERR"; usage; exit 1 ;;
esac
esac
...
...
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