Saravanan666/pypi-org huggingface dataset:
Package: collective.scriptedredirect
ContentsIntroductionBenefitsUsageInstallationDoing redirects through the webDoing redirects through the webInternalsAuthorChangelog1.1.1 (2013-04-14)1.1 (2013-04-14)1.0Introductioncollective.scriptedredirectallows you to write HTTP 302 Moved Temporary and HTTP 301 Moved Permanently
redirects for yourPlone CMSsite in Python code.BenefitsThe redirect logic is front-end web server independent: no need to touch variouos configuration files of Apache, Varnish or Nginx)Python allows to write more complex logic for redirects easier - no regular expressions!Python scripts in Plone have access to more complete state information:
user logged in status, permissions, etc.UsageInstallationAdd add-on inbuildout.cfg:eggs =
    ...
    collective.scriptedredirectRun buildout.InstallScripted redirects in Pythonin Site Setup > Add-ons.Doing redirects through the webEditredirect_handlerin Zope Management Interface in your site root.In the case of accident use?no_redirectHTTP query parameter to override
the redirecter and fix your site.Doing redirects through the webYou can also register a browser view calledredirect_handler.
In this case, you write the redirect code in addon Python code
and not through the web.redirect_handlerview is always preferred overredirect_handlerscript.Example Python code inredirector.py:class TestingRedirectHandler(object):
    """ Redirect handler registered as a ``redirect_handler`` Zope 3 <browser:page>
    """

    def __init__(self, context, request):
        self.context = context
        self.request = request

    def __call__(self, url, host, port, path):
        """
        :return: None if no redirect needed, otherwise a string full HTTP URL to the redirect target

        :raise: zExceptions.Redirect or other custom redirect exception if needed
        """

        # Simple example: always access site over www. domain prefix
        if not url.startswith("http://www."):
            return url.replace("http://", "http://www.")

        # Don't redirect if we are already using www. prefix
        return NoneExample ZCML:<browser:page
    name="redirect_handler"
    for="Products.CMFCore.interfaces.ISiteRoot"
    layer="YOUR_ADDON_LAYER"
    class=".redirector.TestRedirectHandler"
    />Internalscollective.scriptedredirecthooks itself to Zope’s pre-traversal hook and is
triggered before the request traverses into your Plone site in Zope application server.AuthorMikko Ohtamaa (blog,Facebook,Twitter,Google+)Changelog1.1.1 (2013-04-14)Fixed .rst title levels for PyPi [miohtama]1.1 (2013-04-14)Added redirects via browser view support [miohtama]Testing, Travis CI support [miohtama]1.0Initial development [miohtama]
Package: collective.scss
IntroductionThis add-on providescssintegration into Plone. It use python implementation
from Kirill Klenov available ongithub.You will be able to write scss stylesheets and register them into the css
registry (portal_css).How to use scss with PloneYou have to create a new file (mysheet.scss). Next register a css stylesheet
as a browser view using your scss file:<browser:page
  name="mysheet.css"
  for="*"
  class="collective.scss.stylesheet.SCSSView"
  template="mysheet.scss"
  permission="zope2.View
  />Now you just have to register your stylesheet in the css registry.
Using a GenericSetup profile you just have to add an entry in
the cssregistry.xml file, restart your zope server and apply the profile:<?xml version="1.0"?>
<object name="portal_css">
 <stylesheet title=""
    id="mysheet.css"
    media="screen" rel="stylesheet" rendering="import"
    cacheable="True" compression="safe" cookable="True"
    enabled="1" expression="" />
