Creating notes from anywhere

Hi,

A thing that is still frustrating for me with joplin, is that I can’t create a note from anywhere.
From the office, I don’t want to sync my private notes on my office computer.
I always have my mobile near my hand, but sometimes, the mobile is not appropriate, not convenient.
So a computer is the last solution. So for the moment, I mail ideas to myself. then @ home save the note / grabbed web page.

As with Jong i’m able to import notes into my Joplin notebooks, I think I could create notes into a markdown file on the cloud service, in a dedicated folder, which I will read and import.

That way, with jong in a crontab, the notes will be available on phone / home desktop

@laurent: before starting this improvement, and to avoid to make the same work, did you begin something about that ? I think about that issue we discussed

Another option would be have a folder on the sync target which can be used to post notes, which are then added to the clients during sync. That would require adding support for this on Joplin though.

Sure feel free to give a try, I haven’t done anything about this yet.

We could call the directory for example “letterbox” since that’s where users will post their notes. Then the process would be like this:

  • User drops a file in that special directory (we could support .md and .txt files for now).
  • Joplin lists the .md and .txt files in there.
    • For each file, rename that file to a globally unique string (UUID)
    • Check that the file was successfully renamed - if not, there was a race condition, so skip that file
    • Now download the file and create a note from it
    • Delete the file and repeat

The process to rename the file to something else is important because it will prevent race conditions. For example if client 1 rename the file, and client 2 rename it too, only the one that succeeded will proceed. That will prevent two different clients from importing the same note twice.

One issue is that we probably should have a way to define to which notebook the note should be posted to. At the moment, it could simply be whatever Folder.defaultFolder() returns.

I would have been sharped in "before starting this improvement", I spoke about jong :slight_smile:
I won't be able to do anything in ReactJs right now :confused:

Otherwise, I keep this process. It's clear and I could proceed.

About the notebook name, couldn't we add the name of the folder to the markdown file (I spoke about it earlier when comparing with Pelican static blog generator) ?

for example:

folder:News

# title of my news

content 
and so on

so when I read the file, to import its content, I take the first line containing "folder:" (compare with the result of curl http://127.0.0.1:27583/folders to validate) and push the content in the body with for example:

curl -H 'Content-Type: application/json' http://127.0.0.1:41184/notes --data '{"title": "The name of the file", "body": "title of my news \n content\n and so on", "parent_id": "<the uniq id grabbed from the folders list got earlier in the process>"}'

Sorry, just gonna ask the obvious question to make sure you’ve considered it (since I had this exact same problem): can’t you just run a JoplinPortable from an encrypted USB thumb drive?
Or if you’re on Linux, maybe a normal Joplin directed to a profile on the encrypted thumb drive.

I understand there are some employers who ban or try to prevent this, so it might not be good for you; but it worked well for me. I get normal Joplin, no need for complex additions or workarounds, and when I close the app and take the key with me, I know no data has been leaked.
(And as I’d found out today, the Clipper works well in this case, too.)

2 Likes

@zblesk i forgot that ! ...
Gone to find a memory stick :rofl:

Look, I potentially saved you a lot of hassle. :smiley:

As I don’t use windows most of the time, I will try from, the USB device:

rsync -avz /path/to/joplin/profile .

then I will launch, from the USB device

joplin --profile /media/USBdevice/profile
1 Like