Changes
dump etherpad
*** Met a nice guy (coming from techup.ch) who had nice ideas and acted as some sort of complement project manager
*** ...
=Etherpad Dump=
1Goal
Developing an easy to install and maintain distributed server for pasting contents.
GRADING:
1 to 3
Rate features 1-3: 3 is must, 2 is nice to have, 1 is meh
2Interfaces
111231- Irc hook, irc bot
3233333 - Put paste with curl, retrieve them with netcat or curl , possibility to retrieve metadata with the paste.
2312203 - Nice webinterface
3Features
111331- FUCKING ALPHA TECHNOLOGIES !! (languages: D, lua, bash, haskell; storage: rdf; constraints: single source-file)
333333- KISS
333333- Simple installation
333333- Simple configuration, and maintenance.
121111- expandable with modules ?
3333333- utf-8 for the crowd for !!!!
232333- Write once pastes (no future modifications) with expiration
132331- Metadata, link paste to each other
1112011- General Data storage (Image Vids ...)
311111- Programming language detection
3113121- Searchable pastebin
2323323- Simple API
112121- Easy remembered paste
133033- Named paste
12202- Private material (protected to a range of user)
2332323- One time access pastebin
3333333 - No guarantees on data
333313 - default expiration time
111121 - General stats
1131 - Similarity detection
1212023 - Automatic and easy testing (Jenkins)
Counting Votes Script
http://sprunge.us/agCI
http://sprunge.us/ejMV
Api :
Git repository:
git clone ssh://gitolite@foo.fixme.ch:1337/pastebin
PASTEBINLIB:
api
// Option 1 (with soft meta)
retrieve(uid[, with_metadata]) -> content, [meta]
post(utf8-text, [[timeout], **meta_dict]) -> uid
make_paste_link(uid_list[, meta_dict]) -> meta_dict
// Alternative (no soft meta)
post(utf8-text, [**expiry_policy], [**timeout], [**prefered_uid], [**linked_uid_list]) -> uid
'(expiry_policy is one of NEVER, AFTER_READ)
Example: post("def foo(): print 'hello'", expriry_policy=AFTER_READ, timeout=5, prefered_uid="foo", linked_uid_list=["bar", "baz"])
retrieve(uid) -> utf8-text
get_creation_timestamp(uid) -> timestamp
get_linked(uid) -> uids
web client
- WSGI is a apparently a nogo with Python 3, spec is ready but not implemented
Syntax rule
module name all lower case, no underscore all appended
example
in
caca.py
class GrosCacaca(Process): #camel
def __init__(self): #4 space indentation all lowercase
#all variable are lowercase
self.kaka = "I love string anyway" #string should be as the C defined it '
def _poo(self, today=True): #defined as private method (no obligation to do this)
pass