this post was submitted on 09 Mar 2026
50 points (96.3% liked)
Open Source
45284 readers
154 users here now
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Useful Links
- Open Source Initiative
- Free Software Foundation
- Electronic Frontier Foundation
- Software Freedom Conservancy
- It's FOSS
- Android FOSS Apps Megathread
Rules
- Posts must be relevant to the open source ideology
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
- !libre_culture@lemmy.ml
- !libre_software@lemmy.ml
- !libre_hardware@lemmy.ml
- !linux@lemmy.ml
- !technology@lemmy.ml
Community icon from opensource.org, but we are not affiliated with them.
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Any examples of what you're doing with scripts? I use some custom programming in Org-mode in Emacs, but curious about what other people are doing in different apps.
The two biggest things I use it for are programmatically generating "lists of lists" (lists of pages, more accurately) and as a semi-hacky way to get text colors. Semi-related, the "Treeview" plugin gives you a folder hierarchy panel off to the left (by default) which is really, really nice.
I should probably clarify that I didn't write these, I stole them from the Silverbullet community forums... also I should reiterate that I suck at Lua so take my explanations with a grain of "this person may not know what they're talking about" ; )
Lists of Lists : I have a bad memory so I create a LOT of lists. I even have a base page named "Lists" that I then nest different types of lists under (TODOs for home, for work, for school, for projects, for selfhosting, etc). Since the table is programmatically generated, it's always up to date on each load. This first snippet relies on using
frontmatteron the respective pages along with thetagsproperty.This retrieves all pages from the space index with a tag of
todolist(from thefrontmatter), orders them bylastModified, descending, and renders a table that contains thenameandlastModifieddate. This is excellent for providing a list of pages (based on tag,todolistin this case) related to a topic and ordering them by the last time they were changed. I use this in the base page for pretty much all of my "folders". Screenshot :Text Color Hack : Since the Silverbullet markdown interpreter doesn't (currently) support plain HTML, and the way we usually color specific areas of text within Markdown is
<span style="color: #fff">white text</span>, they had to get inventive. Somebody came up with a way to provide Lua functions that will accept text as a parameter and then render it with the specified HTML color/style.In my
CONFIGpage (that is applied to the entire space) I included aspace-luacode block like :Then, anywhere in my Silverbullet space I can use a Lua code snippet like
The following word is ${Red("red")}and it will invoke the space-lua function namedRed()on the textred, apply the styling, and render it with CSS color#e60000. Hacky? Yeah... but it works for now. Screenshot :... I've been meaning to build a generic
Colorize(text, hexColor)function (which would likely take all of 30 seconds : ) but haven't yet. Maybe tonight.EDIT: That did, in fact, take 30 seconds. Function :
Usage :
${Colorize("any text", "#00ff00")}Interesting, thanks. This Silverbullet thing turned out to be more complex than I originally imagined, I thought it's a hierarchical notes app as usual.
I'm the same way, but that led me to Org-mode with local files (synced to the phone) and loads of nested outlines, like thousands of items.
But since it's programmed in Emacs Lisp, I've made me some custom commands like logging taken medicine with the current time and date, adding an episode to the log of series watched, etc. I also plan on hacking together a brother extension that would send the page title and address to one of specific places in the outlines, but I keep putting that off.
Yeah, at the core it's just a hierarchy of directories/markdown files with a WYSIWYG/autorender web editor but then they kept adding more and more fancy stuff : )