tag(3tcl)
πΈ tag β bestie edition πΈ
okay so this is tag, and it lives in the Tcl manual pages (section 3, for the library/procedure girlies π
). it's all about manipulating tagged files and honestly? it eats. let's get into it π«Ά
β¨ NAME β¨
tag β manipulate tagged files. that's the whole vibe. tagged files, we move them, we read them, we write them. iconic.
β¨ SYNOPSIS β¨
tag option ?arg arg ...?
β¨ DESCRIPTION β¨
the tag procedure is literally just a lil bundle of options for messing with tagged files. you call it, you give it an option, you give it some args, it does the thing. no cap β¨
β¨ COMMANDS β¨
tag readfile filenameβ reads the file at the given filename and hands you back a list. every element of that list is one tag record, and each tag record is itself a list of label-value pairs, or label-value-endlabel triples. and listen β the tag header is the very first element it returns. first. the main character. πtag writefile filename listβ takes a list in the format that tcl programs use internally for tagged data, and writes it out as a tagged file at filename. basically the reverse of readfile, and she ate πtag extract list testsβ takes a list in tagged format plus a list of conditions, and returns a new list in tagged format containing only those tag records that match the conditions. filtering? we love her. π
the tests argument is a list of test items, and each test item is a list shaped like this:
{ labelname condition matchvalue }
and the conditions you can use areβ¦ drumroll pls π₯
==β string equals. they're the same string, periodt.!=β string not equal. they are NOT the same string, and we're saying it out loud.<=β less than or equal. tiny or exactly the same, either way she's valid.-inβ is the test value a member of the list given as the matchvalue? like, is she in the group chat? π¬-containsβ does the match value contain the test value as a case insensitive substring? so casing? doesn't matter. not even a little. π-earlierβ date earlier. comparing dates, bestie.-laterβ date later. and jsyk, dates here are in ISO format:yyyy-mm-dd [hh:mm:ss]. note the time part is optional, iykyk β-existsβ does the label exist in this record? yes or no, that's the whole question. simple. clean. πΈ
π BUGS π
okay so we gotta be honest here, no gatekeeping:
tag readfile reads the whole file into memory before turning it into a list. so yeah. it should be more memory efficient. she's a lil hungry. π
the-earlierand-latercomparisons require TCL8.3. so if you're on something older, those two are just not gonna show up for you. sorry bestie π«Ά
π AUTHOR π
John Lines (john+taglog@paladyn.org) β thank you for your service, king π«‘β¨
and that's the whole page, fr fr π this one's from the tcl manual, tag(3tcl) section, dated July 3, 2000 β a classic, an absolute vintage icon, we stan. go manipulate some tagged files, bestie, you got this πππ
π¦ where this page comes from
- debian bookworm: taglog 0.2.6-1
- debian trixie: taglog 0.2.6-1
- ubuntu jammy: taglog 0.2.6-1
- ubuntu noble: taglog 0.2.6-1
- ubuntu resolute: taglog 0.2.6-1build1
- ubuntu stonking: taglog 0.2.6-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms