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

Folders are being created by no note content is being exported #1

Open
DawMatt opened this issue Jul 18, 2022 · 13 comments
Open

Folders are being created by no note content is being exported #1

DawMatt opened this issue Jul 18, 2022 · 13 comments

Comments

@DawMatt
Copy link

DawMatt commented Jul 18, 2022

I'm using Export to SSG v1.03 with Joplin v2.8.8. I've tried this on both Windows and Mac operating systems. I haven't been able to get notes to export in any of these environments.

My tests have involved:

  1. Right clicking on a Notebook that includes a limited number of notes (e.g. 5)
  2. Selecting Export to SSG
  3. Selecting an SSG. I've been primarily using Hugo, but have also tried to Jekyll
  4. Pasting in a path to a test folder. I've tried this both with and without a trailing slash (back or forward slash as appropriate for that operating system
  5. Left the optional frontmatter field blank

In all of my tests the expected folders are created in the correct location but no files are written to disk.

In my tests I've tried:

  • right clicking on a notebook that I've already navigated to, or to a different notebook

Can you please help?

Joplin 2.8.8 (prod, win32)

Client ID: ace00c44c4e5459484ca15e671bc9f9d
Sync Version: 3
Profile Version: 41
Keychain Supported: Yes

Revision: c2a6a13
@DawMatt
Copy link
Author

DawMatt commented Aug 3, 2022

Please note I've also tried the fork here: https://github.com/xczics/joplin-exports-to-ssg . It adds some new features and changes how the settings are stored. Given it was released more recently I was hoping it might have resolved this issue. Unfortunately I see the same behaviour (no content exported) regardless of whether using Hugo or Jekyll as the SSG.

Any ideas? @aman-d-1-n-only or @xczics ?

@xczics
Copy link

xczics commented Aug 4, 2022

I have not meet this situation. But I think the path should be absolute path. How's your path look like? In my Mac, I type "/Users/myusername/WebSite".
My fork was only focus on JekyII, because I only use it. When I add new features, I found the developing mod of Joplin is helpful, for I can view where the error happened. You can try it.

@xczics
Copy link

xczics commented Aug 4, 2022

image

This is a snapshot of @aman-d-1-n-only 's code. For the folder has been created, the code until fs.makefp is ok, I think. You may tried to add some code to debug. First, to test the bug is from 1) the note has not been filtered? or 2) can not write files. if is 2), check the permission issues.

@DawMatt
Copy link
Author

DawMatt commented Oct 9, 2022

@xczics , thanks for the feedback. I have been providing a fully qualified path but that hasn't been making a difference. The folders are created, but no notes are exported within the folders. The folders are empty.

I even tried using your plugin and Jekyll. Same result - folders created, no notes exported. I set the fully qualified path in settings - /Users/<username>/Documents/Notes - and used Jekyll. Right clicked on the notebook folder, select Export to SSG, leave the Frontmatter section unmodified. It creates _posts and resources folders but no content.

This sounds like a pretty fundamental issue here. It is almost like the filter is returning 0 notes even through there are 4 notes in the folder, or close to 270 notes in that Notebook. I had hoped it will be something simple/obvious.

Looks like I'll need to learn Joplin plugin development if this is to be resolved.

@AleMunin
Copy link

AleMunin commented Feb 16, 2023

I had this problem back in December when I installed the plugin, forgot about it, and trying it again had the same result. Neither option works (Hugo, Jekyll, Gatsby).

Folders are created but no file is moved.
No error or success message to give more information.

Edit: It seems to have been the same issue reported in a 2021 thread.

@DawMatt
Copy link
Author

DawMatt commented Feb 18, 2023

Thanks for confirming @AleMunin . I've just retested and can confirm I'm still experiencing the issue on a Mac.

@JeroenDedimo
Copy link

I can confirm I'm experiencing the exact same issue on Ubuntu Linux

@birchtree2
Copy link

I'm experiencing the exact same issue on Windows11 too. Some files in the notebooks are created, some are not, and some are created without the '.md' extension.

@tomthe
Copy link

tomthe commented Sep 18, 2023

I found the reason for this issue.
To retrieve the to be exported notes, he plugin uses the https://joplinapp.org/api/references/plugin_api/classes/joplindata.html API, which in turn is similar to the rest API https://joplinapp.org/api/references/rest_api/ . But it only looks at the first page with the first 100 returned notes. If you have more than 100 notes in Joplin, this plugin might not see them. The fork by xczics has the same bug. I forked it and changed it to use the search endpoint so that all notes with the tag "blog" are returned. works well so far. If you are interested I can create a pull request or upload my plugin on my Github.

@taophp
Copy link

taophp commented Sep 21, 2023

@tomthe Yes, please, do both !

@aman-d-1-n-only
Copy link
Owner

aman-d-1-n-only commented Sep 22, 2023

I found the reason for this issue. To retrieve the to be exported notes, he plugin uses the https://joplinapp.org/api/references/plugin_api/classes/joplindata.html API, which in turn is similar to the rest API https://joplinapp.org/api/references/rest_api/ . But it only looks at the first page with the first 100 returned notes. If you have more than 100 notes in Joplin, this plugin might not see them. The fork by xczics has the same bug. I forked it and changed it to use the search endpoint so that all notes with the tag "blog" are returned. works well so far. If you are interested I can create a pull request or upload my plugin on my Github.

@tomthe Create a pull request. I will check, if it works then I will make it live as well.

@tomthe
Copy link

tomthe commented Sep 26, 2023

Hi @taophp @aman-d-1-n-only,

I made a new repository here: https://github.com/tomthe/joplin-exports-to-ssg

But: It changes the behavior of the plugin: Instead of exporting all subfolders of a specific notebook, it exports all notes with the tag 'blog' (which can be changed in the settings). I don't think it would be good to just change this behavior like this in an update? That's why I have not created a pull request yet. What do you think?

@micmalti
Copy link

micmalti commented Oct 9, 2023

Has there been any progress on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants