Cool plone products

collective.documentviewer

https://pypi.python.org/pypi/collective.documentviewer/1.5.1

This package integrates documentcloud’s viewer and pdf processing into plone.

Example viewer: https://www.documentcloud.org/documents/19864-goldman-sachs-internal-emails

wildcard.foldercontents

https://pypi.python.org/pypi/wildcard.foldercontents

better folder contents implementation

Introduction

This package is developed by Wildcard Corp. to integrate better file upload, sorting and folder_contents view in general to Plone.

Memory of gnome-cn.org

I and Lonestar created GNOMECN (www.gnome-cn.org) in Aug. 2004, and maintain it until Mar. 2008, and final close it in Oct. 2010. I’ve backuped it, and now, lets find it out and see what we did thoese years.

Visit at:

http://yangh.org:19580/gnomecn

How I get it back?

Run Plone 3.0 on Ubuntu 12.04 x86_64

While the old gcn is run in an i386 Debian server, I need to install new Zope in the x86_64 env.

Build dependence
================

apt-get install gcc

binutils cpp cpp-4.6 gcc gcc-4.6 libc-dev-bin libc6-dev libmpc2 libmpfr4 libquadmath0 linux-libc-dev manpages-dev

apt-get build-dep python

build-essential debhelper debiandoc-sgml dh-apparmor docutils-common dpkg-dev g++ g++-4.6 gettext html2text
intltool-debian libdpkg-perl libgettextpo0 libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libroman-perl
libsgmls-perl libsp1c2 libstdc++6-4.6-dev libtext-format-perl libunistring0 liburi-perl make po-debconf
python-docutils python-roman sgml-data sgmlspl sp

# Zope requrie python-zlib
apt-get install zlib1g-dev

Python 2.4.x
============

While 12.04 only support python 2.7, so I need to build python 2.4 from source.

Install python 2.4 follow the instruction at:

http://ubuntuforums.org/showthread.php?t=1976837

wget http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tar.bz2
tar xvf Python-2.4.6.tar.bz2
cd Python-2.4.6
# apply patch for build in x86_64 env
# configure
env CPPFLAGS=”-I/usr/lib/x86_64-linux-gnu” LDFLAGS=”-L/usr/include/x86_64-linux-gnu” ./configure –prefix=/home/gnome/python2.4
make -j4
make install

re-Install Zope-2.9.6
=====================

wget http://old.zope.org/Products/Zope/2.9.6/Zope-2.9.6-final.tgz
tar xvf Zope-2.9.6-final.tgz
cd Zope-2.9.6-final
./configure –with-python=/home/gnome/python2.4/bin/python –prefix=/home/gnome/Zope-2.9 –optimize

First startup
=============

Clean out all old .pyc which compiled with i386 python

find -iname *.pyc -delete
/bin/zopectl start

Zope is ok, bug plone instance broken, check log file:

——
2013-03-13T05:49:43 INFO Archetypes ESC[00mESC[01;32mProducts/Archetypes/Field.py[95]:?
ESC[00mWarning: no Python Imaging Libraries (PIL) found.Archetypes based ImageField’s don’t scale if neccessary.

——
2013-03-13T05:49:44 ERROR Zope Could not import Products.ATContentTypes
Traceback (most recent call last):
File “/home/gnome/Zope-2.9/lib/python/OFS/Application.py”, line 708, in import_product
product=__import__(pname, global_dict, global_dict, silly)
File “/home/gnome/gnomecn/Products/ATContentTypes/__init__.py”, line 57, in ?
import Products.ATContentTypes.content
File “/home/gnome/gnomecn/Products/ATContentTypes/content/__init__.py”, line 34, in ?
import Products.ATContentTypes.content.topic
File “/home/gnome/gnomecn/Products/ATContentTypes/content/topic.py”, line 33, in ?
from Products.CMFPlone.CatalogTool import CatalogTool
File “/home/gnome/gnomecn/Products/CMFPlone/CatalogTool.py”, line 31, in ?
from Products.CMFPlone.utils import base_hasattr
File “/home/gnome/gnomecn/Products/CMFPlone/utils.py”, line 6, in ?
from PIL import Image
ImportError: No module named PIL
——

Install PIL
===========

We need install PIL for ours fresh python2.4

wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
tar xvf Imaging-1.1.7.tar.gz
cd Imaging-1.1.7
~/python2.4/bin/python setup.py install

Restart, Memory of gnome-cn.org…

Skype no redirect to tom.com

How to download skype from office site?

If you access skype.com from Chinese mainland, you’ll be force redirected to skype.tom.com. We always knowns that all localized IM client in the China may be leak your personal info, so we’d like to download office skype install package.

No redirect: Method 1

Use translation function of you favorite search engine, e.g: bing

http://www.bing.com/translator/?ref=SALL&br=ro&mkt=en

Search the skype download link for you platform, then access the download link in the translated page.

For example the skype mac version: www.skype.com/en/download-skype/skype-for-mac , you will find the final download link in the translated page, go ahead, your dmg is there.

That is all.

 

Plone integrators

Fancy plone site design:

http://www.enfoldsystems.com/

http://www.pilotsystems.net/

How an university academe  adopting and running a Plone?

http://www.eng.ox.ac.uk/Plone

A integrator’s rant:

Why I am leaving Plone?

http://pjgrizel.net/2009/07/why-i-am-leaving-plone/

如何下直接下载 Android 的某个库?

如何下直接下载 Android 的某个库?

有时候实然想看看 Android 中的某个部 件的代码,又不想下载整套代码,如何能 只下其中一个呢?

完整的 Android 代码下载方式:

Android 官方: http://source.android.com/source/downloading.html 高通平台: https://www.codeaurora.org/xwiki/bin/QAEP/高通 QRD: https://www.codeaurora.org/xwiki/bin/QRD-Android/

Gitweb 界面:

Android 官方:https://android. googlesource.com/高通平台: https://www.codeaurora.org/gitweb/quic/qrd-android/高通 QRD: https://www.codeaurora.org/gitweb/quic/la/

单独下载某个库:

以 dalvik (Android 下的 Java 虚拟机) 为 例:

git clone https://android.googlesource. com/platform/dalvik

git clone git://codeaurora.org/platform/dalvik

git clone git://codeaurora.org/quic/qrd-android/platform/dalvik

Plone install and customisation

Install

Download last stable release from:

http://plone.org/products/plone/releases

Read the INSTALL in the tar ball, Install it.

start/stop

xxx/zinstance/bin/plonectl start/stop/restart

Open host:8080 in your browser, and create a new Plone instance, e.g: cms

Customisation

Any customisation must be done when plone is not running, and after your change, run xxx/zinstance/bin/buildbot and start plone again.

Time Zone

Plone default runes in GTM+0 time zone, if you want Plone show time in you local time zone, such as in document by line, search result, you need tell Plone which time zone you’re:

Add a TZ environment vary in the zinstance/base.cfg

# You may also control the environment variables for the instance.
environment-vars =
        ${buildout:environment-vars}
        TZ Etc/GMT+8

Note: very vary must stands in a new line.

WebDAV support

If you want to access your contents in plone via the WebDAV protocol, add a new in the base.cfg

# webdav support
webdav-address = 1980

Add-ons

Plone only provides some basic content type, install add-on to add new type as you need

Add new Add-ons in the zinstance/buildout.cfg

# Eggs
# ----
# Add an indented line to the eggs section for any Python
# eggs or packages you wish to include.
#
eggs =
    Plone
    Pillow
    lxml
    Products.PloneFormGen
    Products.Ploneboard
    Products.OpenXml

Products.PloneFormGen – Create form and collect data from it, useful if you want to some survey.

Products.Ploneboard – If you want create BBS, or a forum, it’s be test.

Products.OpenXml – Add support for index Excel files

Index for PDF/Doc/Docx/Excel

If you want to search key word from the content of PDF/Doc/Docx/Excel, You must install some packages into your operating system. So that Plone can use them to index these files.

sudo apt-get install wv poppler-utils

Reference to >>

For support index of Docx, install add-on Products.OpenXml is enough.

Increase login session time out period

If you don’t want to login every day when you access your CMS, You need to customise the session time.

Reference to:

http://plone.org/documentation/kb/cookie-duration

http://davidjb.com/blog/2011/03/increasing-plones-session-timeout