@mifactory-bot/contratos-mcp 1.0.0

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.
@@ -0,0 +1,243 @@
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Paquete de Contratos para Freelancers</title>
7
+ <style>
8
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap');
9
+ * {
10
+ box-sizing: border-box;
11
+ }
12
+ body {
13
+ margin: 0;
14
+ background: #0f0f0f;
15
+ color: #fff;
16
+ font-family: 'Poppins', sans-serif;
17
+ display: flex;
18
+ min-height: 100vh;
19
+ align-items: center;
20
+ justify-content: center;
21
+ padding: 20px;
22
+ }
23
+ .container {
24
+ max-width: 900px;
25
+ width: 100%;
26
+ background: #1b263b;
27
+ border-radius: 16px;
28
+ box-shadow: 0 0 40px rgba(255, 136, 0, 0.4);
29
+ padding: 40px 50px;
30
+ text-align: center;
31
+ }
32
+ h1 {
33
+ font-size: 3.4rem;
34
+ font-weight: 700;
35
+ margin-bottom: 10px;
36
+ color: #ff8800;
37
+ text-shadow: 0 0 10px #ff8800;
38
+ }
39
+ p.subtitle {
40
+ font-size: 1.3rem;
41
+ margin-bottom: 30px;
42
+ color: #f0f0f0;
43
+ font-weight: 600;
44
+ }
45
+
46
+ .price {
47
+ font-size: 2.6rem;
48
+ font-weight: 700;
49
+ margin: 0 0 30px;
50
+ color: #32cd32;
51
+ }
52
+ .price del {
53
+ color: #888;
54
+ margin-right: 15px;
55
+ font-size: 1.8rem;
56
+ }
57
+
58
+ .cards {
59
+ display: flex;
60
+ gap: 24px;
61
+ justify-content: space-around;
62
+ flex-wrap: wrap;
63
+ margin-bottom: 40px;
64
+ }
65
+
66
+ .card {
67
+ background: #0f192e;
68
+ flex: 1 1 250px;
69
+ padding: 25px 30px;
70
+ border-radius: 16px;
71
+ box-shadow: 0 8px 20px rgba(255, 136, 0, 0.3);
72
+ color: #fff;
73
+ text-align: left;
74
+ transition: transform 0.3s ease;
75
+ }
76
+ .card:hover {
77
+ transform: translateY(-10px);
78
+ box-shadow: 0 12px 30px rgba(255, 136, 0, 0.6);
79
+ }
80
+ .card h2 {
81
+ font-size: 1.8rem;
82
+ margin-bottom: 12px;
83
+ color: #ffb347;
84
+ }
85
+ .card ul {
86
+ padding-left: 18px;
87
+ font-size: 1.1rem;
88
+ line-height: 1.5;
89
+ }
90
+
91
+ .emoji {
92
+ font-size: 1.5rem;
93
+ margin-right: 12px;
94
+ }
95
+
96
+ .testimonial {
97
+ background: #14203d;
98
+ border-left: 5px solid #ff8800;
99
+ padding: 20px 25px;
100
+ font-style: italic;
101
+ font-size: 1.15rem;
102
+ margin-bottom: 40px;
103
+ border-radius: 0 16px 16px 0;
104
+ box-shadow: 0 6px 15px rgba(255, 136, 0, 0.3);
105
+ color: #f7f7f7;
106
+ max-width: 600px;
107
+ margin-left: auto;
108
+ margin-right: auto;
109
+ }
110
+ .testimonial-author {
111
+ text-align: right;
112
+ margin-top: 10px;
113
+ font-weight: 700;
114
+ color: #ffb347;
115
+ font-size: 1rem;
116
+ }
117
+
118
+ #checkout-button {
119
+ background: #32cd32;
120
+ border: none;
121
+ padding: 18px 50px;
122
+ font-size: 1.8rem;
123
+ font-weight: 700;
124
+ border-radius: 40px;
125
+ color: #0f0f0f;
126
+ cursor: pointer;
127
+ box-shadow: 0 0 15px #32cd32;
128
+ transition: background-color 0.3s ease;
129
+ display: block;
130
+ margin: 0 auto;
131
+ width: 300px;
132
+ }
133
+ #checkout-button:hover {
134
+ background: #28a428;
135
+ box-shadow: 0 0 25px #28a428;
136
+ }
137
+
138
+ footer {
139
+ margin-top: 30px;
140
+ color: #888;
141
+ font-size: 1rem;
142
+ }
143
+ a {
144
+ color: #ff8800;
145
+ text-decoration: none;
146
+ }
147
+ a:hover {
148
+ text-decoration: underline;
149
+ }
150
+
151
+ </style>
152
+ <script src="https://js.stripe.com/v3/"></script>
153
+ </head>
154
+ <body>
155
+ <div class="container">
156
+ <h1>Paquete de Contratos para Freelancers</h1>
157
+ <p class="subtitle">Plantillas legales adaptadas a México para proteger tu trabajo y asegurar tu pago.</p>
158
+
159
+ <p class="price"><del>$50 USD</del> $20 USD</p>
160
+
161
+ <div class="cards">
162
+ <div class="card">
163
+ <h2><span class="emoji">📄</span> ¿Qué incluye?</h2>
164
+ <ul>
165
+ <li>Contrato de Servicios Profesionales</li>
166
+ <li>Acuerdo de Confidencialidad</li>
167
+ <li>Contrato de Proyecto</li>
168
+ </ul>
169
+ </div>
170
+ <div class="card">
171
+ <h2><span class="emoji">🎯</span> ¿Para quién es?</h2>
172
+ <ul>
173
+ <li>Diseñadores</li>
174
+ <li>Programadores</li>
175
+ <li>Consultores y freelancers</li>
176
+ </ul>
177
+ </div>
178
+ <div class="card">
179
+ <h2><span class="emoji">🛡️</span> ¿Por qué lo necesitas?</h2>
180
+ <ul>
181
+ <li>Protege tu dinero</li>
182
+ <li>Evita malentendidos</li>
183
+ <li>Formaliza tus acuerdos</li>
184
+ </ul>
185
+ </div>
186
+ </div>
187
+
188
+ <div class="testimonial">
189
+ "Gracias a este paquete pude formalizar mis contratos y trabajar con mayor confianza. Muy recomendable para freelancers que quieren proteger su trabajo y evitar problemas legales."
190
+ <div class="testimonial-author">— Ana López, diseñadora gráfica</div>
191
+ </div>
192
+
193
+ <section class="cards" aria-label="Vista previa de contratos">
194
+ <div class="card">
195
+ <h2>📄 Contrato de Servicios Profesionales</h2>
196
+ <p>
197
+ Este contrato establece las condiciones de prestación de servicios profesionales entre el freelancer y el cliente, incluyendo honorarios, plazos y responsabilidades.
198
+ </p>
199
+ </div>
200
+ <div class="card">
201
+ <h2>🔒 Acuerdo de Confidencialidad</h2>
202
+ <p>
203
+ Acuerda mantener en confidencialidad toda la información técnica, comercial o de otro tipo compartida durante la relación profesional.
204
+ </p>
205
+ </div>
206
+ <div class="card">
207
+ <h2>📑 Contrato de Proyecto</h2>
208
+ <p>
209
+ Describe el desarrollo y entrega del proyecto, los plazos, pagos y derechos de propiedad intelectual entre el freelancer y el cliente.
210
+ </p>
211
+ </div>
212
+ </section>
213
+
214
+ <button id="checkout-button">Comprar ahora - $20 USD</button>
215
+
216
+ <footer>Contacto: <a href="mailto:contacto@tutienda.com">contacto@tutienda.com</a></footer>
217
+ </div>
218
+
219
+ <script>
220
+ const stripe = Stripe('pk_live_51T19j6K6geYaOAPlw0ScVpZeM6ed2cYhQyp4jBVF1gtbm9kZROKiHcV9cOVD3t28VmZOYwMbgYT5C2k1burrDSVI00gUgF0na5');
221
+ const checkoutButton = document.getElementById('checkout-button');
222
+
223
+ checkoutButton.addEventListener('click', function () {
224
+ fetch('/api/create-checkout-session', {
225
+ method: 'POST',
226
+ headers: {
227
+ 'Content-Type': 'application/json'
228
+ },
229
+ body: JSON.stringify({ items: [{ name: 'Paquete de Contratos para Freelancers', price: 20, quantity: 1 }] })
230
+ })
231
+ .then(response => response.json())
232
+ .then(session => {
233
+ window.location.href = session.url;
234
+ })
235
+ .catch(error => {
236
+ console.error('Error:', error);
237
+ alert('Error al iniciar el pago.');
238
+ });
239
+ });
240
+ </script>
241
+
242
+ </body>
243
+ </html>
@@ -0,0 +1,37 @@
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Pago Exitoso</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ text-align: center;
11
+ padding: 40px;
12
+ background-color: #ecf0f1;
13
+ color: #2c3e50;
14
+ }
15
+ h1 {
16
+ color: #27ae60;
17
+ }
18
+ p {
19
+ font-size: 18px;
20
+ }
21
+ a {
22
+ color: #2980b9;
23
+ text-decoration: none;
24
+ font-weight: bold;
25
+ }
26
+ </style>
27
+ </head>
28
+ <body>
29
+ <h1>¡Gracias por tu compra!</h1>
30
+ <p>Tu pago fue procesado exitosamente.</p>
31
+ <p>Haz clic en el botón para descargar tu paquete de contratos:</p>
32
+ <a href="/contratos.pdf" download>
33
+ <button style="padding: 12px 24px; font-size: 18px; background-color: #27ae60; color: white; border: none; border-radius: 6px; cursor: pointer;">Descargar Contratos</button>
34
+ </a>
35
+ <a href="/">Volver a la página principal</a>
36
+ </body>
37
+ </html>
@@ -0,0 +1,29 @@
1
+ import os
2
+ import glob
3
+ import re
4
+ from functions import message
5
+
6
+ note_dir = os.path.expanduser('~/.openclaw/workspace/memory/daily-notes/')
7
+
8
+ ongoing_projects = []
9
+
10
+ for filepath in glob.glob(note_dir + '*.md'):
11
+ with open(filepath, 'r') as file:
12
+ content = file.read()
13
+ if re.search(r'\bproyecto en curso\b', content, re.IGNORECASE):
14
+ ongoing_projects.append(os.path.basename(filepath))
15
+
16
+ if ongoing_projects:
17
+ report_message = 'Proyectos en curso que necesitan seguimiento:\n'
18
+ for project in ongoing_projects:
19
+ report_message += f'- {project}\n'
20
+
21
+ # Send report via Telegram
22
+ message.action = 'send'
23
+ message.channel = 'telegram'
24
+ message.target = 'me'
25
+ message.message = report_message
26
+ # The message() call is a placeholder, actual sending will depend on environment
27
+ print(report_message) # Simulate sending
28
+ else:
29
+ print('No ongoing projects encontrados.')
@@ -0,0 +1,69 @@
1
+ import os
2
+ import json
3
+ import time
4
+ from datetime import datetime
5
+ import stripe
6
+ import requests
7
+
8
+ # Config
9
+ LAST_CHECK_FILE = os.path.expanduser('~/.openclaw/workspace/.stripe_last_check')
10
+ TELEGRAM_BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN')
11
+ TELEGRAM_CHAT_ID = '7277427829'
12
+
13
+ # Setup Stripe
14
+ stripe.api_key = "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"
15
+ TELEGRAM_BOT_TOKEN = "8626556110:AAHMVF6KDv_jnprmKhQVnba9W54Ie2kgjf8"
16
+
17
+ if not stripe.api_key:
18
+ print('Error: STRIPE_SECRET_KEY not set')
19
+ exit(1)
20
+ if not TELEGRAM_BOT_TOKEN:
21
+ print('Error: TELEGRAM_BOT_TOKEN not set')
22
+ exit(1)
23
+
24
+ # Load last check time
25
+ try:
26
+ with open(LAST_CHECK_FILE, 'r') as f:
27
+ last_check_timestamp = float(f.read())
28
+ except (FileNotFoundError, ValueError):
29
+ last_check_timestamp = time.time() - 86400
30
+
31
+ # Query for charges created after last check
32
+ charges = stripe.Charge.list(
33
+ created={'gte': int(last_check_timestamp)},
34
+ limit=100
35
+ )
36
+
37
+ new_sales = [c for c in charges.auto_paging_iter() if c['paid'] and not c['refunded']]
38
+
39
+ # Calculate total amount for today
40
+ now = datetime.utcnow()
41
+ start_of_today = datetime(now.year, now.month, now.day)
42
+ start_of_today_ts = int(start_of_today.timestamp())
43
+
44
+ charges_today = stripe.Charge.list(
45
+ created={'gte': start_of_today_ts},
46
+ limit=100
47
+ )
48
+
49
+ total_today = sum(c.amount for c in charges_today.auto_paging_iter() if c['paid'] and not c['refunded']) / 100.0
50
+
51
+ if new_sales:
52
+ total_new_sales = sum(c.amount for c in new_sales) / 100.0
53
+ report = f"Ventas nuevas desde última revisión: ${total_new_sales:.2f}\nTotal ventas hoy: ${total_today:.2f}"
54
+ print(report)
55
+ # Send report via Telegram API
56
+ url = f'https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage'
57
+ payload = {
58
+ 'chat_id': TELEGRAM_CHAT_ID,
59
+ 'text': report
60
+ }
61
+ response = requests.post(url, json=payload)
62
+ if response.status_code != 200:
63
+ print(f'Error sending Telegram message: {response.text}')
64
+ else:
65
+ print('No hay ventas nuevas desde última revisión.')
66
+
67
+ # Save current timestamp as last check
68
+ with open(LAST_CHECK_FILE, 'w') as f:
69
+ f.write(str(time.time()))