Skip to content
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

[Bear] Assets are not imported correctly #229

Closed
tanob opened this issue Apr 7, 2024 · 1 comment
Closed

[Bear] Assets are not imported correctly #229

tanob opened this issue Apr 7, 2024 · 1 comment
Labels
bear duplicate This issue or pull request already exists

Comments

@tanob
Copy link

tanob commented Apr 7, 2024

If you're importing a bear2bk file with notes that reference assets with the same base name then only the first asset is imported and all notes will reference the same asset.

For example if you're importing the following bear2bk file with two different assets called image_1.png, only one will be imported because the importer is putting all the assets into the same assets folder:

$ unzip -l Bear\ Notes\ 2024-03-31\ at\ 22.29.bear2bk
Archive:  Bear Notes 2024-03-31 at 22.29.bear2bk
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  04-07-2024 12:55   Bear Notes 2024-03-31 at 22.29.bear2bk/
        0  04-07-2024 12:07   Bear Notes 2024-03-31 at 22.29.bear2bk/BB duvida.textbundle/
      452  03-31-2024 22:29   Bear Notes 2024-03-31 at 22.29.bear2bk/BB duvida.textbundle/text.md
      514  03-31-2024 22:29   Bear Notes 2024-03-31 at 22.29.bear2bk/BB duvida.textbundle/info.json
        0  04-07-2024 12:07   Bear Notes 2024-03-31 at 22.29.bear2bk/BB duvida.textbundle/assets/
    23699  06-10-2020 17:52   Bear Notes 2024-03-31 at 22.29.bear2bk/BB duvida.textbundle/assets/image_1.png
        0  04-07-2024 12:07   Bear Notes 2024-03-31 at 22.29.bear2bk/Boleto mockups.textbundle/
      840  03-31-2024 22:29   Bear Notes 2024-03-31 at 22.29.bear2bk/Boleto mockups.textbundle/text.md
      514  03-31-2024 22:29   Bear Notes 2024-03-31 at 22.29.bear2bk/Boleto mockups.textbundle/info.json
        0  04-07-2024 12:07   Bear Notes 2024-03-31 at 22.29.bear2bk/Boleto mockups.textbundle/assets/
    27147  06-10-2020 18:01   Bear Notes 2024-03-31 at 22.29.bear2bk/Boleto mockups.textbundle/assets/image_2.png
   135510  06-10-2020 18:01   Bear Notes 2024-03-31 at 22.29.bear2bk/Boleto mockups.textbundle/assets/image_1.png
    32252  06-10-2020 18:01   Bear Notes 2024-03-31 at 22.29.bear2bk/Boleto mockups.textbundle/assets/with visa selected.png

Ideally the assets should be put into subfolders that have the note's title into the assets folder, this way they get "namespaced" and don't conflict.

tanob added a commit to tanob/obsidian-importer that referenced this issue Apr 7, 2024
@kepano kepano added the bear label Apr 15, 2024
@kepano
Copy link
Collaborator

kepano commented Apr 15, 2024

This looks like a duplicate of #67

Ideally the assets should be put into subfolders that have the note's title into the assets folder, this way they get "namespaced" and don't conflict.

Importer respects the user's settings under Files and links > Default location for new attachments, so we'll need to increment the file name if the user has specified keeping all images at the top level of their attachments folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bear duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants