RkBlog - Python, PHP, Linux http://www.rkblog.rk.edu.pl/ Site/Blog about Django, Python and some Linux and PHP stuff. en RkBlog - Python, PHP, Linux http://www.rkblog.rk.edu.pl/site_media/layout/tux.png http://www.rkblog.rk.edu.pl/ 132 124 http://www.rkblog.rk.edu.pl/forum/topic/1/12/ http://www.rkblog.rk.edu.pl/forum/topic/1/12/ it;s a good start 2008-08-16 10:25:08.741471 http://www.rkblog.rk.edu.pl/forum/topic/1/12/ http://www.rkblog.rk.edu.pl/forum/topic/1/12/ it;s a good start 2008-08-15 22:35:55.325262 http://www.rkblog.rk.edu.pl/forum/topic/1/1/ http://www.rkblog.rk.edu.pl/forum/topic/1/1/ Re: Trying out these tools
just testing this as a possible forum on my site

looks good ;) ]]>
2008-08-06 14:04:34.519571
http://www.rkblog.rk.edu.pl/w/p/python-c-and-c-efficiency-jpg-thumbnail-creation/ http://www.rkblog.rk.edu.pl/w/p/python-c-and-c-efficiency-jpg-thumbnail-creation/ Python, C and C++ efficiency on JPG thumbnail creation 2008-08-04 00:49:58.596237 http://www.rkblog.rk.edu.pl/w/p/advanced-fulltext-searching-solr/ http://www.rkblog.rk.edu.pl/w/p/advanced-fulltext-searching-solr/ Advanced fulltext searching with Solr Enterprise search with PHP and Apache Solr
Search smarter with Apache Solr, Part 1: Essential features and the Solr schema
Search smarter with Apache Solr, Part 2: Solr for the enterprise
PDFs on Slideshare
A simple Python script for Solr would look like this:
from httplib import HTTPConnection

def add(item_id, title, description, text):
	"""
	Add a document to index
	"""
	DATA = '''<add><doc>
<field name="id">%d</field>
<field name="title">%s</field>
<field name="description">%s</field>
<field name="text">%s</field>
</doc></add>''' % (item_id, title, description, text)
	con = HTTPConnection('0.0.0.0:8983')
	con.putrequest('POST', '/solr/update/')
	con.putheader('content-length', str(len(DATA)))
	con.putheader('content-type', 'text/xml; charset=UTF-8')
	con.endheaders()
	con.send(DATA)
	r = con.getresponse()
	if str(r.status) == '200':
		print r.read()
	else:
		print r.status
		print r.read()

def commit():
	"""
	commit changes
	"""
	DATA = '<commit/>'
	con = HTTPConnection('0.0.0.0:8983')
	con.putrequest('POST', '/solr/update/')
	con.putheader('content-length', str(len(DATA)))
	con.putheader('content-type', 'text/xml; charset=UTF-8')
	con.endheaders()
	con.send(DATA)
	r = con.getresponse()
	if str(r.status) == '200':
		print r.read()
	else:
		print r.status
		print r.read()

def search(key):
	"""
	perform a search
	"""
	con = HTTPConnection('0.0.0.0:8983')
	con.putrequest('GET', '/solr/select?q=title:%s&start=0&rows=10&fl=id,title,description' % key)
	con.endheaders()
	con.send('')
	r = con.getresponse()
	if str(r.status) == '200':
		print r.read()
	else:
		print r.status
		print r.read()

add(5, 'Django search engine', 'blaaaa', 'text')
add(6, 'Google search', 'blaaa', 'text')
add(7, 'Solr fulltext search engine', 'blaaaa', 'text')
add(8, 'Car engine', 'blaaaa', 'text')
commit()
search('searching')
For a simple schema like this:
<fields>
  <field name="id" type="string" indexed="true" stored="true" required="true" />
  <field name="title" type="text" indexed="true" stored="true"/>
  <field name="description" type="text" indexed="true" stored="true"/>
  <field name="text" type="text" indexed="true" stored="true"/>
  </fields>
  <uniqueKey>id</uniqueKey>
]]>
2008-07-29 11:45:07.915048
http://www.rkblog.rk.edu.pl/w/p/contentbbcode-examples/ http://www.rkblog.rk.edu.pl/w/p/contentbbcode-examples/ ContentBBcode examples Update: Updated to CBC in Diamanda 2008
Some examples and info about CBC]]>
2008-07-27 00:32:23.078476
http://www.rkblog.rk.edu.pl/w/p/diamanda-application-set-200807-test-3-released/ http://www.rkblog.rk.edu.pl/w/p/diamanda-application-set-200807-test-3-released/ Diamanda Application Set 2008.07 Test 3 Released Diamanda 2008 Test 3 release contains mainly fixes, and enchantments submited after Test 2. It's the last release not compatible with newforms-admin (and so compatible with older Django-SVN code) so for older projects you can use code from this release. Test 4 will be NFA compatible, and probably hit normal stable release with Django 1.0.

All the features of Diamanda 2008 you can check on this site, which runs on Diamanda 2008 Test 3. I'm updating the documentation from 2007 to 2008 release. Comments, and showcase links are welcomed :)

Diamanda 2008 main features:

  • Much improved forum (discussion board) – MyghtyBoard
  • OpenID support
  • Cleaner code
  • Compatibility with the "latest" Django code
  • Download ZIP or download tar.bz2

]]>
2008-07-27 00:05:55.503092
http://www.rkblog.rk.edu.pl/w/p/punbb-and-wordpress-integration-plugin/ http://www.rkblog.rk.edu.pl/w/p/punbb-and-wordpress-integration-plugin/ punBB and Wordpress integration plugin Update: Plugin updated to punBB 1.3/1.2 and WP 2.6
Wordpress plugin that integrates punBB user system with wordpress.]]>
2008-07-24 13:52:41.418045
http://www.rkblog.rk.edu.pl/w/p/hosting-django-under-nginx-scgi-and-wsgi/ http://www.rkblog.rk.edu.pl/w/p/hosting-django-under-nginx-scgi-and-wsgi/ Hosting Django under Nginx with SCGI and WSGI 2008-07-22 15:27:15.077866 http://www.rkblog.rk.edu.pl/w/p/mvc-punframework/ http://www.rkblog.rk.edu.pl/w/p/mvc-punframework/ MVC in punFramework 2008-07-22 11:49:43.346533 http://www.rkblog.rk.edu.pl/w/p/punframework-instalation/ http://www.rkblog.rk.edu.pl/w/p/punframework-instalation/ punFramework instalation 2008-07-22 11:49:01.868353 http://www.rkblog.rk.edu.pl/w/p/diamanda-200807-test-2-released/ http://www.rkblog.rk.edu.pl/w/p/diamanda-200807-test-2-released/ Diamanda 2008.07 Test 2 Released download second Test/Beta release of Diamanda 2008. Compared to Test 1 there is a lot of changes in the code.
  • Prefix, moderators and anonymous support in forums. Marking topics as solved.
  • Main Page (and RSS) feed of new and updated entries (pages and posts by default)
  • OpenID support (you can login by openID, then do a quick registration with no passwords. OpenID user will be auto-logged on his Django account.)
  • Few minor changes in all components
In the next 1-2 weeks Test 3 will be released, and after a week a Final release of Diamanda 2008 will be made. Test 3 will contain fixes and few unfinished features (polishing OpenID, content submission, text captcha)]]>
2008-07-14 11:31:16.915018
http://www.rkblog.rk.edu.pl/w/p/diamanda-2008-test-2-coming-soon/ http://www.rkblog.rk.edu.pl/w/p/diamanda-2008-test-2-coming-soon/ Diamanda 2008 Test 2 coming soon
  • Removed less important apps (will be available in diamanda-extras)
  • Forum, and overall UI improved
  • Support for new unread posts and topics, and links to first unread post
  • markItUp! BBCode on the forums, and Markdown on the wiki-content module
  • Wiki-almost-like content module with Markdown syntax and CBC tags
  • After Test 2 there will be one more "test" release – 2008.06 Test 3 with fixes, clean-ups, and - data importers (move data from other scripts, for example PHP forums and CMS to Diamanda). After a period of testing a stable 2008 release will be available.]]>
    2008-07-14 11:31:16.501322
    http://www.rkblog.rk.edu.pl/w/p/appengine-everywhere/ http://www.rkblog.rk.edu.pl/w/p/appengine-everywhere/ AppEngine everywhere :) For virtualization reasons only the pure Python is supported and a subset of the Python standard library. Hm... so I can't have PIL there? If so web based services and tools will get big attention (google charts and not matplotlib, pixenate and others and not PIL).
    disk storage is up to 500M, both incoming and outgoing traffic is restricted to 10G per day each, up to 2000 emails per day, and up to 200 million megacycles of CPU per day
    All my sites would fit :) ]]>
    2008-07-14 11:31:15.373730