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
Automated way to import preexisting list via this plugin? #26
Comments
@PaperOrb thanks :) No there currently is no way to bulk import entries. |
It wouldn't cover bulk-importing, but perhaps an additional command: "add Media DB YAML to active note" or similar. Search relevant API as usual, and it'd then write (or overwrite as appropriate) into the YAML of the current note. (That may be far enough afield of what @PaperOrb is thinking that this should be a separate-related FR) |
For my particular use case, I have a spreadsheet of media. We can already import each row as a separate note with autogenerated yaml based off of the columns via https://github.com/farling42/obsidian-import-json. People that literally just kept a list of stuff could also easily use external programs to turn their list into a CSV to work with farlings plugin. With that in mind, I think @GarDrastic has the right idea, but with the caveat that it doesn't overwrite preexisting YAML, but rather appends to it. Also if this were to be implemented, I'd recommend setting it up to append media DB YAML to notes in folder rather than just the active note (for instance, I have several hundred notes I have to do this with). edit: searching stuff by ID wouldn't work with myanimelist unless you already stored the numeric IDs inside your list. Also anything you typoed may not work (haven't used the media db plugin firsthand yet). So on that note, maybe also move anything that fails to find a result to a separate folder if possible for further processing, or maybe a cheaper operation would be appending a "#process-this-12345" tag to such files. |
Makes sense. Perhaps a semi-automated middle ground could be populating the API search with the title for each media note in a folder so the user doesn't have to type every title in. The plugin could pause on the dropdown part to let the user manually pick the show or give them a chance to redo the search before moving onto the next note? |
@PaperOrb |
I'm amazed you did this and got it out so soon. It seems to be doing great with my anime list right now. A few things I noticed which you probably did as well:
|
Hey, i did implement a cancel button that cancels the entire import and a skip button that only skips the current note. |
Awesome, I'll check it out today or tomorrow. As for the modal hotkeys, I asked over in the plug-dev channel on the discord in case this is something you feel like implementing. From what joethei said, you can use https://marcus.se.net/obsidian-plugin-docs/api/classes/Scope to register hotkeys on modal buttons, and the hotkeys should be unregistered after the modal closes. Here's some examples from his own code on using it: https://github.com/joethei/obsidian-rss/blob/223c2d0941357a6036e0e8bd57010169fb800d66/src/modals/ItemModal.ts#L46 |
That looks good. I am going to try that tomorrow if I find the time. |
I am still having some problems with it but for now, I have the arrow keys to navigate up and down in the list, the right arrow to select that result (I wanted to use space but that also closes the modal for some reason...) and enter to confirm. |
I'm not through my entire anime backlog yet, but from my testing thus far it looks good. Some small typos in the modal: mata data and meta data should be metadata. The hotkeys you setup are great imo. There's one minor issue where if there's too many search results (which has been pretty often in my case), you'll need to mousewheel scroll back to the top to see the topmost result. I'm not sure if there's a way to make the modal default to being scrolled to the very top for each new show or not. For the documentation, it might be good to mention that users should split their shows up into separate folders for processing--that way if they decide to stop mid-session, they can more easily resume adding shows from where they left off. Otherwise, they'll start from the very beginning of their shows list the next time. All that said, thanks for this nice addition. It looks fully functional ;) |
I'm sure many of us already had lists we kept of our movies/games/etc before looking at this plugin. Is there an automated way to import those lists into obsidian using this plugin? It looks great btw, thank you for making this.
The text was updated successfully, but these errors were encountered: