README in parlement-0.6 vs README in parlement-0.7

- old
+ new

@@ -1,69 +1,82 @@ -I am using debian, so here are a few commands I use: + _ _ + _ __ __ _ _ __| | ___ _ __ ___ ___ _ __ | |_ + | '_ \ / _` | '__| |/ _ \ '_ ` _ \ / _ \ '_ \| __| + | |_) | (_| | | | | __/ | | | | | __/ | | | |_ + | .__/ \__,_|_| |_|\___|_| |_| |_|\___|_| |_|\__| + |_| + +I use debian, here are the commands I use to setup my machine for parlement: # apt-get install postgresql # sudo su - postgres # createuser /your_login/ # apt-get install ruby # apt-get install libpgsql-ruby # apt-get install irb # apt-get install rdoc --> why??? -# ln -s /sbin/ifconfig /bin/ +Basically this install postgresql, ruby and the ruby driver to psql. Ruby on +Rails is database agnostic, parlement will be sometimes in the near future. +You need to install "ruby gems":http://docs.rubygems.org + +And then: # gem install rails # gem install redcloth -Only if you expect to develop and release: + +Only if you expect to develop and do any release: # gem install meta_project The database is setup for user "manu", you may need to change the file config/database.yml for your own settings. Change config/environment.rb to set the domain, default is something like -'leparlement.org', define it as your web site or email domain. +'leparlement.org', use your web site or email domain. -In procmail, define a rule to redirect the relevant mail to parlement, I use: -:0 c -* ^TO parlement|leparlement.org -| /home/manu/parlement/trunk/script/runner 'Mailman.receive STDIN.read' +When you want to setup your server as a node in the graph of servers, redirect +your incoming mails to *your* parlement. In procmail (or any other mail +filtering tool), define this kind of rule: + :0 c + * ^TO parlement|leparlement.org + | /home/manu/parlement/trunk/script/runner 'Mailman.receive STDIN.read' Once you have everything set up (ruby, postgresql, redcloth, irb), you can -launch parlement thus: -~ cd parlement +initialise and launch parlement this way: + +Go into the right folder +~ cd parlement/trunk + +Create the db ~ psql -q template1 -f db/schema.sql + +Populate the db ~ ruby lib/data_import.rb + +Migrate the db to its last version +~ rake migrate + +Launch the developement web server ~ ruby ./script/server +Now you can go to http://localhost:3000 with your browser. -Now you can go to localhost:3000 +You can check that everything works all right on your machine with the testing suite: +~ rake -The problem: "how to display conversations" -The entities involved: - - element - - ancestor - - children - - children number - - author - - element's size - - title - - body -The possibilities - - show one element and its children closed - - show one element opened and its children closed - - show one element and its children opened, its grand children closed - - show one element opened, its children and grand children opened - - when an element is closed, also show its children? -Limits - - can not display all elements at once - - can not display one element and all its direct children at once -Parameters - - ordering - - date - - number of children displayed - - votes + __ __ _ + \ \ / /__| | ___ ___ _ __ ___ ___ + \ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \ + \ V V / __/ | (_| (_) | | | | | | __/ + \_/\_/ \___|_|\___\___/|_| |_| |_|\___| + + + + + +What is below is just for future personal reference... # Here is my console code to reset threads from their original mails: >> elts=Mail.find_all.select{|m|m.file and mail=TMail::Mail.parse(m.file) and reply=mail.in_reply_to and mailObject=Mail.find_by_message(reply) and mailObject.elt.id!=m.elt.parent_id}.collect{|m| {:elt=>m.elt.id, :parent=>Mail.find_by_message(TMail::Mail.parse(m.file).in_reply_to).elt.id}}; puts elts.size >> elts.each{|e|print e[:elt], ' ', e[:parent], ' '; puts Elt.update_all("parent_id='#{e[:parent]}'", "id='#{e[:elt]}'")}; puts elts.size