Markdown mirror: should it import back? (properties syntax, page tags and aliases)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- markdown
- Lĩnh vực
- tooling
Hướng nghiên cứu
This is an open design question, so the first step is a maintainer decision between options 1A/1B and 2A/2B, not code. Read ADR 0016 and docs/logseq-markdown-syntax.md for the mirror's property format, then block-properties-content in logseq.common.export.file, which drops db-attribute-properties (:block/tags, :block/alias). Only after a choice is agreed would the importer in logseq.graph-parser and tests change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Two questions about the Markdown mirror (ADR 0016) and Logseq's own Markdown importer, found by fuzzing the loop mirror → import as a file graph → compare blocks.
ADR 0016 says the mirror is for files that can be "read by external tools, backed up, indexed, or inspected outside Logseq", and also that it "is not a backup format with guaranteed import fidelity". The answers depend on where between those two the mirror should sit.
1. Should the importer read the mirror's property syntax?
The mirror writes properties as list items with * (ADR Markdown Content 5, docs/logseq-markdown-syntax.md):
- Ship it
* deadline:: Jan 1st, 2024
* rating:: 5
The file-graph importer (logseq.graph-parser) reads properties only in the file-graph form, deadline:: Jan 1st, 2024 without the * . With the * it reads a list item with text, so every property of every type (date, number, url, checkbox, choice, node, default) is lost on import, and the * key:: value text ends up in the block.
- A. Teach the importer that
* key:: valueis a property, so a mirror imports with its properties. - B. Leave it: the mirror is a readable copy, not something to import back.
2. How should the mirror write page tags and aliases?
Today the mirror writes neither (block-properties-content in logseq.common.export.file drops db-attribute-properties, which holds :block/tags and :block/alias, and the mirror adds tag tokens only to block lines). So a page tagged Book with alias Dorian has no trace of either in its file. Two ways to write them:
- A.
* tags:: [[Book]]and* alias:: [[Dorian]], the mirror's own property syntax (imports only with 1A). - B.
tags:: [[Book]]andalias:: [[Dorian]], the file-graph form, which the importer already reads.
Whichever you prefer, happy to send the PR with tests.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 29
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của logseq/db-test
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedCó thể đã có người làm @RaphaelFakhri đã nhận 20 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabledCó thể đã có người làm @tiensonqin đã nhận 23 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Tất cả issue của logseq/db-test
Issue tương tự
-
enhancement triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ShaftHQ/SHAFT_ENGINE#7902 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
openlayers/create-ol-app#70 ·
-
[Request]: OfficeIMO StudioĐang mởpackage-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ScoopInstaller/Extras#19317 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 83/100
FinanceFlash/unvibecode#652 ·
Maintainer thường phản hồi trong vòng 1 ngày