INNER CODE UNIT · Python

decode_project_path

softaworks/agent-toolkit · skills/daily-meeting-update/scripts/claude_digest.py:58

def decode_project_path(encoded: str) -> str:
    """Decode encoded project path from directory name."""
    if encoded.startswith('-'):
        return '/' + encoded[1:].replace('-', '/')
    return encoded.replace('-', '/')


def parse_timestamp(timestamp: str) -> Optional[datetime]:
    """Parse ISO timestamp string to datetime."""
    if not timestamp:
        return None
    try:
        if 'T' in timestamp:
            timestamp = timestamp.split('+')[0].split('Z')[0]
            if '.' in timestamp:
                return datetime.strptime(timestamp[:26], '%Y-%m-%dT%H:%M:%S.%f')
            return datetime.strptime(timestamp[:19], '%Y-%m-%dT%H:%M:%S')
        return datetime.strptime(timestamp[:10], '%Y-%m-%d')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…