Loading...
Loading...
Analyze blog posts for SEO, readability, headline quality, and content structure. Generate meta tags and optimization recommendations with scoring.
npx skill4agent add dkyazzentwatwa/chatgpt-skills blog-post-optimizerfrom scripts.blog_post_optimizer import BlogPostOptimizer
# Initialize optimizer
optimizer = BlogPostOptimizer()
# Analyze a blog post
with open('blog_post.md', 'r') as f:
content = f.read()
# Full analysis
results = optimizer.analyze_full(
content=content,
headline="10 Ways to Boost Your Productivity",
keywords=["productivity", "time management", "efficiency"]
)
# View scores
print(f"Overall Score: {results['overall_score']}/100")
print(f"Headline Score: {results['headline']['score']}/100")
print(f"SEO Score: {results['seo']['score']}/100")
print(f"Readability Grade: {results['readability']['grade_level']}")
# Export HTML report
optimizer.export_html_report(results, 'report.html')optimizer = BlogPostOptimizer(){
'score': 75, # 0-100
'character_count': 52,
'power_words': ['boost', 'proven'],
'emotional_impact': 68,
'suggestions': [
"10 Proven Ways to Boost Your Productivity Today",
"Boost Your Productivity: 10 Essential Strategies"
]
}{
'score': 80,
'keyword_density': {'productivity': 1.8, 'time management': 0.9},
'keyword_prominence': True, # In first 100 words
'meta_description': 'Discover 10 proven ways to boost productivity...',
'title_tag': '10 Ways to Boost Productivity | Your Site',
'url_slug': 'boost-productivity-10-ways'
}{
'score': 85,
'h1_count': 1,
'h2_count': 10,
'avg_paragraph_length': 4.2, # Sentences
'list_count': 3,
'warnings': ['Paragraph on line 45 is too long (8 sentences)']
}{
'flesch_kincaid_grade': 8.5,
'reading_ease': 65.2,
'avg_sentence_length': 15.3,
'passive_voice_pct': 8.5,
'complexity_score': 72
}{
'word_count': 1250,
'reading_time_minutes': 5,
'character_count': 7890,
'sentence_count': 85,
'paragraph_count': 28
}{
'open_graph': {
'og:title': '10 Ways to Boost Your Productivity',
'og:description': 'Discover proven strategies...',
'og:type': 'article'
},
'twitter_card': {
'twitter:card': 'summary_large_image',
'twitter:title': '10 Ways to Boost Your Productivity'
},
'schema_org': {
'@context': 'https://schema.org',
'@type': 'Article',
'headline': '10 Ways to Boost Your Productivity'
}
}{
'overall_score': 78,
'headline': {...},
'seo': {...},
'structure': {...},
'readability': {...},
'stats': {...},
'recommendations': [
{'priority': 'high', 'issue': '...', 'fix': '...'}
]
}python scripts/blog_post_optimizer.py \
--input blog_post.md \
--headline "10 Ways to Boost Your Productivity" \
--keywords "productivity,time management,efficiency" \
--output report.html \
--format htmlpython scripts/blog_post_optimizer.py \
--input article.txt \
--headline "Ultimate Guide to Python" \
--keywords "python,programming" \
--format jsonpython scripts/blog_post_optimizer.py \
--headline-only "10 Productivity Hacks You Need to Know"| Argument | Description | Default |
|---|---|---|
| Input file (txt/md/html) | - |
| Blog post headline | Extracted from content |
| Comma-separated keywords | - |
| Output file path | stdout |
| Output format (json/html) | json |
| Analyze headline only | False |
optimizer = BlogPostOptimizer()
with open('article.md') as f:
content = f.read()
results = optimizer.analyze_full(
content=content,
headline="The Complete Guide to Remote Work",
keywords=["remote work", "productivity", "work from home"]
)
optimizer.export_html_report(results, 'seo_report.html')optimizer = BlogPostOptimizer()
headline = "Ways to Improve Your Writing"
analysis = optimizer.analyze_headline(headline)
print(f"Score: {analysis['score']}/100")
print(f"Power words found: {', '.join(analysis['power_words'])}")
print("\nSuggestions:")
for suggestion in analysis['suggestions']:
print(f" - {suggestion}")optimizer = BlogPostOptimizer()
with open('post.md') as f:
content = f.read()
seo = optimizer.analyze_seo(
content=content,
keywords=["python", "tutorial", "beginners"]
)
for keyword, density in seo['keyword_density'].items():
print(f"{keyword}: {density:.1f}%")nltk>=3.8.0
textblob>=0.17.0
beautifulsoup4>=4.12.0
pandas>=2.0.0
matplotlib>=3.7.0
reportlab>=4.0.0
lxml>=4.9.0