</object>CreditsCompaniesPlanet Makina CorpusContact usAuthorsJeanMichel FRANCOIS aka toutpt <toutpt@gmail.com>Changelog1.0b1 (2011-11-12)Initial release
Package: collective.searchevent
collective.searchevent providesSearch Event Portletfor searching Plone default Event content type.It is also possible to filter the search with tags (Subjects) and paths.FilteringTo make filtering work, you need to go toSearch Event CollectionsfromSite Setup:Add-on Configurationsection and addEvent Search Collectionwhich will then be selected in the search event portlet management page.ExportingExporting search event results to csv file is available for roles who have Modify Portal Content permission who can seeExportbutton on the portlet.
The separation of each values are done by ‘|’.Currently tested withPlone-4.3Python-2.7.xChangelog0.6.1 (2013-05-12)Removed browser layer. [taito]0.6 (2013-05-11)Removed dependency from five.grok. [taito]0.5.3 (2013-02-01)Fixed encoding error while exporting events. [taito]0.5.2 (2013-02-01)Fixed exporting events number. [taito]0.5.1 (2013-01-06)Fixed test failures for Plone-4.2.3. [taito]0.5 (2012-12-10)Addes CSS style. [taito]Added testing integration to Travis CI. [taito]0.4 (2012-11-14)Tested with Plone-4.2.2. [taito]0.3 (2012-09-03)Setting paths now uses string lines. [taito]0.2.1 (2012-08-20)Order of form field in portlet fixed. [taito]0.2 (2012-08-07)Added more control on batch start, size and orphan. [taito]Exporting as csv file is now available. [taito]Dropped support for Python-2.6. [taito]0.1 (2012-06-23)Initial release. [taito]CreditsThe Finnish Association for Nature Conservation (Suomen Luonnonsuojeluliitto).
Package: collective.searchform
ContentsIntroductionInstallationUsageCompatibilityContributorsChangelogIntroductionAn advanced searchform for Plone 4.2 and above.The searchform included in this package was in the core until version 4.1
of Plone. It was removed in 4.2 in favour of a more cleaned and simplified
search UI. This package is for all who want or need to retain the
old functionality.InstallationJust add the eggcollective.searchformto your buildout, rerun it and restart
your instance.UsageAddsearch_formto the URL of your Plone site and you will get a advanced
search form which exposes most of Plones indexes in a search UI.CompatibilityPlone 4.2 and 4.3ContributorsTom Gross, Original AuthorChangelog1.0 (2012-04-19)Copied necessary code from Plone packages of 4.1
[tomgross]Package created using zopeskel
[tomgross]
Package: collective.searchtool
Search facility for plone using z3c.form.Important! This is initial release so documentation is comming soon.Source:http://svn.plone.org/svn/collective/collective.searchtoolHistory0.1.4 - 02/18/2009addeed custom_render check when displaying result0.1.3 - bugfix releaserender for custom results by type is now called with self.provider as
context
Package: collective.searchweightings
IntroductionThis is a simple product that patches the ZCatalog such that you can register sort adapters for results.The main usecase for this is to tailor search results to specific business rules, eg. ‘Recent document are more important than old’
or ‘Documents from the CEO are more important than from the tea boy’.To use it you need to write a utility that provides a sorted() method that can be passed
a LazyMap of brains and re-score and re-sort them based upon your criteria.See adapters.py for some examples.Changelog1.1Fixed bug in utility being called twice1.0Initial release
Package: collective.select2
ContentsIntroductionContributorsChangelog1.1 (2014-06-04)1.0b (2014-05-14)IntroductionSelect2integration forPloneandz3c.formExample:from zope import schema
from zope.interface import Interface
from .field import Select2MultiField
from .field import Select2Field

class ISchema(Interface):

    users = Select2MultiField(
        title=u"Users",
        value_type=schema.Choice(
            title=u"User ID",
            source="plone.app.vocabularies.Users"
        ),
        search_view=lambda x: '{}/select2-users-search'.format(x),
        required=True
    )

    user = Select2Field(
        title=u"Single User",
        source="plone.app.vocabularies.Users",
        search_view=lambda x: '{}/select2-users-search'.format(x),
        placeholder="Search and select a user",
        required=True
    )

    categories = Select2MultiField(
        title=u"Categories",
        value_type=schema.TextLine(
            title=u"Category"
        ),
        search_view=lambda x: '{}/select2-subjects-search'.format(x),
        required=False
    )ContributorsGiorgio Borelli [gborelli], Original AuthorChangelog1.1 (2014-06-04)Fixed z3c.form meta.zcml include
[gborelli]Restricted demo view to Manager role
[gborelli]Add placeholder attribute on single and multiple selection widgets
[jslucas]1.0b (2014-05-14)Register categories and users search views to INavigationRoot
[gborelli]Add specific fields for single and multiple selection widgets
[gborelli]Improved IUserTokenInputWidget and UserSearch view
[gborelli]Package created using templer
[gborelli]
Package: collective.sentry
collective.sentrySentry integration with Zope.RequirementsPlone 5.2, 5.1 (tested)Python 3.6+, 2.7 (tested)InstallationAddcollective.sentryto your buildout and re-run buildout.ConfigurationConfigure the Sentry DSN by setting the environment variableSENTRY_DSNinside your shell configuration or using buildout:[instance]
environment-vars +=
    SENTRY_DSN https://......Supplementary information logged in Sentrycollective.sentrywill create automatically a Sentry taginstance_namewhich is derived from the buildout part name of the related instance.  An
