import streamlit as st # Sample command data (replace or expand with real commands later) commands = { "LINE": { "description": "Creates straight line segments between two points.", "link": "https://www.youtube.com/watch?v=4Hsb5j5JH7A" }, "CIRCLE": { "description": "Creates a circle based on a center point and radius.", "link": "https://www.youtube.com/watch?v=ZFbP13bU5Ck" }, "TRIM": { "description": "Trims objects to meet the edges of other objects.", "link": "https://www.youtube.com/watch?v=8QULwXuHEjM" }, "OFFSET": { "description": "Creates concentric circles, parallel lines, and curves at specified distances.", "link": "https://www.youtube.com/watch?v=3AwYIjvQqek" }, "MOVE": { "description": "Moves objects a specified distance in a specified direction.", "link": "https://www.youtube.com/watch?v=gzS4h3rzFeM" }, "ROTATE": { "description": "Rotates objects around a base point.", "link": "https://www.youtube.com/watch?v=s7KAMdUHz4E" } # You can add up to 200 commands here } # App config st.set_page_config(page_title="AutoCAD Command Helper", layout="wide") # Custom style st.markdown(""" """, unsafe_allow_html=True) # Title st.markdown('
📘 AutoCAD Command Explorer
', unsafe_allow_html=True) # Layout: Dropdown on left, Description on right col1, col2 = st.columns([1, 2]) with col1: selected_cmd = st.selectbox("Choose an AutoCAD Command:", list(commands.keys()), index=0) with col2: cmd_data = commands[selected_cmd] st.markdown(f"""
🛠️ {selected_cmd}
{cmd_data['description']}
""", unsafe_allow_html=True)