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

Posting to drummer.scripting.com from outside Drummer #17

Open
scripting opened this issue Jan 10, 2022 · 4 comments
Open

Posting to drummer.scripting.com from outside Drummer #17

scripting opened this issue Jan 10, 2022 · 4 comments

Comments

@scripting
Copy link
Owner

My friend @emk wants to post to Drummer from outside Drummer. Yes, this is possible. But rather than playing 20 questions about what he's trying to do, I invite him to post a short comment here outlining the purpose of this project.

To get started, Drummer is running daveappserver, a package I developed as a successor to nodeStorage, which was getting cluttered with lots of extras, and was hard to maintain as a result.

Eric, that's the software your app will be talking to.

There are two calls that post files to the server.

publishFile is the one that Drummer users when the user is editing a file interactively and writeWholeFile is the back end of the file.writeWholeFile verb.

The oAuth values you need can be gotten by logging on to Drummer interactively and copying them from localStorage values, I think it'll be obvious what they are when you look. Without those values you won't be able to post.

That's pretty much the whole thing.

@scripting
Copy link
Owner Author

scripting commented Jan 10, 2022

@emk -- please let me know what you're contemplating here. Drummer is hardly the best place to upload OPML files, its sole advantage is that it's the place Drummer stores them. I don't generally upload random OPML files there, preferring S3 or GitHub, because they don't affect the performance of my server, which is believe me a very lower powered server.

Also because we may be working cross-purposes. I have a better picture of the lay of the land outside of LogSeq, which is where I need help. The goal is to get the content of the Journals folder accessible to code running in Drummer. But (and this is a key point) have to be in Drummer's space for it to be easily accessible to a script running in Drummer.

@emk
Copy link

emk commented Jan 10, 2022

Thank you for the information!

My use case here was that I had a bunch of outlines LogSeq, and I wanted to export some of those outlines into Web Drummer (since I can't run Electric Drummer yet). That way, I'd have a bunch of useful data in Drummer that I could run scripts on and experiment with. I had a vision "sending" a single outline between the two tools as being fast and easy.

S3 would also be an interesting option. Could I create a heading in Drummer that expands to the content of an OPML file on S3? I know that used to be a thing back in the day.

GitHub would be great for certain kinds of outlines, but it's much more work for the stuff I'm imagining.

@scripting
Copy link
Owner Author

thanks @emk -- that's a perfectly fine use-case. there is an Import local file command in the File menu, that could help too.

@emk
Copy link

emk commented Jan 10, 2022

there is an Import local file command in the File menu, that could help too.

That's probably the way a reasonable person would do this, yes. ;-) Thank you!

I have occasionally been accused of trying to do things the hard way, often in the name of automation.

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

2 participants