mbp-oskar.lan 2025-5-10:18:42:56
This commit is contained in:
parent
1239a5463a
commit
afcf0f22e4
7
.obsidian/plugins/breadcrumbs/data.json
vendored
7
.obsidian/plugins/breadcrumbs/data.json
vendored
@ -491,6 +491,13 @@
|
|||||||
],
|
],
|
||||||
"close_reversed": false,
|
"close_reversed": false,
|
||||||
"close_field": "source"
|
"close_field": "source"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"chain": [],
|
||||||
|
"rounds": 10,
|
||||||
|
"close_reversed": false,
|
||||||
|
"close_field": "up"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
2
.obsidian/plugins/github-sync/data.json
vendored
2
.obsidian/plugins/github-sync/data.json
vendored
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"remoteURL": "https://gitea.dariow.fr",
|
"remoteURL": "https://gitea.dariow.fr",
|
||||||
"gitLocation": "",
|
"gitLocation": "",
|
||||||
"syncinterval": 0,
|
"syncinterval": 20,
|
||||||
"isSyncOnLoad": true,
|
"isSyncOnLoad": true,
|
||||||
"checkStatusOnLoad": true
|
"checkStatusOnLoad": true
|
||||||
}
|
}
|
69
.obsidian/plugins/quickadd/data.json
vendored
69
.obsidian/plugins/quickadd/data.json
vendored
@ -401,9 +401,76 @@
|
|||||||
},
|
},
|
||||||
"openFile": false,
|
"openFile": false,
|
||||||
"openFileInMode": "default"
|
"openFileInMode": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "0b1ce8df-732b-4f1c-aa11-4914666e6416",
|
||||||
|
"name": "convert inline properties to YAML",
|
||||||
|
"type": "Macro",
|
||||||
|
"command": true,
|
||||||
|
"macroId": "076271f1-41bd-4076-b253-5a9cb7fd1d5a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "49fccdfb-e1e1-4c3d-baf8-18b139ff6440",
|
||||||
|
"name": "convert ALL inline properties to YAML",
|
||||||
|
"type": "Macro",
|
||||||
|
"command": false,
|
||||||
|
"macroId": "acd31cfd-8e03-4c73-98d8-d40e4906e97a"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"macros": [
|
||||||
|
{
|
||||||
|
"name": "convert inline properties to YAML",
|
||||||
|
"id": "076271f1-41bd-4076-b253-5a9cb7fd1d5a",
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"name": "Save current file",
|
||||||
|
"type": "Obsidian",
|
||||||
|
"id": "6d7e3958-864f-4e3c-a43a-76ceafd5be40",
|
||||||
|
"commandId": "editor:save-file"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "convert_inline_to_yaml",
|
||||||
|
"type": "UserScript",
|
||||||
|
"id": "48601ce0-820f-47d4-a61d-34549323b302",
|
||||||
|
"path": "quickadd_scripts/convert_inline_to_yaml.js",
|
||||||
|
"settings": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Save current file",
|
||||||
|
"type": "Obsidian",
|
||||||
|
"id": "2af2f2a9-6cdb-43ac-9c13-4b846d4385cd",
|
||||||
|
"commandId": "editor:save-file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"runOnStartup": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "convert ALL inline properties to YAML",
|
||||||
|
"id": "acd31cfd-8e03-4c73-98d8-d40e4906e97a",
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"name": "Save current file",
|
||||||
|
"type": "Obsidian",
|
||||||
|
"id": "845535c2-2359-497d-a71d-fdc58c9ac40a",
|
||||||
|
"commandId": "editor:save-file"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "convert_ALL_inline_to_yaml",
|
||||||
|
"type": "UserScript",
|
||||||
|
"id": "a54f0813-5d36-4d5b-a793-d7d32b05b22c",
|
||||||
|
"path": "quickadd_scripts/convert_ALL_inline_to_yaml.js",
|
||||||
|
"settings": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Save current file",
|
||||||
|
"type": "Obsidian",
|
||||||
|
"id": "05488d2d-11a6-4217-87a3-6252e547047b",
|
||||||
|
"commandId": "editor:save-file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"runOnStartup": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"macros": [],
|
|
||||||
"inputPrompt": "single-line",
|
"inputPrompt": "single-line",
|
||||||
"devMode": false,
|
"devMode": false,
|
||||||
"templateFolderPath": "templates",
|
"templateFolderPath": "templates",
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 602a41e7f8b2465babd4ebe38e2b292dc28fa7d2
|
|
@ -1,11 +1,8 @@
|
|||||||
---
|
---
|
||||||
alias: [ "base duale" ]
|
alias: [ "base duale" ]
|
||||||
---
|
up: "[[espace dual d'un espace vectoriel]]"
|
||||||
up:: [[espace dual d'un espace vectoriel]]
|
sibling: "[[base antéduale d'une famille de formes linéaires|base antéduale]]"
|
||||||
sibling:: [[base antéduale d'une famille de formes linéaires|base antéduale]]
|
tags: "#s/maths/algèbre"
|
||||||
title::
|
|
||||||
#s/maths/algèbre
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
> [!definition] base duale d'un espace vectoriel
|
> [!definition] base duale d'un espace vectoriel
|
||||||
@ -20,8 +17,8 @@ title::
|
|||||||
> - $\mathcal{B}^{*} = (e_{k}^{*} \mid k \in [\![1; n]\!])$
|
> - $\mathcal{B}^{*} = (e_{k}^{*} \mid k \in [\![1; n]\!])$
|
||||||
> - $\mathcal{B}^{*} = \big( (e_{i} \mapsto [i = k]) \mid k \in [\![1; n]\!] \big)$
|
> - $\mathcal{B}^{*} = \big( (e_{i} \mapsto [i = k]) \mid k \in [\![1; n]\!] \big)$
|
||||||
^definition
|
^definition
|
||||||
|
|
||||||
![[base duale d'une famille de formes linéaires 2023-01-23 17.35.35.excalidraw|100%]]
|
![[base duale d'une famille de formes linéaires 2023-01-23 17.35.35.excalidraw|60%]]
|
||||||
|
|
||||||
# Propriétés
|
# Propriétés
|
||||||
Soient $\mathcal{B} = (e_1, e_2, \dots, e_{n})$ une base, et $\mathcal{B}^{*} = (e_1^{*}, e_2^{*}, \dots, e_{n}^{*})$ sa base duale
|
Soient $\mathcal{B} = (e_1, e_2, \dots, e_{n})$ une base, et $\mathcal{B}^{*} = (e_1^{*}, e_2^{*}, \dots, e_{n}^{*})$ sa base duale
|
||||||
|
@ -6,7 +6,7 @@ tags: "#s/maths/algèbre"
|
|||||||
|
|
||||||
> [!definition] ensemble des formes linéaire d'un espace vectoriel
|
> [!definition] ensemble des formes linéaire d'un espace vectoriel
|
||||||
> Soit $E$ un $\mathbf{K}$-[[espace vectoriel]]
|
> Soit $E$ un $\mathbf{K}$-[[espace vectoriel]]
|
||||||
> On note $E^{*}$ l'ensemble des formes linéaires sur $E$
|
> On note $E^{*}$ l'ensemble des [[forme linéaire|formes linéaires]] sur $E$
|
||||||
>
|
>
|
||||||
> $E^{*}$ est appelé **espace dual de $E$**
|
> $E^{*}$ est appelé **espace dual de $E$**
|
||||||
>
|
>
|
||||||
@ -16,8 +16,23 @@ tags: "#s/maths/algèbre"
|
|||||||
# Propriétés
|
# Propriétés
|
||||||
|
|
||||||
- $\dim E^{*} = \dim E$
|
- $\dim E^{*} = \dim E$
|
||||||
- Evident car une forme linéaire sur $E$ est une matrice de taille $1\times \dim E$, et donc $E^{*}$ peut être assimilé à $E$ par les matrices des formes linéaires
|
|
||||||
- preuve : $\dim E* = \dim \left( \mathcal{L}(E, \mathbf{K}) \right) = \underbrace{\dim E \times \dim K}_{\text{taille des matrices de } E^{*}} = \dim E \times 1 = \dim E$
|
> [!proposition]+ Dimension de l'espace dual
|
||||||
|
> Si $E$ est de [[dimension d'un espace vectoriel|dimension]] finie
|
||||||
|
> Alors $E^{*}$ est un [[espace vectoriel]] de même dimension que $E$ :
|
||||||
|
> $\dim E^{*} = \dim E$
|
||||||
|
> - I Evident car une forme linéaire sur $E$ est une matrice de taille $1\times \dim E$, et donc $E^{*}$ peut être assimilé à $E$ par les matrices des formes linéaires
|
||||||
|
>
|
||||||
|
> > [!démonstration]- Démonstration
|
||||||
|
> > preuve : $\dim E* = \dim \left( \mathcal{L}(E, \mathbf{K}) \right) = \underbrace{\dim E \times \dim K}_{\text{taille des matrices de } E^{*}} = \dim E \times 1 = \dim E$
|
||||||
|
> >
|
||||||
|
> > ---
|
||||||
|
> > Autrement :
|
||||||
|
> >
|
||||||
|
> > On sait que si $E, F$ sont des $\mathbf{K}$-[[espace vectoriel|espaces vectoriels]] de dimension finie, alors $\mathscr{L}(E, F)$ est un $\mathbf{K}$-[[espace vectoriel]] de dimension $\dim(E)\dim(F)$.
|
||||||
|
> > Ici, $\dim(F) = 1$.
|
||||||
|
> > Donc si $\dim(E) < +\infty$, on a :
|
||||||
|
> > $\dim(E^{*}) = \dim(E)$
|
||||||
|
|
||||||
> [!proposition]+
|
> [!proposition]+
|
||||||
> Soit $E$ un [[espace vectoriel]]
|
> Soit $E$ un [[espace vectoriel]]
|
||||||
@ -36,6 +51,10 @@ tags: "#s/maths/algèbre"
|
|||||||
> Donc :
|
> Donc :
|
||||||
> $\displaystyle \varphi\left( e_{j} = \sum\limits_{i = 1}^{n} \lambda _{i}\underbrace{e_{i}^{*}(e_{j})}_{\substack{0 \text{ si } i \neq j\\ 1 \text{ si } i = j }} \right)$
|
> $\displaystyle \varphi\left( e_{j} = \sum\limits_{i = 1}^{n} \lambda _{i}\underbrace{e_{i}^{*}(e_{j})}_{\substack{0 \text{ si } i \neq j\\ 1 \text{ si } i = j }} \right)$
|
||||||
|
|
||||||
|
> [!proposition]+ Propriétés des formes linéaires
|
||||||
|
> Soit $\varphi \in E^{*}$
|
||||||
|
> Alors $\varphi \neq 0$ si et seulement si $\varphi$ est [[surjection|surjective]]
|
||||||
|
> Si $\dim (E) = n< +\infty$ alors $\varphi \neq 0 \iff \dim(\ker(\varphi)) = n-1$
|
||||||
|
|
||||||
# Exemples
|
# Exemples
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
alias: [ "actions non conventionnelles" ]
|
alias: [ "actions non conventionnelles" ]
|
||||||
|
up: "[[principes généraux de mise en place de l'action]]"
|
||||||
|
source: "[[conférence gesticulée.Inculture 4 - le plein d'énergie]]"
|
||||||
|
tags: "#s/politique"
|
||||||
---
|
---
|
||||||
up:: [[principes généraux de mise en place de l'action]]
|
|
||||||
source:: [[conférence gesticulée.Inculture 4 - le plein d'énergie]]
|
|
||||||
#s/politique
|
|
||||||
|
|
||||||
[[il faut agir de manière non conventionnelle]]
|
[[il faut agir de manière non conventionnelle]]
|
||||||
Les actions innatendues ont plus d'effet que les actions conventionnelles (manifestations...). ^0d4ed3
|
Les actions innatendues ont plus d'effet que les actions conventionnelles (manifestations...). ^0d4ed3
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
alias: [ "déranger en restant à l'aise", "sortir du champ d'expérience de l'ennemi tout en restant dans le notre" ]
|
alias: [ "déranger en restant à l'aise", "sortir du champ d'expérience de l'ennemi tout en restant dans le notre" ]
|
||||||
|
up: "[[principes généraux de mise en place de l'action]]"
|
||||||
|
source: "[[conférence gesticulée.Inculture 4 - le plein d'énergie]]"
|
||||||
---
|
---
|
||||||
up:: [[principes généraux de mise en place de l'action]]
|
|
||||||
source:: [[conférence gesticulée.Inculture 4 - le plein d'énergie]]
|
|
||||||
|
|
||||||
Les actions militantes doivent déranger au maximum, mais les militants doivent toujours être dans leur zone de comfort.
|
Les actions militantes doivent déranger au maximum, mais les militants doivent toujours être dans leur zone de comfort.
|
||||||
|
|
||||||
|
10
injection.md
10
injection.md
@ -1,15 +1,11 @@
|
|||||||
---
|
---
|
||||||
sr-due: 2022-11-28
|
|
||||||
sr-interval: 74
|
|
||||||
sr-ease: 317
|
|
||||||
alias: injective
|
|
||||||
aliases:
|
aliases:
|
||||||
- injective
|
- injective
|
||||||
- injectif
|
- injectif
|
||||||
|
up: "[[application]]"
|
||||||
|
sibling: "[[surjection]]"
|
||||||
|
tags: "#s/maths/analyse"
|
||||||
---
|
---
|
||||||
up::[[application]]
|
|
||||||
sibling::[[surjection]]
|
|
||||||
#s/maths/analyse
|
|
||||||
|
|
||||||
> [!definition] Définition
|
> [!definition] Définition
|
||||||
> Soit f une application de $E$ dans $F$ :
|
> Soit f une application de $E$ dans $F$ :
|
||||||
|
36
polynôme d'endomorphisme.md
Normal file
36
polynôme d'endomorphisme.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
aliases:
|
||||||
|
up:
|
||||||
|
- "[[polynôme]]"
|
||||||
|
- "[[endomorphisme linéaire]]"
|
||||||
|
tags:
|
||||||
|
- s/maths/algèbre
|
||||||
|
---
|
||||||
|
|
||||||
|
> [!definition] Définition
|
||||||
|
> Soit $E$ un $\mathbf{K}$-[[espace vectoriel]] avec $\dim(E) = n$
|
||||||
|
> Soit $P = a_0 + a_1 X + \cdots +a_{k}X^{k} \in K[X]$ ([[polynôme]])
|
||||||
|
> On note alors :
|
||||||
|
> - Si $f \in \mathscr{L}(E)$ alors $P(f) = a_0 \mathrm{Id}_{E} + a_1 f + \cdots + a_{k}f^{k}$
|
||||||
|
> - Si $A \in \mathcal{M}_{n}(K)$ alors $P(A) = a_0 I_{n} + a_1 A + \cdots + a_{k}A^{k}$
|
||||||
|
^definition
|
||||||
|
|
||||||
|
# Propriétés
|
||||||
|
|
||||||
|
> [!proposition]+ Les polynômes d'endomorphismes sont linéaires
|
||||||
|
> $P(f) \in \mathscr{L}(E)$
|
||||||
|
|
||||||
|
> [!proposition]+ Préservation des bases
|
||||||
|
> Si $B$ est une [[base d'un espace vectoriel|base]] de $E$, alors $[P(f)]_{B} = P([f]_{B})$
|
||||||
|
> - dem Cela vient du fait que $f \mapsto [f]_{B}$ est un [[isomorphisme d'anneaux]]
|
||||||
|
|
||||||
|
> [!proposition]+ Linéarité
|
||||||
|
>
|
||||||
|
- $(\lambda P + Q)(f) = \lambda P(f) + Q(f)$
|
||||||
|
- $(PQ)(f) = P(f) \circ Q(f) = (QP)(f)$
|
||||||
|
- $\ker P(f)$ et $\operatorname{Im} Q(f)$ sont stables par $f$
|
||||||
|
- Si $\lambda$ est [[valeur propre d'une matrice|valeur propre]] de $f$ alors $P(\lambda)$ est valeur propre de $P(f)$
|
||||||
|
|
||||||
|
|
||||||
|
# Exemples
|
||||||
|
|
@ -1,5 +1,7 @@
|
|||||||
up:: [[militantisme]]
|
---
|
||||||
#s/politique
|
up: "[[militantisme]]"
|
||||||
|
tags: "#s/politique"
|
||||||
|
---
|
||||||
|
|
||||||
```breadcrumbs
|
```breadcrumbs
|
||||||
title: "Sous-notes"
|
title: "Sous-notes"
|
||||||
|
177
quickadd_scripts/convert_ALL_inline_to_yaml.js
Normal file
177
quickadd_scripts/convert_ALL_inline_to_yaml.js
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
module.exports = {
|
||||||
|
settings: {
|
||||||
|
name: 'Convert Dataview Inline YAML to YAML',
|
||||||
|
author: 'AmericanBagel',
|
||||||
|
options: {
|
||||||
|
'Excluded Files': {
|
||||||
|
type: 'text',
|
||||||
|
defaultValue: '.git',
|
||||||
|
placeholder: 'A ":" seperated list of strings or regex',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
entry: async (params, settings) => {
|
||||||
|
const {
|
||||||
|
quickAddApi: { inputPrompt, suggester },
|
||||||
|
} = params;
|
||||||
|
const metaedit = app.plugins.plugins['metaedit'].api;
|
||||||
|
const vault = app.vault;
|
||||||
|
const fs = app.vault.adapter;
|
||||||
|
|
||||||
|
function clearFormattingCharacters(string) {
|
||||||
|
return string.replace(/[*_~]/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDataviewInlineYamlLines(string) {
|
||||||
|
const lines = string.split('\n');
|
||||||
|
const matches = [];
|
||||||
|
lines.forEach((line) => {
|
||||||
|
// (?!`(\$=|=).*`) to exclude inline dataview code
|
||||||
|
if (
|
||||||
|
line.match(
|
||||||
|
/^[*_~]{0,3}[a-zA-Z-_]+[*_~]{0,3}::.*$(?!`(\$=|=).*`)/g
|
||||||
|
)
|
||||||
|
&& line.match(/^[*_~]{0,3}[a-zA-Z-_]+[*_~]{0,3}:: (?!`(\$=|=).*`)/gm)
|
||||||
|
) {
|
||||||
|
matches.push(line);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeDataviewInlineYamlLines(string) {
|
||||||
|
const lines = string.split('\n');
|
||||||
|
let output = [];
|
||||||
|
lines.forEach((line) => {
|
||||||
|
// (?!`(\$=|=).*`) to exclude inline dataview code
|
||||||
|
if (
|
||||||
|
!line.match(
|
||||||
|
/^[*_~]{0,3}[a-zA-Z-_]+[*_~]{0,3}::.*$/g
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
output.push(line);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
output = output.join('\n');
|
||||||
|
output = output.replace(/%%\s%%/g, '');
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertToKebabCase(string) {
|
||||||
|
return string
|
||||||
|
.replace(/([a-z])([A-Z])/g, '$1-$2')
|
||||||
|
.replace(/[\s_]+/g, '-')
|
||||||
|
.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseAndAddProperty(obj, line) {
|
||||||
|
const arr = line.split(':: ');
|
||||||
|
obj[convertToKebabCase(clearFormattingCharacters(arr[0]))] = arr[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
function isTag(string) {
|
||||||
|
// if (string.match(/(#[^\s]+)+/g))
|
||||||
|
if (string.startsWith('#')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isLink(string) {
|
||||||
|
if (string.match(/(\[\[[^\s]+\]\])[ ]*/g)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLinkFrontmatter(key, value) {
|
||||||
|
console.log(value);
|
||||||
|
console.log(typeof value);
|
||||||
|
// This regex makes it only split when outside double brackets
|
||||||
|
return listToFrontmatter(key, value.match(/(\[\[[^\]]*\]\]|\S)+/g));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTagFrontmatter(key, value) {
|
||||||
|
console.log(value);
|
||||||
|
console.log(typeof value);
|
||||||
|
return listToFrontmatter(
|
||||||
|
key,
|
||||||
|
value.split(' ').map((tag) => tag.replace(/^#/g, ''))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function listToFrontmatter(key, _value) {
|
||||||
|
console.log('listToFrontmatter');
|
||||||
|
console.log('_value: ' + _value);
|
||||||
|
let value = _value;
|
||||||
|
if (typeof _value === 'string') {
|
||||||
|
value = _value.replace(/[ \t]+$/g, '').split(' ');
|
||||||
|
}
|
||||||
|
console.log(value);
|
||||||
|
let out = `${key}:\n`;
|
||||||
|
for (element of value) {
|
||||||
|
out += ` - "${element}"\n`;
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
function propertyToFrontmatter(key, value) {
|
||||||
|
return `${key}: ${value}\n`;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function convertNote(note) {
|
||||||
|
let contents = await vault.read(note);
|
||||||
|
const inlineLines = getDataviewInlineYamlLines(contents);
|
||||||
|
inlineLines.forEach(
|
||||||
|
(line) => (line = clearFormattingCharacters(line))
|
||||||
|
);
|
||||||
|
if (inlineLines.length > 0) {
|
||||||
|
const inlineProperties = {};
|
||||||
|
inlineLines.forEach((line) =>
|
||||||
|
parseAndAddProperty(inlineProperties, line)
|
||||||
|
);
|
||||||
|
|
||||||
|
let frontmatter = '';
|
||||||
|
for (const [key, value] of Object.entries(inlineProperties)) {
|
||||||
|
if (isLink(value)) {
|
||||||
|
console.log('isLink');
|
||||||
|
frontmatter += getLinkFrontmatter(key, value);
|
||||||
|
} else if (isTag(value)) {
|
||||||
|
console.log('isTag');
|
||||||
|
frontmatter += getTagFrontmatter(key, value);
|
||||||
|
} else {
|
||||||
|
frontmatter += propertyToFrontmatter(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contents = removeDataviewInlineYamlLines(contents);
|
||||||
|
let sections = contents.split('---\n');
|
||||||
|
if (sections.length === 1) {
|
||||||
|
contents = `---\n${frontmatter}---\n\n` + contents;
|
||||||
|
} else {
|
||||||
|
sections[1] =
|
||||||
|
sections[1].replace(/(?<=\n|^)\s/g, '') + frontmatter;
|
||||||
|
contents = sections.join('---\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
await fs.write(note.path, contents);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start
|
||||||
|
const excluded = settings['Excluded Files']?.split(':');
|
||||||
|
let files = await app.vault.getMarkdownFiles();
|
||||||
|
console.log(files);
|
||||||
|
files = files.filter((file) => {
|
||||||
|
// Check if any excluded substring is present in the file name
|
||||||
|
return !excluded.some((substring) => file.path.includes(substring));
|
||||||
|
});
|
||||||
|
const shouldContinue = await params.quickAddApi.yesNoPrompt(
|
||||||
|
'Are you sure you want to continue?',
|
||||||
|
'This will format ALL notes in your vault that are not excluded by the settings. This will effect ' +
|
||||||
|
files.length +
|
||||||
|
' files.'
|
||||||
|
);
|
||||||
|
files.forEach(async (file) => {
|
||||||
|
convertNote(file);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
177
quickadd_scripts/convert_inline_to_yaml.js
Normal file
177
quickadd_scripts/convert_inline_to_yaml.js
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
module.exports = {
|
||||||
|
settings: {
|
||||||
|
name: 'Convert Dataview Inline YAML to YAML',
|
||||||
|
author: 'AmericanBagel',
|
||||||
|
options: {
|
||||||
|
'Excluded Files': {
|
||||||
|
type: 'text',
|
||||||
|
defaultValue: '.git',
|
||||||
|
placeholder: 'A ":" seperated list of strings or regex',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
entry: async (params, settings) => {
|
||||||
|
const {
|
||||||
|
quickAddApi: { inputPrompt, suggester },
|
||||||
|
} = params;
|
||||||
|
const metaedit = app.plugins.plugins['metaedit'].api;
|
||||||
|
const vault = app.vault;
|
||||||
|
const fs = app.vault.adapter;
|
||||||
|
|
||||||
|
function clearFormattingCharacters(string) {
|
||||||
|
return string.replace(/[*_~]/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDataviewInlineYamlLines(string) {
|
||||||
|
const lines = string.split('\n');
|
||||||
|
const matches = [];
|
||||||
|
lines.forEach((line) => {
|
||||||
|
// (?!`(\$=|=).*`) to exclude inline dataview code
|
||||||
|
if (
|
||||||
|
line.match(
|
||||||
|
/^[*_~]{0,3}[a-zA-Z-_]+[*_~]{0,3}::.*$(?!`(\$=|=).*`)/g
|
||||||
|
)
|
||||||
|
&& line.match(/^[*_~]{0,3}[a-zA-Z-_]+[*_~]{0,3}:: (?!`(\$=|=).*`)/gm)
|
||||||
|
) {
|
||||||
|
matches.push(line);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeDataviewInlineYamlLines(string) {
|
||||||
|
const lines = string.split('\n');
|
||||||
|
let output = [];
|
||||||
|
lines.forEach((line) => {
|
||||||
|
// (?!`(\$=|=).*`) to exclude inline dataview code
|
||||||
|
if (
|
||||||
|
!line.match(
|
||||||
|
/^[*_~]{0,3}[a-zA-Z-_]+[*_~]{0,3}::.*$/g
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
output.push(line);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
output = output.join('\n');
|
||||||
|
output = output.replace(/%%\s%%/g, '');
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertToKebabCase(string) {
|
||||||
|
return string
|
||||||
|
.replace(/([a-z])([A-Z])/g, '$1-$2')
|
||||||
|
.replace(/[\s_]+/g, '-')
|
||||||
|
.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseAndAddProperty(obj, line) {
|
||||||
|
const arr = line.split(':: ');
|
||||||
|
obj[convertToKebabCase(clearFormattingCharacters(arr[0]))] = arr[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
function isTag(string) {
|
||||||
|
// if (string.match(/(#[^\s]+)+/g))
|
||||||
|
if (string.startsWith('#')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isLink(string) {
|
||||||
|
if (string.match(/(\[\[[^\s]+\]\])[ ]*/g)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLinkFrontmatter(key, value) {
|
||||||
|
console.log(value);
|
||||||
|
console.log(typeof value);
|
||||||
|
// This regex makes it only split when outside double brackets
|
||||||
|
return listToFrontmatter(key, value.match(/(\[\[[^\]]*\]\]|\S)+/g));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTagFrontmatter(key, value) {
|
||||||
|
console.log(value);
|
||||||
|
console.log(typeof value);
|
||||||
|
return listToFrontmatter(
|
||||||
|
key,
|
||||||
|
value.split(' ').map((tag) => tag.replace(/^#/g, ''))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function listToFrontmatter(key, _value) {
|
||||||
|
console.log('listToFrontmatter');
|
||||||
|
console.log('_value: ' + _value);
|
||||||
|
let value = _value;
|
||||||
|
if (typeof _value === 'string') {
|
||||||
|
value = _value.replace(/[ \t]+$/g, '').split(' ');
|
||||||
|
}
|
||||||
|
console.log(value);
|
||||||
|
let out = `${key}:\n`;
|
||||||
|
for (element of value) {
|
||||||
|
out += ` - "${element}"\n`;
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
function propertyToFrontmatter(key, value) {
|
||||||
|
return `${key}: ${value}\n`;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function convertNote(note) {
|
||||||
|
let contents = await vault.read(note);
|
||||||
|
const inlineLines = getDataviewInlineYamlLines(contents);
|
||||||
|
inlineLines.forEach(
|
||||||
|
(line) => (line = clearFormattingCharacters(line))
|
||||||
|
);
|
||||||
|
if (inlineLines.length > 0) {
|
||||||
|
const inlineProperties = {};
|
||||||
|
inlineLines.forEach((line) =>
|
||||||
|
parseAndAddProperty(inlineProperties, line)
|
||||||
|
);
|
||||||
|
|
||||||
|
let frontmatter = '';
|
||||||
|
for (const [key, value] of Object.entries(inlineProperties)) {
|
||||||
|
if (isLink(value)) {
|
||||||
|
console.log('isLink');
|
||||||
|
frontmatter += getLinkFrontmatter(key, value);
|
||||||
|
} else if (isTag(value)) {
|
||||||
|
console.log('isTag');
|
||||||
|
frontmatter += getTagFrontmatter(key, value);
|
||||||
|
} else {
|
||||||
|
frontmatter += propertyToFrontmatter(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contents = removeDataviewInlineYamlLines(contents);
|
||||||
|
let sections = contents.split('---\n');
|
||||||
|
if (sections.length === 1) {
|
||||||
|
contents = `---\n${frontmatter}---\n\n` + contents;
|
||||||
|
} else {
|
||||||
|
sections[1] =
|
||||||
|
sections[1].replace(/(?<=\n|^)\s/g, '') + frontmatter;
|
||||||
|
contents = sections.join('---\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
await fs.write(note.path, contents);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start
|
||||||
|
const excluded = settings['Excluded Files']?.split(':');
|
||||||
|
let files = await app.vault.getMarkdownFiles();
|
||||||
|
console.log(files);
|
||||||
|
files = files.filter((file) => {
|
||||||
|
// Check if any excluded substring is present in the file name
|
||||||
|
return !excluded.some((substring) => file.path.includes(substring));
|
||||||
|
});
|
||||||
|
const shouldContinue = await params.quickAddApi.yesNoPrompt(
|
||||||
|
'Are you sure you want to continue?',
|
||||||
|
'This will format ALL notes in your vault that are not excluded by the settings. This will effect ' +
|
||||||
|
files.length +
|
||||||
|
' files.'
|
||||||
|
);
|
||||||
|
files.forEach(async (file) => {
|
||||||
|
convertNote(file);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
@ -1,13 +1,12 @@
|
|||||||
up::[[application linéaire]]
|
---
|
||||||
title::"$\mathrm{rang} f = \dim \mathrm{Im} f$"
|
up: "[[application linéaire]]"
|
||||||
#s/maths/algèbre
|
tags: "#s/maths/algèbre"
|
||||||
|
---
|
||||||
----
|
|
||||||
Soient $E$ et $F$ deux [[espace vectoriel|espaces vectoriels]]
|
|
||||||
Soit $f: E\rightarrow F$ une [[application linéaire]]
|
|
||||||
Le _rang_ de $f$ est $\mathrm{rang} f = \dim \mathrm{Im} f$
|
|
||||||
|
|
||||||
|
|
||||||
|
> [!proposition]+ [[rang d'une application linéaire]]
|
||||||
|
> Soient $E$ et $F$ deux [[espace vectoriel|espaces vectoriels]]
|
||||||
|
> Soit $f: E\rightarrow F$ une [[application linéaire]]
|
||||||
|
> Le _rang_ de $f$ est $\operatorname{rang} f = \dim \mathrm{Im} f$
|
||||||
|
|
||||||
|
|
||||||
Voir :
|
Voir :
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
---
|
---
|
||||||
aliases:
|
aliases:
|
||||||
- Inculture 3
|
- Inculture 3
|
||||||
|
up: "[[conférence gesticulée]]"
|
||||||
|
next: "[[conférence gesticulée.Inculture 4 - le plein d'énergie|Inculture 4 - le plein d'énergie]]"
|
||||||
|
prev: "[[conférence gesticulée.Inculture 2|Inculture 2]]"
|
||||||
|
tags: "#s/politique"
|
||||||
---
|
---
|
||||||
up:: [[conférence gesticulée]]
|
|
||||||
next:: [[conférence gesticulée.Inculture 4 - le plein d'énergie|Inculture 4 - le plein d'énergie]]
|
|
||||||
prev:: [[conférence gesticulée.Inculture 2|Inculture 2]]
|
|
||||||
#s/politique
|
|
||||||
|
|
||||||
> [!smallquery]+ Sous-notes de `$= dv.el("span", "[[" + dv.current().file.name + "]]")`
|
|
||||||
> ```breadcrumbs
|
|
||||||
> title: false
|
|
||||||
> type: tree
|
|
||||||
> dir: down
|
|
||||||
> ```
|
|
||||||
|
|
||||||
|
```breadcrumbs
|
||||||
|
title: "Sous-notes"
|
||||||
|
type: tree
|
||||||
|
collapse: false
|
||||||
|
show-attributes: [field]
|
||||||
|
field-groups: [downs]
|
||||||
|
depth: [0, 0]
|
||||||
|
```
|
||||||
|
@ -11,10 +11,12 @@ up:: [[conférence gesticulée]]
|
|||||||
- [[il faut déranger l'ennemi en restant à l'aise]]
|
- [[il faut déranger l'ennemi en restant à l'aise]]
|
||||||
|
|
||||||
|
|
||||||
> [!smallquery]+ Sous-notes de `$= dv.el("span", "[[" + dv.current().file.name + "]]")`
|
```breadcrumbs
|
||||||
> ```breadcrumbs
|
title: "Sous-notes"
|
||||||
> title: false
|
type: tree
|
||||||
> type: tree
|
collapse: false
|
||||||
> dir: down
|
show-attributes: [field]
|
||||||
> ```
|
field-groups: [downs]
|
||||||
|
depth: [0, 0]
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
---
|
---
|
||||||
sr-due: 2024-01-11
|
|
||||||
sr-interval: 365
|
|
||||||
sr-ease: 339
|
|
||||||
aliases:
|
aliases:
|
||||||
- surjective
|
- surjective
|
||||||
- surjectives
|
- surjectives
|
||||||
- surjectif
|
- surjectif
|
||||||
excalidraw-plugin: parsed
|
excalidraw-plugin: parsed
|
||||||
|
excalidraw-open-md: true
|
||||||
|
up:
|
||||||
|
- "[[application]]"
|
||||||
|
sibling:
|
||||||
|
- "[[injection]]"
|
||||||
tags:
|
tags:
|
||||||
- excalidraw
|
- excalidraw
|
||||||
excalidraw-open-md: true
|
- s/maths/analyse
|
||||||
---
|
---
|
||||||
up::[[application]]
|
|
||||||
sibling::[[injection]]
|
|
||||||
#s/maths/analyse
|
|
||||||
|
|
||||||
> [!definition] Définition
|
> [!definition] Définition
|
||||||
> Soit $f: E\mapsto F$ une [[application]].
|
> Soit $f: E\mapsto F$ une [[application]].
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
up::[[espace vectoriel]]
|
---
|
||||||
title::"$\dim(\mathrm{Ker}(f)) + \dim(\mathrm{Im}(f)) = \dim(E)$"
|
up: "[[espace vectoriel]]"
|
||||||
#s/maths/algèbre
|
tags: "#s/maths/algèbre"
|
||||||
|
---
|
||||||
----
|
|
||||||
Soient $E$ et $F$ deux [[espace vectoriel|espaces vectoriels]] de [[dimension d'un espace vectoriel|dimension]] finie,
|
|
||||||
Soit $f: E\rightarrow F$ une [[application linéaire]],
|
|
||||||
On a :
|
|
||||||
$\dim \ker f + \dim \im f = \dim E$
|
|
||||||
|
|
||||||
|
> [!proposition]+ [[théorème du rang]]
|
||||||
|
> Soient $E$ et $F$ deux [[espace vectoriel|espaces vectoriels]] de [[dimension d'un espace vectoriel|dimension]] finie,
|
||||||
|
> Soit $f: E\rightarrow F$ une [[application linéaire]],
|
||||||
|
> On a :
|
||||||
|
> $\dim(\ker (f)) + \dim (\operatorname{im} (f)) = \dim E$
|
||||||
|
|
||||||
Voir:
|
Voir:
|
||||||
- [[rang d'une application linéaire]]
|
- [[rang d'une application linéaire]]
|
||||||
- [[Noyau d'une application linéaire]]
|
- [[Noyau d'une application linéaire]]
|
||||||
- [[dimension d'un espace vectoriel]]
|
- [[dimension d'un espace vectoriel]]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user