Skip to content

Instantly share code, notes, and snippets.

View toutpt's full-sized avatar
👨‍💻

Jean-Michel toutpt

👨‍💻
View GitHub Profile
@jaroel
jaroel / gist:1688278
Created January 27, 2012 10:59
Count words in Plone html
catalog = context.portal_catalog
lexicon = catalog.htmlwordsplitter_lexicon
brains = catalog(Language='nl', portal_type='CoolPage')
words = dict(Title=0, Description=0, getText=0)
for brain in brains:
ob = brain.getObject()
words['Title'] = ob.Title().split()
words['Description'] = ob.Description().split()
words['getText'] = lexicon.parseTerms(ob.getText())
@tpryan
tpryan / ribbon.html
Last active April 11, 2024 00:21
Github Ribbon in CSS.
<!--
Copyright (c) 2012 Terrence Ryan
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:
@toutpt
toutpt / collective-classifiers.py
Last active September 29, 2015 17:47
common classifiers for collective addons
classifiers=[
"Environment :: Web Environment",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Framework :: Zope2",
"Framework :: Plone",
"Framework :: Plone :: 4.0",
"Framework :: Plone :: 4.1",
"Framework :: Plone :: 4.2",
"Framework :: Plone :: 4.3",