help on notes project

90 views
Skip to first unread message

Andrew McDowell

unread,
Dec 16, 2023, 11:48:30 AM12/16/23
to BBEdit Talk
- notes project description
- I have a number of notes journals, some up to 100k words, written over some 30 years. Multiple topics in each file. My project is to extract and compile all meaningful notes from these journals and split them out by topic into separate files. Everything will be plain text, at least initially (I'll have to sanitize some Word files). My thought is to use BBEdit and Apple Scripts to accomplish this, as it's the only thing I've found that shows any promise at all. If anyone has a better idea I'm listening.
- I would prep the notes journal files into delimited text blocks as seen below. Following that is my pseudo code attempt at a script. I'm a beginner with Apple Scripts and with BBEdit. I am not a coder but willing to learn enough scripting, regex, etc to do this. Help is appreciated. Let me know if I can be clearer.
- If this works I'm sure I'll find other things to automate for this or other projects.
-----
- proposed form for 'prepped source file' (notes journal)
- misc (unwanted) text
- filename1 (target file for the following clip)
- ;; (beginning delimiter)
- heading, date
- text body
- ;; (end delimiter)
- misc (unwanted) text
- filename2
- ;;
- heading, date
- text body
- ;;
- misc text
- etc ... to end of file
-----
- proposed (pseudo code) script
- find 1st filename
- index that file to front
- select & copy delimited text (;; text ;;)
- append selection to target file
- find next filename in source file & repeat
- no more filenames?
- done.
-----
- maybe only an end delimiter is needed, if filename may serve as beginning delimiter?
- If anyone offers a script, please translate it for me (I'm a dummy)
- Or if there's a better way...
Thanks,  Andy

Tim Gray

unread,
Jan 15, 2024, 8:40:29 AM1/15/24
to BBEdit Talk
I love BBEdit, and I'm sure this could be done with it and some Applescripts, but something like Python seems much better suited.  Very easy to write a small script that would cycle through a bunch of text files, extract text based on different criteria, and output things to new text files.

Tim
--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages