More Related Content
Similar to Tabledown (20)
Tabledown
- 1. Tabledown
2011 OSDC.TW
@tcc / tcchou@tcchou.org
- 2. Tabledown?
• : Markdown
• ( ) , Java , Python
• google: tabledown
- 3. About me
C/C++
SI 5+ Perl
Java
Web
SW 5- Python
SD 5+ Groovy
Scala
- 5. • - Tabledown
• -
• - ?
- 7. • FLOSS DATA FAIL!
• ,
• , UI UX FAIL!
• twill HTTP ( )
• scotch HTTP *.pickle
• translate-recording-to-twill *.twill
- 8. twill
go http://localhost:8080/ofbizsetup/control/main
fv 2 groupName ' '
fv 2 USER_ADDRESS1 ' '
fv 2 USER_POSTAL_CODE '300'
fv 2 USER_COUNTRY 'TWN'
fv 2 USER_CITY ' '
fv 2 USER_WORK_COUNTRY '886'
fv 2 partyId 'jia'
fv 2 USER_WORK_CONTACT '5153000'
fv 2 USER_WORK_AREA '3'
fv 2 USER_EMAIL 'jia@side.org'
submit
( )
- 9. • : , ,
•
• ...
UX FAIL!
- 11. • : ,
• API: /
• DSL: Groovy Builder/Slurper
• Tabledown: Collections Collections
Hash + List
- 12. tabledown 1
{ '_':['master','tasks'], { u'Sheet1': { 'master': { 'billing': u'yi',
'master':{ 'cust_pm': u'yi',
'id':['A^1',u' ID'], 'desc': '',
'name':['A^2',u' '], 'exec_pm': u'bing',
'desc':['A^3',u' '], 'id': '',
'billing':['A^4',u' '], 'name': u'PR001',
'cust_pm':['C^4',u' PM'], 'org': u'jia',
'org':['A^5',u' '], 'pg': u'wu,ji,geng',
'exec_pm':['C^5',u' PM'], 'sa': u'ding'},
'sa':['E^5',u' '], 'tasks': [ { 'desc': '',
'pg':['G^5',u' '], 'est_bgn': '',
}, 'est_end': '',
'tasks':{ 'id': '',
'*':{ 'name': u'u8a55u4f30',
'id':['A1',u'ID'], 'sno': u'100',
'sno':['B1',u' '], 'type': u'P'},
'type':['C1',u' '], { 'desc': '',
'name':['D1',u' '], 'est_bgn': u'2011-3-26',
'desc':['E1',u' '], 'est_end': u'2011-3-26',
'est_bgn':['F1',u' '], 'id': '',
'est_end':['G1',u' '], 'name': u'u8166u529bu6fc0u76ea',
'res':['H1',u' '], 'res': 'bing,ding,wu',
}, 'sno': '',
}, 'type': u'T'},
}
( )
- 13. tabledown 2
from tabledown.tdxls import TDXls
tdx = TDXls(conf)
data = tdx.xls2dict(filename)
tdx.dict2xls(data, filename)
- 14. • REST, Web Service ... OFBiz
• ... ! SOA FAIL!
• Web App mechanize
(Python, Perl, Ruby ... PHP )
- 15. mechanize
•
• WWW::Mechanize
• / (Ruby)
• 10yr, 5yr
•
• twill
• Beautiful Soup
- 16. mechanize
import mechanize
br = mechanize.Browser()
...
# create project
dProject={'workEffortName': mName, 'description': mDesc,
'clientBillingPartyId': mBilling, 'organizationPartyId': mOrg,
'scopeEnumId':'WES_PRIVATE',}
br.open("%s/EditProject" % url_app)
applyDict2Form(br, 'EditProject', dProject)
res = br.submit()
id, soup = page_get_project_id_and_soup(res.get_data())
( )
def page_get_id_and_soup(page):
soup = BeautifulSoup(page, convertEntities=BeautifulSoup.HTML_ENTITIES)
title = soup.find('div', {'class':'page-title'}) # ok
id = None
if title:
m = re.search(r'[([^]]+)]', title.find('span').getText())
if m: id = m.groups()[0]
print "---> new id %s" % id
return (id, soup)
- 17. mechanize
+
BeatifulSoup Tabledown
Web/
Python
Services
twill + scotch
- 18. • OFBiz (Timesheet) → ♥
•
• UX OK
• (Task)
•
•
•
- 20. Td
•
• ( )
• ?
• ( )
• / ,
…
- 21. • ... !
•
• ex: PM,
• >>
• ,
• ... ?
- 22. • SaaS, PaaS , IaaS ?
• IaaS / /
• > / > >
- 23. IaaS ( )
• IaaS
• > / > >
• :
• :
• :
- 24. •
• : ,
• :
• :
• : Socialtext Socailcalc
Google Spreadsheet
- 25. • ,
• : ,
• : ( ), SFC
• mechanize
• UI FAIL?
- 27. •
, ,
•
; ??
•♥ / ♥ $ £¥
,
- 28. • Tabledown http://code.google.com/p/tabledown/
• OFBiz http://ofbiz.apache.org/
• xlrd, xlwt http://www.python-excel.org/
• twill http://twill.idyll.org/
• scotch http://darcs.idyll.org/~t/projects/scotch/doc/
• mechanize http://wwwsearch.sourceforge.net/mechanize/
• Beatiful Soup http://www.crummy.com/software/
BeautifulSoup/
- 31. Option: 1
!"#$ '()* %&#$
+,
-*!"./
- 32. Option: 2
robust cust. Web MN FTP UV Zenoss
["]^
ERP OFBiz BC MO
serv. serv. App Web
ST Nuexo Felix / Karaf
B2B ... @A Akka Grails ZK JKL ... Camel
ServiceMix
R3 Activiti
Scala Groovy
Portal ... >? DEFGHI ...
Apache WXYZ
Java PQ DS
Openfire
!"#$ '()* +,#$-./ +,#$-.0 +,#$-.1
23 45 67 89 :; <=
Vim Markdown Ant/mvn Jenkins Hg Trac
Eclipse Docbook sbt/gradle (Hudson) git
DITA Artifactory Selenium
Sphinx JMeter _*!"`a
%&