additional tagprojectcan be configured (optional) if you set the
environment variableSENTRY_PROJECT.  This allows you introduce an additional
tag for filtering, if needed.SetSENTRY_ENVIRONMENTto differentiate between environments e.g. staging vs production
(https://docs.sentry.io/enriching-error-data/environments/)SetSENTRY_RELEASEto sent release information to sentry. (https://docs.sentry.io/workflow/releases/)Set ´SENTRY_INTEGRATIONS` (comma seperated) for different Integrations. (https://docs.sentry.io/platforms/python/configuration/integrations/)Optional activationBy default, if you installcollective.sentryalong you eggs, the instance start will crash if you do not configureSENTRY_DSN.
But sometime, you have multiple environments where you want that the product to be loaded, without doing anything under the hood (same conf for dev & prod, but no sentry on dev).
To enable this behavior, addSENTRY_OPTIONAL=1to your environment variables.Repositoryhttps://github.com/collective/collective.sentryLicenceGPL2 - GNU Public License 2based onraven.contrib.zope: BSDAuthorZOPYX/Andreas Jung,info@zopyx.comcollective.sentryhas been developed as part of a Plone 5.2 migration project and it
sponsored by the University Gent.Changelog0.3.2 (2023-11-07)Fix SENTRY_MAX_LENGTH default value again.
[Lunga001]0.3.1 (2023-10-11)Fix SENTRY_MAX_LENGTH default value.
[folix-01]0.3.0 (2022-10-06)Add enviroment var to disable sentry integration. [krissik]0.2.6 (2022-07-28)Fix a problem onerrorRaisedSubscriberfunction that was missing theexc_infovariable. [thomasmassmann]0.2.5 (2022/07/26)Add optional environment parameter for Sentry integrations (“SENTRY_INTEGRATIONS”, comma seperated list)
[2silver]Ensure all exceptions which should be ignored are actually ignored before sending them.
[thomasmassmann]0.2.4 (2020/09/07)Ignore exceptions that are ignored in the root Zope error_log.
[maurits]0.2.3 (2020/08/05)Fix error handling on zope site root
[krissik]0.2.2 (2020/07/13)Add check with error_log ignored_exceptions before send exceptions to sentry
[eikichi18]0.2.1 (2020/07/08)Add SENTRY_ENVIRONMENT option.
[fulv]0.2.0 (2019/11/28)Add optional environment parameter to set max length of stacktrace (“SENTRY_MAX_LENGTH”, default is 512)
[Thokas]0.1.7 (2019/10/21)Make collective.sentry configuration optional (do not load if noSENTRY_DSN)
[kiorky]0.1 (2019/08/15)initial releaseContributorsAndreas Jung <info@zopyx.com>Thomas Kastenholz <github@kronix.eu>
Package: collective.seo
IntroductionThis add-on let you set values of some html head tags content. This is important
when your website has few pages and / or few text content. In that case every
words are importants and SEO guys whant to be able to change it.How to use itInstall this add-on as usual:http://plone.org/documentation/kb/installing-add-ons-quick-how-toNext you have a new tabs ‘SEO’ in your edit bar. Click on it will give you
a simple form where you can change the following head tags values:titledescriptionkeywordsHow it worksThis add-on is a very small one. It has less than 200 lines of code. SEO fields
are stored in annotation, the form use plone.autoform and it override
Plone related viewlets plone.htmlhead.title and plone.htmlhead.dublincore to
achieve the needs.CreditsCompaniesPlanet Makina CorpusContact usAuthorsJeanMichel FRANCOIS aka toutpt <toutpt@gmail.com>ContributorsChangelog1.1 (2011-07-03)fix setup issue: collective.configviews is a dependencyfix if context is not AttributeAnnotable1.0 (2011-07-01)Initial release
Package: collective.seobatching
IntroductionTable of contentsIntroductionOverviewQuick StartDeeper CustomizationDrawbacksChangelogcollective.seobatching TODOSome SEO validation services tell us that query parameters are bad for those
pages which display different content based on those parameters. It usually
means having the same page but with different content within it. Thus we end up
with different pages with the same meta tags, title, etc…This packages deals only with one kind of query parameters inside Plone: pages
with batched listings. It replaces those query parameters with traversal
sub-paths to make up completely different urls for the next items inside batched
listings.OverviewPlone batching mechanism usesb_startquery parameter to tell where to start
with displaying content items inside batched listing page. So url forfolder1containing batched listing might look like:...folder1?b_start:int=10&-C=Instead, after installing and setting up collective.seobatching package this
url will have the next appearance:...folder1/batch-10This is a default look for batched page urls withbatch-10sub-path telling
that now we’re displaying listing starting from the 10th item.batch-10look
could be customized if needed. How to do this? Take a look atDeeper Customizationsection.Quick StartInstall this python package as described indocs/INSTALL.txtfile. Then go
to portal_quickinstaller tool and installcollective.seobatching. After thisseo_batch_macros.pttemplate will be available for you to use in your
customized page templates.For example if you need seo friendly batching in your folder_listing template,
then customize it and replace this string:<div metal:use-macro="here/batch_macros/macros/navigation" />with the next one:<div metal:use-macro="here/seo_batch_macros/macros/navigation" />That’s it.Deeper CustomizationIf you’re not happy withbatch-10in your batch listing urls, you can easily
adjust it to your needs insideportal_propertiestool. There you haveseobatching_propertiesproperty sheet withbatch_patterninside telling
how to represent batched sub-pages. Default pattern isbatch-${num}which
gives us the result we saw above.And, for instance, to havestart_from_10component at the end of batch urls
we simply have to setbatch_patternproperty to:start_from_${num}string. As you guessed already,${num}is a placeholder for the number of
items to start from for a given link.Drawbackscollective.seobatchingdoesn’t support any other query parameters apart fromb_start. It also won’t forward any 3rd party query parameters which may be
required by your page. So in case you need some extra variables provided byPlone Batchclass or your own logic, this package won’t help. But this may be
implemented in the next versions ofcollective.seobatchingpackage.Changelog1.0 - April 21, 2010Initial releasecollective.seobatching TODOSupport all batch and 3rd-party query parameters.
Package: collective.setdefaulteditor
IntroductionWhen you install a new visual editor in your Plone 3 Site, you can setwysiwyg_editorin portal_memberdata to the proper value for this
new editor.  This only means thatnewusers will get this new editor.
To change the editor for all existing users, use this package.In Plone 4 this should be less necessary, because this Plone version
introduces an option for members to simply use whatever the current
default editor of the site is.  If you migrate from Plone 3 you can
still use this package to change all members so they use this option.This package makes available a browser view@@set-default-editorto change the editor setting of members.  Follow the instructions
there.  This has slightly different functionality for Plone 3 and
Plone 4.  You can choose to run this in dry-run mode and see how many
users would be changed.  When dry run is not selected, details are
logged to the instance log.On the same form you can also select to set the default editor for
new users (Plone 3) or set the editor that is used when ‘Use site
default’ is selected (Plone 4).TodoAdd tests.ContributorsI (Maurits van Rees) found the main code in anarticleby Rob
Gietema.  He apparently got the script from Kelly Craig.  And I have
seen the same code in apostto the plone-setup list by Reinout van
Rees.  So I claim it back in defense of our family honour. ;-)Changelog1.5 (2013-09-13)Split the form in two for clarity: one for setting the default
editor that is used when the member has not set a preference and one
for setting the editor in the preferences of each existing user.
[maurits]When first loading the form, select the site default editor or the
default member editor.
[maurits]1.4 (2012-11-23)Be smarter about getting all users, also when many_users is true and
you are using ldap.
[maurits]Use the default_editor site property when it is there (Plone 4).
[maurits]1.3 (2012-10-27)Avoid hard dependency on zope.app.component, to gain Plone 4.3
compatibility.
[maurits]Make compatible with Plone 4.1+ (load CMFCore zcml for the
permissions).
[maurits]Code moved tohttps://github.com/zestsoftware/collective.setdefaulteditor[maurits]1.2 (2010-04-27)When there are many users (site_properties/many_users) try to get
all members by searching for a login with ‘a’, then ‘b’, etc.  Not
ideal, but if for example LDAP gives problems because it returns too
many results (which means it does not actually return anything) then
this may help.
[maurits]1.1 (2010-04-21)Also offer option to set the chosen editor as new default in
portal_memberdata.
[maurits]Added form to make setting the editor more user friendly.
[maurits]Check that the input for the wanted editor is sane: is that editor
actually installed?
[maurits]1.0 (2010-03-17)Initial release
[maurits]
Package: collective.setuphandlertools
IntroductionTools for Plone setuphandler steps when running Generic Setup import Steps.add_calendar_typeAdd calendar types to Products.CMFPlone.CalendarTool.add_groupAdd a group to plone.add_userAdd a user to plone.create_itemCreate an Archetype content item in the given context. This function is called
by create_item_runner for each content found in it’s given data structure.create_item_runnerCreate Archetype contents from a list of dictionaries, where each dictionary
describes a content item and optionally it’s childs.delete_itemsRemove content items from a context.hide_and_retractExclude an item from the navigation and retract it, if it was published. For
example, to hide “Members” folder, if it shouldn’t be shown to anonymous users.isNotThisProfileReturn True if marker_file CANNOT be found in the current profile’s context.
Used to exit a setuphandler step if it isn’t called in profile’s context.load_fileLoad a file from a directory and return it’s data.setup_portal_transformsPersistently configure a specific transformation in portal_transforms.unsafe_html_transformConfigure safe_html transformation from portal_transforms, so that it also
allows embed and object elements. Also configure the style_whitelist to allow
some styles needed for TinyMCE to bypass a limitation found in beta versions of
Plone 4.0.update_portlet_schemaHelper function to update a schema of an already registered portlet.TODOWrite integration tests.AuthorJohannes Raggam <johannes at raggam dot co dot at>
BlueDynamics Alliance, 2010CreditsCarsten Senger for adding users.Changelog1.0.b4 (2012-04-19)Allow color styles in unsafe_html_transform step. Allows colorizing text in
TinyMCE.
[thet]In create_item and create_item_runner, allow configurations of existing
items. Still don’t allow creating items over existing ones.
[thet]Add options to deactivate hiding or retracting to hide_and_retract, if
necessary.
[thet]1.0b3 (2011-02-15)Add update_portlet_schema helper function.
[thet]1.0b2 (2010-11-25)Bugfixes: Missing import and don’t call callers_globals for load_file.
[thet]1.0b1 (2010-11-19)Initial release.
[thet]
Package: collective.sgvizler
SGVizler is a library that can directly question SPARQL endpoint to visualize opendat in your site.
This intregration of version 0.6 use dexterity type to be flexible with parameters.Due to time limitation for the exercise this package is not done in the Plone 5 way.Enjoy.FeaturesSGVizler 0.6Dexterity type to make the renderingSee the SGVizler documentation and screenshot below to see examples.ExamplesThis add-on can be seen in action at the following sites:http://dev.data2000.no/sgvizler/wiki/Sgvizler#Screenshotshttp://doc.data2000.no/sgvizler/0.6/classes/sgvizler.htmlDocumentationTODO
#Full documentation for end users can be found in the “docs” folder, and is also available online athttp://docs.plone.org/foo/barLocal SetupAs SPARQL works with prefix in its query, a good thing can be to overload thesgvizler-setup.jsfile.Proxy ConfigurationSGVizler does AJAX request between domains. You need to configure your front
proxy to accept data from domains where are SPARQL endpoints, id est you need
to addconnect-srcandscript-srcprovider in theContent-Security-PolicyHTTP header.Example with NGinx:add_headerX-Frame-Options"SAMEORIGIN";add_headerStrict-Transport-Security"max-age=15768000;includeSubDomains";add_headerX-XSS-Protection"1;mode=block";add_headerX-Content-Type-Options"nosniff";add_headerContent-Security-Policy"default-src'self';script-src'self''unsafe-eval''unsafe-inline'http://endpoint.example.comhttp://sws.ifi.uio.nohttps://www.google.com;style-src'self''unsafe-inline';img-src'self''unsafe-inline'http://mediaserver.example.com;media-src'self'http://mediaserver.example.comhttp://videoserver.example.com;font-src'self''unsafe-inline';object-src'self'http://endpoint.example.comhttp://sws.ifi.uio.no;connect-src'self'http://endpoint.example.comhttp://sws.ifi.uio.no";Notice that you need to open your server to google.com JS api (https://www.google.com/jsapi)
until a better implementation of requirements in this project.TranslationsThis product has been translated intoFrench (TODO)InstallationInstall collective.sgvizler by adding it to your buildout:[buildout]

...

eggs =
    collective.sgvizlerand then runningbin/buildoutContributeIssue Tracker:https://github.com/collective/collective.sgvizler/issuesSource Code:https://github.com/collective/collective.sgvizlerDocumentation:http://dev.data2000.no/sgvizler/wiki/Sgvizler/0.6/UsingSupportIf you are having issues, please let us know.
You can contact the owner (don’t abuse please):Gerard.Vidal@ens-lyon.frLicenseThis work was planned and done with the courtesy of the IFÉ - École Normale
Supérieure de Lyon.The project is licensed under the BSD.ContributorsEncolpe DEGOUTE,encolpe.degoute@free.frGérard VIDAL,Gerard.Vidal@ens-lyon.frChangelog1.0.1 (2015-12-17)Fix double compression problem on minified javascript library
[encolpe]1.0   2015-12-16Initial release.
[encolpe]Integrate SGVizler 0.6
[encolpe]Add a Dexterity type to customize SGVizler rendering
[encolpe]