1 Commits

Author SHA1 Message Date
Jules Neny
990106aab3 snapshot(windows): carte-o.json en cours de modification au 07/08/2026
Sauvegarde du travail non commite du PC Windows avant bascule sur le
portable Linux (campagne build aout 2026). Branche snapshot : main est
inchangee, aucun historique reecrit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BERCnDiqhT6SJUe9wGZmXQ
2026-08-07 23:07:19 +02:00
5 changed files with 38 additions and 389 deletions

View File

@@ -1,24 +1,17 @@
# Kit (ex-ConvertKit) - newsletter infolettre
KIT_API_SECRET_V4=kit_xxx
# Behold.so : DEPRECATED V1.5-E — remplace par RSSHub self-host (rss.trans-former.fr).
# InstaFeed.vue consomme desormais PUBLIC_JOURNAL_URL (filtre platform=instagram).
# Les 2 vars ci-dessous ne sont plus lues ; conservees pour compat.env.local existant.
# Behold.so feed IDs (voir docs/BEHOLD-SETUP.md)
# 1) Inscris-toi sur https://behold.so/dashboard
# 2) Connecte les 2 comptes Insta (@aep.politique + @julesneny)
# 3) Recupere les feed IDs et copie ce fichier vers .env.local puis remplis ci-dessous
PUBLIC_BEHOLD_AEP=
PUBLIC_BEHOLD_JULESNENY=
# Journal unifie (V1.6) - URL JSON agrege par n8n cron 4h UTC
# Sources : RSSHub self-host (Insta @aep.politique + @julesneny) + Substack natif
# + Atom Gitea natif (git.trans-former.fr/jules.atom) + LinkedIn API V2
# Journal unifie (PC6) - URL JSON agrege par n8n cron nocturne
# Override en local : pointer vers un mock /public/data/journal.json par exemple
PUBLIC_JOURNAL_URL=https://data.trans-former.fr/journal.json
# LinkedIn (V1.6) - Member ID du profil Jules (format numerique, sans urn: prefix)
# Recuperer via curl -H "Authorization: Bearer TOKEN" https://api.linkedin.com/v2/me | jq .id
# Stocke comme variable d'env n8n (Settings -> Variables) sous le nom LINKEDIN_MEMBER_ID
# Le workflow l'utilise comme : urn:li:person:${LINKEDIN_MEMBER_ID}
LINKEDIN_MEMBER_ID=
# Chatbot upstream (PC7) - URL backend chatbot AEP
# V1 : chatbot AEP classique (Mistral Small + 120 fiches)
# V1.5 : switch vers LightRAG-PE (1 ligne)

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"version": "1.1",
"generatedAt": "2026-05-12T22:53:33.094Z",
"generatedAt": "2026-07-22T19:04:46.501Z",
"nodes": [
{
"id": "contrat-social-medecine-corps-social",

View File

@@ -1,21 +1,23 @@
---
import InstaFeed from '../vue/InstaFeed.vue';
// V1.5-E : Behold remplacé par RSSHub self-host. InstaFeed lit désormais
// le journal unifié (PUBLIC_JOURNAL_URL → data.trans-former.fr/journal.json)
// agrégé par n8n depuis rss.trans-former.fr. Plus de feedId Behold à passer.
// Feed IDs Behold a remplir apres inscription Behold (voir docs/BEHOLD-SETUP.md)
const FEED_AEP = import.meta.env.PUBLIC_BEHOLD_AEP || 'PLACEHOLDER_AEP';
const FEED_JULESNENY = import.meta.env.PUBLIC_BEHOLD_JULESNENY || 'PLACEHOLDER_JULESNENY';
---
<div class="h-full overflow-y-auto">
<InstaFeed
client:visible
account="aep.politique"
feedId={FEED_AEP}
account="@aep.politique"
accountUrl="https://www.instagram.com/aep.politique/"
fallbackBio="Carrousels manifeste AEP ; pensee politique eco-architecture"
/>
<InstaFeed
client:visible
account="julesneny"
feedId={FEED_JULESNENY}
account="@julesneny"
accountUrl="https://www.instagram.com/julesneny/"
fallbackBio="Peinture, poesie, Corse ; archives visuelles personnelles"
/>

View File

@@ -1,80 +1,46 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue';
// V1.5-E : on consomme désormais le journal unifié agrégé par n8n
// (sources RSSHub self-host → data.trans-former.fr/journal.json),
// au lieu de l'API Behold directe (rate-limit, plafond 6 posts gratuit).
interface JournalItem {
id: string;
platform: string;
date: string;
titre: string;
extrait?: string;
url: string;
thumbnail: string | null;
}
interface JournalPayload {
generatedAt: string;
items: JournalItem[];
}
interface InstaPost {
interface BeholdPost {
id: string;
permalink: string;
thumbnailUrl: string | null;
caption: string;
mediaUrl: string;
thumbnailUrl?: string;
caption?: string;
mediaType: 'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM';
timestamp: string;
}
const props = defineProps<{
/** handle Instagram sans @ (ex: 'aep.politique', 'julesneny') — sert à filtrer le journal */
feedId: string;
account: string;
accountUrl: string;
fallbackBio?: string;
/** nombre max de posts affichés (défaut 6, parité avec ancien Behold) */
max?: number;
}>();
const posts = ref<InstaPost[]>([]);
const posts = ref<BeholdPost[]>([]);
const loading = ref(true);
const error = ref<string | null>(null);
const JOURNAL_URL =
(import.meta as unknown as { env: Record<string, string | undefined> }).env
.PUBLIC_JOURNAL_URL || 'https://data.trans-former.fr/journal.json';
const accountHandle = (props.account || '').replace(/^@/, '').toLowerCase();
const limit = props.max ?? 6;
const isPlaceholder = (id: string) => !id || id.startsWith('PLACEHOLDER_');
onMounted(async () => {
if (isPlaceholder(props.feedId)) {
loading.value = false;
error.value = 'no-feed-id';
return;
}
try {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 8000);
const res = await fetch(JOURNAL_URL, {
const timeoutId = setTimeout(() => controller.abort(), 5000);
const res = await fetch(`https://feeds.behold.so/${props.feedId}`, {
signal: controller.signal,
cache: 'no-store',
});
clearTimeout(timeoutId);
if (!res.ok) throw new Error(`Journal returned ${res.status}`);
const data = (await res.json()) as JournalPayload;
const all = Array.isArray(data?.items) ? data.items : [];
posts.value = all
.filter(
(it) =>
it.platform === 'instagram' &&
typeof it.url === 'string' &&
it.url.toLowerCase().includes(`/${accountHandle}`),
)
.slice(0, limit)
.map((it) => ({
id: it.id,
permalink: it.url,
thumbnailUrl: it.thumbnail ?? null,
caption: it.titre || it.extrait || '',
timestamp: it.date,
}));
if (!posts.value.length) error.value = 'no-posts';
if (!res.ok) throw new Error(`Behold returned ${res.status}`);
const data = await res.json();
const items: BeholdPost[] = Array.isArray(data) ? data : (data.posts ?? []);
posts.value = items.slice(0, 6);
} catch (e) {
error.value = (e as Error).message || 'fetch-error';
} finally {
@@ -105,28 +71,24 @@ onMounted(async () => {
/>
</div>
<div v-else-if="posts.length" class="grid grid-cols-2 gap-1 p-1">
<div
v-else-if="posts.length"
class="grid grid-cols-2 gap-1 p-1"
>
<a
v-for="post in posts"
:key="post.id"
:href="post.permalink"
target="_blank"
rel="noopener"
class="block aspect-square overflow-hidden group bg-neutral-100"
class="block aspect-square overflow-hidden group"
>
<img
v-if="post.thumbnailUrl"
:src="post.thumbnailUrl"
:src="post.thumbnailUrl || post.mediaUrl"
:alt="post.caption?.slice(0, 80) || account"
loading="lazy"
class="w-full h-full object-cover group-hover:scale-105 transition-transform"
/>
<span
v-else
class="w-full h-full flex items-center justify-center text-[10px] text-neutral-400 p-2 text-center"
>
{{ post.caption?.slice(0, 60) || account }}
</span>
</a>
</div>