diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-03-16 18:23:55 +0100 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-03-16 18:24:30 +0100 |
| commit | dbb50bc03105bd7a208e46a9b0ddbe11811b8f20 (patch) | |
| tree | b111743996988ce77fa569540e60428487286c19 | |
| parent | 8e703f77bb2431902ebd57aced3fba1224e28c44 (diff) | |
drop draft extensions by Léandre and Sabin
| -rw-r--r-- | _extensions/leandre-filter/_extension.yml | 8 | ||||
| -rw-r--r-- | _extensions/leandre-filter/leandre.lua | 7 | ||||
| -rw-r--r-- | _extensions/protoExtension/_extension.yml | 7 | ||||
| -rw-r--r-- | _extensions/protoExtension/proto.lua | 14 | ||||
| -rw-r--r-- | _extention.qmd | 60 | ||||
| -rw-r--r-- | _proto.qmd | 31 | ||||
| -rw-r--r-- | _sementic_test.qmd | 14 | ||||
| -rw-r--r-- | main.qmd | 8 |
8 files changed, 0 insertions, 149 deletions
diff --git a/_extensions/leandre-filter/_extension.yml b/_extensions/leandre-filter/_extension.yml deleted file mode 100644 index 03b9275..0000000 --- a/_extensions/leandre-filter/_extension.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: leandre-filter -title: Leandre Name Filter -author: Léandre -version: 1.0.0 -quarto-required: ">=1.3.0" -contributes: - filters: - - leandre.lua
\ No newline at end of file diff --git a/_extensions/leandre-filter/leandre.lua b/_extensions/leandre-filter/leandre.lua deleted file mode 100644 index 67ff113..0000000 --- a/_extensions/leandre-filter/leandre.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Function to replace variations of Leandre with Léandre. -function Str(el) - -- Case-insensitive substitution using pattern matching - -- [Ll][Ee][Aa][Nn][Dd][Rr][Ee] matches Leandre in any capitalization - el.text = el.text:gsub("[Ll][Ee][Aa][Nn][Dd][Rr][Ee]", "Léandre") - return el -end diff --git a/_extensions/protoExtension/_extension.yml b/_extensions/protoExtension/_extension.yml deleted file mode 100644 index f00b3c5..0000000 --- a/_extensions/protoExtension/_extension.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: protoExtension -title: Prototype for html -version: 1.0.0 -quarto-required: ">=1.3.0" -contributes: - filters: - - proto.lua diff --git a/_extensions/protoExtension/proto.lua b/_extensions/protoExtension/proto.lua deleted file mode 100644 index cb29c31..0000000 --- a/_extensions/protoExtension/proto.lua +++ /dev/null @@ -1,14 +0,0 @@ --- Function to replace variations of Leandre with Léandre. -function Str(el) - i , j = string.find(el.text,"{") - if i ~= nil then a = string.find(el.text,"}") - print(i) - print(string.sub(el.text,i,a)) - b = string.sub(el.text,0,i-1) - c = string.sub(el.text,a+1,-1) - el.text = b .. c - - end - - return el -end diff --git a/_extention.qmd b/_extention.qmd deleted file mode 100644 index 9918cf9..0000000 --- a/_extention.qmd +++ /dev/null @@ -1,60 +0,0 @@ - -# Introduction - -In this file we will see how to create an filter extention for quarto using Lua. -A filter extention is a flexible and powerful tool for introducing new global behaviors and/or new markdown rendering behaviors. -For example, you could create filters to implement output folding, an image carousel, or just about anything you can imagine! - -# Creation - -To create a extention we need to have an "_extensions" folder -and in this folder we need to create a folder for each extention. -For each extention we need to have a file name "_extension.yml" to tell quarto the structure of this extention. -Here is an exemple: -```yaml -title: Leandre Name Filter -author: Léandre -version: 1.0.0 -quarto-required: ">=1.3.0" -contributes: - filters: - - leandre.lua -``` -In this file we can see that it include a file in .lua and that where the logic of the extention will be coded. - -So in resume we have this file structure -```bash -_extensions/ -└── leandre-filter - ├── _extension.yml - └── leandre.lua -``` - -# Code Exemple - -For this exemple we will talk about the file leandre.lua -```lua -function Str(el) - el.text = el.text:gsub("[Ll][Ee][Aa][Nn][Dd][Rr][Ee]", "Léandre") - return el -end -``` -What do this small code do is using the function gsub for each part of the document. -The gsub function search for a patern and replace it with the given string. -The patern given here "[Ll][Ee][Aa][Nn][Dd][Rr][Ee]" to permit to have evry possibility covered of the word léandre. - - -# More resources - -In these links you can find more information about the diferent function that can be use in the extention. - -[https://quarto.org/docs/extensions/lua.html](https://quarto.org/docs/extensions/lua.html) - - -[https://quarto.org/docs/extensions/lua-api.html](https://quarto.org/docs/extensions/lua-api.html) - -More about filter -[https://quarto.org/docs/extensions/filters.html](https://quarto.org/docs/extensions/filters.html) - -And other type of extension -[https://quarto.org/docs/extensions/creating.html#development](https://quarto.org/docs/extensions/creating.html#development) diff --git a/_proto.qmd b/_proto.qmd deleted file mode 100644 index 0af54c4..0000000 --- a/_proto.qmd +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Test Document" -format: html -filters: - - protoExtension ---- - -Here is Leandre writing some text. -My name is [Sabin Ghimire]{:name} and you can call me at [1-800-555-0199]{:telephone}. -My favorite animal is the [Lioner]{ov:preferredAnimal}. - - -# tomorrow's meeting list -## {.schema:Event} Meeting Details - -- Date: [2/27]{schema:startDate} -- Location: [Library]{schema:location} -- Attendees: - - Leandra - - jonas - - [Sabin](https://example.com/tim){schema:attendee}My name is [Sabin Ghimire]{:name} and you can call me at [1-800-555-0199]{:telephone}. - -# tomorrow's meeting list -## {.schema:Event} Meeting Details - -- Date: [11/10]{schema:startDate} -- Location: [Library]{schema:location} -- Attendees: - - Alice - - Bob - - [Tim](https://example.com/tim){schema:attendee}
\ No newline at end of file diff --git a/_sementic_test.qmd b/_sementic_test.qmd deleted file mode 100644 index 190d358..0000000 --- a/_sementic_test.qmd +++ /dev/null @@ -1,14 +0,0 @@ -This is a sample text file created for semantic testing purposes. It contains a few lines of text to demonstrate the future functionality of the text generation feature. - -Line 2: This is the second line of the [text file]{wikipedia:Text_file}. - -Or that already been thinked about by Thomas Francart [here](https://blog.sparna.fr/2020/02/20/semantic-markdown/): -### Specifications Meeting {.schema:Event} - -* Date : _11/10_{.schema:startDate} -* Place {.schema:location} : Our office, Street name, 75014 Paris -* Meeting participants : - {.schema:attendee} - * Thomas Francart{.schema:Person} - * [Someone else](https://www.wikidata.org/wiki/Q80) - * Tim Foo
\ No newline at end of file diff --git a/main.qmd b/main.qmd deleted file mode 100644 index a33b9e4..0000000 --- a/main.qmd +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Test Document" -format: html -filters: - - leandre-filter ---- - -Here is Leandre writing some text.
\ No newline at end of file |
