
A user-friendly Streamlit application for building professional newsletters without technical knowledge
- Intuitive Interface: Edit newsletter content through user-friendly forms
- Real-time Preview: See changes instantly in a live HTML preview
- No Code Required: Perfect for team members without technical background
- π Text Content: Rich paragraphs with markdown support
- β Feature Grid: Showcase features in organized cards
- π± Platform Cards: Display app availability with custom icons
- π₯ Contributors: Highlight team members and contributors
- π¬ Feedback/Contact: Dynamic contact methods and paragraphs
- Dynamic Content Management: Add, edit, and delete content within each section type
- Flexible Paragraph System: Multiple customizable paragraphs in feedback and content sections
- Dynamic Contact Methods: Customizable contact buttons with editable text and links
- Markdown Support: Format text with bold, italic, and links
- Export Options: Download HTML for distribution and YAML for configuration backup
- Python 3.7 or higher
- pip package manager
The application automatically checks and installs the following dependencies:
streamlit>=1.28.0
- Web application frameworkPyYAML>=6.0
- YAML configuration parsingJinja2>=3.0
- HTML template enginestreamlit-ace>=0.1.1
- Advanced code editor componentstreamlit-code-editor>=0.1.19
- Enhanced code editing features
-
Clone the Repository
git clone https://github.com/ansari-org/ansari-email-builder.git cd ansari-email-builder
-
Install Dependencies
pip install -r requirements.txt
-
Run the Application
python run.py
Alternative: Run directly with Streamlit
streamlit run "UI Builder.py"
-
Open in Browser
- Streamlit will automatically open your browser
- Or manually go to
http://localhost:8501
- Configure newsletter title and greeting message
- Set up branding with logo URL
- All changes reflect immediately in the live preview
- Add key highlights that appear at the top of newsletters
- Use markdown formatting for emphasis
- Dynamically add/edit/remove highlight items
- Add Sections: Choose from multiple section types
- Edit Content: Each section type has specialized editing interfaces
- Manage Sections: Reorder, edit, or delete sections as needed
- Real-time HTML preview updates automatically
- Export options for HTML and YAML formats
- Download ready-to-send newsletters
- Direct YAML configuration editing with syntax highlighting
- Advanced code editor with autocomplete and validation
- Switch between visual UI and YAML editing modes
- Export and import YAML configurations
- Multiple editable paragraphs
- Full markdown support
- Perfect for announcements and detailed descriptions
- Add/edit/delete individual features
- Each feature has title and description
- Automatically organized in responsive grid layout
- Showcase app availability across platforms
- Custom icons and links for each platform
- Professional card-based design
- Contributors List: Add/edit/delete individual contributors with names and descriptions
- Additional Thanks: Multiple thank-you messages and acknowledgments
- Section Description: Customizable introduction text
- Dynamic Paragraphs: Multiple customizable paragraphs instead of fixed text
- Contact Methods: Add/edit/delete contact buttons with custom text and links
- Flexible Layout: Fully customizable contact information display
**bold text**
β bold text*italic text*
β italic text[link text](URL)
β clickable links
- Built-in icon library with Google Drive hosted images
- Custom icon support for platforms and sections
- Consistent visual branding across all newsletters
- Frontend: Streamlit for rapid prototyping and user interface
- Templating: Jinja2 for consistent HTML generation
- State Management: Streamlit session state for form persistence
- Export System: YAML and HTML generation for multiple use cases
ansari-email-builder/
βββ run.py # Main application runner with dependency checks
βββ UI Builder.py # Primary Streamlit UI application
βββ requirements.txt # Python dependencies
βββ pages/ # Streamlit multi-page components
β βββ YAML Builder.py # YAML configuration editor
βββ utils/ # Utility modules
β βββ newsletter_builder.py # Core newsletter building logic
β βββ test_builder.py # Testing framework
β βββ create_icon.py # Icon generation utility
βββ assets/ # Design assets and templates
β βββ email_template.jinja2 # HTML email template
β βββ email_icon.* # Application icons (PNG, SVG, ICO)
β βββ compositeLogo.* # Ansari branding assets
β βββ *.svg, *.png # Various UI icons and graphics
βββ secrets/ # Private configuration and outputs
β βββ *.html, *.md # Generated newsletters and drafts
βββ README.md # This documentation
The application follows a modular design:
run.py
: Entry point that handles dependency checking, core functionality testing, and launches the Streamlit interfaceUI Builder.py
: Main Streamlit application with visual form builderYAML Builder.py
: Advanced YAML editor page for power usersutils/newsletter_builder.py
: Core newsletter generation engine with template processingassets/email_template.jinja2
: HTML email template with dynamic section rendering
-
Update Section Selection in
UI Builder.py
section_type = st.selectbox("Section Type:", ["content", "features", "platforms", "contributors", "feedback", "your_new_type"])
-
Create Section Template
elif section_type == 'your_new_type': new_section.update({ 'field1': 'default_value', 'field2': [] })
-
Add Editing Interface
elif section['type'] == 'your_new_type': # Add form elements for editing
-
Update HTML Template in
assets/email_template.jinja2
{% if section.type == 'your_new_type' %} <!-- Your HTML template --> {% endif %}
python utils/test_builder.py
The application now supports multiple pages:
- UI Builder: Visual form-based editor (main page)
- YAML Builder: Advanced YAML configuration editor for power users
We welcome contributions to improve the Ansari Email Builder! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is part of the Ansari ecosystem. Please refer to the main Ansari project for licensing information.
- Ansari Main Platform - The main Ansari chat application
- Ansari Documentation - Comprehensive documentation
For questions, issues, or feature requests:
- GitHub Issues: Use the Issues tab in this repository
- Community: Join the Ansari community discussions
- Documentation: Check the inline help within the application
Built with β€οΈ by the Ansari team to streamline newsletter creation and improve team collaboration.
Made with π by the Ansari Team