Saravanan666/pypi-org huggingface dataset:
Package: lektor-index-pages
Lektor Index Pages PluginThisLektorplugin can be used to generate “index pages” for a
blog or similar collection of pages.  These index pages list the blog posts
segregated by some key, with each index page containing only those posts
which match that key.Examples of what this can be used for include:Category Indexes: A set of index pages, one for each category,
which lists all the posts in that category.  (Multi-valued index keys
are also supported, so that each post can appear on more than a single
index page: e.g.keyword indexes.)Date Indexes: A set of index pages, one for each year (say), which
list all the posts in that year.  (Sub-indexes are supported
subindexes — e.g., each year index may have as children a sequence
of month indexes.)Behind the scenes, judicious caching of indexing results, and careful
control of Lektor’s dependency tracking prevent all this from slowing
the build process down too excruciatingly much.Project LinksDocumentationGithubPyPIAuthorJeff Dairikidairiki@dairiki.orgChangelogRelease 1.1.0 (2023-06-16)Drop support for Lektor 3.2.xTest under python 3.11Add type annotationsConvert packaging from setuptools toPDMDisusepkg_resourcesin favor ofimportlib.metadataAddpre-commitconfigurationRunblackandreorder-python-importson codeRelease 1.0 (2022-01-28)Drop support for python 2.7 and 3.6.Fix deprecation warning fromjinja2. Jinja2 version 3 is now required.DocumentationDocumentation clarifications, updates and fixes.
(PR#2— Thank you Bart Van Loon!)Add missing requirementrecommonmarktodocs/requirements.txt.Adddocsenviroment totox.inito test that docs will build cleanly.TestingTest under python 3.10 and lektor<3.3Release 0.1 (2021-02-05)No code changes.Update development status classifier to "stable".Release 0.1a3 (2020-05-08)API changesAdded akeyfield on the index virtual source object.  It is an
alias to_id, but is syntactically more self-explanatory.Thekeysconfiguration key has been renamed tokey.When thekeyexpression is being evaluted, the record whose key(s)
is(are) to be be computed is now available in the jinja context asitemrather thanthis.DocumentationDocumentation moved from README to Sphinx docs at RTFD.ioRelease 0.1a2 (2020-05-06)API changesTherecordargument has been dropped from the (jinja) globalindex_pagesfunction.  (Since indexes can not have multiple
parents, it is not necessary.)Theparentconfiguration key has been renamed toparent_path.Theslugconfiguration key has been renamed toslug_format.Theattributesconfig section has been renamed tofields.Though they are not quite like regular Lektor Record fields, they
are more field-like than attribute-like.  (I.e. access is viagetitemrather thangetattr.)Release 0.1a1 (2020-05-05)Initial release.
Package: lektor-inlinetags
lektor plugin: inlinetagsThe inlinetags plugin allows you to use tags inside normal text / html / markdown elements.
For example, you can writeThis is my {{Lektor}} powered websiteand it will automatically replace the tag with a link to the actual page:This is my <a href="/tag/lektor/">Lektor</a> powered website.Of course, you can configure a different matching pattern, e.g., instead of the default{{tag}}use$tag$(\$(.{1,20}?)\$).This plugin is based on thelektor-groupbyplugin.
All configuration options from groupby can be used (including multiple attribute names).
Further, you can access the tags of a page with the filter|vgroups(key1, key2, recursive=False)where key is0..Nattribute keys.
If no key is provided, all attributes will be returned – otherwise only matching attribute keys.Example config fileAdd a newinlinetags = Trueattribute to your model, e.g., a flow block:[block]name=Text Elementbutton_label=[[paragraph]][fields.content]label=Texttype=markdowninlinetags=TrueIn your plugin config (configs/inlinetags.ini):[inlinetags]root=/slug=tag/{key}/template=tag-page.html[inlinetags.pattern]match={{([^}]{1,32})}}replace=<a class="tag" href="{url}">{name}</a>[inlinetags.fields]title="Tagged: " ~ this.key_obj[inlinetags.key_map]C#=c-sharp
Package: lektor-jinja-content
lektor-jinja-contentThis is a Lektor plugin that allows you to render Jinja2 inside your content fields that are string-like. For example, this means that inside your content fields that are of type string or Markdown, you can write Jinja logic, and access Lektor'sTemplate Context, and has access to all normal Jinja filters, including those provided byother plugins. In a Markdown field (or other field that is rendered - likerst), theJinja is processed first, then the formatting processor.You can set and use Jinja variables, but they will only have meaning within their field that is being rendered.With this plugin, you'll have to make sure the content that is renderedis valid Jinja. Jinja syntax erros will throw an exception. Don't forget about the handy{% raw %} {% endraw %}tags if you want content that is not valid Jinja.N.B.Using this plugin is rendering many more items with Jinja, and your build process will slow down as a result. As an early benchmark and anecdote, my small website's build time rose from 4.89s to 5.39s even while I actually had no Jinja-Content that needed rendering. I plan on adding the ability to configure this plugin later so that you don't have to runeverythingthrough Jinja if you don't want to.ExamplesQuerying context:{{ site.get('/').title }}or{{ this.path }}Logic:{%setmeaning_of_life,meaning_of_universe=this.life,this.universe%}{%ifmeaning_of_life==meaning_of_universe==42%}{%setmeaning_of_it_all=meaning_of_life%}{%else%}{%setmeaning_of_it_all='Undefined'%}{%endif%}{{meaning_of_it_all}}Jinja in Markdown:[link text]({{this|url}})Jinja in reStructuredText:`link text <{{this|url}}>`_Try running thetest sitefor more examples.Possible future of this plugin.This Plugin opens the door to some pretty powerful and pretty funky functionality. Here's some food for though:Currently every every string-like field in_dataand_blocksis processed, even things like_slugand_template. Can these other things be used?Some people want to be able to include markdown in content files / declarations. This plugin might pave the way toward that withincludes and extends.Could we Jinjaify static files?Databags?What about modularity?
Package: lektor-jsminify
lektor-JSminifyJS minifier for Lektor that automatically minifies javascript filesUsesrjsminand looks for .js files,
minifying them as part of the build process. It only rebuilds when it's needed (file changed or the config changed). When starting the the development server it watchs the files for changes in the background and rebuilds them when needed.InstallingYou can install the plugin with Lektor's installer::lektorpluginsaddlektor-jsminifyOr by hand, adding the plugin to the packages section in your lektorproject file::[packages]lektor-jsminify=1.4.1UsageTo enable jsminify, pass thejsminifyflag when starting the development
server or when running a build:lektorserver-fjsminifylektorbuild-fjsminifyWhen the flag is present, jsminify will take all .js files from asset_sources/js, minifies them and places them
in assets/js.The Plugin has the following settings you can adjust to your needs:parameterdefault valuedescriptionsource_dirasset_sources/js/the directory in which the plugin searchs for js files (subdirectories are included)output_dirassets/js/the directory the minified js files get place atname_prefixprefix for output name e.g. test.js becomes to test<name_prefix>.jskeep_bang_commentsFalsekeep comments starting with an exclamation markexcluded_assetsexclude .js files using a comma separated list of unix shell style wildcards (fnmatch)included_assetsinclude .js files using a comma separated list of unix shell style wildcards (fnmatch) overrides excluded assetsAn example config can be found atconfigs/jscompile.ini
Package: lektor-leaflet-geojson
lektor-leaflet-geojsonLektor template filter to convert geojson objects to Leaflet mapsInstallationpip install lektor-leaflet-geojsonUsageImport the leaflet JS and CSS. You can skip this step if you are managing Leaflet yourself (e.g: with NPM){{ import_leaflet('1.7.1') }} {# using a specified version #}{{ import_leaflet() }} {# default to "latest" #}The|map()filter can be used to render a GeoJSON feature on a map. Pass some inline CSS to style the map div.{{
  '{"type": "Feature", "geometry": {"type": "Point", "coordinates": [125.6, 10.1]}}' | map("height: 300px; width: 300px;")
}}
Package: lektorlib
LektorlibA few bits which may possibly be useful to developers ofLektorplugins.Bits Includedlektorlib.query.PrecomputedQueryA subclass oflektor.db.Querywhich yields a pre-computed
sequence of children.This is useful in (at least) two circumstances:First, when the children to be queried are virtual source objects,
the standardlektor.db.Querywill not work.  This version will.Second, when we would like to generate a query of a pre-computed
subset of a resource's children, this prevents intruducing
unnecessary build dependencies.  If we used a standard query with
a filter applied, it still iterates over all of the parent node’s
children, registering dependencies on all of them.lektorlib.context.disable_dependency_recordingA python context manager which (temporarily) disables lektor’s
dependency recording system.lektorlib.recordcache.get_or_create_virtualThis function is a helper to streamline the caching of virtual
source objects in the lektor record cache.Lektor.db.Pad.get()handles caching for regular records.
At present, however, it does not appear that it ever caches
virtual source objects, even though its record cache is perfectly
capable of doing so.lektorlib.testing.assert_no_dependencies(match=None)This context manager is a testing helper which can be used to
check that no dependencies are recorded with lektor’s dependency
tracking system.AuthorJeff Dairikidairiki@dairiki.orgChangelogRelease 1.2.1 (2023-06-15)Type AnnotationsNarrow the return type oflektorlib.recordcache.get_or_create_virtual.Convertlektorlib.query.PrecomputedQueryto a generic type.Release 1.2.0 (2023-06-02)Added type annotationsUse PDM instead of setuptools to build distributionConfigured pre-commitRun black and reorder-python-imports on the codeRelease 1.1.0 (2023-04-20)Fixes for Lektor 3.4 (in pre-release).We now test under Lektor 3.3 and Lektor 3.4 (pre-release).Release 1.0 (2022-01-28)Drop support for python < 3.7. Test under python 3.10.Release 0.1 (2021-02-05)No code changes.Release is now classified as "production/stable".Release 0.1a1 (2020-05-05)Initial release.
Package: lektor-markdown-admonition
lektor-markdown-admonitionThis plugin adds admonition tags to Markdown for Lektor.  This feature is
inspired by the extension in Python Markdown but simplified.Enabling the PluginTo enable the plugin run this command:$ lektor plugins add markdown-admonitionSyntaxA paragraph prefixed with exclamation marks is handled as admonition:! a note

