Is there a way to get an article’s raw or original content?
My goal is mostly to put articles in some area (ex: singular learning theory) into a tool like Google’s NotebookLM to then ask quick questions about.
Google’s own conversion of HTML to text works fine for most content, excepting math. A division may turn into p ( w | D n ) = p ( D n | w ) φ ( w ) p ( D n ), becoming incorrect.
I can always just grab the article’s HTML content (or use the GraphQL api for that), but HTMLified MathJax notation is very, uh, verbose. I could probably do some massaging of the data and then an LLM to translate it back into the more typical markdown $ delimited syntax, but I’m hopeful that there’s some existing method to avoid that entirely.
Just paste this into the editor at lesswrong.com/graphiql (adjusting the “id” for the post id, which is the alphanumerical string in the URL after /posts/), and you can get the raw content for any post.
Thank you! I tried it on this post and while the post itself is pretty short, the raw content that i get seems to be extremely long (making it larger than the o1 context window, for example), with a bunch of font-related information inbetween. Is there a way to fix this?
Is there a way to get an article’s raw or original content?
My goal is mostly to put articles in some area (ex: singular learning theory) into a tool like Google’s NotebookLM to then ask quick questions about.
Google’s own conversion of HTML to text works fine for most content, excepting math. A division may turn into p ( w | D n ) = p ( D n | w ) φ ( w ) p ( D n ), becoming incorrect.
I can always just grab the article’s HTML content (or use the GraphQL api for that), but HTMLified MathJax notation is very, uh, verbose. I could probably do some massaging of the data and then an LLM to translate it back into the more typical markdown $ delimited syntax, but I’m hopeful that there’s some existing method to avoid that entirely.
Yeah, you can grab any post in Markdown or in the raw HTML that was used to generate it using the
markdown
andckEditorMarkup
fields in the API:Just paste this into the editor at lesswrong.com/graphiql (adjusting the “id” for the post id, which is the alphanumerical string in the URL after /posts/), and you can get the raw content for any post.
Thank you! I tried it on this post and while the post itself is pretty short, the raw content that i get seems to be extremely long (making it larger than the o1 context window, for example), with a bunch of font-related information inbetween. Is there a way to fix this?
Thank you!
You’re welcome!