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

Autotag from directory name? (better Import from Joplin) #660

Open
ChrisJefferson opened this issue May 27, 2021 · 4 comments
Open

Autotag from directory name? (better Import from Joplin) #660

ChrisJefferson opened this issue May 27, 2021 · 4 comments

Comments

@ChrisJefferson
Copy link

This is a two-part PR (which I could unmerge if people want)

  1. I want a nice importer from Joplin (an open source markdown note storing tool) to Foam.

  2. I think the simplest way to do this would be to auto-add a tag to file based on the directories it is in (so "home/roof/fix.md" would #home and #roof).

Full description:

Joplin is based around storing notes in an hierarchical structure, so export produces a nested directory structure of markdown files.

Joplin does have tags (which are stored as #tags at the top of files, so are automatically picked up by Foam), but I didn't use them much.

I wondered if Foam could auto-add a tag for files based on their directories? Personally I'd like this generally, it would mean entries in journal got #journal automatically, for example.

I wrote a horrible one line bash script which added a tags: to each file based on the directory they were in, so "home/roof/plans.md" got tags "#home" and "#roof". This (for me) made the import much nicer.

@ChrisJefferson ChrisJefferson changed the title Autotag from directory name? (Import from Joplin) Autotag from directory name? (better Import from Joplin) May 27, 2021
@maciejmatczak
Copy link

maciejmatczak commented Jun 26, 2021

I would like to have directories as a first class citizen in note taking system. But you can nest folders, but not tags - tags are flat.

What about using folders as hierarchical nodes for notes? Currently I am keeping a dummy index files, so home.md, root.md that references previous file and a new note fix.md that would reference root.md. That is well reflected in a graph. I am not sure if there is already existing issue for that one. Something similar is mentioned in #604.

@riccardoferretti
Copy link
Collaborator

Hi @maciejmatczak, a couple of notes:

  1. tags can also be hierarchical (e.g. #tag/subtag)
  2. having folders somewhat represented in the dataviz graph (I believe this is what you are referring to) could definitely be an interesting option. Whether as nodes, as you suggested, or containers. cc @jmg-duarte who is our dataviz champion

@jmg-duarte
Copy link
Member

I agree that folders could/should be represented, I think we can provide options and expand on the topic but getting a first draft would be the priority.

@maciejmatczak
Copy link

Thanks guys, comments appreciated.

My comment here might be a bit off topic. Main "folders in graph" is #452.

BTW, "first draft" - it's implementation or functional spec / results expectation?

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

4 participants