!! an informational message

!!! a tip to users

!!!! a warningThey are rendered as follows:Markdown PrefixRendered div!<div class="admonition admonition-note">!!<div class="admonition admonition-info">!!!<div class="admonition admonition-tip">!!!!<div class="admonition admonition-warning">
Package: lektor-markdown-excerpt
# lektor-markdown-excerptThis plugin adds filter for Markdown body excerpt.## Enabling the PluginTo enable the plugin run this command:`ini $ lektor plugins addmarkdown-excerpt`## In TemplatesPlugin provides the|excerptfilter that can be used to render first
paragraph of Markdown:`jinja {{ post.body|excerpt }} `It takes one optional argument which is the separator for the excerpt:`jinja {{post.body|excerpt:'\n\n##'}} `
Package: lektor-markdown-header-anchors
lektor-markdown-header-anchorsThis plugin extends the markdown support in Lektor in a way that headlines
are given anchors and a table of contents is collected.Enabling the PluginTo enable the plugin run this command:$lektorpluginsaddmarkdown-header-anchorsIn TemplatesWithin templates it becomes possible to access the.tocproperty of
markdown data.  It's a list where each item has the following attributes:anchor: the name of the anchortitle: the title of the headline as HTMLchildren: a list of headers below that headerExample rendering:<h4>Table Of Contents</h4><ul class="toc">{%foriteminthis.body.tocrecursive%}<li><a href="#{{item.anchor}}">{{item.title}}</a>{%ifitem.children%}<ul>{{loop(item.children)}}</ul>{%endif%}</li>{%endfor%}</ul>
Package: lektor-markdown-highlighter
lektor-markdown-highlighterThis plugin adds support for syntax highlighting through Pygments to
Lektor's markdown support.Enabling the PluginTo enable the plugin run this command:lektorpluginsaddmarkdown-highlighterConfiguring the PluginThe plugin has a config file that is used to configure a few things
for Pygments.  Just create a file namedmarkdown-highlighter.iniinto yourconfigs/folder.  Currently onlypygments.styleis used:[pygments]style=tangoYou can use this to select any of the built-in Pygments styles.  Support for
custom styles will come in the future.The config file is considered the "source" for the Pygments stylesheet, so you must create the configuration file (it can be empty) or Lektor's build will prunepygments.css.In MarkdownTo use the syntax highlighter you need to use fenced blocks and pass the name
of the pygments lexer after the opening fence:```python
print("Hello World!")
```In TemplatesIn templates the plugin provides theget_pygments_stylesheetfunction which
can be used to generate and retrieve a link to the pygments stylesheet:<link rel="stylesheet" href="{{get_pygments_stylesheet()|url}}">In addition the|pygmentizefilter can be used to highlight code from
templates.  It takes one argument which is the lexer name:{{'print "Hello World!"'|pygmentize('python')}}
Package: lektor-markdown-image-attrs
Lektor Markdown Extension for Image and Link attributesThis plugin hacks up Lektor’s Markdown renderer to add syntax which allows
arbitrary HTML attributes to be set on image and link tags.MotivationMarkdown, as implemented in Lektor, provides nice shorthand syntax for
marking up images.  It does not provide any syntax for controlling
image styling, e.g., sizing and alignment.  This plugin molests
Markdowns syntax for image (and link) titles to allow setting
arbitrary HTML attributes on image and link tags.On using raw HTMLIt is true that one can simply include raw HTML<img>tags within
Markdown text.  However, since this bypasses Markdown processing
altogether, it also bypasses Lektor’s resolution of image/link
URLs. This can be undesirable.Setting attributes on link and image tags in Markdown textThese hacks allow one to set attributes on image and link tags, by overloading
Markdown’s syntax for setting title attributes.If the title of a Markdown image or link looks like a set of
(non-empty) HTML attributes, they are interpreted as such, and stuck
onto the produced<a>or<img>tag.![My cat, Fluffy](fluffy.jpg "class=img-responsive")will produce<imgsrc="fluffy.jpg"class=img-responsive>If you do want to set a title as well, you may surround the extra attributes
with angle brackets and append them at the end of the title.   Both of these
are equivalent:![My cat, Fluffy](fluffy.jpg "Fluffy at rest <class=img-responsive>")![My cat, Fluffy](fluffy.jpg "title='Fluffy at rest' class=img-responsive")If you’d like to set a title, when the title text looks like a set of HTML attributes, simply append an empty set of angle brackets to the title:![My cat, Fluffy](fluffy.jpg "Fluffy=resting <>")This works with reference-style links and images as well:Here’s a photo of [my cat][]:  ![fluffy][]

