From 8a3c7e4b84b480cdcdde4d163d753e4447a4ffbf Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Wed, 9 Oct 2013 18:05:51 +0400 Subject: [PATCH] stubs for scripts --- Makefile.PL | 2 +- bin/comment | 19 +++++++++++++++++++ bin/login | 16 ++++++++++++++++ bin/post | 24 ++++++++++++++++++++++++ bin/userinfo | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 bin/comment create mode 100644 bin/login create mode 100644 bin/post create mode 100644 bin/userinfo diff --git a/Makefile.PL b/Makefile.PL index 4cebc97..ee77823 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,7 +3,7 @@ use ExtUtils::MakeMaker; WriteMakefile( - NAME=>'MicroBlog', + NAME=>'VJournal', VERSION=>0.1 ); diff --git a/bin/comment b/bin/comment new file mode 100644 index 0000000..3edef13 --- /dev/null +++ b/bin/comment @@ -0,0 +1,19 @@ +#!/usr/bin/perl -T + +=head1 NAME + +vjcomment - post comments on blog entries + +=head1 SYNOPSIS + + http://your.server.com/cgi-bin/vjcomment/your-blog-top/2013/11/30-pst.html?id=cmt12 + +=head1 DESCRIPTION + +This script processes a comment, posted from the form in the HTML +file and, if auth OK, inserts comment into this html file. + +If comment is answer to another comment id of parent comment should be +passed. If no id is passed, comment is assumed top-level. + +=cut diff --git a/bin/login b/bin/login new file mode 100644 index 0000000..fffadaa --- /dev/null +++ b/bin/login @@ -0,0 +1,16 @@ +#!/usr/bin/perl -T + +=head1 NAME + +vjlogin - authenticate openid users + +=head1 SYNOPSIS + + http://your.server.com/cgi-bin/vjlogin/your-blog-top + +=head1 DESCRIPTION + +Authenticates user with external OpenID provider, creates VJournal +session and sets approprieate cookie. + +=cut diff --git a/bin/post b/bin/post new file mode 100644 index 0000000..1435e91 --- /dev/null +++ b/bin/post @@ -0,0 +1,24 @@ +#!/usr/bin/perl -T + +=head1 NAME + +vjpost - submit or edit blog posts + +=head1 SYNOPSIS + + http://your.server.org/cgi-bin/vjpost/your-blog-top + +For submit post or set up blog + + http://your.server.org/cgi-bin/vjpost/your-blog-top/2013/12/11-my-post.html + +For editing post visible as: + + http://your.server.org/yoru-blog-top/2013/12/11-mypost.html + +=head1 DESCRIPTION + +B is blog owner interface to VJournal system. It allows to +create new posts, edit existing posts or perform initial blog setup + +=cut diff --git a/bin/userinfo b/bin/userinfo new file mode 100644 index 0000000..0d92d69 --- /dev/null +++ b/bin/userinfo @@ -0,0 +1,34 @@ +#!/usr/bin/perl -T + +=head1 NAME + +vjuserinfo - return current user info as json + +=head1 SYNOPSIS + + http://your.server.org/cgi-bin/vjuserinfo/your-blog-top + +=head1 DESCRIPTION + +Returns info about current user using following format + + { + url:"somebody.livejournal.com", + displayname:"somebody@lj", + state: "guest", + avatar: {src: "http://your.server.org/avatars/somebody@lj.gif", + width:100, height:100}, + } + +B can be B, B or B. + +If user is not logged in, returns following structure: + + { + state: "notlogged", + providers: [ + {name: "Live journal",icon:"/avatars/lj.gif",format: "%s.livejournal.com"} + ... + } + +=cut -- 2.39.5