Having a way to give a human readable filename to files that are opened outside Joplin

This is a snapshot from a pdf reader. Hard to find back what is what.

image

I had some ideas about how this could be implemented, but they likely don’t work.
eg. renaming before opening, or copying in a tmp folder. Problem is how do Joplin know when the file has been closed and is safe to place back in storage ?

3 Likes

Bump.

I love Joplin but having cryptic filename is really hurting my workflow.
For making things easier, would it be possible to add an option for not renaming the imported files?

I didn’t get it why Joplin is encrypting file names?

As far as my knowledge it is important to encrypt file names on server/website, its a security issue there. But in my PC it should not be a security issue.

Can anybody explain this?

@giteshsharma — it’s not “encrypting” the names, it’s just storing them using a unique file name that doesn’t change when the title changes. That’s valuable, indeed vital to me personally for long-term integrity of internal links. But I see why some people don’t like it.

One option would be to make them be "xxxxxx_note_title_with_underscores_for_spaces, tho that might run into problems with characters in titles that some filesystems don’t allow in file names.

I have an experimental (proof-of-concept) implementation of a Joplin filesystem. It works (Linux) with FUSE. It uses the Joplinserver as a back end and provides a filesystem view on the notes. Notes and folders are identified by name.

For example:

When accessed via the joplin fuse filesystem:

% ls -l tmp/notes/joplin
drwxr-xr-x 1 jv jv 12 Apr 30 11:41 Boodschappen/
drwxr-xr-x 1 jv jv  9 Apr 30 11:41 Diversen/
drwxr-xr-x 1 jv jv  0 Apr 30 11:41 Imported Notes/
drwxr-xr-x 1 jv jv 22 Apr 30 11:41 Muziek/
drwxr-xr-x 1 jv jv 12 Apr 30 11:41 Privé/
drwxr-xr-x 1 jv jv  1 Apr 30 11:41 Projekten/
drwxr-xr-x 1 jv jv 11 Apr 30 11:41 Scratch/
% ls -l tmp/notes/joplin/Scratch/
-rw-r--r-- 1 jv jv 0 Mar 24 09:28 AA Several html things.md
-rw-r--r-- 1 jv jv 0 Feb 14 11:24 % cat update.sh.md
-rw-r--r-- 1 jv jv 0 Apr 17 11:03 Checkboxes_-_Copy.md
-rw-r--r-- 1 jv jv 0 Mar  6 08:35 Checkboxes.md
-rw-r--r-- 1 jv jv 0 Apr 16 14:37 I have a song in 6-8 that has measures with bass on 1, bass on 1 and 6, and bass.md
-rw-r--r-- 1 jv jv 0 Jan 28  2019 Lorem Ipsum.md
-rw-r--r-- 1 jv jv 0 Mar  3  2019 README.md
-rw-r--r-- 1 jv jv 0 Dec 18 22:51 Style.md
drwxr-xr-x 1 jv jv 0 Apr 30 11:41 Sub2Scratch/
drwxr-xr-x 1 jv jv 3 Apr 30 11:41 SubScratch/
% cat tmp/notes/joplin/Scratch/Checkboxes_-_Copy.md 
- [ ] Seitan
- [ ] Blanke bonen
- [ ] Berglinzen
- [ ] Couscous
- [ ] Citroensap
- [ ] Limoensap

Dates are accurate. Size of a folder is the number of subnotes/folders.
You can view, modify, rename, create notes and folders. All changes are immediately reflected in Joplin.

Limitations: No duplicate file/folder names.

Drop me a note if you want to play with it.

5 Likes

Hey Rob, I like the idea to simply add the note name to the unique identifier. However I think it would be best to have the true filename instead of the note name, as you could have dozens of files in a single not. Also it would be best to have it in the form <filename>_ID_.ext as some application will hide the leading part of the filename when it is too long.

Also, I don’t know how it is made in Joplin, but I believe the IDs do not need to be that long.

I have made a JS unique ID generator some time ago that is taking time to avoid collision furthermore.

genId() {
	const dateStr = Date.now()
		.toString(36)
		.slice(-4);
	const randStr = Math.round(Math.random() * 1e6)
		.toString(36)
		.padStart(4, "x");
	return randStr + dateStr;
},
genId()
"3jqxzpg0"
genId()
"1j7lzpt0"

It needs to be tested tho.
But yeah, collision would already be unlikely with a filename+simpleID.

1 Like

Thank you for your POC @sciurius !

Can you share it with us ? I love Joplin but the notes naming convention is a nightmare for my workflow.

It could be interesting to add an UID at the end of filename to avoid collisions, but if your implementation works, it's so great !

Have a good day :slight_smile:

Very interesting idea, but I don’t know how difficult it is to implement. After all, the current “content” of the note can affect the “title”. If the content of the note is modified, the change in the title will cause the synchronized file to change., There will be some troublesome problems…

1 Like

Sure. I needed to make a couple of quick fixes due to recent changes in Joplin’s WebClipper API but it seems to work again.

1 Like

Symlinks may provide a simple solution. But then I think there is or used to be some issue with Windows not supporting symlinks by default

Hello folks,

It seems like some solution have been implemented and I just wanted to say a big thanks to the dev :slight_smile:

1 Like

Came here to request this as well. It helps with using joplin on mobile and visual studio on windows/mac, e.g. with this setup: https://kortina.nyc/essays/suping-up-vs-code-as-a-markdown-notebook/

@PureBasic - which solution was implemented, do you have a link to the docs? I spent a while trying to find it in settings and the docs, but couldn't. Is there a workaround for human-readable filenames?

Thanks so much!

@jaan I think you might like @rxliuli's vscode plugin which will allow you to get the benefits of using vscode as a powerful editor, and the benefits of using Joplin.

Thanks @CalebJohn! That's very cool. The file names are not human readable, but I guess that's OK if the search feature works well on titles.

Hello @jaan
Well when you open a file from Joplin, it now create a copy like this:
image

And I can see this in the pdf reader:
image

I guess it is not perfect at all, but it was way worst before (see first post in this thread).

Good to know! Is that pdf screenshot on android/iOS? That would be great to support as well in the background sync.

Erf no it is the desktop application. I'm not using Joplin on Android for anything else than quick note taking.