2009-12-02 05:45:55 +00:00
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
##############################################################################
|
2010-03-26 13:27:16 +00:00
|
|
|
|
#
|
2009-12-02 05:45:55 +00:00
|
|
|
|
# OpenERP, Open Source Management Solution
|
2010-01-12 09:18:39 +00:00
|
|
|
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
2009-12-02 05:45:55 +00:00
|
|
|
|
#
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU Affero General Public License as
|
|
|
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
2010-03-26 13:27:16 +00:00
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2009-12-02 05:45:55 +00:00
|
|
|
|
#
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
|
|
from osv import osv, fields
|
|
|
|
|
from osv.orm import except_orm
|
|
|
|
|
import os
|
|
|
|
|
import StringIO
|
|
|
|
|
import base64
|
|
|
|
|
import datetime
|
|
|
|
|
import time
|
|
|
|
|
import random
|
|
|
|
|
import tools
|
|
|
|
|
import re
|
|
|
|
|
|
2010-01-21 12:01:23 +00:00
|
|
|
|
from tools.translate import _
|
2009-12-15 11:12:09 +00:00
|
|
|
|
from document.nodes import node_content
|
2009-12-02 05:45:55 +00:00
|
|
|
|
|
|
|
|
|
from tools.safe_eval import safe_eval
|
|
|
|
|
|
|
|
|
|
ICS_TAGS = {
|
2010-03-26 13:27:16 +00:00
|
|
|
|
'summary': 'normal',
|
|
|
|
|
'uid': 'normal' ,
|
|
|
|
|
'dtstart': 'date' ,
|
|
|
|
|
'dtend': 'date' ,
|
|
|
|
|
'created': 'date' ,
|
|
|
|
|
'dtstamp': 'date' ,
|
|
|
|
|
'last-modified': 'normal' ,
|
|
|
|
|
'url': 'normal',
|
|
|
|
|
'attendee': 'multiple',
|
|
|
|
|
'location': 'normal',
|
2009-12-02 05:45:55 +00:00
|
|
|
|
'categories': 'normal',
|
2010-03-26 13:27:16 +00:00
|
|
|
|
'description': 'normal',
|
2009-12-02 05:45:55 +00:00
|
|
|
|
|
|
|
|
|
# TODO: handle the 'duration' property
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ICS_FUNCTIONS = [
|
|
|
|
|
('field', 'Use the field'),
|
|
|
|
|
('const', 'Expression as constant'),
|
|
|
|
|
('hours', 'Interval in hours'),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
class document_directory_ics_fields(osv.osv):
|
2010-03-26 13:27:16 +00:00
|
|
|
|
""" Document Directory ICS Fields """
|
2009-12-02 05:45:55 +00:00
|
|
|
|
_name = 'document.directory.ics.fields'
|
2010-03-26 13:27:16 +00:00
|
|
|
|
_description = 'Document Directory ICS Fields'
|
2009-12-02 05:45:55 +00:00
|
|
|
|
_columns = {
|
2010-08-10 11:35:06 +00:00
|
|
|
|
'field_id': fields.many2one('ir.model.fields', 'OpenERP Field'),
|
2009-12-02 05:45:55 +00:00
|
|
|
|
'name': fields.selection(map(lambda x: (x, x), ICS_TAGS.keys()), 'ICS Value', required=True),
|
2010-03-26 13:27:16 +00:00
|
|
|
|
'content_id': fields.many2one('document.directory.content', 'Content',\
|
|
|
|
|
required=True, ondelete='cascade'),
|
2009-12-02 05:45:55 +00:00
|
|
|
|
'expr': fields.char("Expression", size=64),
|
2010-03-26 13:27:16 +00:00
|
|
|
|
'fn': fields.selection(ICS_FUNCTIONS, 'Function', help="Alternate method \
|
|
|
|
|
of calculating the value", required=True)
|
2009-12-02 05:45:55 +00:00
|
|
|
|
}
|
|
|
|
|
_defaults = {
|
|
|
|
|
'fn': lambda *a: 'field',
|
|
|
|
|
}
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2009-12-02 05:45:55 +00:00
|
|
|
|
document_directory_ics_fields()
|
|
|
|
|
|
|
|
|
|
class document_directory_content(osv.osv):
|
2010-03-26 13:27:16 +00:00
|
|
|
|
""" Document Directory Content """
|
2009-12-02 05:45:55 +00:00
|
|
|
|
_inherit = 'document.directory.content'
|
2010-03-26 13:27:16 +00:00
|
|
|
|
_description = 'Document Directory Content'
|
2009-12-02 05:45:55 +00:00
|
|
|
|
__rege = re.compile(r'OpenERP-([\w|\.]+)_([0-9]+)@(\w+)$')
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2009-12-02 05:45:55 +00:00
|
|
|
|
_columns = {
|
|
|
|
|
'object_id': fields.many2one('ir.model', 'Object', oldname= 'ics_object_id'),
|
2010-06-16 11:51:39 +00:00
|
|
|
|
'obj_iterate': fields.boolean('Iterate object', help="If set, a separate \
|
2010-03-26 13:27:16 +00:00
|
|
|
|
instance will be created for each record of Object"),
|
2010-06-16 11:51:39 +00:00
|
|
|
|
'fname_field': fields.char("Filename field", size=16, help="The field of the \
|
2010-03-26 13:27:16 +00:00
|
|
|
|
object used in the filename. Has to be a unique identifier."),
|
2009-12-02 05:45:55 +00:00
|
|
|
|
'ics_domain': fields.char('Domain', size=64),
|
2010-01-06 11:19:56 +00:00
|
|
|
|
'ics_field_ids': fields.one2many('document.directory.ics.fields', 'content_id', 'Fields Mapping')
|
2009-12-02 05:45:55 +00:00
|
|
|
|
}
|
|
|
|
|
_defaults = {
|
|
|
|
|
'ics_domain': lambda *args: '[]'
|
|
|
|
|
}
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2009-12-02 05:45:55 +00:00
|
|
|
|
def _file_get(self, cr, node, nodename, content, context=None):
|
2010-03-26 13:27:16 +00:00
|
|
|
|
""" Get the file
|
|
|
|
|
@param self: The object pointer
|
|
|
|
|
@param cr: the current row, from the database cursor,
|
|
|
|
|
@param node: pass the node
|
|
|
|
|
@param nodename: pass the nodename
|
|
|
|
|
@param context: A standard dictionary for contextual values
|
|
|
|
|
"""
|
|
|
|
|
|
2009-12-15 11:12:09 +00:00
|
|
|
|
if not content.obj_iterate:
|
2009-12-15 14:02:50 +00:00
|
|
|
|
return super(document_directory_content, self)._file_get(cr, node, nodename, content)
|
2009-12-15 11:12:09 +00:00
|
|
|
|
else:
|
2009-12-15 14:02:50 +00:00
|
|
|
|
if not content.object_id:
|
|
|
|
|
return False
|
2009-12-15 11:12:09 +00:00
|
|
|
|
mod = self.pool.get(content.object_id.model)
|
|
|
|
|
uid = node.context.uid
|
|
|
|
|
fname_fld = content.fname_field or 'id'
|
2010-03-26 13:27:16 +00:00
|
|
|
|
where = []
|
2009-12-15 11:12:09 +00:00
|
|
|
|
if node.domain:
|
2009-12-15 14:02:50 +00:00
|
|
|
|
where += eval(node.domain)
|
2009-12-15 11:12:09 +00:00
|
|
|
|
if nodename:
|
|
|
|
|
# Reverse-parse the nodename to deduce the clause:
|
|
|
|
|
prefix = (content.prefix or '')
|
|
|
|
|
suffix = (content.suffix or '') + (content.extension or '')
|
|
|
|
|
if not nodename.startswith(prefix):
|
|
|
|
|
return False
|
|
|
|
|
if not nodename.endswith(suffix):
|
|
|
|
|
return False
|
|
|
|
|
tval = nodename[len(prefix):0 - len(suffix)]
|
|
|
|
|
where.append((fname_fld,'=',tval))
|
|
|
|
|
# print "ics iterate clause:", where
|
2009-12-15 14:02:50 +00:00
|
|
|
|
resids = mod.search(cr, uid, where, context=context)
|
2009-12-15 11:12:09 +00:00
|
|
|
|
if not resids:
|
|
|
|
|
return False
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2009-12-15 11:12:09 +00:00
|
|
|
|
res2 = []
|
|
|
|
|
for ro in mod.read(cr,uid,resids,['id', fname_fld]):
|
|
|
|
|
tname = (content.prefix or '') + str(ro[fname_fld])
|
|
|
|
|
tname += (content.suffix or '') + (content.extension or '')
|
|
|
|
|
dctx2 = { 'active_id': ro['id'] }
|
|
|
|
|
if fname_fld:
|
|
|
|
|
dctx2['active_'+fname_fld] = ro[fname_fld]
|
2010-06-16 11:51:39 +00:00
|
|
|
|
n = node_content(tname, node, node.context, content, dctx=dctx2, act_id = ro['id'])
|
2009-12-15 11:12:09 +00:00
|
|
|
|
n.fill_fields(cr, dctx2)
|
|
|
|
|
res2.append(n)
|
|
|
|
|
return res2
|
2009-12-02 05:45:55 +00:00
|
|
|
|
|
|
|
|
|
def process_write(self, cr, uid, node, data, context=None):
|
2010-03-26 13:27:16 +00:00
|
|
|
|
"""
|
|
|
|
|
@param self: The object pointer
|
|
|
|
|
@param cr: the current row, from the database cursor,
|
|
|
|
|
@param uid: the current user’s ID for security checks,
|
|
|
|
|
@param node: pass the node
|
|
|
|
|
@param data: pass the data
|
|
|
|
|
@param context: A standard dictionary for contextual values
|
|
|
|
|
"""
|
|
|
|
|
|
2009-12-02 05:45:55 +00:00
|
|
|
|
if node.extension != '.ics':
|
2009-12-17 13:22:31 +00:00
|
|
|
|
return super(document_directory_content, self).process_write(cr, uid, node, data, context)
|
2010-01-06 11:19:56 +00:00
|
|
|
|
import vobject
|
2010-03-26 13:27:16 +00:00
|
|
|
|
parsedCal = vobject.readOne(data)
|
2010-01-06 11:19:56 +00:00
|
|
|
|
fields = {}
|
|
|
|
|
funcs = {}
|
|
|
|
|
fexprs = {}
|
2009-12-02 05:45:55 +00:00
|
|
|
|
content = self.browse(cr, uid, node.cnt_id, context)
|
|
|
|
|
|
|
|
|
|
idomain = {}
|
|
|
|
|
ctx = (context or {})
|
|
|
|
|
ctx.update(node.context.context.copy())
|
|
|
|
|
ctx.update(node.dctx)
|
|
|
|
|
if content.ics_domain:
|
|
|
|
|
for d in safe_eval(content.ics_domain,ctx):
|
|
|
|
|
# TODO: operator?
|
|
|
|
|
idomain[d[0]]=d[2]
|
2010-01-06 11:19:56 +00:00
|
|
|
|
for n in content.ics_field_ids:
|
|
|
|
|
fields[n.name] = n.field_id.name and str(n.field_id.name)
|
|
|
|
|
funcs[n.name] = n.fn
|
|
|
|
|
fexprs[n.name] = n.expr
|
|
|
|
|
|
|
|
|
|
if 'uid' not in fields:
|
|
|
|
|
# FIXME: should pass
|
|
|
|
|
return True
|
|
|
|
|
for child in parsedCal.getChildren():
|
|
|
|
|
result = {}
|
|
|
|
|
uuid = None
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2010-01-06 11:19:56 +00:00
|
|
|
|
for event in child.getChildren():
|
|
|
|
|
enl = event.name.lower()
|
|
|
|
|
if enl =='uid':
|
|
|
|
|
uuid = event.value
|
|
|
|
|
if not enl in fields:
|
|
|
|
|
continue
|
|
|
|
|
if fields[enl] and funcs[enl] == 'field':
|
|
|
|
|
if ICS_TAGS[enl]=='normal':
|
|
|
|
|
result[fields[enl]] = event.value.encode('utf8')
|
|
|
|
|
elif ICS_TAGS[enl]=='date':
|
|
|
|
|
result[fields[enl]] = event.value.strftime('%Y-%m-%d %H:%M:%S')
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2010-01-06 11:19:56 +00:00
|
|
|
|
elif fields[enl] and funcs[enl] == 'hours':
|
|
|
|
|
ntag = fexprs[enl] or 'dtstart'
|
|
|
|
|
ts_start = child.getChildValue(ntag, default=False)
|
|
|
|
|
if not ts_start:
|
|
|
|
|
raise Exception("Cannot parse hours (for %s) without %s" % (enl, ntag))
|
|
|
|
|
ts_end = event.value
|
|
|
|
|
assert isinstance(ts_start, datetime.datetime)
|
|
|
|
|
assert isinstance(ts_end, datetime.datetime)
|
|
|
|
|
td = ts_end - ts_start
|
|
|
|
|
result[fields[enl]] = td.days * 24.0 + ( td.seconds / 3600.0)
|
|
|
|
|
|
|
|
|
|
# put other functions here..
|
|
|
|
|
else:
|
|
|
|
|
# print "Unhandled tag in ICS:", enl
|
|
|
|
|
pass
|
2010-03-26 13:27:16 +00:00
|
|
|
|
# end for
|
2010-01-06 11:19:56 +00:00
|
|
|
|
|
|
|
|
|
if not uuid:
|
|
|
|
|
# FIXME: should pass
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
cmodel = content.object_id.model
|
|
|
|
|
wexpr = False
|
|
|
|
|
if fields['uid']:
|
|
|
|
|
wexpr = [(fields['uid'], '=', uuid.encode('utf8'))]
|
|
|
|
|
else:
|
|
|
|
|
# Parse back the uid from 'OpenERP-%s_%s@%s'
|
|
|
|
|
wematch = self.__rege.match(uuid.encode('utf8'))
|
|
|
|
|
# TODO: perhaps also add the domain to wexpr, restrict.
|
|
|
|
|
if not wematch:
|
|
|
|
|
raise Exception("Cannot locate UID in %s" % uuid)
|
|
|
|
|
if wematch.group(3) != cr.dbname:
|
|
|
|
|
raise Exception("Object is not for our db!")
|
|
|
|
|
if content.object_id:
|
|
|
|
|
if wematch.group(1) != cmodel:
|
|
|
|
|
raise Exception("ICS must be at the wrong folder, this one is for %s" % cmodel)
|
|
|
|
|
else:
|
|
|
|
|
# TODO: perhaps guess the model from the iCal, is it safe?
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
wexpr = [ ( 'id', '=', wematch.group(2) ) ]
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2010-01-06 11:19:56 +00:00
|
|
|
|
fobj = self.pool.get(content.object_id.model)
|
|
|
|
|
|
|
|
|
|
if not wexpr:
|
|
|
|
|
id = False
|
|
|
|
|
else:
|
|
|
|
|
id = fobj.search(cr, uid, wexpr, context=context)
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2010-01-06 11:19:56 +00:00
|
|
|
|
if isinstance(id, list):
|
|
|
|
|
if len(id) > 1:
|
|
|
|
|
raise Exception("Multiple matches found for ICS")
|
2010-03-26 13:27:16 +00:00
|
|
|
|
if id:
|
2010-01-06 11:19:56 +00:00
|
|
|
|
fobj.write(cr, uid, id, result, context=context)
|
|
|
|
|
else:
|
|
|
|
|
r = idomain.copy()
|
2010-03-26 13:27:16 +00:00
|
|
|
|
r.update(result)
|
2010-01-06 11:19:56 +00:00
|
|
|
|
fobj.create(cr, uid, r, context=context)
|
2009-12-02 05:45:55 +00:00
|
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def process_read(self, cr, uid, node, context=None):
|
2010-03-26 13:27:16 +00:00
|
|
|
|
"""
|
|
|
|
|
@param self: The object pointer
|
|
|
|
|
@param cr: the current row, from the database cursor,
|
|
|
|
|
@param uid: the current user’s ID for security checks,
|
|
|
|
|
@param node: pass the node
|
|
|
|
|
@param context: A standard dictionary for contextual values
|
|
|
|
|
"""
|
|
|
|
|
|
2010-01-06 11:19:56 +00:00
|
|
|
|
def ics_datetime(idate, short=False):
|
|
|
|
|
if short:
|
|
|
|
|
return datetime.date.fromtimestamp(time.mktime(time.strptime(idate, '%Y-%m-%d')))
|
|
|
|
|
else:
|
|
|
|
|
return datetime.datetime.strptime(idate, '%Y-%m-%d %H:%M:%S')
|
|
|
|
|
|
|
|
|
|
if node.extension != '.ics':
|
|
|
|
|
return super(document_directory_content, self).process_read(cr, uid, node, context)
|
|
|
|
|
|
|
|
|
|
import vobject
|
2009-12-02 05:45:55 +00:00
|
|
|
|
ctx = (context or {})
|
|
|
|
|
ctx.update(node.context.context.copy())
|
|
|
|
|
ctx.update(node.dctx)
|
|
|
|
|
content = self.browse(cr, uid, node.cnt_id, ctx)
|
2010-01-06 11:19:56 +00:00
|
|
|
|
if not content.object_id:
|
|
|
|
|
return super(document_directory_content, self).process_read(cr, uid, node, context)
|
2009-12-02 05:45:55 +00:00
|
|
|
|
obj_class = self.pool.get(content.object_id.model)
|
2010-01-06 11:19:56 +00:00
|
|
|
|
|
2009-12-02 05:45:55 +00:00
|
|
|
|
if content.ics_domain:
|
|
|
|
|
domain = safe_eval(content.ics_domain,ctx)
|
|
|
|
|
else:
|
|
|
|
|
domain = []
|
|
|
|
|
if node.act_id:
|
|
|
|
|
domain.append(('id','=',node.act_id))
|
|
|
|
|
# print "process read clause:",domain
|
|
|
|
|
ids = obj_class.search(cr, uid, domain, context=ctx)
|
2010-03-26 13:27:16 +00:00
|
|
|
|
cal = vobject.iCalendar()
|
2010-01-06 11:19:56 +00:00
|
|
|
|
for obj in obj_class.browse(cr, uid, ids):
|
|
|
|
|
event = cal.add('vevent')
|
|
|
|
|
# Fix dtstamp et last-modified with create and write date on the object line
|
|
|
|
|
perm = obj_class.perm_read(cr, uid, [obj.id], context)
|
|
|
|
|
event.add('created').value = ics_datetime(time.strftime('%Y-%m-%d %H:%M:%S'))
|
|
|
|
|
event.add('dtstamp').value = ics_datetime(perm[0]['create_date'][:19])
|
|
|
|
|
if perm[0]['write_date']:
|
|
|
|
|
event.add('last-modified').value = ics_datetime(perm[0]['write_date'][:19])
|
|
|
|
|
for field in content.ics_field_ids:
|
|
|
|
|
if field.field_id.name:
|
|
|
|
|
value = getattr(obj, field.field_id.name)
|
|
|
|
|
else: value = None
|
|
|
|
|
if (not value) and field.name=='uid':
|
|
|
|
|
value = 'OpenERP-%s_%s@%s' % (content.object_id.model, str(obj.id), cr.dbname,)
|
|
|
|
|
# Why? obj_class.write(cr, uid, [obj.id], {field.field_id.name: value})
|
|
|
|
|
if ICS_TAGS[field.name]=='normal':
|
|
|
|
|
if type(value)==type(obj):
|
|
|
|
|
value=value.name
|
|
|
|
|
event.add(field.name).value = tools.ustr(value) or ''
|
|
|
|
|
elif ICS_TAGS[field.name]=='date' and value:
|
|
|
|
|
if field.name == 'dtstart':
|
|
|
|
|
date_start = start_date = datetime.datetime.fromtimestamp(time.mktime(time.strptime(value , "%Y-%m-%d %H:%M:%S")))
|
|
|
|
|
if field.name == 'dtend' and ( isinstance(value, float) or field.fn == 'hours'):
|
|
|
|
|
value = (start_date + datetime.timedelta(hours=value)).strftime('%Y-%m-%d %H:%M:%S')
|
|
|
|
|
if len(value)==10:
|
|
|
|
|
value = ics_datetime(value, True)
|
|
|
|
|
else:
|
|
|
|
|
value = ics_datetime(value)
|
|
|
|
|
event.add(field.name).value = value
|
2010-03-26 13:27:16 +00:00
|
|
|
|
s = cal.serialize()
|
2009-12-02 05:45:55 +00:00
|
|
|
|
return s
|
|
|
|
|
document_directory_content()
|
|
|
|
|
|
2010-05-14 04:48:36 +00:00
|
|
|
|
class crm_meeting(osv.osv):
|
|
|
|
|
_inherit = 'crm.meeting'
|
2009-12-02 05:45:55 +00:00
|
|
|
|
_columns = {
|
|
|
|
|
'code': fields.char('Calendar Code', size=64),
|
2010-03-26 13:27:16 +00:00
|
|
|
|
'date_deadline': fields.datetime('Deadline', help="Deadline Date is automatically\
|
|
|
|
|
computed from Start Date + Duration"),
|
2009-12-02 05:45:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_defaults = {
|
2010-05-14 04:48:36 +00:00
|
|
|
|
'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'crm.meeting'),
|
2009-12-02 05:45:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def copy(self, cr, uid, id, default=None, context=None):
|
|
|
|
|
"""
|
2010-03-26 13:27:16 +00:00
|
|
|
|
code field must be unique in ICS file
|
|
|
|
|
@param self: The object pointer
|
|
|
|
|
@param cr: the current row, from the database cursor,
|
|
|
|
|
@param uid: the current user’s ID for security checks,
|
|
|
|
|
@param id: crm case's ID
|
|
|
|
|
@param context: A standard dictionary for contextual values
|
2009-12-02 05:45:55 +00:00
|
|
|
|
"""
|
2010-03-26 13:27:16 +00:00
|
|
|
|
|
2009-12-02 05:45:55 +00:00
|
|
|
|
if not default: default = {}
|
2010-05-14 04:48:36 +00:00
|
|
|
|
default.update({'code': self.pool.get('ir.sequence').get(cr, uid, 'crm.meeting'), 'id': False})
|
2010-08-19 11:51:57 +00:00
|
|
|
|
return super(crm_meeting, self).copy(cr, uid, id, default, context)
|
2009-12-02 05:45:55 +00:00
|
|
|
|
|
2010-05-14 04:48:36 +00:00
|
|
|
|
crm_meeting()
|
2009-12-02 05:45:55 +00:00
|
|
|
|
|
|
|
|
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
|
|
|
|