File size: 1,667 Bytes
5e0532d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import asyncio
from app.services.journal import journal_service

async def main():
    print("=== ORA Zettelkasten Journal Verification ===")
    
    user_id = "spiritual_traveler"
    
    # 1. Create a foundational note
    print("\n1. Creating foundational note on 'Faith'...")
    await journal_service.create_entry(
        user_id=user_id,
        text="Faith is not just belief, but active trust when things are uncertain. Like Peter stepping out of the boat.",
        verses=["Matthew 14:29"],
        tags=["faith", "trust"]
    )
    
    # 2. Create a related note (different topic but similar sentiment)
    print("2. Creating related note on 'Courage'...")
    await journal_service.create_entry(
        user_id=user_id,
        text="Today I feel I need courage for my presentation. It feels like stepping out of a boat into the unknown.",
        tags=["courage", "work"]
    )
    
    # 3. Verify the link
    print("\n3. Finding related entries for the 'Courage' reflection...")
    related = await journal_service.get_related_entries(user_id, "I need courage for my presentation. It feels like stepping out of a boat.")
    
    print(f"   -> Found {len(related)} related journal nodes.")
    for idx, node in enumerate(related):
        print(f"   Link {idx+1}:")
        print(f"   - Text: {node['text'][:60]}...")
        print(f"   - Linked Verses: {node['verses']}")
        print(f"   - Timestamp: {node['timestamp']}")

    if len(related) > 0:
        print("\n[SUCCESS] Zettelkasten Journal is successfully linking nodes.")
    else:
        print("\n[FAIL] No related nodes found.")

if __name__ == "__main__":
    asyncio.run(main())