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
5792d7e3
Unverified
Commit
5792d7e3
authored
6 years ago
by
Volkor The Barbarian Warrior
Browse files
Options
Downloads
Patches
Plain Diff
delete leftovers from merge
parent
eb66d5e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
install.sh
+0
-50
0 additions, 50 deletions
install.sh
screenshot.sh
+0
-25
0 additions, 25 deletions
screenshot.sh
upload.sh
+0
-48
0 additions, 48 deletions
upload.sh
with
0 additions
and
123 deletions
install.sh
deleted
100755 → 0
+
0
−
50
View file @
eb66d5e0
#!/bin/bash
set
-e
install
()
{
sudo install
-C
upload.sh /usr/bin/upload
echo
"Installed: upload tool"
sudo install
-C
screenshot.sh /usr/bin/screenshot
echo
"Installed: screenshot tool"
}
checkpkg
()
{
[
-x
"
$(
which
$1
)
"
]
}
func_apt-get
()
{
echo
"Detected Package Manager: apt/apt-get. Installing packages"
sudo
apt
install
curl xclip libnotify-bin maim
}
func_yum
()
{
echo
"Detected Package Manager: yum. Installing packages"
echo
"WARNING: untested on this system, if it does work please tell me."
sudo
yum
install
curl xclip libnotify
echo
"Warning: maim is not in the repositories install it here: https://github.com/naelstrof/maim"
}
func_pacman
()
{
echo
"Detected Package Manager: pacmam. Installing packages"
echo
"WARNING: untested on this system, if it does work please tell maintainer."
sudo
pacman
-S
curl xclip libnotify maim
}
func_zypper
()
{
echo
"Detected Package Manager: zypper. Installing packages"
echo
"WARNING: untested on this system, if it does work please tell maintainer."
sudo
zypper
in
curl xclip libnotify maim
}
if
checkpkg apt-get
;
then
func_apt-get
elif
checkpkg yum
;
then
func_yum
elif
checkpkg pacman
;
then
func_pacman
elif
checkpkg zypper
;
then
func_zypper
else
echo
'No package manager found, install the packages manually. (curl xclip libnotify maim) and copy the files manually (read README.md)'
exit
2
fi
install
This diff is collapsed.
Click to expand it.
screenshot.sh
deleted
100755 → 0
+
0
−
25
View file @
eb66d5e0
#!/bin/bash
# Takes a region screenshot and saves it.
# Depends:
# - maim
# - upload.sh (bundled)
# TODO:
# - Setting to delete screenshot
# - Options (-f fullscreen, -s selection, -h help,
# Settings
SCREENSHOT
=
"
${
HOME
}
"
/Pictures/screenshots/
`
date
+%Y-%m-%d
\(
%H:%M:%S
\)
`
.png
# By default, save screenshot to tmp, for screenshot uploading.
# Functions
function
screenshot
{
echo
"Click and hold to select screenshot area"
maim
-s
-o
${
SCREENSHOT
}
}
# '''Logic'''
screenshot
# Comment these lines if you want to only save the screenshot
exec
upload
${
SCREENSHOT
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
upload.sh
deleted
100755 → 0
+
0
−
48
View file @
eb66d5e0
#!/bin/bash
# Upload files to https://p.thecum.zone/ copying URL to clipboard.
# ---------------------------------
# Depends:
# - curl
# - xclip
#
# Optional Depends:
# - libnotify-bin (to say image has been uploaded)
# TODO:
# - Implement config file for key based auth.
# Default Config
SITE
=
https://thecum.zone/
# Functions
FILE
=
$1
upload
(){
echo
"Uploading File: (
$FILE
)"
URL
=
`
curl
--progress-bar
-F
file
=
@
"
$FILE
"
$SITE
|
grep
-Eo
'https://thecum.zone/[^/"]+'
`
echo
${
URL
}
|
tr
-d
'\n'
| xclip
-selection
clipboard
||
true
echo
"URL:
${
URL
}
"
notify
}
notify
(){
notify-send
"File uploaded (Copied to clipboard)"
"URL:
${
URL
}
"
||
true
}
uploadPipe
(){
rand
=
`
head
-c
48 /dev/urandom |
tr
-dc
'a-zA-Z0-9'
`
foo
=
$(
</dev/stdin
)
echo
"
$foo
"
>
/tmp/
$rand
.txt
FILE
=
/tmp/
$rand
.txt
upload
}
#'''''Logic'''''
if
[
!
-e
"
$FILE
"
]
;
then
uploadPipe
else
upload
fi
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