Internals
Cell management
PlutoBoard.add_cell — Methodadd_cell(
;
ws::WebSocket
) -> nothingAdds a cell at the bottom of the notebook
PlutoBoard.remove_cell — Methodremove_cell(
uuid::String
;
ws::WebSocket
) -> nothingRemoves cell with uuid
PlutoBoard.get_cells — Methodget_cells(
;
ws::WebSocket
) -> Array{String}Returns an array of all cells uuids
PlutoBoard.find_cells_with_variable — Methodfind_cells_with_variable(
var::String
) -> Set{String}
Finds all cells in the notebook that contain the given variable and returns their IDs.JS, HTML and CSS injections
PlutoBoard.load_scripts_and_links — Functionload_scripts_and_links() -> HypertextLiteral.ResultReturns a HypertextLiteral.Result object with scritps and links to load defined by the developer in initialize
PlutoBoard.load_js — Methodload_js() -> HypertextLiteral.ResultReturns 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.
PlutoBoard.monitor_folder — Methodmonitor_folder(; ws)
Watches the folder specified by `SERVE_DIR` for changes. When a file change is detected, sends a notification to the provided WebSocket `ws`.Other stuff
PlutoBoard.setup — Methodsetup()::nothingSets up PlutoBoard project by creating a new Julia package and copying necessary files.
PlutoBoard.get_package_name — Methodget_package_name()::StringReturns the name of the package from the Project.toml file.
PlutoBoard.open_file — Methodopen_file(
path::String
)::StringOpens a file and returns its content as a string.
PlutoBoard.copy_with_delete — Methodcopy_with_delete(
from::String,
to::String
)::nothingCopies 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.