App-Nopaste
view release on metacpan or search on metacpan
0.05 2008-08-29 15:03:10
Allow specific pastebins to say "I don't want to be picked by default"
Apply this to Mathbin
0.04 2008-06-11 00:48:53
Add Mathbin courtesy of doy
Add an "available" method to services which checks Perl dependencies
Add a warn_handler
Refactor the CLI into App::Nopaste::Command, using MooseX::Getopt:
-x/--copy for automatically copying the URL to your clipboard
-p/--paste for automatically taking the clipboard as input
-q/--quiet for silencing warnings
-d/--desc for setting the one-line description
-n/--nick for setting the nickname to something other than $USER
-l/--lang for setting the language to something other than Perl
-c/--chan for setting the channel, so pastebots auto-announce
-s/--services for setting the services to try
0.03 2008-05-06 04:31:08
App::Nopaste will now look at environment variables instead of nopaste
Better handling of weird argument counts to nopaste
"description" : "opening of URLs in a browser with --open_url/--open/-o",
"prereqs" : {
"runtime" : {
"requires" : {
"Browser::Open" : "0"
}
}
},
"x_default" : "0"
},
"clipboard" : {
"description" : "copying of URLs with -x/--copy",
"prereqs" : {
"runtime" : {
"requires" : {
"Clipboard" : "0"
}
}
},
"x_default" : "0"
},
},
{
"class" : "Dist::Zilla::Plugin::OptionalFeature",
"config" : {
"Dist::Zilla::Plugin::OptionalFeature" : {
"always_recommend" : 1,
"always_suggest" : 0,
"check_prereqs" : 1,
"default" : "0",
"description" : "copying of URLs with -x/--copy",
"name" : "clipboard",
"phase" : "runtime",
"prereqs" : {
"Clipboard" : "0"
},
"prompt" : 1,
"require_develop" : 1,
"type" : "requires"
}
},
"name" : "clipboard",
"version" : "0.023"
},
{
"class" : "Dist::Zilla::Plugin::OptionalFeature",
"config" : {
"Dist::Zilla::Plugin::OptionalFeature" : {
"always_recommend" : 1,
"always_suggest" : 0,
"check_prereqs" : 1,
"default" : "0",
name: App-Nopaste
no_index:
directory:
- t
- xt
optional_features:
browser:
description: 'opening of URLs in a browser with --open_url/--open/-o'
requires:
Browser::Open: '0'
clipboard:
description: 'copying of URLs with -x/--copy'
requires:
Clipboard: '0'
pastebin:
description: 'pastebin.com support'
requires:
WWW::Pastebin::PastebinCom::Create: '1.003'
provides:
App::Nopaste:
file: lib/App/Nopaste.pm
version: '0.023'
-
class: Dist::Zilla::Plugin::OptionalFeature
config:
Dist::Zilla::Plugin::OptionalFeature:
always_recommend: 1
always_suggest: 0
check_prereqs: '1'
default: '0'
description: 'copying of URLs with -x/--copy'
name: clipboard
phase: runtime
prereqs:
Clipboard: '0'
prompt: 1
require_develop: 1
type: requires
name: clipboard
version: '0.023'
-
class: Dist::Zilla::Plugin::OptionalFeature
config:
Dist::Zilla::Plugin::OptionalFeature:
always_recommend: 1
always_suggest: 0
check_prereqs: '1'
default: '0'
description: 'opening of URLs in a browser with --open_url/--open/-o'
-remove = MetaTests ; until Test::CPAN::Meta is fixed
StaticInstall.dry_run = 0 ; we can safely set this here
[OptionalFeature / pastebin]
:version = 0.021
-description = pastebin.com support
-always_recommend = 1
-default = 0
WWW::Pastebin::PastebinCom::Create = 1.003
[OptionalFeature / clipboard]
-description = copying of URLs with -x/--copy
-always_recommend = 1
-default = 0
Clipboard = 0
[OptionalFeature / browser]
-description = opening of URLs in a browser with --open_url/--open/-o
-always_recommend = 1
-default = 0
Browser::Open = 0
lib/App/Nopaste/Command.pm view on Meta::CPAN
['chan|channel|c=s',
'The channel for the nopaste, not always relevant. Usually tied to a pastebot in that channel which will announce your paste.',
],
['services|service|s=s',
'The nopaste services to try, in order. You may also specify this in the env var NOPASTE_SERVICES.',
],
['list_services|list|L', 'List available nopaste services'],
['copy|x', 'If specified, automatically copy the URL to your clipboard.'],
['paste|p', 'If specified, use only the clipboard as input.'],
['open_url|open|o', 'If specified, automatically open the URL using Browser::Open.'],
['quiet|q', 'If specified, do not warn or complain about broken services.'],
['private', 'If specified, paste privately to services where possible.'],
);
print($usage->text), exit if $opt->help;
lib/App/Nopaste/Command.pm view on Meta::CPAN
=head2 -s, --services
The nopaste services to try, in order. You may also specify this in C<$NOPASTE_SERVICES> (space-separated list of service names, e.g. C<Shadowcat Gist>).
=head2 -L, --list
List available nopaste services.
=head2 -x, --copy
If specified, automatically copy the URL to your clipboard, using the
L<Clipboard> module.
=head2 -p, --paste
If specified, use only the clipboard as input, using the L<Clipboard> module.
=head2 -o, --open
If specified, automatically open the URL using L<Browser::Open>. Browser::Open
tries a number of different browser commands depending on your OS.
=head2 --private
If specified, the paste access will be restricted to those that know the URL.
t/002-encoding.t view on Meta::CPAN
4. paste: <textarea name='paste' rows=25 cols=75 style='width:100%'></textarea><br><br>
5. <input type='submit' name='Paste it' value='Paste it'><input type='reset' name='Clear form' value='Clear form'>
</font>
</form><br>
<div align="right">
<a href="http://validator.w3.org/check/referer"><img border="0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" height="31" width="88"></a><br><br>
</div>
<div>
<div align=right><font size='-1'><a href='http://sf.net/projects/pastebot/'>Pastebot</a> is powered by <a href='http://poe.perl.org/'>POE</a>.</font></div>
</div>
<!-- Automatically put the clipboard contents into the paste field and select it. -->
<script language="jscript" type="">
onload=function () {
try {
document.pasteForm.paste.value=clipboardData.getData("Text") || "";
document.pasteForm.paste.select();
}
catch (oErr) {}
}
</script>
</body>
</html>
FORM
<<RETURN,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
( run in 2.160 seconds using v1.01-cache-2.11-cpan-2398b32b56e )