joplin-plugin-hotfolder icon indicating copy to clipboard operation
joplin-plugin-hotfolder copied to clipboard

Cannot import .Rmd and .R files as text

Open petzi53 opened this issue 1 year ago • 9 comments

Thank you for your excellent plugin.

I imported as text files successfully .txt, .md and .html files. But did not succeed with .Rmd and .R files. I do not know what I did wrong. See my plugin configuration.

image


  • macOS 12.4. (Monterey),
  • Joplin Desktop 2.8.8 (prod, darwin)
  • Hotfolderv1.0.1

petzi53 avatar Jul 25 '22 20:07 petzi53

the files are imported as attachement?

JackGruber avatar Jul 26 '22 04:07 JackGruber

Yes. Your plugin created a new note with the name of the .R file, and inside this new note, the file was imported as an attachment.

petzi53 avatar Aug 02 '22 08:08 petzi53

There is a small bug on mixed case file extentions.

JackGruber avatar Aug 02 '22 12:08 JackGruber

Could you please test the attached Version.

  1. Downlaod io.github.jackgruber.hotfolder.zip
  2. Close Joplin
  3. Replace the the io.github.jackgruber.hotfolder.jpl in .config\joplin-desktop\plugins with the version from the Zip file
  4. Start Joplin

JackGruber avatar Aug 04 '22 17:08 JackGruber

When I downloaded io.github.jackgruber.hotfolder.zip and unzipped it I got a folder with a manifest.json and an index.js file, but not a .jpl file, not io.github.jackgruber.hotfolder.jpl.

petzi53 avatar Aug 08 '22 09:08 petzi53

When you unzip the file there is a is a io.github.jackgruber.hotfolder.jpl file, when you untar the jpl file, then you would see a index.js and a manifest.json. Plz. don't untar the jpl.

JackGruber avatar Aug 09 '22 15:08 JackGruber

Thank you for your help and patience. I didn't know that macOS automatically untars .zip files by default. I had to use The Unarchiver, a third-party tool, to get the .jpl file.

.Rmd and .R files are not attached anymore as PDFs but imported as text into Joplin! 👍

But there are two errors in the conversion process:

  1. Frontmatter in .Rmd files is not converted correctly. It displays wrongly in the Viewer, but also in the edit mode is a formatting error in the last line.
  2. The parameters for code snippets are not preserved.

I produced a screenshot and loaded it to Imgur so you can see it yourself. (Uploading into this GitHub post didn't work.)

petzi53 avatar Aug 10 '22 17:08 petzi53

Sorry, the file is imported as 1 to 1 as text, therefore also frontmatter would be imported as text. The hotfolder handles the text content as you copy paste it into a note.

JackGruber avatar Aug 10 '22 17:08 JackGruber

Ok, thank you. That's fine with me!

petzi53 avatar Aug 10 '22 20:08 petzi53