« Module:Operations » : différence entre les versions
Aller à la navigation
Aller à la recherche
Page créée avec « local p = {} -- Une entrée par opération. Pour en ajouter une, copie un bloc. local operations = { { nom = "Les punaises de lit", lancement = "01/10/2023", moa = "Doppelgänger", attribution = "Russie", cible = "France", sources = { { "https://www.sgdsn.gouv.fr/publications/maj-19062023-rrn-une-campagne-numerique-de-manipulation-de-linformation-complexe-et", "Etat français" }, { "https://www.tf1info.fr/politique/video-france-la-psychose-aut... » |
Aucun résumé des modifications |
||
| Ligne 62 : | Ligne 62 : | ||
end | end | ||
return table.concat(out, " ") | return table.concat(out, " ") | ||
end | |||
local function match(value, filter) | |||
if not filter or filter == "" then return true end | |||
value = mw.ustring.lower(value or "") | |||
filter = mw.ustring.lower(filter) | |||
return mw.ustring.find(value, filter, 1, true) ~= nil | |||
end | end | ||
function p.table(frame) | function p.table(frame) | ||
local args = frame.args | |||
local cols = { "Nom / Action", "Lancement", "MOA", "Attribution", "Cible", "Sources" } | local cols = { "Nom / Action", "Lancement", "MOA", "Attribution", "Cible", "Sources" } | ||
local t = mw.html.create("table") | local t = mw.html.create("table") | ||
:addClass("wikitable sortable centre") | :addClass("wikitable sortable filtrable centre") | ||
:css("width", "80%") | :css("width", "80%") | ||
local hr = t:tag("tr") | local hr = t:tag("thead"):tag("tr") | ||
for _, c in ipairs(cols) do | for _, c in ipairs(cols) do | ||
hr:tag("th"):attr("scope", "col"):wikitext(c) | hr:tag("th"):attr("scope", "col"):wikitext(c) | ||
end | end | ||
local body = t:tag("tbody") | |||
for _, op in ipairs(operations) do | for _, op in ipairs(operations) do | ||
local r = | if match(op.nom, args.nom) | ||
and match(op.lancement, args.lancement) | |||
and match(op.moa, args.moa) | |||
and match(op.attribution, args.attribution) | |||
and match(op.cible, args.cible) then | |||
local r = body:tag("tr") | |||
r:tag("td"):wikitext("[[" .. op.nom .. "]]") | |||
r:tag("td"):wikitext(op.lancement or "") | |||
r:tag("td"):wikitext(op.moa or "") | |||
r:tag("td"):wikitext(op.attribution or "") | |||
r:tag("td"):wikitext(op.cible or "") | |||
r:tag("td"):wikitext(sources(op.sources)) | |||
end | |||
end | end | ||
return tostring(t) | return tostring(t) | ||
Version du 2 juillet 2026 à 18:39
La documentation pour ce module peut être créée à Module:Operations/doc
local p = {}
-- Une entrée par opération. Pour en ajouter une, copie un bloc.
local operations = {
{
nom = "Les punaises de lit",
lancement = "01/10/2023",
moa = "Doppelgänger",
attribution = "Russie",
cible = "France",
sources = {
{ "https://www.sgdsn.gouv.fr/publications/maj-19062023-rrn-une-campagne-numerique-de-manipulation-de-linformation-complexe-et", "Etat français" },
{ "https://www.tf1info.fr/politique/video-france-la-psychose-autour-des-punaises-de-lit-amplifiee-par-le-kremlin-selon-le-ministre-delegue-charge-de-l-europe-jean-noel-barrot-2287888.html", "Interview TF1" },
},
},
{
nom = "Charnier de Gossi",
lancement = "20/04/2022",
moa = "Wagner Group",
attribution = "Russie",
cible = "France",
sources = {
{ "https://www.slate.fr/story/229508/afrique-russie-intox-manipulations-groupe-wagner-guerre-information-mali-centrafrique-influence", "Slate.fr" },
},
},
{
nom = "Elections roumaines 2024",
lancement = "11/11/2024",
moa = "Inconnu",
attribution = "Russie",
cible = "France",
sources = {
{ "https://www.sgdsn.gouv.fr/files/files/Publications/20250204_NP_SGDSN_VIGINUM_Rapport_public_Elections_roumanie_risques_france_VFF.pdf", "VIGINUM" },
},
},
{
nom = "Matriochka",
lancement = "septembre 2023",
moa = "Matriochka",
attribution = "Russie",
cible = "Fact-checkeurs occidentaux",
sources = {
{ "https://www.sgdsn.gouv.fr/files/files/20240610_NP_SGDSN_VIGINUM_Matriochka_VD.pdf", "VIGINUM" },
},
},
{
nom = "PaperWall",
lancement = "2023 ?",
moa = "",
attribution = "Chine",
cible = "Belgique - Luxembourg",
sources = {
{ "https://www.disinfo.eu/paperwall-chinese-information-operation-targets-belgium-and-luxembourg/", "EU disinfo lab" },
},
},
}
local function sources(list)
local out = {}
for _, s in ipairs(list or {}) do
out[#out + 1] = "[" .. s[1] .. " " .. s[2] .. "]"
end
return table.concat(out, " ")
end
local function match(value, filter)
if not filter or filter == "" then return true end
value = mw.ustring.lower(value or "")
filter = mw.ustring.lower(filter)
return mw.ustring.find(value, filter, 1, true) ~= nil
end
function p.table(frame)
local args = frame.args
local cols = { "Nom / Action", "Lancement", "MOA", "Attribution", "Cible", "Sources" }
local t = mw.html.create("table")
:addClass("wikitable sortable filtrable centre")
:css("width", "80%")
local hr = t:tag("thead"):tag("tr")
for _, c in ipairs(cols) do
hr:tag("th"):attr("scope", "col"):wikitext(c)
end
local body = t:tag("tbody")
for _, op in ipairs(operations) do
if match(op.nom, args.nom)
and match(op.lancement, args.lancement)
and match(op.moa, args.moa)
and match(op.attribution, args.attribution)
and match(op.cible, args.cible) then
local r = body:tag("tr")
r:tag("td"):wikitext("[[" .. op.nom .. "]]")
r:tag("td"):wikitext(op.lancement or "")
r:tag("td"):wikitext(op.moa or "")
r:tag("td"):wikitext(op.attribution or "")
r:tag("td"):wikitext(op.cible or "")
r:tag("td"):wikitext(sources(op.sources))
end
end
return tostring(t)
end
return p