47 lines
746 B
Smalltalk
47 lines
746 B
Smalltalk
"
|
|
I provide some utilites to work with OrgMode files.
|
|
|
|
https://orgmode.org/
|
|
"
|
|
Class {
|
|
#name : #OrgMode,
|
|
#superclass : #Object,
|
|
#instVars : [
|
|
'contents',
|
|
'file'
|
|
],
|
|
#category : #'Grafoscopio-Utils'
|
|
}
|
|
|
|
{ #category : #'instance creation' }
|
|
OrgMode class >> fromFile: aFileReference [
|
|
^ self new contents: aFileReference contents.
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
OrgMode >> contents [
|
|
^ contents
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
OrgMode >> contents: anObject [
|
|
contents := anObject
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
OrgMode >> file [
|
|
^ file
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
OrgMode >> file: anObject [
|
|
file := anObject
|
|
]
|
|
|
|
{ #category : #utilities }
|
|
OrgMode >> selectHeadlines [
|
|
|
|
^ self contents lines select: [ :line |
|
|
line isOrgModeHeader ]
|
|
]
|