OneNote - complete listing of the Property IDs - onenote

I am trying to write a parser for OneNote files.
I would like to get a complete list of all the Property IDs to Property Name.
Here is what I have so far: https://github.com/nddipiazza/onenote-parser-java/blob/5e291a7e6666b4ee62e0f13d9422ca5b4f223e6f/src/main/java/org/apache/tika/onenote/Properties.java
But I cannot find various other ones that appear in documents, such as 0x348b.
Where can I find a complete, definitive list?

Ah I just didn't google hard enough.
Here it is:
https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-one/e9bf7da8-7aab-4668-be5e-e0c421175e3c?redirectedfrom=MSDN
My list was complete from the above link.

Related

Power Automate: Create SharePoint Folder - Response not in JSON Format

I am working on a Power Automate flow....and beating my head against a wall as well. It seems so easy, but it is failing with an error "The Response is not in a JSON format"
The intention of the flow is to set up standard folders in some 200 SharePoint sites within my company. In two files on each of these sites, I want to add a Year Folder (i.e. 2022) and a Month Folder (10-Oct). Seems straight forward.
I have a SharePoint list that contains all the SharePoint sites. After manually triggering this flow, it references the SharePoint List (Get Items). Then working down the list of SharePoint site (Apply to Each), Create the new folders. Been researching & tinkering with this for a couple of hours.
The "Directory" is pulled from the SP List as well: for this example assume it is "Share Documents1" thou it does vary slightly around the company...
The naming is all correct....
Here is the Error output. I am at a loss...
I see there are some strange characters in your site address value. :f:/r/ Can you remove that part from the value?
This error was thrown due to extra characters in the SharePoint Site Address. When using the "Copy Link" feature within SharePoint, it adds extra characters that are not required, in this case they were :f:/r/.
Once removed, the JSON error was resolved and the flow worked perfectly. Lesson learned, inspect the address for additional strings that are not truly required, remove those, test the link to ensure still valid, then utilize the streamlined link.

MediaWiki API: search for pages in specific namespace, containing a substring (NOT a prefix)

I want to scrape pages from a list of Wikipedia Categories, for which there isn't a 'mother category'. In this case, dishes -- I want to get a list of all of the pages like Category:Vegetable Dishes, Category: Italian Dishes, then scrape and tag the pages in them. I know how to search for pages in a known category, but there are hundreds of categories containing the substring dishes + it feels like it should be easy to list them.
However, mediaWiki allcategories search seems to only allow search by prefix (e.g. from and to results), and while old opensearch documentation still allows search by substring, this is no longer supported. (see updated API docs + it also doesn't work if I try it)
This is very doable in the wikipedia browser, to the point where I think it might be quicker to just scrape search results, but I wonder if I'm missing something?
Thanks to #Tgr, for pointing out that I'd missed the regular search API, which allows for both a text search, specified namespace, and so on.
The correct query for my instance is:
curl "https://en.wikipedia.org/w/api.php?action=query&list=search&srnamespace=14&srsearch=Dishes&format=json"
thanks!

How to download the wikipedia articles that are listed in PetScan tool?

I had shortlisted a list of Wikipedia articles using the Petscan tool. Below is the link https://petscan.wmflabs.org/
I have used "Diseases & disorders" category from wikipedia with a depth value of 2. Approx 10000 articles were listed in the results.
My question is how do I download the articles to my computer. I am new to these things so need help.
I think I figured it out with the help of comment from #Tgr above. I navigated to output options and found a bunch of formats for exporting the file. They are as follows,
HTML
JSON
CSV
Pagepile
Simply choose the option and get the required output.
Just navigate to Output tab, and choose the format you need to export to, then click Do it. After that, the data will be downloaded to your PC.

Onenote does not return pages

This is similar question as OneNote pages API doesn't return pages in section-groups.
I'm using the Get sections and get Section pages with Sections expanded to get names for all pages in a notebook. However using the same requests all the time, the sections in section groups sometimes disappears, and wont reappear before recreating the group.
Is this a bug that one can somehow work around, or is there a better way of polling all the page names from a specific notebook? The pages need to be in order.
If you are trying to get all the page names for a Notebook, a work-around exists by using an OData nested filter. The idea is to query for all pages, $expand the parentNotebook, and then $filter on the id of the parentNotebook. Here is an example URL.
GET ~/pages?$expand=parentNotebook&$filter=parentNotebook/id%20eq%20'{$notebook_id_here}'
Here is another SO question where someone employs a similar pattern: Best way to use One Note API to GET specific pages in specific section in specific notebook?
Update:
You can control the order of the returned pages by using OData's $orderby and specifying properties that exist on the entities in the returned entity set (in this case, the entity is pages). From dev.onenote.com: "The default [order] is lastModifiedTime desc (most recently modified page first)."
Under https://dev.onenote.com/docs#/reference/get-pages there is a section, "Page properties", that shows all the properties returned by this call. Since we are getting all the pages available to a user that exist in a notebook, the only property we can use is unfortunately createdTime.
The query param to add looks like $orderby=createdTime
In full:
GET ~/pages?$expand=parentNotebook&$filter=parentNotebook/id%20eq%20'{$notebook_id_here}&$orderby=createdTime
I just tested this using Fiddler against my own pages so I think it should work. The nice thing is that it is a single request.
GET https://www.onenote.com/api/v1.0/me/notes/pages?$expand=parentNotebook&$filter=parentNotebook/id%20eq%20'{$YOUR_NOTEBOOK_ID_HERE}'&$orderby=createdTime

Box API v2 - Retrieving folder items with fields, is tag allowed?

I'd like to move up to v2 of the Box API, however I cannot currently retrieve the tags like you can in the previous api. Can you add the tags as a field in the GET call to the v2 api?
Thanks all,
Chad.
They are a part of the V2 API. If you look at the documentation for folders, you can see that the tag entry is a green entry. That means that you have to explicitly ask for that field in order for us to return it to you. The ?fields parameter will let you ask for only the fields you want (instead of the default set that Box automatically gives you as part of it's responses)
Note that if you are trying to get this info for all the items in a folder, there is a difference in asking for the details about a folder, and asking for the details about every item in a folder. ?fields works for both (and also works if you're doing a POST or PUT operation too).
If you want the details about a single folder: GET ./folders/<id>?fields=a,b,c
If you want the details about all the items inside a folder GET ./folders/<id>/items?fields=a,b,c