4 Commits

Author SHA1 Message Date
Jules Neny
090fb581ee feat(v1.6): ajout LinkedIn API V2 comme 3e source journal
- Node Fetch-linkedin (LinkedIn REST API v2/posts, OAuth2 predefined credential)
- Parser parseLinkedIn() dans Normalise : extrait commentary + UGC text, URL post, thumbnail
- Fonction safeJson() parallèle à safeText() pour payloads JSON (vs XML)
- Variable LINKEDIN_MEMBER_ID (env n8n) dans l'URL du endpoint
- .env.example documenté avec LINKEDIN_MEMBER_ID + comment récupération
- counts.linkedin ajouté dans le payload journal.json

Prerequis L.1 bloquants (humain Jules) :
- Redirect URL n8n dans LinkedIn Developer Portal
- Credential LinkedIn OAuth2 créé dans n8n UI
- Member ID Jules récupéré via /v2/me et stocké dans env n8n

Branche depuis feat/v1.5-E-rsshub (V1.5 pas encore mergé sur main).
Pas de modif Astro/Vue — JournalFeed (JournalList.vue) déjà platform-agnostic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 08:37:47 +02:00
Jules Neny
458a152525 V1.5-E RSSHub journal feed (E.1-E.8)
Bascule Behold -> RSSHub self-host (rss.trans-former.fr) :

- InstaFeed.vue : consomme PUBLIC_JOURNAL_URL (journal unifie n8n)
  au lieu de feeds.behold.so direct. Filtre platform=instagram +
  account dans l'url. Plus de feedId Behold a passer.
- ColInsta.astro : supprime props feedId, passe seulement account
  handle (aep.politique, julesneny) pour filtrage cote client.
- .env.example : PUBLIC_BEHOLD_* deprecies (conservees pour compat),
  PUBLIC_JOURNAL_URL note V1.5-E source RSSHub.
- docs/n8n-workflow-journal-aggregate-v2-rsshub.json : workflow V2
  a importer dans n8n. Remplace 3 nodes Behold par : Substack natif
  (julesneny.substack.com/feed) + RSSHub Insta x2 (rss.trans-former.fr/
  instagram/user/*). Cron 3h -> 4h UTC (anti-rate-limit). Parser RSS
  ajoute (CDATA, dedup par GUID).
- carte-o.json : regen prebuild auto.

Ops VPS realisees hors repo (E.1-E.3, E.8 conf) :
- docker pull diygod/rsshub:latest (image officielle, pas rsshub/rsshub)
- /opt/rsshub/docker-compose.yml : RSSHub + Redis cache, port 3006 local
- Caddy : bloc rss.trans-former.fr -> reverse_proxy 127.0.0.1:3006

CHECKPOINT E.4 BLOQUANT : DNS OVH 'rss' IN A 178.104.106.195 a pousser
manuellement par Jules. Sans DNS, rss.trans-former.fr inaccessible.

LIMITE FONCTIONNELLE detectee : RSSHub /instagram/* requiert config
Instagram cookie (ConfigNotFoundError 503). Tant que les env vars
INSTAGRAM_USERNAME/PASSWORD ou cookie ne sont pas fournis a RSSHub,
les routes Insta retourneront vide. Le journal aura 0 item insta et
ColInsta affichera fallbackBio. Substack et Gitea sources OK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 00:56:36 +02:00
Jules Neny
36feace21f fix(deploy): node 20-alpine -> 22-alpine (astro 6 requires node 22) 2026-05-12 12:03:08 +02:00
Jules Neny
0e65156fa0 feat(v1): page-cerveau LIVE - PC0-PC8 + V1.1-V1.4-bis 2026-05-12 11:31:23 +02:00
6 changed files with 391 additions and 40 deletions

View File

@@ -1,17 +1,24 @@
# Kit (ex-ConvertKit) - newsletter infolettre # Kit (ex-ConvertKit) - newsletter infolettre
KIT_API_SECRET_V4=kit_xxx KIT_API_SECRET_V4=kit_xxx
# Behold.so feed IDs (voir docs/BEHOLD-SETUP.md) # Behold.so : DEPRECATED V1.5-E — remplace par RSSHub self-host (rss.trans-former.fr).
# 1) Inscris-toi sur https://behold.so/dashboard # InstaFeed.vue consomme desormais PUBLIC_JOURNAL_URL (filtre platform=instagram).
# 2) Connecte les 2 comptes Insta (@aep.politique + @julesneny) # Les 2 vars ci-dessous ne sont plus lues ; conservees pour compat.env.local existant.
# 3) Recupere les feed IDs et copie ce fichier vers .env.local puis remplis ci-dessous
PUBLIC_BEHOLD_AEP= PUBLIC_BEHOLD_AEP=
PUBLIC_BEHOLD_JULESNENY= PUBLIC_BEHOLD_JULESNENY=
# Journal unifie (PC6) - URL JSON agrege par n8n cron nocturne # 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
# Override en local : pointer vers un mock /public/data/journal.json par exemple # Override en local : pointer vers un mock /public/data/journal.json par exemple
PUBLIC_JOURNAL_URL=https://data.trans-former.fr/journal.json 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 # Chatbot upstream (PC7) - URL backend chatbot AEP
# V1 : chatbot AEP classique (Mistral Small + 120 fiches) # V1 : chatbot AEP classique (Mistral Small + 120 fiches)
# V1.5 : switch vers LightRAG-PE (1 ligne) # V1.5 : switch vers LightRAG-PE (1 ligne)

View File

@@ -1,11 +1,11 @@
FROM node:20-alpine AS builder FROM node:22-alpine AS builder
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
COPY . . COPY . .
RUN npm run build RUN npm run build
FROM node:20-alpine FROM node:22-alpine
WORKDIR /app WORKDIR /app
COPY --from=builder /app/dist ./dist COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/node_modules ./node_modules

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"version": "1.1", "version": "1.1",
"generatedAt": "2026-05-12T09:28:20.972Z", "generatedAt": "2026-05-12T22:53:33.094Z",
"nodes": [ "nodes": [
{ {
"id": "contrat-social-medecine-corps-social", "id": "contrat-social-medecine-corps-social",

View File

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

View File

@@ -1,46 +1,80 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
interface BeholdPost { // 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 {
id: string; id: string;
permalink: string; permalink: string;
mediaUrl: string; thumbnailUrl: string | null;
thumbnailUrl?: string; caption: string;
caption?: string;
mediaType: 'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM';
timestamp: string; timestamp: string;
} }
const props = defineProps<{ const props = defineProps<{
feedId: string; /** handle Instagram sans @ (ex: 'aep.politique', 'julesneny') — sert à filtrer le journal */
account: string; account: string;
accountUrl: string; accountUrl: string;
fallbackBio?: string; fallbackBio?: string;
/** nombre max de posts affichés (défaut 6, parité avec ancien Behold) */
max?: number;
}>(); }>();
const posts = ref<BeholdPost[]>([]); const posts = ref<InstaPost[]>([]);
const loading = ref(true); const loading = ref(true);
const error = ref<string | null>(null); const error = ref<string | null>(null);
const isPlaceholder = (id: string) => !id || id.startsWith('PLACEHOLDER_'); 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;
onMounted(async () => { onMounted(async () => {
if (isPlaceholder(props.feedId)) {
loading.value = false;
error.value = 'no-feed-id';
return;
}
try { try {
const controller = new AbortController(); const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 5000); const timeoutId = setTimeout(() => controller.abort(), 8000);
const res = await fetch(`https://feeds.behold.so/${props.feedId}`, { const res = await fetch(JOURNAL_URL, {
signal: controller.signal, signal: controller.signal,
cache: 'no-store',
}); });
clearTimeout(timeoutId); clearTimeout(timeoutId);
if (!res.ok) throw new Error(`Behold returned ${res.status}`); if (!res.ok) throw new Error(`Journal returned ${res.status}`);
const data = await res.json(); const data = (await res.json()) as JournalPayload;
const items: BeholdPost[] = Array.isArray(data) ? data : (data.posts ?? []); const all = Array.isArray(data?.items) ? data.items : [];
posts.value = items.slice(0, 6); 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';
} catch (e) { } catch (e) {
error.value = (e as Error).message || 'fetch-error'; error.value = (e as Error).message || 'fetch-error';
} finally { } finally {
@@ -71,24 +105,28 @@ onMounted(async () => {
/> />
</div> </div>
<div <div v-else-if="posts.length" class="grid grid-cols-2 gap-1 p-1">
v-else-if="posts.length"
class="grid grid-cols-2 gap-1 p-1"
>
<a <a
v-for="post in posts" v-for="post in posts"
:key="post.id" :key="post.id"
:href="post.permalink" :href="post.permalink"
target="_blank" target="_blank"
rel="noopener" rel="noopener"
class="block aspect-square overflow-hidden group" class="block aspect-square overflow-hidden group bg-neutral-100"
> >
<img <img
:src="post.thumbnailUrl || post.mediaUrl" v-if="post.thumbnailUrl"
:src="post.thumbnailUrl"
:alt="post.caption?.slice(0, 80) || account" :alt="post.caption?.slice(0, 80) || account"
loading="lazy" loading="lazy"
class="w-full h-full object-cover group-hover:scale-105 transition-transform" 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> </a>
</div> </div>