Compare commits
No commits in common. "master" and "v1.0.0" have entirely different histories.
4 changed files with 139 additions and 84 deletions
|
@ -3,7 +3,7 @@ GTS_SERVER_URL=https://your-gts-instance.tld
|
||||||
GTS_ACCESS_TOKEN=your_gts_access_token_here
|
GTS_ACCESS_TOKEN=your_gts_access_token_here
|
||||||
|
|
||||||
# Processing Configuration
|
# Processing Configuration
|
||||||
MAX_POSTS_PER_RUN=75
|
MAX_POSTS_PER_RUN=25
|
||||||
DELAY_BETWEEN_REQUESTS=1
|
DELAY_BETWEEN_REQUESTS=1
|
||||||
LOG_LEVEL=INFO
|
LOG_LEVEL=INFO
|
||||||
|
|
||||||
|
|
183
README.md
183
README.md
|
@ -1,24 +1,32 @@
|
||||||
# GTS-HolMirDas 🚀
|
# GTS-HolMirDas 🚀
|
||||||
|
|
||||||
RSS-based content discovery for [GoToSocial](https://codeberg.org/superseriousbusiness/gotosocial) instances.
|
RSS-based content discovery for GoToSocial instances.
|
||||||
|
|
||||||
Automatically discovers and federates content from RSS feeds across the Fediverse, helping small GoToSocial instances populate their federated timeline without relying on traditional relays.
|
Automatically discovers and federates content from RSS feeds across the Fediverse, helping small GoToSocial instances populate their federated timeline without relying on traditional relays.
|
||||||
|
|
||||||
Inspired by the original [HolMirDas](https://github.com/aliceif/HolMirDas) by [@aliceif](https://mkultra.x27.one/@aliceif), adapted for GoToSocial with enhanced Docker deployment and multi-instance processing.
|
## Features
|
||||||
|
|
||||||
## ✨ Key Features
|
- 📡 **Multi-Instance RSS Discovery** - Fetches content from configurable RSS feeds across Fediverse instances
|
||||||
|
- ⚡ **Efficient Processing** - Configurable rate limiting and duplicate detection
|
||||||
|
- 🔧 **Production Ready** - Environment-based config, Docker deployment, health monitoring
|
||||||
|
- 📊 **Comprehensive Statistics** - Runtime metrics, content processing, and federation growth tracking
|
||||||
|
- 🐳 **Containerized** - Simple Docker Compose deployment
|
||||||
|
- 📁 **File-based Configuration** - Easy RSS feed management via text files
|
||||||
|
|
||||||
- **📡 Multi-Instance Discovery** - Fetches content from configurable RSS feeds across Fediverse instances
|
## How it Works
|
||||||
- **⚡ Performance Scaling** - 20-100 posts per feed with URL parameters (`?limit=100`)
|
|
||||||
- **🐳 Production Ready** - Docker deployment, environment-based config, health monitoring
|
|
||||||
- **📊 Comprehensive Stats** - Runtime metrics, federation growth, performance tracking
|
|
||||||
- **🔧 Zero Maintenance** - Runs automatically every hour with duplicate detection
|
|
||||||
|
|
||||||
## 🚀 Quick Start
|
GTS-HolMirDas reads RSS feeds from various Fediverse instances and uses GoToSocial's search API to federate the discovered content. This approach:
|
||||||
|
|
||||||
|
- Maintains proper ActivityPub federation (posts remain interactive)
|
||||||
|
- Respects rate limits and instance policies
|
||||||
|
- Provides better content discovery for small instances
|
||||||
|
- Works alongside tools like FediFetcher for comprehensive federation
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone https://git.klein.ruhr/matthias/gts-holmirdas
|
git clone https://your-forgejo-instance.tld/user/gts-holmirdas
|
||||||
cd gts-holmirdas
|
cd gts-holmirdas
|
||||||
|
|
||||||
# Copy configuration templates
|
# Copy configuration templates
|
||||||
|
@ -30,83 +38,138 @@ nano .env # Add your GTS credentials
|
||||||
nano rss_feeds.txt # Customize RSS feeds
|
nano rss_feeds.txt # Customize RSS feeds
|
||||||
|
|
||||||
# Deploy
|
# Deploy
|
||||||
docker compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
# Monitor
|
# Monitor
|
||||||
docker compose logs -f
|
docker-compose logs -f
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📈 Performance at Scale
|
## Configuration
|
||||||
|
|
||||||
**Real Production Data:**
|
|
||||||
```
|
|
||||||
📊 Runtime: 8:42 | 487 posts processed | 3,150+ instances discovered
|
|
||||||
⚡ 56 posts/minute | 102 RSS feeds | +45 new instances per run
|
|
||||||
💾 Resource usage: ~450MB RAM total (GoToSocial + tools)
|
|
||||||
```
|
|
||||||
|
|
||||||
**Scaling Options:**
|
|
||||||
- **Conservative:** 20 posts/feed (~100 posts/run)
|
|
||||||
- **Balanced:** 50 posts/feed (~300 posts/run)
|
|
||||||
- **Aggressive:** 100 posts/feed (~600 posts/run)
|
|
||||||
|
|
||||||
## 🛠️ Configuration Essentials
|
|
||||||
|
|
||||||
### Environment Variables (.env)
|
### Environment Variables (.env)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Required
|
# GTS Server Configuration
|
||||||
GTS_SERVER_URL=https://your-gts-instance.tld
|
GTS_SERVER_URL=https://your-gts-instance.tld
|
||||||
GTS_ACCESS_TOKEN=your_gts_access_token
|
GTS_ACCESS_TOKEN=your_gts_access_token
|
||||||
|
|
||||||
# Performance Tuning
|
# Processing Configuration
|
||||||
MAX_POSTS_PER_RUN=25 # Posts per feed per run
|
MAX_POSTS_PER_RUN=25 # Posts per feed per run
|
||||||
DELAY_BETWEEN_REQUESTS=1 # Seconds between API calls
|
DELAY_BETWEEN_REQUESTS=1 # Seconds between API calls
|
||||||
LOG_LEVEL=INFO # DEBUG for troubleshooting
|
LOG_LEVEL=INFO # Logging verbosity
|
||||||
|
|
||||||
|
# RSS Configuration
|
||||||
|
RSS_URLS_FILE=/app/rss_feeds.txt # Path to RSS feeds file
|
||||||
|
|
||||||
|
# Optional: Monitoring
|
||||||
|
HEALTHCHECK_URL=https://hc-ping.com/your-uuid
|
||||||
```
|
```
|
||||||
|
|
||||||
### RSS Feeds (rss_feeds.txt)
|
### RSS Feeds (rss_feeds.txt)
|
||||||
```bash
|
|
||||||
# Use URL parameters to scale performance
|
```
|
||||||
https://mastodon.social/tags/homelab.rss?limit=50
|
# Example RSS feeds - customize for your interests
|
||||||
https://fosstodon.org/tags/selfhosting.rss?limit=100
|
# homelab
|
||||||
https://infosec.exchange/tags/security.rss?limit=75
|
https://mastodon.social/tags/homelab.rss
|
||||||
|
https://fosstodon.org/tags/homelab.rss
|
||||||
|
|
||||||
|
# selfhosting
|
||||||
|
https://mastodon.social/tags/selfhosting.rss
|
||||||
|
https://infosec.exchange/tags/selfhosting.rss
|
||||||
|
|
||||||
|
# Add your preferred instances and hashtags
|
||||||
```
|
```
|
||||||
|
|
||||||
### GoToSocial Access Token
|
## Access Token Setup
|
||||||
|
|
||||||
1. Login to your GoToSocial instance
|
1. Login to your GoToSocial instance
|
||||||
2. Settings → Applications → Create new application
|
2. Go to Settings → Applications
|
||||||
3. Required scopes: `read`, `read:search`, `read:statuses`
|
3. Create new application with scopes: `read`, `read:search`, `read:statuses`
|
||||||
4. Copy access token to `.env` file
|
4. Copy the access token to your `.env` file
|
||||||
|
|
||||||
## 📖 Complete Documentation
|
## Statistics Output
|
||||||
|
|
||||||
For detailed information, visit our **[Wiki](https://git.klein.ruhr/matthias/gts-holmirdas/wiki)**:
|
```
|
||||||
|
📊 GTS-HolMirDas Run Statistics:
|
||||||
|
⏱️ Runtime: 0:04:14
|
||||||
|
📄 Total posts processed: 45
|
||||||
|
🌐 Current known instances: 2519
|
||||||
|
➕ New instances discovered: +3
|
||||||
|
📡 RSS feeds processed: 25
|
||||||
|
⚡ Posts per minute: 10.6
|
||||||
|
```
|
||||||
|
|
||||||
- **[📋 Installation Guide](https://git.klein.ruhr/matthias/gts-holmirdas/wiki/Installation-Guide.-)** - Detailed setup, Docker configuration, deployment options
|
## Resource Requirements
|
||||||
- **[📈 Performance & Scaling](https://git.klein.ruhr/matthias/gts-holmirdas/wiki/Performance-%26-Scaling)** - Optimization tables, scaling strategies, resource planning
|
|
||||||
- **[🛠️ Troubleshooting](https://git.klein.ruhr/matthias/gts-holmirdas/wiki/Troubleshooting)** - Common issues, Docker problems, debugging guide
|
|
||||||
- **[⚙️ Advanced Configuration](https://git.klein.ruhr/matthias/gts-holmirdas/wiki/Advanced-Configuration)** - Environment variables, RSS strategies, production tips
|
|
||||||
- **[📊 Monitoring & Stats](https://git.klein.ruhr/matthias/gts-holmirdas/wiki/Monitoring-%26-Stats)** - Understanding output, health monitoring, metrics
|
|
||||||
- **[❓ FAQ](https://git.klein.ruhr/matthias/gts-holmirdas/wiki/FAQ+-+Frequently+Asked+Questions.-)** - Common questions and answers
|
|
||||||
|
|
||||||
## 🤝 Community & Support
|
- **Memory**: ~200-500MB depending on feed count
|
||||||
|
- **CPU**: Minimal (mostly I/O bound)
|
||||||
|
- **Storage**: <100MB for application, plus log storage
|
||||||
|
- **Network**: Depends on RSS feed count and frequency
|
||||||
|
|
||||||
- **[Contributing Guide](Contributing)** - Development setup and contribution guidelines *(coming soon)*
|
## Deployment Options
|
||||||
- **Issues**: [Report bugs or request features](https://git.klein.ruhr/matthias/gts-holmirdas/issues)
|
|
||||||
- **Contact**: [@matthias@me.klein.ruhr](https://me.klein.ruhr/@matthias) on the Fediverse
|
|
||||||
|
|
||||||
## 🔗 Related Projects
|
### Docker Compose (Recommended)
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
- **[FediFetcher](https://github.com/nanos/fedifetcher)** - Fetches missing replies and posts
|
### Standalone Docker
|
||||||
- **[GoToSocial](https://github.com/superseriousbusiness/gotosocial)** - Lightweight ActivityPub server
|
```bash
|
||||||
- **[slurp](https://github.com/VyrCossont/slurp)** - Import posts from other instances
|
docker build -t gts-holmirdas .
|
||||||
|
docker run -d --env-file .env \
|
||||||
|
-v ./data:/app/data \
|
||||||
|
-v ./gts_holmirdas.py:/app/gts_holmirdas.py:ro \
|
||||||
|
-v ./rss_feeds.txt:/app/rss_feeds.txt:ro \
|
||||||
|
gts-holmirdas
|
||||||
|
```
|
||||||
|
|
||||||
## 📄 License
|
## Monitoring
|
||||||
|
|
||||||
MIT License - see [LICENSE](LICENSE) file for details.
|
- **Logs**: `docker-compose logs -f`
|
||||||
|
- **Health**: Optional Healthchecks.io integration
|
||||||
|
- **Statistics**: Built-in runtime and performance metrics
|
||||||
|
- **Resource Usage**: Docker stats or container monitoring tools
|
||||||
|
|
||||||
## 🙏 Acknowledgments
|
## Troubleshooting
|
||||||
|
|
||||||
- Inspired by [HolMirDas](https://github.com/aliceif/HolMirDas) by [@aliceif](https://mkultra.x27.one/@aliceif)
|
### Common Issues
|
||||||
|
|
||||||
|
**No posts processed**: Check access token permissions and RSS feed URLs
|
||||||
|
|
||||||
|
**Rate limiting errors**: Increase `DELAY_BETWEEN_REQUESTS` or reduce feed count
|
||||||
|
|
||||||
|
**High memory usage**: Reduce `MAX_POSTS_PER_RUN` or feed frequency
|
||||||
|
|
||||||
|
**Container won't start**: Verify `.env` file format and required variables
|
||||||
|
|
||||||
|
### Debug Mode
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Enable debug logging
|
||||||
|
echo "LOG_LEVEL=DEBUG" >> .env
|
||||||
|
docker-compose restart gts-holmirdas
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
1. Fork the repository
|
||||||
|
2. Create a feature branch
|
||||||
|
3. Make your changes
|
||||||
|
4. Test thoroughly
|
||||||
|
5. Submit a pull request
|
||||||
|
|
||||||
|
## Related Projects
|
||||||
|
|
||||||
|
- [FediFetcher](https://github.com/nanos/fedifetcher) - Fetches missing replies and posts
|
||||||
|
- [GoToSocial](https://github.com/superseriousbusiness/gotosocial) - Lightweight ActivityPub server
|
||||||
|
- [slurp](https://github.com/VyrCossont/slurp) - Import posts from other instances
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT License - see LICENSE file for details.
|
||||||
|
|
||||||
|
## Acknowledgments
|
||||||
|
|
||||||
|
- Inspired by the [HolMirDas](https://github.com/aliceif/HolMirDas) concept
|
||||||
- Built for the GoToSocial community
|
- Built for the GoToSocial community
|
||||||
- RSS-to-ActivityPub federation approach
|
- RSS-to-ActivityPub approach inspired by Fediverse discovery challenges
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
GTS-HolMirDas: RSS-based content discovery for GoToSocial
|
GTS-HolMirDas: RSS-based content discovery for GoToSocial
|
||||||
|
Fetches URLs from RSS feeds and uses GTS search API to federate content
|
||||||
Inspired by HolMirDas by @aliceif:
|
|
||||||
- GitHub: https://github.com/aliceif/HolMirDas
|
|
||||||
- Fediverse: @aliceif@mkultra.x27.one
|
|
||||||
|
|
||||||
This GoToSocial adaptation extends the original RSS-to-ActivityPub concept
|
|
||||||
with Docker deployment, multi-instance processing, and comprehensive monitoring.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -46,8 +40,8 @@ class GTSHolMirDas:
|
||||||
try:
|
try:
|
||||||
with open(rss_urls_file, 'r') as f:
|
with open(rss_urls_file, 'r') as f:
|
||||||
self.config["rss_urls"] = [
|
self.config["rss_urls"] = [
|
||||||
line.split('#', 1)[0].strip() for line in f
|
line.strip() for line in f
|
||||||
if line.strip() and not line.strip().startswith('#')
|
if line.strip() and not line.startswith('#')
|
||||||
]
|
]
|
||||||
self.logger.info(f"Loaded {len(self.config['rss_urls'])} RSS URLs from file: {rss_urls_file}")
|
self.logger.info(f"Loaded {len(self.config['rss_urls'])} RSS URLs from file: {rss_urls_file}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
# Example RSS feeds - customize for your interests
|
# Example RSS feeds - customize for your interests
|
||||||
|
|
||||||
# Add ?limit=X parameter to increase posts per feed (default: 20, max: 100)
|
# homelab
|
||||||
# Higher limits = more content discovery, but longer processing time
|
https://mastodon.social/tags/homelab.rss
|
||||||
# Performance tip: Start with limit=50, then increase to 100 if needed
|
https://fosstodon.org/tags/homelab.rss
|
||||||
|
|
||||||
# homelab (up to 100 posts per feed)
|
# selfhosting
|
||||||
https://mastodon.social/tags/homelab.rss # 20 posts/feed (default)
|
https://mastodon.social/tags/selfhosting.rss
|
||||||
https://fosstodon.org/tags/homelab.rss?limit=50 # 50 posts/feed
|
https://infosec.exchange/tags/selfhosting.rss
|
||||||
|
|
||||||
# selfhosting (up to 100 posts per feed)
|
# docker
|
||||||
https://mastodon.social/tags/selfhosting.rss?limit=100 # 100 posts/feed
|
https://social.tchncs.de/tags/docker.rss
|
||||||
https://infosec.exchange/tags/selfhosting.rss?limit=100 # 100 posts/feed
|
https://fosstodon.org/tags/docker.rss
|
||||||
|
|
||||||
# docker (up to 100 posts per feed)
|
# Add your preferred instances and hashtags...
|
||||||
https://social.tchncs.de/tags/docker.rss?limit=100 # 100 posts/feed
|
|
||||||
https://fosstodon.org/tags/docker.rss?limit=100 # 100 posts/feed
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue