Migration From Plone to WordPress
December 30, 2010 by spoonfork · 2 Comments
Migrating from Plone to WordPress is not quite as straightforward as it may seem. In fact, it was quite a PITA. One of the factors for this was that none of us (except for @kagesenshi) have deep technical expertise on the innerworkings of Plone, or Zope. There was one solution, but reading through it, I know it would be a PITA.
So I decided that the best solution would be to parse Plone’s RSS feed and import them to WordPress’ MySQL database. This seems to be the most sensible, effective and headache free solution – provided that your Plone entries (articles, news, etc) combined are not in thousands.
The first thing that you need to do is to aggregate the entire Plone site. The steps to do this is well documented here.
The RSS by default will publish only 15 items. You have to change the RSS’ setting to, well, a very large number if you want to parse all the contents. This can be done by navigating to synPropertiesForm of the Plone site.
So now you will have all the site’s content in RSS. Parsing the RSS is easy. My first attempt was to use ElementTree, a library that I always use whenever dealing with stuff XML-ish. Apparently it didn’t work properly, so I used feedparser instead.
Here’s a snippet of the code that does the job. This code reads a RSS file. feedparser can also retrieve the RSS remotely.
import feedparser
import os
import sys
import MySQLdb as mdb
# get this from the db
# post_author id
# mel => 1
# sniffit => 2
# klks => 3
# apparently unicode is not handled properly eventhough uft8 is aleady set, so edit the RSS file and remove Unicode chars first
if __name__ == '__main__':
file = sys.argv[1]
if not os.path.exists(file):
print "Error: Unable to find file: " + file
sys.exit(1)
dbname = "yourdb"
dbpass = "yourpassword"
dbhost = "localhost"
dbuser = "youruser"
conn = mdb.connect(dbhost, dbuser, dbpass, dbname, charset="utf8")
cursor = conn.cursor()
f = feedparser.parse(file)
l = len(f['entries'])
print "Processing %d entries" % l
for post in f['entries']:
title = post.title
link = post.link
content = post.description
content = content.encode('utf8')
postdate = post.date
slug = link.split("/")[-1]
author = post.author
post_author = ""
if author == 'mel': post_author = "1"
if author == 'sniffit': post_author = "2"
if author == 'klks': post_author = "3"
print "Importing post " + title
q = "INSERT INTO wp_posts (post_date, post_date_gmt, post_content, post_title, post_name, post_author) VALUES (%s,%s,%s,%s,%s,%s)"
cursor.execute(q, (postdate, postdate, content, title, slug, post_author))
conn.commit()
cursor.close()
conn.close()There are a few things that this script doesn’t do, namely tags and categories. This can be coded, or done manually. Also, the RSS’ HTML output as generated by Plone may contain some garbage or wayward HTML tags (which are pretty consistent in around 80% of contents) and this can be cleaned up manually or by code.
Share this article
Security Meetup – UniPwned! – Hacking UniFi for the LOLZ
What?
This 30 minute presentation will talk about the recent deployment of TM’s new HSBB service and the security aspects of it. We’ll mainly be focusing on hacking the D-LINK DIR-615 router which is issued to all UniFi subscribers. From stealing account credentials, to ways of building a router based botnet. There will also be a Q&A session in hopes of discussing other potential attack vectors.
When?
- 11th January 2011, 8-10pm (Tuesday)
Where?
- HackerspaceKL
Who?
- Everyone is invited! If you are interested in security, you should be there
Cost?
- Free for members. We’re all about keeping knowledge free, but in the real world that we live in, everything requires money. Hence non-members are required a minimum donation of RM15. Your donation will be used for the upkeep of the space.
Share this article
HackerspaceKL Update: The one where we are announcing a few stuff
December 28, 2010 by spoonfork · Leave a Comment
2011 is fast approaching, 2010 is fast ending, and come January, HSKL will be exactly one year old. In light of this, it is my duty announce a few things. Here they are, in no particular order:
Membership fee to be reduced from RM100/month (professional adult) and RM50/month (full-time students) to RM50 to all.
Yes you read that right. We are reducing the membership fees from RM100/month (professional adult) and RM50/month (full-time student) to a flat fee of RM50 for everyone. There are several reasons for the fee reductions, but one of the main purpose is to get and attract more members to join the space. In line with the reduction of fees, HSKL will be conducting a series of activities to attract more memberships – such as university road shows. Membership is still for a minimum of 3 months, and members can choose to pay either every 3 months, or for 1 year. Check out this page on how to be a member.
Annual General Meeting, 16th January 2011
We will be having our annual general meeting on the 16th of January 2011 (Sunday). The meeting will be held from 10am – 1pm at HackerspaceKL. The meeting agenda has not been finalized yet, and will be announced in the next few days. Key to the AGM will be the selection of new committee members, 2011 activity planning, and so on. Stay tuned for more announcements. I am sad to announce that this will be the final AGM that I will chair as I will be relinquishing my role as HSKL’s President. Instead, in line with the Registrar of Society’s requirements, I will be one of HSKL’s three Permanent Life Member.
HSKL Security Meetup
The first ever HSKL Security Meetup will take place on the 11th January 2011 (Tuesday), from 8pm – 11pm. This is a monthly meetup that will take place every first Tuesday of the month (subject to holidays, etc), and the first meetup is on the second Tuesday due to the holidays. The format of the meetup is pretty simple: It is a 1.5 – 2 hours meetup with an hour of technical presentation, followed by Q&A, brainstorming, and lepak session.
What?
- Monthly get together to present, and discuss security-related stuff
- Anything and everything about security (including physical security and hardware hacking)
- Technical/semi-technical in nature
- 1 hour of presentation, followed by Q&A, brainstorming, discussions and lepak session
When?
- Every first Tuesday of the month, unless otherwise stated
Where?
- HackerspaceKL
Who?
- Everyone is invited! If you are interested in security, you should be there
Cost?
- Free for members. We’re all about keeping knowledge free, but in the real world that we live in, everything requires money. Hence non-members are required a minimum donation of RM15. Your donation will be used for the upkeep of the space.
The first talk for the first meetup is titled “UniPwned! – Hacking UniFi for the LOLZ” by The Sexy Kambingz Crew and HSKL members. Here’s an abstract of the talk:
This 30 minute presentation will talk about the recent deployment of TM’s new HSBB service and the security aspects of it. We’ll mainly be focusing on hacking the D-LINK DIR-615 router which is issued to all UniFi subscribers. From stealing account credentials, to ways of building a router based botnet. There will also be a Q&A session in hopes of discussing other potential attack vectors.
Share this article
Electronics Fridays 17/10/2010
December 16, 2010 by spoonfork · Leave a Comment
Our weekly Electronics Fridays meetup is on from 8:00pm – 11pm, 17th December 2010. We are expecting a visit from a journalist (and photographer) so, bring your projects/stuff to showcase.
What?
- Weekly get-together to solder, wire, design, etch, and make electronics stuff.
- Learn new skills
- Make a project
- Show, tell and get help (bring your project – advance or simple, it don’t matter)
When?
- We are usually open as early as 4pm, with a break for dinner at around 7-8pm. And continue on till 10:30 or 11pm. If you want to come earlier, the best time is usually around 6:30 (before we go off for dinner)
Where?
- Hackerspace KL
Who?
- Everyone is welcome! Even if you are not a member and you want to check out what HackerspaceKL is about, feel free to come.
Cost?
- Free for members. Non-members however, cannot use any of our equipments (to be fair, they are paid by the members). Non-members can buy the electronics components from us. We have stuff to sell to – QuarterK, and Seeeduino.
See you guys there!
Share this article
What do we have at the space?
December 8, 2010 by spoonfork · Leave a Comment
We have the following items for use by members at the space:
- Soldering iron
- Soldering flux
- Solder wire
- Pliers, snippers, IC extractor, wire cutters, diagonal pliers
- Screwdriver set
- Solder sucker
- Digital and analog multimeter
- Single core wires
- Variable power supply
- Etching materials
- Iron
- Printer (please buzz @spoonfork if you need to use the printer)
- Drill (please buzz @spoonfork if you need to use it)
- Electronic components (resistors, diodes, capacitors, etc)
- Old circuit boards
- Seeduino (as pointed by @kakeman, spelling fail, should be Seeeduino)
- Projector
- Breadboard, veroboards, etc
- Old PCs
- Old hard disks
- Lots and lots of cables
- … and many more!
Basically, we have enough electronic equipments to use if you want to get started on your projects. The members also have their toys, which are usually shared among each other:
- Various Arduinos (Arduino Uno, Arduino S3V3, Arduino Uno Mega, Seeeduino, Freeduino, Duemilanove, and many more!)
- Arduno sheilds: Ethernet shield, Xbee module and adaptor, QuarterK, LOLshield, motor party add-on, etc
- Bus pirate
- USBTinyISP programmer
- LCDs (16×2, 20×2), GLCD
- LED matrix
- … and many more!
We also have t-shirts and stickers for sale.
Share this article
Electronic Fridays
What?
- Weekly get-together to solder, wire, design, etch, and make electronics stuff.
- Learn new skills
- Make a project
- Show, tell and get help (bring your project – advance or simple, it don’t matter)
When?
- We are usually open as early as 4pm, with a break for dinner at around 7-8pm. And continue on till 10:30 or 11pm. If you want to come earlier, the best time is usually around 6:30 (before we go off for dinner)
Where?
- Hackerspace KL
Who?
- Everyone is welcome! Even if you are not a member and you want to check out what HackerspaceKL is about, feel free to come.
Cost?
- Free for members. Non-members however, cannot use any of our equipments (to be fair, they are paid by the members). Non-members can buy the electronics components from us. We have stuff to sell to – QuarterK, and Seeeduino.
Share this article
FreeBSD Essentials ends; Announcing UNIX-g33ks III
UNIX-g33ks FreeBSD essentials is coming to an end with the last session on FreeBSD system management and maintenance being held on the 5th of December 2010. Totalling 6 sessions starting from the 19th September 2010, this series has already covered enough material to allow participants to deploy and administer their own FreeBSD system to suit their needs.
On behalf of our FreeBSD mentor, Mr Suresh Ramasamy, we would like to thank the g33ks and members of HackerspaceKL who came to our sessions and sharing knowledge throughout the series.
Share this article
This Week’s Electronics Friday is Cancelled
This week’s electronics Friday (3rd December 2010) is cancelled since most of the members will be out of town due to the Awal Muharram celebration on the 7th of December.
As a side note, we are still testing out the Google Calendar Events, so events may or may not appear on the Events page. To keep updated on our events, follow us on Twitter (@hackerspacekl) and subscribe to our blog as we will post event details on the blog as well.
Share this article
Migration to WordPress
December 1, 2010 by spoonfork · 2 Comments
After a long battle with Plone, we have finally decided to migrate the WordPress. When we started, we used Trac, then Plone, and now WordPress. Why the change?
With Plone, we wanted to have a system that can manage membership. For example, members can view their membership status, renew their membership, and be sent notification when membership fees are due. However, Plone doesn’t have this feature built-in, and we don’t have enough expertise to hack Plone. As far as membership management is concerned, we don’t have members in the hundreds, so I have been using a simple excel file to keep track of members and payment.
With Plone, we also wanted a system for event management, and Plone is great for that. The calendaring system rocks. It was tightly integrated with Twitter, so new events that are added will be tweeted out immediately. Posted items are integrated to the mailing list, so any new posting will be sent to the mailing list. The calendar and event system are the only function in Plone that works for us.
So Plone had been used primarily to blog. However, it is a monster. It’s slow, non-intuitive, and even the easiest of tasks such as adding multiple photos to a post seems daunting. This has been a major discouragement, and one of the primarily reasons why we seldom post new stuff (you can point the finger at Mr. Lazy too).
And so we decided to move to WordPress. WordPress has everything we need (we still don’t need the membership management thingamagick). The only exception is the event and calendar system that worked for us in Plone. For that, we chose Google Calendar Event, a really nice and functional plugin for WordPress. It is not as awesome as the one that we have in Plone (as @kakeman has repeatedly pointed out, ad nauseum), but it works. One limitation is that new events that are added are not automatically tweeted. If you know how to integrate Google Calendar with Twitter notification, do let us know.
As for migration from Plone to WordPress, it was a pain in the ass, and will be the subject for another post.
Share this article
HSKL Income & Expenditure Statement – December 2010
Our latest income and expenditure statement can be found here. The are a few good news regarding our finances:
- HSKL is officially debt free. Money owed to @spoonfork totalling RM10,209.04 have been fully paid.
- HSKL’s account is positive for the first time in many months
- We have successfully managed to keep costs low
The not so good news are:
- We still have very limited members to keep the space alive. In November, our membership count was 13, and at RM100 per person per month, that is just enough to pay for rental.
For the past two months, the most common feedback that I get from would-be new members was “RM100 per month ah? Why so expensive. Cannot afford la.” So why is RM100 so expensive per month?
But that is the wrong question to ask. The right question to ask is “Why is HSKL charging RM100 per month?“. The simple answer to that question is: we don’t have enough members. The more members we have, the less that everyone will have to pay.
The first year (almost!) of HSKL’s founding have been largely spent on developing core skills and knowledge. The handful of members that we have have accomplished so much. We started with zero knowledge on Arduino up to a point where we can design and build our own shield now. And we are slowly gaining recognition in the community.
The next step would logically, to recruit more members, and work on more interesting projects, and get everything that was planned executed. And hopefully, we will get more members and lower the membership fee.
OK, back to the accounts. Summary, since January:
- Average income per month is RM1808.67
- Average expenses per month is RM1800.92
- Balance: RM93.03
And for those who hasn’t paid their membership fees, please do so as soon as possible.
