{% extends "base.html" %} {% from "icons.html" import icon, sep %} {% from "ui.html" import csrf_field, file_input with context %} {% block title %}{{ _("Import") }} · {{ space.name }} · Synaptane{% endblock %} {% block crumbs %}{{ sep() }}{{ org.name }}{{ sep() }}{{ space.name }}{{ sep() }}{{ _("Import") }}{% endblock %} {% block content %} {% set base = '/o/' ~ org.slug ~ '/' ~ space.slug ~ '/-/import' %} {% macro paths(items) -%} {% if items|length > shown %}

{{ _("and {count} more", count=items|length - shown) }}

{% endif %} {%- endmacro %}

{{ _("Import a zip: Obsidian, Markdown, Notion or Confluence") }}

{% if plan is none %}

{{ _("An Obsidian vault or any folder of Markdown files, zipped with its attachments, or the zip of a Notion export (Markdown & CSV) or of a Confluence space exported in HTML. Nothing is written yet: you will see what the archive holds first. Markdown files are kept as they are; Notion and Confluence pages are converted to Markdown, with their links. Nothing already in the space is overwritten.") }}

{{ csrf_field() }}
{{ file_input("archive", "archive", required=true) }}
{% else %} {% set count = plan.new|length %}
{% if plan.folder %}{% endif %}

{{ _(pl(plan.pages, "{n} page", "{n} pages"), n=plan.pages) }} · {{ _(pl(plan.attachments, "{n} attachment", "{n} attachments"), n=plan.attachments) }}{% if plan.folder %} · {{ _("into {folder}", folder=plan.folder) }}{% endif %}{% if converted %} · {{ _(pl(plan.links.rewritten, "{n} link rewritten", "{n} links rewritten"), n=plan.links.rewritten) }}{% endif %}

{% if converted %}

{{ _("Pages are converted to Markdown, with clean names; their links lead to the new paths.") }}

{% endif %}
{{ csrf_field() }}{% if chosen %}{% endif %} {% if plan.with_secrets %}

{{ _("Likely secrets") }} {{ plan.with_secrets|length }}

{{ _("These files are left out: a secret pushed to Git is hard to erase. Tick one only if it holds no real secret.") }}

{% if plan.with_secrets|length > shown %}

{{ _("and {count} more", count=plan.with_secrets|length - shown) }}

{% endif %}
{% endif %}
{% if plan.new %}
{{ _("Files to import") }} {{ count }}{{ paths(plan.new|map(attribute="path")|list) }}
{% endif %} {% if plan.existing %}
{{ _("Already in the space, left as they are") }} {{ plan.existing|length }}{{ paths(plan.existing) }}
{% endif %} {% if plan.too_large %}
{{ _("Too large (25 MB maximum per file), left out") }} {{ plan.too_large|length }}{{ paths(plan.too_large) }}
{% endif %} {% if plan.links.broken %}
{{ _("Links that lead nowhere: their page is not in the export") }} {{ plan.links.broken_count }} {% if plan.links.broken_count > shown %}

{{ _("and {count} more", count=plan.links.broken_count - shown) }}

{% endif %}
{% endif %} {% if plan.skipped %}
{{ _("Files of the export not imported as they are (tables turned into pages, styles, icons)") }} {{ plan.skipped|length }} {% if plan.skipped|length > shown %}

{{ _("and {count} more", count=plan.skipped|length - shown) }}

{% endif %}
{% endif %} {% if plan.refused %}
{{ _("Refused: unsafe path, link, encrypted file or folder conflict") }} {{ plan.refused|length }}{{ paths(plan.refused) }}
{% endif %} {% if plan.left_out %}

{{ _(pl(plan.left_out, "{n} hidden or system file left out (.obsidian, .trash…).", "{n} hidden or system files left out (.obsidian, .trash…)."), n=plan.left_out) }}

{% endif %}
{% if plan.new or plan.with_secrets %}{% else %}

{{ _("Nothing to import.") }}

{% endif %}
{{ csrf_field() }}
{% endif %} {% endblock %}