Generate information cards with titles

Ruby, 153 147 140 characters

h,*d=s=gets.chop.split(?|)
puts"/%s\\
|%s|
|%s|"%[e=?=*k=2+l=s.map(&:size).max,h.center(k),e]
d.map{|x|puts"| %%-%ds |"%l%x}
$><<?\\+?-*k+?/

Double format string in the second-to-last line :D


Python 2.7 - 168 = 166 + 2 for quotes.

This assumes we can accept the input with surrounding quotes, hence the possible +2. Either way +2 is better than the +4 required if you use raw_input() vs. just input().

b="|"
s=input().split(b)
w=max(map(len,s))
x=w+2
S="| %s |"
print"\n".join(["/"+"="*x+"\\",S%s[0].center(w),b+"="*x+b]+[S%i.ljust(w)for i in s[1:]]+["\\"+"-"*x+"/"])

Thanks to Volatility for the max(map(len,s)) tip. A very cool tip.

edit: Corrected top row problem.

And the above outputs this:

> python i.py
"1234567890|12345|1234567890123|pie|potato|unicorn"
/===============\
|   1234567890  |
|===============|
| 12345         |
| 1234567890123 |
| pie           |
| potato        |
| unicorn       |
\---------------/

GolfScript, 97 characters

'|'/{'  ':!{1/*}:E~}%.{,}%$-1=:L'='*:§'/\\'E\(.,L\-)2/{!E}*L<'||':^E§^E@{!L*+L<^E}/L'-'*'\\/'E]n*

Example:

> 1234567890|12345|1234567890123|pie|potato|unicorn

/===============\
|   1234567890  |
|===============|
| 12345         |
| 1234567890123 |
| pie           |
| potato        |
| unicorn       |
\---------------/