Internals
Cell management
PlutoBoard.add_cell
— Methodadd_cell(
;
ws::WebSocket
) -> nothing
Adds a cell at the bottom of the notebook
PlutoBoard.remove_cell
— Methodremove_cell(
uuid::String
;
ws::WebSocket
) -> nothing
Removes cell with uuid
PlutoBoard.get_cells
— Methodget_cells(
;
ws::WebSocket
) -> Array{String}
Returns an array of all cells uuids
JS, HTML and CSS injections
PlutoBoard.load_scripts_and_links
— Functionload_scripts_and_links() -> HypertextLiteral.Result
Returns a HypertextLiteral.Result object with scritps and links to load defined by the developer in initialize
PlutoBoard.load_js
— Methodload_js() -> HypertextLiteral.Result
Returns a HypertextLiteral.Result object to load entry js files as modules and css stylesheets.
PlutoBoard.get_css_files
— Methodget_css_files() -> Array{String}
Returns all css files in static/css
folder of developer package.
Fileserver
PlutoBoard.serve_file
— Methodserve_file(req::HTTP.Request)
Serves the requested file from the SERVE_DIR
directory.
PlutoBoard.start_server
— Methodstart_server()
Starts the server on the port specified in the config.toml
file.
PlutoBoard.run_fileserver
— Methodrun_fileserver()
Starts the file server with restarting if needed.
PlutoBoard.get_mime_type
— Methodget_mime_type(file)
Returns the MIME type of the file.
Other stuff
PlutoBoard.setup
— Methodsetup(
example::String="default"
)::nothing
Sets up the PlutoBoard module by copying the necessary files to the current working directory. Example can either be default
or vue
or vue_moving_cells
.
PlutoBoard.get_package_name
— Methodget_package_name()::String
Returns the name of the package from the Project.toml file.
PlutoBoard.open_file
— Methodopen_file(
path::String
)::String
Opens a file and returns its content as a string.
PlutoBoard.copy_with_delete
— Methodcopy_with_delete(
from::String,
to::String
)::nothing
Copies a file from one location to another and deletes the original file. Sets the permissions of the copied file to 666.
PlutoBoard.parse_to_symbol
— Methodparse_to_symbol(
d::Dict{String, Any}
)::Dict{Symbol, Any}
Parse a dictionary with string keys to a dictionary with symbol keys.