dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 4319c529fb7b37fd0f6e042f96814b73ae4b1004
parent 9c3db8254f386a03d23f31562285cf34a4d5273d
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 11 Feb 2019 15:18:14 +0100

Use BROWSER envvar for urlview, delete old gitlab script

Diffstat:
Alinks/.urlview | 29+++++++++++++++++++++++++++++
Dlinks/bin/gitlab-create-project | 63---------------------------------------------------------------
2 files changed, 29 insertions(+), 63 deletions(-)

diff --git a/links/.urlview b/links/.urlview @@ -0,0 +1,29 @@ +############################################################################### +# Urlview configuration file. +# man urlview <Man page> +# +# Put this file in: $HOME/.urlview +# Put url_handler.sh in: /usr/bin +# +# You can call 'urlview' while in 'mutt' by pressing the Ctrl b keys. +# Put these macros in your $HOME/.muttrc file. +# +# macro index \cb |urlview\n +# macro pager \cb |urlview\n +# +# You can call 'urlview' while in 'tin' by pressing | then a for article, +# put urlview as the pipe command. +# +# Regular expression to use to match URLs. + +#REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] +REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] + +# Command to invoke for selected URL. Use lynx, netscape, or url_handler.sh +# shell script. Alternatively, you can leave COMMAND unset and set the BROWSER +# environment variable instead. + +#COMMAND lynx %s +#COMMAND netscape -remote 'openURL(%s)' +#COMMAND url_handler.sh + diff --git a/links/bin/gitlab-create-project b/links/bin/gitlab-create-project @@ -1,63 +0,0 @@ -#!/usr/bin/env bash - -glserver="https://gitlab.com" - -function show_help { - echo "${0##*/} [VISIBILITY] PROJECTNAME[S]" - echo "creates a $glserver project with name PROJECTNAME." - echo "VISIBILITY can be 'private', 'internal', or 'public'." - echo "If VISIBILITY is not set, the project will be set as 'private'." -} - -function send_post_create_project { - curl --header "PRIVATE-TOKEN: $(pass Online/gitlab.com-admesg-private-access-token)" \ - -H "Accept: application/json" \ - -H "Content-type: application/json" \ - -X POST \ - --data-urlencode "name=$2" \ - --data-urlencode "visibility_level=$1" \ - "$glserver/api/v3/projects" -} - -function die { - printf '%s\n' "$1" >&2 - exit 1 -} - -[[ $# -lt 2 ]] && (show_help && exit 1) - -visibility=0 -while :; do - case "$1" in - -h|-\?|--help) - show_help - exit 0 - ;; - private) - visibility=0 - ;; - internal) - visibility=10 - ;; - public) - visibility=20 - ;; - --) # end all options - shift - break - ;; - -?*) - die 'Error: Unknown option specified' - ;; - *) # no more options - break - esac - shift -done - -[[ $# -lt 1 ]] && die 'Error: No project name[s] specified' - -# loop over PROJECTNAME[S] -for projectname in "$@"; do - send_post_create_project "$visibility" "$projectname" -done