Saravanan666/pypi-org huggingface dataset:
Package: tiddlywebplugins.cors
A plugin for TiddlyWeb to support CORS pre-flight checks.This is an experiment, with limited functionality. As test
cases increase, functionality will increase.To use add ‘tiddlywebplugins.cors’ to ‘system_plugins’ in
tiddlywebconfig.py.There are a few optional config settings:If ‘cors.match_origin’ is True, then the value of the Origin
header will be the value of the Access-Control-Allow-Origin header,
on simple requests. On non-simple request, it always matches. If False
the value is ‘*’ (on simple requests).If ‘cors.allow_creds’ is True, then the
Access-Control-Allow-Credentials header will be sent with a value
of ‘true’, otherwise it will not be sent.If ‘cors.exposed_headers’ is set, its should be a list of strings
representing header names which are appended to the default
Access-Control-Expose-Headers: ETag. This same list is used to set
the default of Access-Control-Allow-Headers.If ‘cors.enable_non_simple’ is True, preflight OPTIONS requests are
handled. This defaults to False to avoid accidental exposure.For authenticated cross-domain PUTs of resources the following config
appears to be required:‘cors.enable_non_simple’: True,
‘cors.allow_creds’: True,
‘cors.match_origin’: True,The match_origin setting is required for the OPTIONS preflight requests
to be handled effectively.ToDo:Blacklist/Whitelist processing of Access-Control-Request-Headers.Auditing with someone else to confirm that this stuff is “correct”.Refactoring of the two middlewares. There’s a fair bit of overlap.
It could become just one that operates on both sides of the internal
application, but I find that can be confusing.Copyright 2012, Chris Dent <cdent@peermore.com>
Package: tiddlywebplugins.count
Adds the url /count/<<fieldname>>/<<bagname>> which allows you to list the different values of a field or tag alongside the number of times they occur.Results are returned as a new line separated list with the tag on the left and the number of occurances on the right of the last trailing whitespace.
tag1 42
tag2 12
tag3 4
You can limit the number of results returned by the use of a max querystring
eg. /count/tag/bag?max=2 in the above example would return
tag1 42
tag2 12Based on work by Jonathan Lister to count tags
See the tests for further enlightenmentThis package is licensed under the same terms as TiddlyWeb itself.
Package: tiddlywebplugins.devstore2
A store for TiddlyWeb for use in development.A common problem with complicated web apps built on top of TiddlySpaceis that it is hard to do live development on a test or dev instance.While the desired experience is to be able to edit tiddlers on the filesystem and see those changes in the instance instantly, the currenthabit is to make the changes, update the package, update the instancethen see the changes.This store aims to fix that by providing a wrapper store that ontiddler_get first looks in a configured dir for an appropriate fileto satisfy the request.Configuration is as follows:config = {'server_store': ['tiddlywebplugins.devstore2', {'devstore_root':'./src'}],'wrapped_devstore': ['text', {'store_root': 'store'}],'log_level': 'DEBUG',}Where devstore_root is either an absolute path or relative to whateverthe PWD is in the process using the config.devstore uses tiddlywebplugins.twimport's url_to_tiddler and thus willread files ending in .tid as a tiddler, .js as a javascript file or treatother extensions as binary or pseuod-binary tiddlers.
Package: tiddlywebplugins.differ
TiddlyWeb plugin to compare tiddler revisionsUsage:GET /diff?rev1=<tiddler>&rev2=<tiddler>[&format=<format>]
POST /diff?rev1=<tiddler>[&format=<format>]tiddler references are of the form bags/<title>[/<revision>]
(recipes are currently not supported in this context)supported formats:
* human-readable line-by-line comparison (default; plain text)
* “unified” (plain text)
* “inline” (HTML)
* “horizontal” (side-by-side; HTML)POST data (JSON representation of a tiddler) can be used instead of a tiddler
reference (rev1 or rev2 URL parameter)
Package: tiddlywebplugins.dispatcher
A TiddlyWeb plugin to dispatch tiddlers to asynchronous job queues.This plugin uses beanstalkd to provide an in memory queing systemholding queues to external processes which will do something withthe information in the queue. The general goal is to allow processingof tiddlers asynchronously: For example to do indexing, send mail,etc.The general model goes as follows:* In init() of the plugin two things happen:** a Store HOOK for tiddler put and delete is registered, that hooke hasone job: put a message in the default queue of beanstalkd** N+1 external process are either forked or if launched by some othermechanism, registered. The '1' processs listens on the defaultqueue and writes the tiddler ID into a queue named after each ofthe N external processes (e.g. a tube named 'index')* Each of the process listening on non-default tubes, processesthe tiddler, and then deletes it from the queue.This is _highly_ experimental. You will need to be able to compilebeanstalkd in order to use this.External requirements are:client: http://github.com/earl/beanstalkcserver: http://github.com/kr/beanstalkdCopyright 2010, Chris Dent <cdent@peermore.com>BSD License
Package: tiddlywebplugins.diststore
A TiddlyWeb store that makes it possible to store some content indifferent stores, based on rules defined in tiddlywebconfig.py.The rules are regular expressions which match the name of a bag. When atiddler or bag is accessed (for read or write) if the name of the bagmatches a regular expression in the store's "extras" dictionary, thestore named in the value is responsible for the entity being accessed.Otherwise the store named in "main" is used.This is an experimental store, but it is being reliably used inproduction with the http://www.wiki-data.com/ website. In that service,the main collection of tiddler data is kept in one highly optimized bagusing the mappingsql store, while users and other system data are storedin a text store. Here's the relevant config:'server_store': ['tiddlywebplugins.diststore', {'main': ['text', {'store_root': 'store'}],'extras': [(r'^example$', ['mappingsql',{'db_config':'mysql://example@localhost/example?charset=utf8'}]),],}],To use this plugin you must modify tiddlywebconfig.py to set the'server_store' item. Do not add 'tiddlywebplugins.diststore' to'system_plugins' or 'twanager_plugins'.Copyright 2009, Chris Dent <cdent@peermore.com>Licensed under the same terms as TiddlyWeb.http://tiddlyweb.com/
Package: tiddlywebplugins.docs
A serialization which provides documentation of the request methods
and serializations for all the resources available from the current
TiddlyWeb instance.That is: for any existing resource if you get it as text/x-tiddlyweb-docs
this code will automatically generate documentation about this thing.So, for examplehttp://example.com/bags/foo/tiddlers.x-docwill
list the serializations and HTTP methods available at that URI.The motivation for this is to cause lack-of-documentation shame.Install by adding tiddlywebplugins.docs to system_plugins in
tiddlywebconfig.py.Copyright 2011 Chris Dent <cdent@peermore.com>
BSD License
Package: tiddlywebplugins.env
This is a debugging plugin for TiddlyWeb.When {server_prefix}/env is accessed the current WSGI environment
is returned as text/plain, formatted with pprint.You should not run this on your public TiddlyWeb server unless you
are comfortable with sharing you entire configuration with the
outside world.Licensed under the same terms as TiddlyWeb.Copyright 2010, Chris Dent <cdent@peermore.com>.
Package: tiddlywebplugins.etagcache
This is a plugin for TiddlyWeb that creates a cache of ETags.It uses the memcached handling provided by tiddlywebplugins.caching.Cache invalidation is handled via store hooks and this trick:http://code.google.com/p/memcached/wiki/FAQ#Deleting_by_NamespaceNote the test files are not good tests, there were used to structure
development but do not adequately assert anything.The plugins keeps a cache of ETags so we don’t need to access the store
to do validation.This operates as a two tiered piece of middleware.On the request side it checks if the request is a GET and if it includes
an If-None-Match header. If it does it looks up the current URI in the
cache and compares the value with what’s in the If-Match header. If they
are the same we can raise a 304 right now.On the response side, if the current request is a GET and the outgoing
response has an ETag, put the current URI and ETag into the cache.Store HOOKs are used to invalidate the cache through the management of
namespaces.Installation is simply adding the plugin name to system_plugins and
twanager_plugins in tiddlywebconfig.pyLicensed as TiddlyWeb itself.
Copyright 2011, Chris Dent <cdent@peermore.com>
Package: tiddlywebplugins.extraclude
[TiddlyWeb](http://tiddlyweb.com/) plugin that uses a validatorto process extraclusions.# IntroAn extraclusion is markup in renderable wikitext which extractsthe contained text to a tiddler of its own. For example if thefollowing text were put as tiddler "foo":# HeaderSome text.extraclude bar## Other HeaderOther text.extraclude# Another HeaderHi!The result would be two tiddlers in the same bag, "foo" and "bar"."foo" would contain markup to trainsclude "bar".The extracluded tiddlers inherits the `type` of the parent.# InstallInstall the Python package with:pip install -U tiddlywepblugins.extracludeAdd the package to `system_plugins` in `tiddlywebconfig.py`:config = {'system_plugins': ['tiddlywebplugins.extraclude']}Copyright 2014 Peermore LimitedBSD License
Package: tiddlywebplugins.form
tiddlywebplugins.formProvides a Serializer to transform HTML form-data into an object that can be put into the store.Also adds POST support to the standard set of URLs and support for uploading binary files.URLs with POST support are:/bags/foo/tiddlers
/recipes/foo/tiddlersTo use, add tiddlywebplugins.form to your system_plugins in tiddlywebconfig.py.You can then POST tiddlers to the server as follows:set up an HTML form with any named elements. Supported names include:title - tiddler.title (this is optional and, depends upon which URL you POST to. Additionally, if you POST to /bags/foo/tiddlers without a title, you will get a UUID title instead).
text - tiddler.text
tags - tiddler.tags (this can be a list (eg checkboxes), or a string formatted as per standard TiddlyWiki tags).
created - tiddler.created
modified - tiddler.modified
file - this is a special case and represents a binary file so must take the form of an HTML <input type=”file” /> tag. If this is specified, you may include tags and a title, but anything else will be ignored.Content type (enctype attribute in HTML form lingo) of the form must be either appilcation/x-www-form-urlencoded or multipart/form-data (if uploading a binary file)POST the form (ie - set the method to POST) to one of the above URLs (ie - set the action attribute), replacing foo as required.Optionally specificy a redirect to redirect to a different page.Example Usage:say you want to POST a new tiddler to the bag “common”, you might include the following HTML:<form action=”/bags/common/tiddlers” method=”POST”>
<input type=”text” name=”title” value=”New Tiddler” />
<textarea name=”text” rows=”5” cols=”40”></textarea>
<input type=”text” name=”tags” />
<input type=”submit” value=”Save” />
</form>Alternatively, you may want to upload a binary file to the bag “common”:<form action=”/bags/common/tiddlers” method=”POST” enctype=”multipart/form-data”>
<input type=”file” name=”file” />
<input type=”submit” value=”Upload” />
</form>There is also a Binary Upload Plugin for TiddlyWiki designed specifically to work with tiddlyweplugins.form. You can find it athttps://raw.githubusercontent.com/TiddlySpace/tiddlyspace/master/src/plugins/BinaryUploadPlugin.jsYou can find the source code athttps://github.com/tiddlyweb/tiddlywebplugins.form
Package: tiddlywebplugins.geofilters
A TiddlyWeb plugin that provides ability to query tiddlers with geodata near a given locationThis provides a new filter for TiddlyWeb aimed at geotiddlers (tiddlers containing longitude and latitude information expressed in fields with names "geo.long" and "geo.lat respectively")It adds a near filter which allows you to query tiddlers by proximitythe argument given is comma separated with latitude first, longitude second and radius third.eg.tiddlers/bag/geotiddlers?near=50,0,5kmyou can also request in milestiddlers/bag/geotiddlers?near=50,0,5milesThe resulting distance (in miles or kms depending on what was called) is added to a temporary tiddler field called "_geo.proximity"To installSimply update your tiddlywebconfig to supply the following.config = {'system_plugins': ['tiddlywebplugins.ltgt','tiddlywebplugins.geofilters'],}This package is licensed under the same terms as TiddlyWeb itself.
Package: tiddlywebplugins.hashmaker
A TiddlyWeb plugin which adds a _hash field to outgoing tiddlers.When a tiddler is get from the store, if there is no _hash, then the
hash is added to the outgoing tiddler. It is _not_ savedThis is done to allow quick comparisons between tiddlers which may have
different names but may have the same set of content characteristics.The hash_tiddler method is exposed so that stores can create a hash
prior to a put to the store. See tiddlywebplugis.tiddlyspace.store for
an example.To use add ‘tiddlywebplugins.hashmaker’ to system_plugins and
twanager_plugins in tiddlywebconfig.py. Optionally define
hashmaker.attributes to be a list of strings representing the attributes
or fields of a tiddler which are to be hashed. The default is:[‘text’]
Package: tiddlywebplugins.hoster
Hoster is a plugin for TiddlyWeb that hosts TiddlyWikis.Do not use. Hoster is out of date, there are better
and more interesting TiddlyWeb hosting solutions in Tank or
TiddlySpace. This code is not maintained!It aggregates a lot of functionality to explore how multi-user
TiddlyWiki hosting might work. It is a prototype and is not
intended to be a complete system with an excellent UI. Instead
it explores the structure of the application to see where there
are gaps, patterns, opportunities.You can help by trying it out.You can make a new hoster instance, once the package has been
installed, with the ‘betsy’ command:$ betsy place
$ cd place
$ twanager server
$ openhttp://0.0.0.0:8080/Copyright 2009, Chris Dent <cdent@peermore.com>Licensed under the same terms and TiddlyWeb itself.http://tiddlyweb.com/
Package: tiddlywebplugins.ibuilder
tiddlywebplugins.ibuilder is a tool to help build instance packages.In TiddlyWeb, an instance package provides pre-defined tiddlers,
bags, and recipes for a plugin.ibuilder replaces the development half of the functionality
provided by tiddlywebplugins.instancer. See tiddlywebplugins.imaker
for the other half.
Package: tiddlywebplugins.imaker
tiddlywebplugins.imaker is a tool to help create new instances.In TiddlyWeb, an instance is a particular store + configuration
which serves up a set of content and features.imaker works to ensure that created instances have the expected
initial configuration and (optionally) initial bags, recipes, users
and tiddlers.imaker replaces the installation half of the functionality
provided by tiddlywebplugins.instancer. See tiddlywebplugins.ibuilder
for the development half.
Package: tiddlywebplugins.imrss
A TiddlyWeb plugin that allows you to import rss feeds to bags through a twanager commandTo use just add "tiddlywebplugins.imrss" to your twanager_pluginsEach item in an rss feed is mapped to a tiddler by the following rulestitle:guid / id attribute (preferred)OR url with ":","/" and "." replaced with "_" charactertext:The text by default is saved as a link <html><p><b><a href='{{rss link}}'>{{rss title}}</a><br>{{rss description}} </p></html>geo.long and geo.lat:if geo data is present, the longitude and latitude will be matched to these feeds (works with <georss:point> and <georss:where>)modifier:the author of the rss itemmodified:the date field is used if present if not then the current date on time of command is takenYou can also create customisations by providing a handler. For example:1) add to tiddlywebconfig"imrss":{"module": "my_module"}2) create a module my_module.py, inside which pastedef generic_handler(url,tiddler,feed_entry,feed=False,host=""):tiddler.text = "foo"return tiddler3) run twanager imrss http://rssurl fooThe result will be tiddlers in foo from the rss feed, all with "foo" as the text. Obviously this example is rubbish but hopefully it gives you a starting point to explore further customisations.This package is licensed under the same terms as TiddlyWeb itself.
Package: tiddlywebplugins.jsondispatcher
# AboutA TiddlyWeb plugin to allow the dispatching of tiddlers to non-Python handlers by serialising tiddler data to JSON.The primary purpose of this plugin is for use with websockets to deliver realtime tiddler updates via [beanstalkd](http://kr.github.io/beanstalkd/).
For more explanation [read this](http://cdent.tiddlyspace.com/TiddlySpaceSockets).# Requirements[Python](http://www.python.org/)makeA working TiddlySpace instance to test against[py.test](http://pytest.org/latest/) to run the tests# Contributingsetup.pyis used to package up the plugin and install it.Plugin code lives in thetiddlywebpluginsdirectory.Tests live in thetestdirectory.# Usagemake testruns the tests.  Currently there is just the one that
ensures the plugin can be imported.make installinstalls the plugin as a package on your system
(you may need sudo for this.)## Configuration for TiddlySpaceEdittiddlywebconfig.pyto include the following config:‘use_dispatcher’: True,
‘beanstalk_listeners’: [‘tiddlywebplugins.jsondispatcher’]The plugin is registered as a beanstalk listener as that is where it receives incoming tiddler data from.For more details on usage run:pydoc tiddlywebplugins/jsondispatcher.py# Credits@cdent is the original author ofjsondispatcher.py.  I’ve just packaged it up a bit.# See AlsoSee the [tiddlyspace websockets](https://github.com/TiddlySpace/tiddlyspacesockets) node application that this plugin works with.
Package: tiddlywebplugins.jsonp
tiddlywebplugins.jsonp is a subclass of the JSON serializer
which optionally allows the JSON output from TiddlyWeb to be
packaged as JSONP (JSON with padding). This is a method for
getting around cross domain constraints. You should only use
this if you know what you are doing with regard to security
issues.To use, add ‘tiddlywebplugins.jsonp’ to system_plugins in tiddlywebconfig.py.When requests are made for JSON if there is a jsonp_callback
query parameter the value of that parameter will be prepended
to the output, with the required ‘(’ and ‘)’.
Package: tiddlywebplugins.ldapauth
[![Build Status](https://travis-ci.org/pads/tiddlywebplugins.ldapauth.png)](https://travis-ci.org/pads/tiddlywebplugins.ldapauth)[![Coverage Status](https://coveralls.io/repos/pads/tiddlywebplugins.ldapauth/badge.png)](https://coveralls.io/r/pads/tiddlywebplugins.ldapauth)[![Latest Release](https://pypip.in/v/tiddlywebplugins.ldapauth/badge.png)](https://crate.io/packages/tiddlywebplugins.ldapauth/)About=====Allows TiddlyWeb users to Authenticate against an LDAP server.It has been tested with OpenLDAP but other LDAP-compliant servers could be used (e.g. Active Directory).Requirements============* [Python](http://www.python.org/).* [pip](http://www.pip-installer.org/en/latest/).* make.* A working TiddlyWeb instance to test against.* [py.test](http://pytest.org/latest/) to run the tests.* An LDAP server (e.g. [OpenLDAP](openldap.org)) with some users that have passwords.Modifying=========The best way to figure out how to work with this project is to look at the `.travis.yml` file.`setup.py` is used to package up the plugin, install and distribute.Plugin code lives in the `tiddlywebplugins` directory.Tests live in the `test` directory.* `make test` runs the tests.* `make test_with_coverage` runs the tests with code coverage reporting from `pytest-cov`* `make pep8` runs pep8 over the code to check for style compliance.* `make install` installs the plugin as a package on your system(you may need sudo for this.)* `make release` packages and uploads the plugin to [PyPI](http://pypi.python.org/pypi) for distribution.Setting up LDAP===============See [this guide](http://pads.tiddlyspace.com/OpenLDAP%20Setup).Plugin Installation===================Requires the following OS packages:apt-get install libldap2-dev libsasl2-devOn Redhat-based systems this is:yum install openldap-develThen install tiddlywebplugins.ldapauth:pip install -U tiddlywebplugins.ldapauthTiddlyWeb Configuration=======================Reference the plugin from your TiddlyWeb configuration as an auth system plugin e.g:`'auth_systems': ['tiddlywebplugins.ldapauth']`Configure an LDAP server to communicate with.  If this is not specified then `127.0.0.1:389` is the default connection.'ldapauth': {'ldap_host': 'my.ldapserver.com','ldap_port': '3890','ldap_base_dn': 'dc=my,dc=domain''ldap_tiddlyspace_mode': True}If `ldap_base_dn` is not specified then `dc=localhost` is assumed.`'ldap_tiddlyspace_mode': True` is only needed for TiddlySpace installations where a CSRF token is required.Usage=====The URL to authenticate with will end in:`challenge/tiddlywebplugins.ldapauth`
Package: tiddlywebplugins.links
tiddlywebplugins.links is a tool for managing and presenting the
front and backlinks from tiddlers in a TiddlyWeb installation.There are two main parts:A tiddler parser which finds links and updates a database.Two web handlers which look in that database to present
information at/bags/{bag_name}/tiddlers/{tiddler_title}/frontlinks
/bags/{bag_name}/tiddlers/{tiddler_title}/backlinksThis system uses pyparsing to scan for links. Pyparsing used
with help fromhttp://onlamp.com/lpt/a/6435Copyright 2011, Chris Dent <cdent@peermore.com>
BSD Licensed
Package: tiddlywebplugins.ltgt
This adds a less than (lt) and greater than (gt) filter to TiddlyWebField value is converted to a floateg. Less than
?lt=fieldname:4
would give you all tiddlers with a field ‘fieldname’ who’s value is less than 4
eg. this would match tiddlers with field ‘fieldname’ =1,’fieldname’ =2,’fieldname’ =2.5 etc..
but would not match ‘fieldname’ =4 or ‘fieldname’ =5.If the field is one of modified or created, the value given is treated as a date in YYYYMMDDHHMMSS form
eg. gt=modified:20100109 would give you all tiddlers which have been modified since 9th January 2010. Note hours, minutes and seconds are optional.
Package: tiddlywebplugins.magicuser
tiddlywebplugins.magicuser is a tool to extend the capabilities
of a user in TiddlyWeb.When an authentic user is extracted from the credentials extractor
system, the username and their roles are places into the WSGI
environment as the value of a tiddlyweb.usersign key.magicuser extends these capabilities by providing a model
for adding additional keys and values to the tiddlyweb.usersign
dictionary.It does this by looking in a bag, by default called MAGICUSER,
for a tiddler with the same title as the value of the name key
in the usersign dict. If that tiddler is present, it is loaded
and it’s attributes and fields are used (as shown in the code)
to add to the usersign.BEFORE the magicuser bag is inspected, a username translation
layer is engaged. This allow N different authenticated usersigns
to be treated as one core usersign within TiddlyWeb. It works as
follows:A tiddler with a title that is the same as the extracted usersign
name is retrieved from a bag by default called MAPUSER. If the
tiddler exists and has the field mapped_user the value of the
field replaces the name in the usersign. It is that name that
is then used during the magicuser stage.This plugin provides no facility for putting tiddlers in either
the MAGICUSER or MAPUSER bags. Other code (either client side
or server side) is expected to do that.