]> www.wagner.pp.ru Git - oss/vjournal.git/blob - journal.txt
new description
[oss/vjournal.git] / journal.txt
1 Project of the mini-blog serivice (tornado-based).
2
3 1. All the blog entries and tapes are stored as plain html files and
4 served via StaticFileHandler (or even frontend httpd such as nginx).
5
6 2. Comments from any OpenID authenticatied user is allowed (unless this
7 user or corresponding openid-provider is banned).
8
9 Comments are stored within POST page.
10
11 3. Post and editing is allowed for openid-authenticated blog owner. OpenID provider
12 with support for email and avatar should be incorporated.
13
14 4. There can be more than one blog on the same physical instance of
15 application. Blogs can be distinguihed by URI prefix and hostname.
16 All blogs on the same physical instance share cache of authenticated
17 users, including their avatars.
18
19 5. There should be support for rotatable tape of recent posts.
20
21 6. Post could have multiple tags. Each tag has a page with list of
22 recent (rotatable) posts with same tags. When post is edited and list of
23 tags is changed, post is removed from the tapes which are no longer
24 relevant
25
26 7. There can be cuts in the post. Cut is implemented as block with
27 display:none and javascript to hide/unhide.
28
29 8. Comment submit form is included into post (and possbile tape) pages
30 and open clicking "Reply" link using javascript.
31
32 9. All templates (for post, comment etc) are pure html files where
33 elements to be edited upon posting are marked with special classes.
34
35 10. There should be an installer which genrates secret for tornado
36 securie cookie and provides default configuration for apache and nginx
37 frontends.
38
39 11. There should be no client-server database. If there is 
40 persistent state which
41 cannot be represented as publically available files  (hmtl. images) on
42 the filesystem (such as cached user session) they should be iplemented
43 as persistent dictionary using shelve standard module.
44
45 12. There should be commenter preferences URL, which would allow user to
46 specify e-mail address and avatar.
47
48 URL specification
49
50 ${prefix}/index.html - main tape of recent posts
51 ${prefix}/prevNNNN.html - rotated parts of recent posts tape
52 ${prefix}/tag/index.html  list of tags.
53 ${prefix}/tag/tagname.html list of recent posts with given tag
54 ${prefix}/nnnn/nn/index.html list of posts, posted during year nnnn,
55 month nn
56 ${prefix}/nnnn/nn/user-specified-name.html - individual post with
57 discusson\
58 ${prefix}/avatars - cached user avatars
59 ${prefix}/login - login page handled by tornado.auth.OpenIDMixin
60 ${prefix}/post - page to create new post
61 ${prefix}/edit/nnnn/nn/user-specified-name.html - page to edit/delete existing post
62 ${prefix}/comment/nnnn/nnn/user-specified-name.html?id=comment-id - page
63 to add comment
64 ${prefix}/ban?user=email - url to ban openid-user
65 ${prefix}/ban?site=hostname - url to ban entire openid provider.
66 ${prefix}/templates - static templates for all pages are stored.
67 ${prefix}/friend?add=identity-url - add an RSS feed from your friend
68 blog to the friend tape
69 ${prefix}/friend?del=identity-url - remove RSS feed from friend tape
70 Template classes and editing.
71 ${prefix}/user/identity-url - allows to specify identity avatar.
72
73 Prefix is not contained into distributive templates. It is added there
74 when new page created from the template
75
76 Post information is stored into the following html elements
77
78 1. title and h1.title - title of the post
79 2. .date - date of the posting
80 3. .tags .tag a - url and names of tag. If there is more than one tag
81 block with class .tag is replicated neccessary number of times.
82 4. .body (should be block element) - body of post
83 5. img.authorpic - choosen author userpic if several are possible.
84
85 post information in the tape (recent post, calendar and tag) page
86
87 1. .posts .post h1.title or .posts .post h1 a.title title of the post
88         In second case href attribute is replaced by post url
89    .post .post a.postlink - href is replaced by post url
90 2.   .date - date
91    .posts .post a.date  href replaced with link to the month directory
92 3.
93 4.
94 5.  -as above
95
96
97 Comment information
98
99 .comment block can have nested .comments list. IF so, comments which are
100 responses to this commend are added to the comments list of this comment
101 block.
102
103 Otherwise if there is an element in the .comment block with class .level and directly
104 specified width: style, or the .comment block itself has inline
105 margin-left property, this style value would be multiplied  accorde
106 comment is inserted just before next comment of same level as parent.
107
108 If neither criteria met, comment is insertied at the end of discussion.
109
110 .comment a.parent@href set to the #id where id is value of id attribute
111 of parent comment.
112
113 .comment .author set to display name of author
114 .comment a.author@href set to identity url of author
115 .comment img.avatar@src set to the url of locally cached author's avatar
116 .comment .text set to the text of comment
117 .comment a.reply@href set to the link to the commenting URL
118 .comment a.edit@href set to the link of comment editing/deleting URL.
119
120
121
122 Friends tape - RSS aggregator based on cron job.