从备份您的代码段snipplr.com网站
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了从备份您的代码段snipplr.com网站相关的知识,希望对你有一定的参考价值。
Dumps your snippets (and possibly skips your favourites [British spelling]) to standard output. Requires Frontier::RPC2.
#!/usr/bin/perl -w use strict; use Frontier::Client; my $key = ''; # (your API key) my $user = ''; # used to skip others' snippets (fill with your user name) $session->call('user.checkkey', $key) my @args = ($key, ''); my $list = $session->call('snippet.list', @args); my @snippets; # in case you need to process data afterwards (sort ...) my $data = $session->call('snippet.get', $_->{'id'}); if ($data->{username} !~ /^$user$/) {next}; # skip favorites (back up just your snippets) $snippets[$i]=$data; # dump for post loop processing }
以上是关于从备份您的代码段snipplr.com网站的主要内容,如果未能解决你的问题,请参考以下文章