-
Notifications
You must be signed in to change notification settings - Fork 129
/
toplone.cfg
138 lines (114 loc) · 4.71 KB
/
toplone.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[buildout]
parts +=
toplone
[sources]
transmogrify.webcrawler = git git://github.com/djay/transmogrify.webcrawler.git
#transmogrify.webcrawler = git git://github.com/miohtama/transmogrify.webcrawler.git
transmogrify.pathsorter = git git://github.com/djay/transmogrify.pathsorter.git
transmogrify.htmltesting = git git://github.com/djay/transmogrify.htmltesting.git
transmogrify.siteanalyser = git git://github.com/djay/transmogrify.siteanalyser.git
#transmogrify.siteanalyser = git git://github.com/miohtama/transmogrify.siteanalyser.git
transmogrify.htmltesting = git git://github.com/djay/transmogrify.htmltesting.git
#transmogrify.htmltesting = git git://github.com/miohtama/transmogrify.htmltesting.git
# Following have been patched
transmogrify.ploneremote = git git://github.com/djay/transmogrify.ploneremote.git
#transmogrify.ploneremote = git git://github.com/miohtama/transmogrify.ploneremote.git
transmogrify.htmlcontentextractor = git git://github.com/djay/transmogrify.htmlcontentextractor.git
#transmogrify.htmlcontentextractor = git git://github.com/miohtama/transmogrify.htmlcontentextractor.git
#funnelweb = git git://github.com/djay/funnelweb.git
funnelweb = git git://github.com/collective/funnelweb.git
#
# Recipe to create toplone command.
#
# It will walk through all blueprints defined
# in pipeline.cfg and override their target parameter
# to be a remote Plone site given on the command line.
# This all happeins in initialization= magic.
#
# Also Python logger is initialized to give us verbose
# output. Some blueprints use logging module for the output.
#
#[toplone]
#recipe = zc.recipe.egg
#eggs =
# transmogrify.htmltesting
# transmogrify.webcrawler
# transmogrify.siteanalyser
# transmogrify.htmlcontentextractor
# transmogrify.pathsorter
# transmogrify.ploneremote
#
## This initialization script sets remote site argument
## for remote blueprints defined in pipeline.cfg
#initialization =
# from urllib import pathname2url as url
# from sys import argv
# import logging, os
#
# logging.basicConfig(level=logging.DEBUG)
# target=len(argv) > 1 and argv[1] or ''
# args = dict(webcrawler=dict(site_url='file://'+os.getcwd()+'/build/html/'),
# localconstructor=dict(output=url('ploneout')),
# ploneuploader=dict(target=target),
# )
#arguments = 'pipeline.cfg', args
#entry-points = toplone=transmogrify.htmltesting.runner:runner
#
# Recipe to create toplone command.
#
# Using the funnelweb blueprint to create a script
# to convert and upload the manual as plone content
# bin/toplone --ploneupload=http://admin:[email protected]/home/
# use --template1:debug to get extra detail on fields extracted from pages.
# use --changetype:value="python:item['_type']" if you want to test on plone site without PHC
# see http://plone.org/products/funnelweb
#
[toplone]
recipe = funnelweb
crawler-url=file://${buildout:directory}/build/html
crawler-ignore=
cgi-bin
javascript:
_static
_sources
genindex\.html
search\.html
saesrchindex\.js
# Since content is from disk, no need for local cache
cache-output =
# Fields with '_' won't be uploaded to Plone so will be effectively removed
template1-title = text //div[@class='body']//h1[1]
template1-_permalink = text //div[@class='body']//a[@class='headerlink']
template1-text = html //div[@class='body']
template1-_label = optional //p[contains(@class,'admonition-title')]
template1-description = optional //div[contains(@class,'admonition-description')]/p[@class='last']/text()
template1-_remove_useless_links = optional //div[@id = 'indices-and-tables']
templateauto-condition = python:False
#attachmentguess-condition = python: subitem.get('_type') in ['Image']
#attachmentguess-defaultpage = index
# Images will get titles from backlink text
titleguess-condition = python:True
indexguess-condition = python:True
# Hide the images folder from navigation
hideguess-condition = python:item.get("_path","").startswith('_images') and item.get('_type')=='Folder'
# Upload as PHC instead of Folders and Pages
changetype-value=python:{'Folder':'HelpCenterReferenceManualSection','Document':'HelpCenterLeafPage'}.get(item['_type'],item['_type'])
# Save locally for debugging purposes
# WARNING: not currently working
#localupload-output=${buildout:directory}/ploneout
# All folderish content should be checked if they contain
# any items on the remote site which are not presented locally. including base folder
ploneprune-condition=python:item.get('_type') in ['HelpCenterReferenceManualSection','HelpCenterReferenceManual'] or item['_path'] == ''
[test]
recipe = zc.recipe.testrunner
eggs =
${toplone:eggs}
transmogrify.htmltesting
[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml
[versions]
roadrunner = 0.2.3.1
z3c.form = 1.9.0
zc.recipe.egg=1.2.0
Docutils = 0.6