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

Custom File Templates (select, copy file & open it) #676

Closed
Gregger83 opened this issue Sep 18, 2019 · 10 comments
Closed

Custom File Templates (select, copy file & open it) #676

Gregger83 opened this issue Sep 18, 2019 · 10 comments

Comments

@Gregger83
Copy link

General information

  • App: v2.1.1 (91)
  • OS: Android 9

Description

Actually the file templates are hard-coded. It would be nice, to be able, to create custom file templates or change the existing ones.

Furthermore it would be nice, to configure the location, where the templates are beeing stored.

Log

none

@macdonaldster
Copy link

I'm going to try to use Texpand to fill in an empty file.

@madCode
Copy link

madCode commented Sep 2, 2020

I've been using markor to make jekyll blog posts and I would love this feature! A lightweight version of this would be just pointing to any random file to use as a template. Or even being able to open up one of the templates as a markdown file and save it to wherever its stored in the app (presumably as a string).

@gsantner
Copy link
Owner

gsantner commented Sep 2, 2020

In the meanwhile, you can always have templates somewhere in a folder(i.e. named "templates"), and just use the "import" option from the menu.

Screenshot_20201024-112453_Mordor

@lamyergeier
Copy link

lamyergeier commented Sep 3, 2020

@gsantner From inside Markor file navigation: When we select a folder or a file we only have the option to move it. It would be nice if we could copy and paste any folder or file (as my workflow requires creating a folder that contains the new markdown file, with the same name as the markdown file, and it also contains certain custom resources).

Or, It would be useful if enduser could write custom script for creating Templates.

@madCode
Copy link

madCode commented Sep 3, 2020

@gsantner ah, I didn't realize importing was an option! Love that idea. Thanks :)

@gsantner gsantner changed the title file-based (custom) file templates Custom File Templates (select, copy file & open it) Oct 24, 2020
@nikiluk
Copy link

nikiluk commented Jan 8, 2021

@gsantner Thank you for the great work you're doing both on the technical and on the community side. I reall appreciate the product and I want to say that for me it's more than a MD editor, it's a part of the knowledge management workflow covering my mobile experience and data collection.

Said that, brining customizable templates plus a set of simple placeholders like {date:FORMAT}, {title}, #{tag} or others is needed. Import is great and it works perfectly if you need to do it just once or twice, however, the user who wants to work with a repetitive flow has to always repeat his actions for import multiple times, navigate through folders and make changes after the import.

For example, the following set of user stories will be enabled by customized templates.

Scenario 1: Making a quick note
As a user I want to quickly add a daily note

  • GIVEN: I have specified a custom template for a Quick note
  • AND, I have set the placeholders to automatically fill in the date for me
  • WHEN I press a Quick note button
  • THEN The MD QuickNote is generated using the filename and content specified

Scenario 2: Bookmarking a website
As a user I want to be able to bookmark a website from my mobile browser and then come back and easily find my bookmark later.

  • GIVEN: I have specified a custom template for bookmarks/"Share to Markor"
  • WHEN I Press "Share to Markor" from a mobile browser
  • THEN The note's body and a filename is being pre-populated with such elements as {title}, {excerpt}, {created_at}

Scenario 3: Sharing a picture to a note's library
As a user I want to make a written note to a picture I've taken

  • GIVEN: I have specified a custom template for Sharing image files to Markor
  • WHEN I Press "Share to Markor" from a photo viewer
  • THEN a copy of the image is created in the Markor/_resources/ folder
  • AND the note's body is populated with the link to the image in the "local" _resource folder plus a simple metadata extracted from the image's EXIF data such as taken, location, etc

@gsantner
Copy link
Owner

gsantner commented Jan 8, 2021

I'm well aware people want this, including myself - but expectations on it are very high, and everybody has different demands. So first some middle ground between functionality, fitting for everybody and not being bloat must be found.
And in any way, especially due the high expectation - that we don't deliver something sub-par 😃 .

plus a simple metadata extracted from the image's EXIF data such as taken, location, etc

Can already say ahead, very very unlikely to happen.

@nikiluk
Copy link

nikiluk commented Jan 8, 2021

@gsantner it totally makes sense, keeping it "minimal" is important

@edrex
Copy link

edrex commented May 26, 2022

snippets PR is related: #1624

IMO custom file template MVP needs to support filename as well as content, like the current hardcoded templates. Maybe the first line of the file could be used as the filename?

It might also be worth looking for how other tools in the "markdown wiki ecosystem" do templating, on the off chance it's possible to define an ad hoc convention that users can share across tools. It would have to be very simple to be shared across tools, unlike template formats that expose detailed tool-specific data models, like https://www.thoughtasylum.com/2021/07/24/the-basics-of-templater-for-obsidian/

@gsantner
Copy link
Owner

gsantner commented May 26, 2022

I gave my input here #1624 (comment)

Basically, to add the snippets to the list at the "new file" dialog. Which means, you also can enter the filename at the point choosing the template/snippet.

It might also be worth looking for how other tools in the "markdown wiki ecosystem" do templating

No, Markor won't get such a big fat templating library added. Keep in mind, goal is to stay lightweight.

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

No branches or pull requests

7 participants