feat: AI Press Secretary - content generation and publishing platform

Features:
- AI-powered post generation from brand profiles
- Image generation with templates
- Content planning
- Telegram publishing
- Social profile analyzer
- Community organization support
- Markdown to HTML conversion for Telegram
- Inline AI chat for post editing

Deploy:
- Add deployment scripts for Linux servers
- Add PowerShell deploy script for Windows
- Add Nginx and SSL setup scripts
- Add backup and restore scripts
This commit is contained in:
apuc committed 2026-08-27 15:24:15 +03:00
1 parent 81625b2e6f
commit c6048aeea0
37 files changed
+7037 -225

No files matched your search

+201
View File
@@ -0,0 +1,201 @@
{% extends "base.html" %}
{% block title %}{{ survey.title }} — Личный кабинет{% endblock %}
{% block content %}
<h1>{{ survey.title }}</h1>
<div class="post-actions">
<a href="/surveys/{{ survey.id }}/export" class="copy-btn">📄 Скачать .docx</a>
<a href="/survey" class="copy-btn">➕ Новый опрос</a>
<a href="/surveys" class="copy-btn">← К списку</a>
<form action="/surveys/{{ survey.id }}/delete" method="post" class="inline-form" onsubmit="return confirm('Удалить медиа-образ?')">
<button type="submit" class="button-link button-link-danger">🗑 Удалить</button>
</form>
</div>
<div class="card">
<p><strong>Дата создания:</strong> {{ survey.created_at }}</p>
</div>
{% set d = survey.data %}
<!-- 1. Резюме и цели -->
<div class="card">
<h2>1. Резюме и цели</h2>
<p><strong>Клиент:</strong> {{ d.client_name }} ({{ d.client_role }}), {{ d.client_location }}</p>
<p><strong>Текущая ситуация:</strong> {{ d.current_situation }}</p>
<h3>Цели на 12 месяцев:</h3>
<ul>
<li><strong>Аудитория:</strong> {{ d.goal_audience_number }} подписчиков в {{ d.goal_audience_platform }} ({{ d.goal_audience_description }})</li>
<li><strong>Экспертный статус:</strong> {{ d.goal_expert_field }}, {{ d.goal_expert_speaking }} выступлений/год</li>
<li><strong>Коммерциализация:</strong> {{ d.goal_commercial_leads }} заявок/мес ({{ d.goal_commercial_services }})</li>
<li><strong>Контент:</strong> {{ d.goal_content_system }}</li>
</ul>
</div>
<!-- 2. Позиционирование -->
<div class="card">
<h2>2. Позиционирование и УТП</h2>
<p><strong>Сущность бренда:</strong> {{ d.brand_essence }}</p>
<p><strong>Кому помогаю:</strong> {{ d.positioning_who }}</p>
<p><strong>Проблема:</strong> {{ d.positioning_problem }}</p>
<p><strong>Результат:</strong> {{ d.positioning_result }}</p>
<p><strong>УТП:</strong> {{ d.usp }}</p>
</div>
<!-- 3. Аудитории и каналы -->
<div class="card">
<h2>3. Аудитории и каналы</h2>
<h3>Идеальные подписчики:</h3>
<ul>
{% for line in (d.ideal_audiences or '').split('\n') if line.strip() %}
<li>{{ line.strip() }}</li>
{% endfor %}
</ul>
{% if d.channels %}
<h3>Каналы:</h3>
<table class="table">
<thead><tr><th>Платформа</th><th>Тип</th><th>Частота</th><th>Описание</th></tr></thead>
<tbody>
{% for ch in d.channels %}
<tr><td>{{ ch.platform }}</td><td>{{ ch.type }}</td><td>{{ ch.frequency }}</td><td>{{ ch.description }}</td></tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
<!-- 4. Визуальная идентичность -->
<div class="card">
<h2>4. Визуальная идентичность</h2>
<p><strong>Концепция:</strong> {{ d.visual_concept }}</p>
<h3>Цвета:</h3>
<ul>
<li>Основной: {{ d.color_main_name }} ({{ d.color_main_hex }})</li>
<li>Акцент 1: {{ d.color_accent1_name }} ({{ d.color_accent1_hex }})</li>
<li>Акцент 2: {{ d.color_accent2_name }} ({{ d.color_accent2_hex }})</li>
<li>Нейтральная база: {{ d.color_neutral }}</li>
</ul>
<h3>Типографика:</h3>
<ul>
<li>Заголовки: {{ d.typography_headings }}</li>
<li>Текст: {{ d.typography_body }}</li>
<li>Акценты: {{ d.typography_accents }}</li>
</ul>
</div>
<!-- 5. ToV -->
<div class="card">
<h2>5. Tone of Voice</h2>
<p><strong>Описание:</strong> {{ d.tov_description }}</p>
<p><strong>Референсы:</strong> {{ d.tov_references }}</p>
{% if d.tov_axes %}
<h3>Оси ToV:</h3>
<ul>
{% for line in d.tov_axes.split('\n') if line.strip() %}
<li>{{ line.strip() }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
<!-- 6. Контент-стратегия -->
<div class="card">
<h2>6. Контент-стратегия: Три столпа</h2>
<table class="table">
<thead><tr><th>Столп</th><th>Цель</th><th>Форматы</th><th>Частота</th></tr></thead>
<tbody>
<tr><td>{{ d.pillar1_name }}</td><td>{{ d.pillar1_goal }}</td><td>{{ d.pillar1_formats }}</td><td>{{ d.pillar1_frequency }}</td></tr>
<tr><td>{{ d.pillar2_name }}</td><td>{{ d.pillar2_goal }}</td><td>{{ d.pillar2_formats }}</td><td>{{ d.pillar2_frequency }}</td></tr>
<tr><td>{{ d.pillar3_name }}</td><td>{{ d.pillar3_goal }}</td><td>{{ d.pillar3_formats }}</td><td>{{ d.pillar3_frequency }}</td></tr>
</tbody>
</table>
{% if d.special_formats %}
<p><strong>Особые форматы:</strong> {{ d.special_formats }}</p>
{% endif %}
</div>
<!-- 7. Воронка и продукты -->
<div class="card">
<h2>7. Воронка и продуктовый ряд</h2>
{% if d.funnel %}
<table class="table">
<thead><tr><th>Этап</th><th>Контент</th><th>CTA</th></tr></thead>
<tbody>
{% for s in d.funnel %}
<tr><td>{{ s.name }}</td><td>{{ s.content }}</td><td>{{ s.cta }}</td></tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<h3>Продуктовый ряд:</h3>
<ul>
<li><strong>Lead Magnet:</strong> {{ d.product_lead_magnet }}</li>
<li><strong>Простая услуга:</strong> {{ d.product_simple }}</li>
<li><strong>Услуга-конвертер:</strong> {{ d.product_converter }}</li>
<li><strong>Комплексные решения:</strong> {{ d.product_complex }}</li>
<li><strong>Экспертные продукты:</strong> {{ d.product_expert }}</li>
</ul>
</div>
<!-- 8. Метрики -->
<div class="card">
<h2>8. Метрики</h2>
{% if d.metrics_quantitative %}
<h3>Количественные:</h3>
<pre class="result">{{ d.metrics_quantitative }}</pre>
{% endif %}
{% if d.metrics_qualitative %}
<h3>Качественные:</h3>
<pre class="result">{{ d.metrics_qualitative }}</pre>
{% endif %}
{% if d.metrics_commercial %}
<h3>Коммерческие:</h3>
<pre class="result">{{ d.metrics_commercial }}</pre>
{% endif %}
</div>
<!-- 9. Риски -->
<div class="card">
<h2>9. Риски и рекомендации</h2>
{% if d.risks %}
<h3>Риски:</h3>
<pre class="result">{{ d.risks }}</pre>
{% endif %}
{% if d.recommendations %}
<h3>Рекомендации:</h3>
<pre class="result">{{ d.recommendations }}</pre>
{% endif %}
</div>
<!-- 10. Архетипы -->
<div class="card">
<h2>10. Архетипический образ</h2>
<p><strong>Ключевой архетип:</strong> {{ d.archetype_key_name }}</p>
<p><strong>Суть:</strong> {{ d.archetype_key_essence }}</p>
{% if d.archetype_key_manifestations %}
<pre class="result">{{ d.archetype_key_manifestations }}</pre>
{% endif %}
{% if d.archetype_supporting %}
<h3>Вспомогательные:</h3>
<pre class="result">{{ d.archetype_supporting }}</pre>
{% endif %}
{% if d.archetype_synthesis %}
<h3>Синтез:</h3>
<p>{{ d.archetype_synthesis }}</p>
{% endif %}
{% if d.archetype_table %}
<h3>Таблица проявлений:</h3>
<pre class="result">{{ d.archetype_table }}</pre>
{% endif %}
</div>
<!-- 11. Промпт -->
<div class="card">
<h2>11. Промпт для генерации контента</h2>
{% if d.prompt_context %}<p><strong>Контекст:</strong> {{ d.prompt_context }}</p>{% endif %}
{% if d.prompt_tov %}<p><strong>ToV:</strong> {{ d.prompt_tov }}</p>{% endif %}
{% if d.prompt_structure %}<p><strong>Структура:</strong> {{ d.prompt_structure }}</p>{% endif %}
{% if d.prompt_directions %}<p><strong>Направления:</strong></p><pre class="result">{{ d.prompt_directions }}</pre>{% endif %}
{% if d.prompt_formats %}<p><strong>Форматы:</strong></p><pre class="result">{{ d.prompt_formats }}</pre>{% endif %}
{% if d.prompt_technical %}<p><strong>Тех. требования:</strong></p><pre class="result">{{ d.prompt_technical }}</pre>{% endif %}
</div>
{% endblock %}