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

Make it easy for dev to write custom command #1584

Open
mudnug opened this issue Sep 25, 2024 · 6 comments
Open

Make it easy for dev to write custom command #1584

mudnug opened this issue Sep 25, 2024 · 6 comments

Comments

@mudnug
Copy link

mudnug commented Sep 25, 2024

Problem to Solve

It would be nice if this project were easy to customize because I'm finding that I need to write my own command

New Feature/Solution

Documentation

Alternative Solutions

A type of add in or extension ability that let me write C sharp code and execute it.

Additional Context

I'm trying to automate tasks that otherwise are going to consume a lot of time.

There may already be something related to this but searching for onemore plugin yields results only to the main project and not https://github.com/stevencohn/OneMore/tree/main/Plugins or any documentation.

@mudnug
Copy link
Author

mudnug commented Sep 25, 2024

After struggling to get the code to build for a while, I may have found some answers here after posting this request

@jasonjac2
Copy link
Sponsor

@mudnug glad you found the help. What are you looking to write?
Aside: if replying here keeps this open, then maybe start a discussion thread or even message me.
Cheers,JAC

@stevencohn
Copy link
Owner

I'll reopen it. May have been too twitchy here :-)

@stevencohn stevencohn reopened this Sep 26, 2024
@mudnug
Copy link
Author

mudnug commented Sep 26, 2024

I was looking to write something I thought was pretty niche and would essentially allow me to hide or show page titles. That feature is not an option for the graph API, So it has to be written on the desktop.
I tried getting the source code for OneMore and tried compiling it locally but was hitting issues
In the end, I have met this specific need a different way.

I never did workout how I would call custom Powershell scripts from OneMore, but it appeared that the API available to Powershell did not have the feature I needed.

@stevencohn
Copy link
Owner

stevencohn commented Sep 26, 2024

OneMore doesn't use the Graph APIs. It uses COM Interop wrapper provided with OneNote Desktop. But the COM wrapper is quite thin, basically only letting you read and write pages projected as XML. The majority of code in OneMore is all about modifying that XML.

There is no way to "hide" a page title, that I'm aware of anyway. You can remove a page title, but wouldn't be able to undelete it without saving that information somewhere to be restored.

The XML schema is described here https://github.com/stevencohn/OneMore/blob/main/Reference/0336.OneNoteApplication_2013.xsd

@mudnug
Copy link
Author

mudnug commented Sep 26, 2024

Yes, I meant my first step was to write my own plugin from scratch and I hit the API limitations.

I thought it should be simple enough to hit
image

So the requested feature is no longer needed for today but I could see it as being useful in the future. My next step would be to try to run those powershell scripts and determine whether they actually can manipulate OneNote in the ways I need.

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

3 participants