Markdown

About

This is an endpoint for transforming google docs, and their comments, into markdown

Usage

GET https://docs.nunosempere.com/get?id=YOUR_GOOGLE_DOC_ID

For instance, with curl

curl https://docs.nunosempere.com/get?id=1-EMjL8kvQXfv9LX6U190s13A1b-pN6B5rpwOYWjQMCg

The beauty of this approach is that this can then be scripted and composed with other tools, for instance, SimonW's llm:

curl https://docs.nunosempere.com/get?id=1-EMjL8kvQXfv9LX6U190s13A1b-pN6B5rpwOYWjQMCg | llm "summarize this document"

With a bit more elbow grease, you can download your history from your browser, select the Google docs from the last three months, and try to get some patterns. See an example of this here

This tool will turn this document

Into this text:

---
title: Lorem ipsum
documentId: 1-EMjL8kvQXfv9LX6U190s13A1b-pN6B5rpwOYWjQMCg
revisionId: ALBJ4LsMiXcKwElWGeHzXBgLzoKRP667CO3DJeFxhw8HFEJFsOQLoGJJgs0gJ_3qMnHOhyS4yzf-NHvlNhb0BQ
---

### Lorem ipsum

Lorem ipsum dolor[^1] sit amet consectetur adipiscing elit felis nunc natoque integer sagittis tempor egestas eros lectus ultricies metus urna, duis non quisque condimentum pretium phasellus magnis ridiculus sociosqu hac facilisis primis ad ac vitae etiam in potenti. Posuere lacus ante gravida primis in venenatis luctus taciti aliquet magna eu, dui sapien maecenas ultrices tristique at dis consequat morbi et potenti pretium, himenaeos pharetra tempor elementum a auctor hendrerit aptent sodales commodo. Faucibus nibh molestie orci taciti pretium mauris inceptos mollis convallis, tempus at pulvinar vestibulum magna per luctus curabitur.

Maecenas interdum imperdiet vestibulum gravida conubia quis ante, porta porttitor sagittis accumsan proin eleifend, ullamcorper quisque est sollicitudin donec vivamus. Feugiat nisl consequat ullamcorper sodales commodo parturient netus tortor, conubia convallis fermentum per quisque nibh magna, varius dictumst sagittis leo phasellus lectus proin. Malesuada dis blandit rutrum maecenas eu suscipit, est etiam fames congue dignissim at platea, eros cras quam velit placerat.



[^1]: Nuño Sempere: This is a comment
  Nuño Sempere: And this is a reply
      

Limitations

The security posture of this tool isn't particularly paranoid. It requires documents to either be shared publicly, or to be shared with nuno.sempere@gmail.com.

The Google docs API doesn't allow us to unambiguously detect which part of the document a comment belongs to. See for instance this discussion. This doesn't matter if a comment is attached to a sentence that only occurs once in the document, but matters if it is, for instance, attached to a period.

Returns this

---
title: Excerpt from The Princess Bride
documentId: 1RxFHtCXRYU_NQ11LIlLlec6FnMMi0fk_qQVFHP6N-lc
revisionId: ALBJ4LtTsqMy6txPW1wN3nbMG_u11ohlU0rmGxBQIRtLutL5VVIfmcAqEyzdawgigarWxkyGXIcaLOOCYVvjIg
---

ÍÑIGO

I was eleven[^1] years old. When I was strong enough, I dedicated my life to the study of fencing. So the next time we meet, I will not fail. I will go up to the sixfingered man and say, "_Hello, my name is Íñigo Montoya. You killed my father. Prepare to die_."

MAN IN BLACK

You've done nothing but study swordplay?

ÍÑIGO

More pursuit than study lately. You see, I cannot find him. It's been twenty years now. I am starting to lose confidence. I just work for Vizzini to pay the bills. There's not a lot of money in revenge.

MAN IN BLACK

(handing back the great sword, starting to rise) Well, I certainly hope you find him, someday.



[^1]: Nuño Sempere: This is a comment
  Nuño Sempere: This is a reply

---

# Ambiguously placed comments

*This is necessary because of limitations of the Google Docs API. As a workaround, make comments refer to whole paragraphs or lines.*

Nuño Sempere: This is an ambiguous comment, since it is attached to a period.
  Nuño Sempere: This is another reply