-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The .json file is empty #1
Comments
The
Yes, this is by design. That's also why there is an id extraction step first.
This is probably because the
This is a quirk of my files, since all my logseq files had a
at the beginning, and the script takes the name from that. But logseq only adds this if the page is in a namespace (e.g.
Thanks! |
Thanks for the reply. Then my final question shifts to "how can I read the I personally think the command I hit is correct. $ E:\xxx\logseq2obsdn> cargo run -- "E:\xxx\Hex\pages" "E:\xxx\Migration" --extract-ids There are lots of Could you give me any hints? |
This issue was actually related to the empty file name. It is now fixed with the last revision. And no need for a |
Thank you @N3xed ! It works right now! In general, the script migrates almost everything! I would like to offer some personal opinions In order to scale the capability of this project, ⚠DISCLAIMER: AutomationCurrently, the greatest pain point from my perspective is to migrate from file to file. The solutions flash into my mind are the following. Solution1 - files parsing pipelineSince you already have a Solution2 - batch scriptSimply attach a batch script to automate in this repo could be a quick-fix solution. However, this is just a workaround and without scalability in software engineering perspective. Assets related issuesYour intention to copy and paste the asset file to the destination is good to avoid "ghost" asset from logseq. Maybe there should some cases you could also consider. thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 123, kind: InvalidFilename, message: "The filename, directory name, or volume label syntax is incorrect." }' The assests can't be handled varies. Following are the few.
Solution1 Error HandlingSince there might be a bunch of reasons that can crash a program, it is good to add error-handling logic in the code. In C++, there is a Solution2 Just ignore the assets pathIt seems silly at the first glance but it is reasonable in the scenario when logseq and obsidian are working together. example 1, example 2, example 3. Thank You!It is good in general for migration! Sorry I am not a rust programmer, otherwise I can create a Pull Request rather than mumbling a lot... Thank you and wish you a pleasant life! Peace! |
Hi @N3xed , thank you so much for making the script available🌹! Before asking the question, I have to admit that I am not a Rust programmer so please forgive me for asking silly questions.
So here begin...
Files structure
The file structure is the following.
Hex
is mylogseq
repo andMigration
is my target vault folder.Question 1
Question: Should
ids.json
be empty?I have tried your scripts while the
ids.json
seems empty... The commands I wrote:And I got the following...
📄
ids.json
{ "refs": {} }
Question 2
Question: Is the one-time conversion by design?
For the command you mentioned in the
README.md
, it saidSo in current version of the script, do I have to manually convert each file like the following?
Problem Report 1
When I hit the command
and I got
The error is fixed when I copied the
assets
folder from logseq to vault. Maybe this instruction could be documented in theREADME.md
.😉Problem Report 2
From the fix of problem report 1, I run the command again and the conversion was succeeded. However, the file name is
.md
rather thanAlgorithm.md
.At this point, I am not sure whether it was caused by the false setup in previous steps...
Thank You!
Anyhow, this script does very good in general especially handling the block logic to heading logic! Thank you!
The text was updated successfully, but these errors were encountered: