{% extends 'layout.html.twig' %} {% block body %} {% if nzine is not defined %}

{{ 'heading.createNzine'|trans }}

N-Zines are in active development. Expect weirdness. {% if not is_granted('IS_AUTHENTICATED_FULLY') %} Login Required: You must be logged in to create an N-Zine. Please log in to continue. {% endif %}

An N-Zine is a digital magazine definition for collecting long form articles from the nostr ecosystem according to specified filters. The N-Zine can then be read and browsed as a traditional digital magazine made available on this platform. Additionally, it can be subscribed to using the nostr bot which will be generated during the setup process. Your currently logged-in npub will be assigned to the N-Zine as an editor, so you can come back later and tweak the filters.

You can automatically aggregate content from RSS feeds. Just provide a feed URL and configure categories with matching tags. The system will periodically fetch new articles and publish them as Nostr events. {{ form_start(form) }} {{ form_widget(form) }} {{ form_end(form) }}
{% else %}

{{ 'heading.editNzine'|trans }}

{% if not canCreateIndices %} Ready to Publish: Add your categories below, then click "Publish N-Zine" to create all indices in one step. {% if nzine.state != 'published' %}
Current state: {{ nzine.state }}. Once published, you can add more categories later. {% endif %}
{% endif %} {% if nzine.feedUrl %} RSS Feed: {{ nzine.feedUrl }} {% if nzine.lastFetchedAt %}
Last fetched: {{ nzine.lastFetchedAt|date('Y-m-d H:i:s') }} {% else %}
{% if canCreateIndices %}Ready to fetch. Run: php bin/console nzine:rss:fetch --nzine-id={{ nzine.id }}{% else %}Feed will be available after publishing.{% endif %} {% endif %}
{% endif %} {% if canCreateIndices %}

Indices

{% endif %}

Categories

{% if canCreateIndices %} Edit your categories. New categories will be added to the index. You have {{ nzine.mainCategories|length }} categories configured. {% else %} Add categories for your N-Zine. Categories help organize articles by topic. {% if nzine.feedUrl %}
RSS Matching: Tags are used to match RSS feed items to categories (case-insensitive). {% endif %} {% endif %}

{{ form_start(catForm) }}
{{ form_end(catForm) }} {% if not canCreateIndices and nzine.mainCategories|length > 0 %}

Ready to Publish?

You have configured {{ nzine.mainCategories|length }} categories. Click the button below to publish your N-Zine. This will:

Note: You'll only need to sign the indices once. After publishing, you can still add more categories.

{% endif %} {% if nzine.feedUrl and canCreateIndices %}

RSS Feed Management

Feed URL: {{ nzine.feedUrl }}
{% if nzine.lastFetchedAt %} Last Fetched: {{ nzine.lastFetchedAt|date('Y-m-d H:i:s') }}
{% endif %}

Fetch RSS feed articles using the console command:

docker-compose exec php php bin/console nzine:rss:fetch --nzine-id={{ nzine.id }}

Or test without publishing: --dry-run

Set up a cron job to automate fetching. See documentation for details.

{% endif %} {% endif %} {% endblock %}