kevboh / longform

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

Feature Request: Representing the order of the scenes in the order of the files and/or notes #168

Closed zverhope closed 5 months ago

zverhope commented 1 year ago

Describe the solution you'd like

I'd like the order of the notes in my longform project to mirror the order represented by the "Scenes" tab of the longform view/window. The optimal solution would be to rename the notes themselves to reflect the numbers the user can elect to enable before the note names. The other solution would be to optionally add sorting-spec metadata to the index for users of the Custom File Explorer sorting plugin. This metadata would simply mirror the scenes - the same scenes in the same order - but without the leading dashes to represent the outline structure. I prefer the first option insofar as it would duplicate this structure, but know it might be the more difficult way to implement this.

I don't know whether mine would be a widespread use case. I'd simply like to see the order of the scenes reflected in the file explorer, while also (in the case of changing file names) having that order available to me in an external editor. If there's any enthusiasm for this, and it's easy to implement, then great. If not, then I'm happy to fork and do the work myself. Unfortunately, I'm new to Obsidian and don't have much JS/TS/React in my limited coding repertoire. I attempted to do this already with the little skill I have in this area - basically just an understanding of the grammar of these languages more generally - but the main.js file is too big for me to legibly parse at this stage. Any pointers as to where I'd go, or what existing variables I'd leverage to accomplish either option, would be very appreciated.

Thanks so much for this incredible tool!

kevboh commented 1 year ago

Sorry, not sure I follow—where is the order mismatch? The first-party file explorer?

zverhope commented 1 year ago

Yes, that's it precisely - I essentially use the Scenes tab as an outliner that allows me to represent the order and hierarchy of the parts of a project. But I typically work from the first-party file explorer while writing, as my project contains notes and other files that are excluded from the eventual compile and therefore not present in the Scenes tab. Working from the explorer doesn't allow me to see the order of the scenes, which is important to my sense of where I am in the project.

I use the file explorer sorting plugin to organize my folders and their content, so a possible solution could leverage that plugin as a dependency to specify that indexed files appear first and in the order you've given them in the Scenes tab. Even better would be to have an option that would also privilege and represent the order of your indexed files in Finder or an external editor. My possibly naive thought was that this could be done by optionally prepending scene numbers to the name of the file.

kevboh commented 1 year ago

I have no control over the file explorer, unfortunately. I don't want to rely on other third-party plugins, and don't want to risk deep integration with the first-party explorer when it's closed source and has no API hooks for file ordering. Your best bet would be to file a feature request with obsidian to ask for file sorting API--then I could safely integrate.

Happy to leave this open as a placeholder if they do add such API.

b-camphart commented 10 months ago

What if longform dynamically renamed the names of the scene files to be prefixed with the index? Would that be possible?

kevboh commented 10 months ago

It's theoretically possible, yes, but could get a little spooky depending on what you're using for sync. But it's a fun idea, I'll ponder it a bit.

b-camphart commented 10 months ago

If added, probably better as opt-in :)

b-camphart commented 10 months ago

Might be worth taking a look at this plugin: https://github.com/SebastianMC/obsidian-custom-sort

wesleyboar commented 6 months ago
Resolved, Outdated I also have this request. In testing my project in Longform, I have had to remove the `1.1.0`, `1.1.2`, et cetera prefixes that I was manually maintained on my notes before Longform. I miss being able to navigate my notes **in order** in the File Explorer of Obsidian (and VS Code, and macOS Finder, et cetera). ~~I still must navigate the notes in File Explorer of Obsidian, when I want to rename a file. I do not know how to rename via Longform UI.~~ [I realize I can rename via the Obsidian UI, within the editor window of the file.]
wesleyboar commented 6 months ago

I had this request too, until I resigned to:

  1. Manually prefix file names with 1.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, etc. so all File Explorers (eg. Obsidian, VS Code, OS) order scenes correctly
  2. Uncheck Longform's "Show scene numbers in Scenes tab" setting. because file prefixes are already visible
  3. Add titles directly into file content. so creative titles can be different from practical file names
  4. Remove step "Prepend Title". so practical file names are not used as titles
kevboh commented 5 months ago

I've thought about this more and am going to close it. I don't want Longform to both run its own pane and muck about in the explorer pane—it just feels like the plugin would be exceeding its bounds.