2019-05-29 12:31:04 +00:00
|
|
|
"
|
|
|
|
I model the interface between a CodiMD (https://demo.codimd.org) documentation
|
|
|
|
server and Grafoscopio.
|
|
|
|
I enable the interaction between Grafoscopio notebooks and CodiMD documents,
|
|
|
|
so one document can start online (as a CodiMD pad) and continue as a Grafoscopio
|
|
|
|
notebook or viceversa.
|
|
|
|
"
|
|
|
|
Class {
|
|
|
|
#name : #CodiMD,
|
|
|
|
#superclass : #Object,
|
|
|
|
#instVars : [
|
|
|
|
'server',
|
2020-05-02 23:59:57 +00:00
|
|
|
'pad',
|
|
|
|
'contents',
|
|
|
|
'url'
|
2019-05-29 12:31:04 +00:00
|
|
|
],
|
|
|
|
#category : #'Grafoscopio-Utils'
|
|
|
|
}
|
|
|
|
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
|
|
CodiMD class >> newDefault [
|
|
|
|
^ self new
|
|
|
|
defaultServer.
|
|
|
|
]
|
|
|
|
|
2020-05-02 23:59:57 +00:00
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> contents [
|
|
|
|
^ contents
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> contents: anObject [
|
|
|
|
contents := anObject
|
|
|
|
]
|
|
|
|
|
2019-05-29 12:31:04 +00:00
|
|
|
{ #category : #'as yet unclassified' }
|
|
|
|
CodiMD >> defaultServer [
|
|
|
|
self server: 'https://docutopia.tupale.co'.
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> pad [
|
|
|
|
^ pad
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> pad: anObject [
|
|
|
|
pad := anObject
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> server [
|
|
|
|
^ server
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> server: aUrlString [
|
|
|
|
server := aUrlString
|
|
|
|
]
|
|
|
|
|
2020-05-02 23:59:57 +00:00
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> url [
|
|
|
|
^ url
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
CodiMD >> url: anObject [
|
|
|
|
url := anObject
|
|
|
|
]
|
|
|
|
|
2019-05-29 12:31:04 +00:00
|
|
|
{ #category : #visiting }
|
|
|
|
CodiMD >> visit [
|
2020-05-02 23:59:57 +00:00
|
|
|
WebBrowser openOn: self url.
|
2019-05-29 12:31:04 +00:00
|
|
|
]
|