What is Nostr?
Alexandre B A Villares 🐍 /
npub13qa…alcv
2024-10-01 20:06:56

Alexandre B A Villares 🐍 on Nostr: I made this so I could create a bunch of HackMD.io pages for my classes in bulk... ...

I made this so I could create a bunch of HackMD.io pages for my classes in bulk...

api = API(access_token)

title = "My Nice Course - 2024 - day {0}".format
body = """
## Course X - 2024
# My nice course - day {0}
## This page is at: `hackmd.io/@myuser/nice-course-2024-day{0}`
""".format
link = 'nice-course-2024-day-day{0}'.format

for a in range(1, 9): # 8-day class
data = api.create_note(title=title(a),
content=body(a),
permalink=link(a))
print(f"- [Day {a}](https:///hackmd.io/@myuser/{link(a)}")

Author Public Key
npub13qa4ushxn7jwk2lwwmj4tsshq2953hrkwmmpg57875r06x3n4d3qenalcv