[fluffy]:fluffy.jpg   (style='width: 80px;')[my cat]:<http://fluffy.example.org>   'Fluffy’s website <class="external link">'TestingWe now usehatchfor packaging and development.To run all tests, including under a full matrix of python and lektor
versions, as well as combined coverage tests:hatchruncover:fullAcknowledgmentsIdeas were gleaned from thisblog postby Baron Schwartz.AuthorJeff Dairikidairiki@dairiki.org
Package: lektor-markdown-ruby-blocks
lektor-markdown-ruby-blocksThis is a simple Lektor plugin that adds support for
HTML ruby tags to Markdown.SyntaxTo create a ruby tag, use the followingruby-blocksyntax:^^
(歩)[ある]く
^^This will generate the following HTML:<spanclass="ruby-line"><ruby>歩<rp>(</rp><rt>ある</rt><rp>)</rp></ruby>く</span>The rendering result:歩(ある)くYou can combine adjacent ruby text like this:^^
(自|分)[じ|ぶん]
^^And this will be rendered like this:<spanclass="ruby-line"><ruby>自<rp>(</rp><rt>じ</rt><rp>)</rp></ruby><ruby>分<rp>(</rp><rt>ぶん</rt><rp>)</rp></ruby></span>Rendered output:自(じ)
  分(ぶん)NewlineThis plugin will automatically add<br />between each line in a ruby-block:^^
