dreamloop 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dreamloop/__init__.py +3 -0
- dreamloop/analysis.py +406 -0
- dreamloop/cli.py +130 -0
- dreamloop/core.py +601 -0
- dreamloop/static/style.css +1503 -0
- dreamloop/templates/detail.html +181 -0
- dreamloop/templates/index.html +509 -0
- dreamloop/web.py +766 -0
- dreamloop-0.1.0.dist-info/METADATA +252 -0
- dreamloop-0.1.0.dist-info/RECORD +13 -0
- dreamloop-0.1.0.dist-info/WHEEL +4 -0
- dreamloop-0.1.0.dist-info/entry_points.txt +2 -0
- dreamloop-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="{{ lang }}">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Dream #{{ dream.id }} / DreamLoop</title>
|
|
7
|
+
<link rel="stylesheet" href="{{ url_for('static', path='/style.css') }}">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div class="app-frame detail-frame">
|
|
11
|
+
<aside class="sidebar" aria-label="DreamLoop navigation">
|
|
12
|
+
<a class="brand-mark" href="/?lang={{ lang }}" aria-label="DreamLoop home">
|
|
13
|
+
<span class="brand-orbit"></span>
|
|
14
|
+
<strong>DreamLoop</strong>
|
|
15
|
+
</a>
|
|
16
|
+
<nav class="side-nav">
|
|
17
|
+
<a href="/?lang={{ lang }}">{{ t.nav_dashboard }}</a>
|
|
18
|
+
<a href="/log?lang={{ lang }}" class="active">{{ t.nav_log }}</a>
|
|
19
|
+
<a href="/patterns?lang={{ lang }}">{{ t.nav_patterns }}</a>
|
|
20
|
+
<a href="/gallery?lang={{ lang }}">{{ t.nav_gallery }}</a>
|
|
21
|
+
<a href="/settings?lang={{ lang }}">{{ t.nav_settings }}</a>
|
|
22
|
+
</nav>
|
|
23
|
+
<div class="side-note">
|
|
24
|
+
<span>#{{ dream.id }}</span>
|
|
25
|
+
<p>{{ dream.analysis_status }}</p>
|
|
26
|
+
</div>
|
|
27
|
+
</aside>
|
|
28
|
+
|
|
29
|
+
<main class="dashboard detail-dashboard">
|
|
30
|
+
<a class="back-link" href="/?lang={{ lang }}">{{ t.back_dashboard }}</a>
|
|
31
|
+
|
|
32
|
+
<article class="detail-hero constellation-sky">
|
|
33
|
+
<div class="star-field" aria-hidden="true"></div>
|
|
34
|
+
<p class="eyebrow">{{ dream.dreamed_on }} / {{ dream.analysis_status }}</p>
|
|
35
|
+
<h1>Dream #{{ dream.id }}</h1>
|
|
36
|
+
<p class="dream-text">{{ dream.content }}</p>
|
|
37
|
+
<div class="tag-shelf">
|
|
38
|
+
<span>{{ dream.manual_mood or t.no_mood }}</span>
|
|
39
|
+
{% for tag in dream.tags %}
|
|
40
|
+
<span>{{ tag }}</span>
|
|
41
|
+
{% else %}
|
|
42
|
+
<span>{{ t.no_tags }}</span>
|
|
43
|
+
{% endfor %}
|
|
44
|
+
</div>
|
|
45
|
+
<div class="visual-memory-action">
|
|
46
|
+
<button type="button" class="secondary-button">{{ t.generate_dream_image }}</button>
|
|
47
|
+
<p>{{ t.visual_memory_note }}</p>
|
|
48
|
+
</div>
|
|
49
|
+
</article>
|
|
50
|
+
|
|
51
|
+
<section class="detail-grid">
|
|
52
|
+
<article class="panel" id="analysis">
|
|
53
|
+
<div class="section-title">
|
|
54
|
+
<span>{{ t.structured_output }}</span>
|
|
55
|
+
<h2>{{ t.ai_analysis }}</h2>
|
|
56
|
+
</div>
|
|
57
|
+
{% if dream.analysis %}
|
|
58
|
+
<div class="tag-shelf">
|
|
59
|
+
<span>{{ dream.analysis.emotional_tone }}</span>
|
|
60
|
+
{% for symbol in dream.analysis.symbols %}
|
|
61
|
+
<span>{{ symbol }}</span>
|
|
62
|
+
{% endfor %}
|
|
63
|
+
{% for theme in dream.analysis.themes %}
|
|
64
|
+
<span>{{ theme }}</span>
|
|
65
|
+
{% endfor %}
|
|
66
|
+
</div>
|
|
67
|
+
<p class="analysis-summary">{{ dream.analysis.summary }}</p>
|
|
68
|
+
{% set report = dream.analysis.report %}
|
|
69
|
+
{% if report.analysis_version %}
|
|
70
|
+
<div class="dream-report">
|
|
71
|
+
{% if report.dream_details %}
|
|
72
|
+
<section class="report-section">
|
|
73
|
+
<h3>{{ t.dream_details }}</h3>
|
|
74
|
+
<ul>
|
|
75
|
+
{% for item in report.dream_details %}
|
|
76
|
+
<li>{{ item }}</li>
|
|
77
|
+
{% endfor %}
|
|
78
|
+
</ul>
|
|
79
|
+
</section>
|
|
80
|
+
{% endif %}
|
|
81
|
+
{% if report.core_emotion %}
|
|
82
|
+
<section class="report-section">
|
|
83
|
+
<h3>{{ t.core_emotion }}</h3>
|
|
84
|
+
<p>{{ report.core_emotion }}</p>
|
|
85
|
+
</section>
|
|
86
|
+
{% endif %}
|
|
87
|
+
{% if dream.reflections %}
|
|
88
|
+
<section class="report-section">
|
|
89
|
+
<h3>{{ t.important_context }}</h3>
|
|
90
|
+
<ul>
|
|
91
|
+
{% for key, value in dream.reflections.items() %}
|
|
92
|
+
<li>{{ value }}</li>
|
|
93
|
+
{% endfor %}
|
|
94
|
+
</ul>
|
|
95
|
+
</section>
|
|
96
|
+
{% endif %}
|
|
97
|
+
{% if report.real_life_links %}
|
|
98
|
+
<section class="report-section">
|
|
99
|
+
<h3>{{ t.real_life_links }}</h3>
|
|
100
|
+
<ul>
|
|
101
|
+
{% for item in report.real_life_links %}
|
|
102
|
+
<li>{{ item }}</li>
|
|
103
|
+
{% endfor %}
|
|
104
|
+
</ul>
|
|
105
|
+
</section>
|
|
106
|
+
{% endif %}
|
|
107
|
+
{% if report.possible_interpretations %}
|
|
108
|
+
<section class="report-section">
|
|
109
|
+
<h3>{{ t.possible_interpretations }}</h3>
|
|
110
|
+
<div class="interpretation-list">
|
|
111
|
+
{% for item in report.possible_interpretations %}
|
|
112
|
+
<article>
|
|
113
|
+
<strong>{{ item.title or loop.index }}</strong>
|
|
114
|
+
<p>{{ item.interpretation }}</p>
|
|
115
|
+
<small>{{ item.dream_evidence }}</small>
|
|
116
|
+
<small>{{ item.real_life_connection }}</small>
|
|
117
|
+
<em>{{ item.verification_question }}</em>
|
|
118
|
+
</article>
|
|
119
|
+
{% endfor %}
|
|
120
|
+
</div>
|
|
121
|
+
</section>
|
|
122
|
+
{% endif %}
|
|
123
|
+
{% if report.real_life_questions %}
|
|
124
|
+
<section class="report-section reality-focus">
|
|
125
|
+
<h3>{{ t.real_life_questions }}</h3>
|
|
126
|
+
<ul>
|
|
127
|
+
{% for item in report.real_life_questions %}
|
|
128
|
+
<li>{{ item }}</li>
|
|
129
|
+
{% endfor %}
|
|
130
|
+
</ul>
|
|
131
|
+
</section>
|
|
132
|
+
{% endif %}
|
|
133
|
+
{% if report.verification_prompts %}
|
|
134
|
+
<section class="report-section">
|
|
135
|
+
<h3>{{ t.verification_prompts }}</h3>
|
|
136
|
+
<ul>
|
|
137
|
+
{% for item in report.verification_prompts %}
|
|
138
|
+
<li>{{ item }}</li>
|
|
139
|
+
{% endfor %}
|
|
140
|
+
</ul>
|
|
141
|
+
</section>
|
|
142
|
+
{% endif %}
|
|
143
|
+
</div>
|
|
144
|
+
{% endif %}
|
|
145
|
+
<details>
|
|
146
|
+
<summary>{{ t.raw_json }}</summary>
|
|
147
|
+
<pre><code>{{ dream.analysis.raw_json }}</code></pre>
|
|
148
|
+
</details>
|
|
149
|
+
{% elif ai.ready %}
|
|
150
|
+
<p class="empty-state">{{ t.pending_analysis }}: {{ ai.provider }} / {{ ai.model }}</p>
|
|
151
|
+
<form method="post" action="/dreams/{{ dream.id }}/analyze?lang={{ lang }}" class="analyze-form">
|
|
152
|
+
<button type="submit">{{ t.generate_chinese_analysis if lang == "zh" else t.generate_english_analysis }}</button>
|
|
153
|
+
</form>
|
|
154
|
+
{% else %}
|
|
155
|
+
<p class="empty-state">{{ t.analysis_unavailable }}</p>
|
|
156
|
+
{% endif %}
|
|
157
|
+
</article>
|
|
158
|
+
|
|
159
|
+
<article class="panel quiet-panel" id="context">
|
|
160
|
+
<div class="section-title">
|
|
161
|
+
<span>{{ t.day_context }}</span>
|
|
162
|
+
<h2>{{ t.calendar_weather }}</h2>
|
|
163
|
+
</div>
|
|
164
|
+
<h3>{{ t.calendar }}</h3>
|
|
165
|
+
{% for event in context.events %}
|
|
166
|
+
<p>{{ event.summary }}</p>
|
|
167
|
+
{% else %}
|
|
168
|
+
<p class="empty-state">{{ t.no_calendar }}</p>
|
|
169
|
+
{% endfor %}
|
|
170
|
+
<h3>{{ t.weather }}</h3>
|
|
171
|
+
{% if context.weather %}
|
|
172
|
+
<p>{{ context.weather.temperature_2m_min }}-{{ context.weather.temperature_2m_max }} C, precipitation {{ context.weather.precipitation_sum }} mm</p>
|
|
173
|
+
{% else %}
|
|
174
|
+
<p class="empty-state">{{ t.no_weather }}</p>
|
|
175
|
+
{% endif %}
|
|
176
|
+
</article>
|
|
177
|
+
</section>
|
|
178
|
+
</main>
|
|
179
|
+
</div>
|
|
180
|
+
</body>
|
|
181
|
+
</html>
|