kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
662 stars 31 forks source link

Feature Request: Save as Note with file extensions other than `.md` #203

Closed chuangcaleb closed 11 months ago

chuangcaleb commented 11 months ago

Describe the solution you'd like Hi! Creator of Fountain Editor Plugin here! I've been iterating through so many different writing workflows, but I ended up here, leveraging the already-created features of Obsidian and excellent community plugins like Longform.

I'd like for Longform to natively handle exporting to a file with an extension of .fountain. This would complete the Fountain writing workflow, because .fountain is what we use to share the final manuscript around, not .md. This would remove the friction of renaming the file extension on every Compile action. This would be especially useful for the 90% majority of users who don't know how to code and customise, using plugins at default configuration/face value, which could otherwise be a dealbreaker for a lot of people using my plugin.

It seems to be a very simple fix to this one line: https://github.com/kevboh/longform/blob/8fe5f6d5e83f0bb2f6cdd9d48d42087bfe44c8b4/src/compile/steps/write-to-note.ts#L88

However, I understand that this implementation is intentional, to prevent people from compiling to non-.md formats. But it's easy enough to add an extra checkbox to specify whether to "Use a custom file extension" or something.

In the end, it shouldn't be so complicated — if the user doesn't specify a file extension in their output path, we still can assume it to be .md. But if the user does specify a custom file extension, the user should know what they're doing?

This could also help people who want to export into other plaintext file extensions (.txt, .markdown, .doc) for whatever reasons.

Describe alternatives you've considered

Creating a custom compile step script that clones https://github.com/kevboh/longform/blob/8fe5f6d5e83f0bb2f6cdd9d48d42087bfe44c8b4/src/compile/steps/write-to-note.ts and just edit that one line lol.

But getting non-technical users (who make up the writing community) to use custom scripts would add friction and dropout.

I can write the simple PR if you want! Let me know :D

kevboh commented 11 months ago

Hey! This makes sense. In reality that check should probably be something like "if the destination has an extension, use it, otherwise use .md." An easy change, I can make it.

chuangcaleb commented 11 months ago

Heya! Thanks so much! Your plugin really does a whole bunch of things that I would've had to implement myself. By it's own, it's been working pretty neat for me on non-Fountain/regular prose projects. Keep up the good work!