(歩)[ある]く
(歩)[ある]く
^^This will output:<spanclass="ruby-line"><ruby>歩<rp>(</rp><rt>ある</rt><rp>)</rp></ruby>く</span><br/><spanclass="ruby-line"><ruby>歩<rp>(</rp><rt>ある</rt><rp>)</rp></ruby>く</span>You can also use-##-to create an extra newline in a ruby-block.^^
(歩)[ある]く
-##-
(歩)[ある]く
^^Output:<spanclass="ruby-line"><ruby>歩<rp>(</rp><rt>ある</rt><rp>)</rp></ruby>く</span><br/><br/><spanclass="ruby-line"><ruby>歩<rp>(</rp><rt>ある</rt><rp>)</rp></ruby>く</span>Coloring the textAdditionally, you can add a 6-digit or 8-digit hex RGB code
after the beginning^^, making the rendered content colored
with specified color.^^#44cc00
(歩)[ある]く
^^This will generate the following HTML pieces:<spanclass="ruby-line"style="color: #44cc00"><ruby>歩<rp>(</rp><rt>ある</rt><rp>)</rp></ruby>く</span>Raw linesPrepend%to create a raw line. Raw lines are not converted to ruby tags,
not affected by the color settings, and have a different class.Example:^^#44cc00
(歩)[ある]く
% (aru)[ku]
^^Output:<spanclass="ruby-line"style="color: #44cc00"><ruby>歩<rp>(</rp><rt>ある</rt><rp>)</rp></ruby>く</span><br/><spanclass="non-ruby-line">(aru)[ku]</span>
Package: lektor-minification
# lektor-minificationA simple [Lektor](https://www.getlektor.com/) plugin to minify images at build time.## RequirementsSome packages have to be installed beforehand the plugin installation.Linux :$ sudo apt-get install -y optipng jpegoptim libjpeg8-dev zlib1g-dev gifsicleOS X :$ brew install optipng jpegoptim gifsicle libmagic## InstallationThe easier is to use the command line :$ lektor plugins add lektor-minificationBut you could also add the plugin to your.lektorprojectfile, so it’ll be automatically downloaded by Lektor :`ini [packages]lektor-minification= 1.1.5 `## How to useThere’s nothing more to do ! The plugin will optimize on-the-fly all the PNG and JPEG images each time that you’re building your project :$ lektor build## ConfigurationIf you want to to tweak the optimization tools and their options just copy your [configuration file](http://pyimagediet.readthedocs.io/en/latest/configure.html) asminification.ymlto your project’sconfigsfolder. One is available from the plugin [source directory](https://github.com/numericube/lektor-minification/blob/master/minification.yml) if needed.Just be sure to always keep something to execute for each file type (png, jpeg and gif) or the build process could crash.## SupportThis plugin is provided as-is by [NumeriCube](http://numericube.com), a human-sized Paris-based company prodiving tailored services to smart customers.We’d be happy to try to help you with this plugin if needed. In that case, just file an issue on the [GitHub tracker](https://github.com/numericube/lektor-minification/issues).## Licenselektor-minification is released under the [GNU General Public License v3](https://github.com/numericube/lektor-minification/blob/master/LICENSE).## ContributingYou can submit any ideas, suggestions or bug reports to our [GitHub tracker](https://github.com/numericube/lektor-minification/issues).If you’d like to merge any bug fix or enhancement into the project, please fill a [pull request](https://github.com/numericube/lektor-minification/pulls).
Package: lektor-minify
This plugin allows you to minify the build artifacts of yourLektorproject
during the build process, without any additional tool. It currently supports
minifying HTML, CSS and JS files.The plugin only minifies the files changed during the last build, avoiding
slowing down the build if your project consists of a lot of files. Internally
it uses the rcssmin and rjsmin libraries, and it’s released under the MIT
license.Learn more about the plugin
Package: lektor-natural-language
lektor-natural-languageThis is a Lektor plugin that provides a few simple template filters with the Natural Language ToolKit (nltk).This offers the following filters:sentences_filterAccept a string of text and return a list of its sentences.Usage:{{ this.text|sentences }}firstsentences_filterAccept a string of text and return its the first sentence.Usage:{{ this.text|firstsentence }}sentences_filterAccept a string of text and return a list its keywords as determined bynltk'sRake.Usage:{{ this.text|keywords }}
Package: lektor-netlify
Lektor Netlify Publisher PluginPublish yourLektorsite toNetlify.InstallationInstall thenetlifycommand-line program according tothe instructions on netlify.com.Add lektor-netlify to your project from the command line:lektorpluginsaddlektor-netlifySeethe Lektor documentation for more instructions on installing plugins.ConfigurationConfigure a server in your.lektorprojectfile:[servers.production]name=Productiontarget=netlify://my-domain.comAccess TokenGet a personal access token from Netlify's "applications" page:ApplicationsYou must use this access token each time you publish.If your project file is privateyou can save the token there. Do not commit this![servers.production]name=Productiontarget=netlify://my-domain.comkey=ACCESS_TOKENNow deploy your site like:lektordeployproductionOtherwise, pass the token on the command line:lektordeployproduction--keyACCESS_TOKEN
Package: lektor-netlify-lfs-resize-url
netlify-lfs-resize-urlThis plugin provides a filter that allows the user to generateNetlify Image Transformationresize URL parameters when working withNetlify Large Media.InstallationYou can install this plugin by running the following command in your project's directory:lektorpluginsaddnetlify-lfs-resize-urlUsageThenf_resizefilter works in conjunction with theurlfilter as follows:{%forimageinthis.attachments.images%}<img src="{{image|url|nf_resize(w=720)}}">{%endfor%}The above will return the following:<imgsrc="/images/example.png?nf_resize=fit&w=720">ArgumentsArguments correspond toNetlify transformation parameters.ArgumentAcceptsDefaultnf_resize'fit', 'smartcrop''fit'hPositive integersnullwPositive integersnullDevelopmentTestingAll of the tests can be run by executingtest.shwith the pipenv shell activated.Static analysis and checkingmypyis used for static analysis, andflake8is used for checking:python-mmypylektor_netlify_lfs_resize_url.py
python-mmypytest.py
python-mflake8lektor_netlify_lfs_resize_url.py
python-mflake8test.pyUnit testingPython's built-inunittestframework is used for unit testing:python-munittestSecuritybanditis used for security testing:python-mbanditlektor_netlify_lfs_resize_url.pyUploading the plugin to PyPIpython-mbuild
python-mtwineuploaddist/*