From: Andy Spencer Date: Mon, 7 May 2012 04:04:51 +0000 (+0000) Subject: Update vpaste styles X-Git-Url: http://pileus.org/git/?p=vpaste;a=commitdiff_plain;h=41227324b6c416a33c97162d2d0b2c09ae4eebd0 Update vpaste styles - Get rid of ugly man page format - Hide most text by default - Shown using JavaScript - Add more margins --- diff --git a/index.cgi b/index.cgi index 7347e9e..60978b2 100755 --- a/index.cgi +++ b/index.cgi @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (C) 2009-2011 Andy Spencer +# Copyright (C) 2009-2012 Andy Spencer # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free @@ -149,7 +149,7 @@ function do_upload { uri="$url$(basename "$output")" message -h 'Status: 302 Found' \ -h "Location: $uri" \ - "$uri" + "$uri" } # Default index page @@ -161,111 +161,156 @@ function do_help { ) uploads=$(ls -t db | head -n 5) filetype=$(get_param '^(ft|filet(y(pe?)?)?)$') + vpaste='vpaste' header text/html cat <<-EOF - - vpaste.net - Vim based pastebin - - - - - - -
-
- - - - -
-
- -

NAME

-

vpaste: Vim based pastebin

- -

SYNOPSIS

-
-
 vpaste file [option=value,..]
-
 <command> | vpaste [option=value,..]
-
-
 <command> | curl -F 'text=<-' $url[?option=value,..]
-
-
 :map vp :exec "w !vpaste ft=".&ft<CR>
-
 :vmap vp <ESC>:exec "'<,'>w !vpaste ft=".&ft<CR>
-
- -

DESCRIPTION

-

Add ?option[=value],.. to make your text a rainbow.

-

Options specified when uploading are stored as defaults.

- -

OPTIONS

-
-
ft, filetype={filetype}
-
A filetype to use for highlighting, see above menu for supported types
-
fdm, foldmethod=(syntax|indent)
-
Turn on dynamic code folding
-
bg, background={light|dark}
-
Background color to use for the page
-
et, expandtab
-
Expand tabs to spaces
-
ts, tabstop=[N]
-
Number of spaces to use for tabs when et is set
-
...
-
See :help modeline for more information
-
- -

BUGS

- - -

SOURCE

- - -

LATEST UPLOADS

- -

list all

-

sample all

- + + vpaste.net - Vim based pastebin + + + + + + + + +
+ + +
+ + +
+ +
+ +
+

Pasting

+
+
From a shell
+
$vpaste file [option=value,..]
+
<command> | $vpaste [option=value,..]
+ +
From Vim
+
:map vp :exec "w !vpaste ft=".&ft<CR>
+
:vmap vp <ESC>:exec "'<,'>w !vpaste ft=".&ft<CR>
+ +
With curl
+
<command> | curl -F 'text=<-' $url[?option=value,..]
+
+ +

Options

+

Add ?option[=value],.. to make your text a rainbow.

+

Options specified when uploading are saved as defaults.

+ +
+
ft, filetype={filetype}
+
A filetype to use for highlighting, see above menu for supported types
+
fdm, foldmethod=(syntax|indent)
+
Turn on dynamic code folding
+
bg, background={light|dark}
+
Background color to use for the page
+
et, expandtab
+
Expand tabs to spaces
+
ts, tabstop=[N]
+
Number of spaces to use for tabs when et is set
+
...
+
See :help modeline for more information
+
+
+ +
+

License

+

Copyright © 2009-2012 + Andy spencer <andy753421@gmail.com>

+

See individual files for license

+ +

Source code

+ + +

Bugs

+ +
+ +
+

Recent Uploads

+ +

list all

+

sample all

+
+ EOF }