#robmartinson.me #blog
Summary
First revision of the blog / feed application is up and running. Companion Bear.app connector script that pushes notes containing a certain tag out to the post API every few minutes.
So far, I like it! It syncs from a certain tag or tags from Bear. It allows me to quickly publish and/or adjust content. It’s an easy way for me to quickly push notes or content out to different folks and I think it will be a good feed aggregation point.
Current State
- Infrastructure
- Caddy reverse proxy
- go backend using Gin
- SQLite storage
- Running on raspberry pi 4 with 8GB ram
- Functionality
- Generic “post” entry that has a source and source ID to allow for different source feeds.
- Supports viewing posts by slug or UUID
- Supports filtering posts by tags and all tags are clickable
- Correctly parses tags out based on Bear style regex
- Api to add and manage posts
- Initial post type of “bearnote”
- Companion python script to push notes from bear to api.
- Setup on 5 min cron from home workstation
- This currently only syncs notes that contain a specific tag (for now, #robmartinson.me so all notes MUST contain at least this tag and/or others to be pushed.
- Script supports deleting of old posts and correctly sends a DELETE for any trashed Bear notes
- Currently pushes all posts and attachments on every cycle.
- Correctly marks any items flagged as pinned in Bear as pinned posts which automatically move to navbar. Note: may want to remove pinned notes from the main listing.
- Although this works well when viewing posts within a tag in Bear, it could be annoying to have all of the nav posts pinned to the top of the main Bear list. I may want to adjust this to use a tag instead. Probably better.
How tags work
- ’robmartinson.me’ is required for bear_sync.py to pick up the note at all and push to API. No other processing happens with this on server-side
- ’pinned’ should be sorted first, before updated date so these items always float to the top of the feed list
- ’nav’ items should be added as navigation items
- ’hidden’ items shouldn’t be listed in the main feed, but are still accessible via their direct link. You can combine ‘hidden’ and ‘nav’ to make nav only links.
Needs / Todo
- Next connector:
- Try a simple inbound feed such as Twitter/X or Threads. Free X API has limits but may allow reading my own posts a few times a day, need to dig into this.
- Allow linking between notes using Bear’s IDs. Will need to translate bearID to postID. Check the [[About]] page. I should be able to do this just by slugifying bear note links like [[ this ]]
- Move all specialized link, tag and image rendering into the goldmark markdown processor, currently using a quick and dirty approach parsing needed things (like hashtags) outside of the markdown processor.
- Add paging to post list, should maintain state with filters
- Add api endpoint to return all unique tags (to be used for a tag search or list )
- Add smart search by tag and/or text
- Search by tag or tags and auto-filter
- Search by text and auto filter
- Adjust card header/post title to prevent line breaks and allow either scrolling side to side or… When viewed on mobile or smaller screens
- Add google analytics token
Ideas and Pondering
- Threading functionality, this is a new thought. Essentially have the ability to view posts in a thread style timeline (oldest first) where a certain tag matches. So if you look for /threads/ it lists oldest first, then displays a connector between each subsequent post. This could further be filtered with ?tags=,
- Allow it to serve from different urls. Each URL can have its title and templates and can filter content to those with a set of tags.
- For example, currently the bear script filters all posts and only pushes those containing the #robmartinson.me tag to the API. But I could also have it push tags for a different site like #martinson.shop. From the web side, if a user requests content from the robmartinson.me domain, the system would serve all posts tagged there (regardless of tags). Similarly if the user requested from the martinson.shop domain, it would serve content with that tag. A post with both tags, would be visible in both places.
- Things to consider:
- How does this work for things that aren’t Bear notes, like twitter, instagram or other inbound feeds. Maybe domains configure specific content as well, like source: bear tags: robmartinson.me or source: x.com/robmartinson tags: any, source: x.com/limelytedotcom tags: any and so-on.
Created: Tuesday, August 13, 2024
- Updated: Wednesday, August 14, 2024