Notion API examples & templates
stevekrouse.com - my personal website
This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite.
It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still.
Todos
- Speed up page load by loading sqlite data later like in @healeycodes/steve_web
- Store more (legally storable) analytics data, and maybe make a sparkline!
- Add some sort of way to contact me
- Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
stevekrouse.com - my personal website
This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite.
It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still.
Todos
- Speed up page load by loading sqlite data later like in @healeycodes/steve_web
- Store more (legally storable) analytics data, and maybe make a sparkline!
- Add some sort of way to contact me
- Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
Date Me Directory
This is the source code for the Date Me Directory. Contributions welcome!
Architecture
This version of the site still uses Notion to store the data and NoteForms for the form to get your submission into Notion. I intend to cut Notion out of the equation shortly by building our own HTML form that writes data directly to my sqlite database.
- This val is the router for the application
- @stevekrouse/getDocs pulls the date me docs from my sqlite database.
- @stevekrouse/dateme_notion_sync syncs my data from Notion to my sqlite database every 10 minutes
Todos
- Make a form to send data directly to sqlite (in progress: @stevekrouse/date_me_form)
- Require an email (that isn't shared publicly)
- Filters: Gender, Interested In, Style, Location, etc
- Table: hide location, location flexibility, community, contact, last updated in more details
- Refactor Location to an array of Lat, Lon
- Geocode all the existing locations
- Add a geocoder map input to the form
- Allow selecting multiple location through the form
- Profile performance & speed up site, possibly add more caching
- Let people edit their forms
- Featured profiles
stevekrouse.com - my personal website
This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite.
It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still.
Todos
- Speed up page load by loading sqlite data later like in @healeycodes/steve_web
- Store more (legally storable) analytics data, and maybe make a sparkline!
- Add some sort of way to contact me
- Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
Example usage of the add_to_notion_w_ai val
Try with the money database.
Read and watch the demo run here
Uses instructor and open ai (with gpt-4-turbo) to process any content into a notion database entry.
Use addToNotion
with any database id and content.
await addToNotion(
"DB_ID_GOES_HERE",
"CONTENT_GOES HERE"//"for example: $43.28 ordered malai kofta and kadhi (doordash) [me and mom] jan 3 2024"
);
Prompts are created based on your database name, database description, property name, property type, property description, and if applicable, property options (and their descriptions).
Supports: checkbox, date, multi_select, number, rich_text, select, status, title, url, email
- Uses
NOTION_API_KEY
,OPENAI_API_KEY
stored in env variables and uses Valtown blob storage to store information about the database. - Use
get_notion_db_info
to use the stored blob if exists or create one, useget_and_save_notion_db_info
to create a new blob (and replace an existing one if exists).
Use todoist for quick notes to add to notion. Uses project to decide which project to fetch to add stuff to notion. Can add to page or database based on config below. Demarkation using sections in the todoist project. Extracts date for page blocks that are added as callouts.
RSS feed of stevekrouse.com essays