Attach a script
Upload source files the way you upload anything else: drag them into a collection, use the upload button, or attach one to a Bird chat. The formats Bower accepts include.R, .Rmd, .Rnw, .py, .ipynb, .sql,
.sh, .jl for Julia, .m for MATLAB, .do and .ado for Stata, plus
.json, .yaml, .xml, .c, .cpp, .java, .js and .ts.
If you tried this before and Bower turned you away, that was not you doing it
wrong. Most operating systems have no registered file type for a .R or a
.do, so your browser hands the upload over with the type field blank, and
Bower used to refuse anything it could not identify. It now recognises these
files by their extension.
Read it without downloading it
Open the attachment and you see the file itself, syntax highlighted, with the language named at the top and buttons to copy or download it. An.Rmd keeps its chunk headers intact, options included, so include=FALSE
is still visible where you wrote it.
A few accepted formats have no highlighter yet, .css and .xml among them.
Those still open and read as code, just without the colours. Files over 256 KB
are not rendered in the browser: you get the file details and a download button
instead, because syntax highlighting a file that size would lock up the tab.
Search inside your scripts
When a script is brought in through import, Bower reads the text inside it. Search for a function name you defined and the file comes back, and Bird can read the file when you ask about it, rather than asking you to paste the code into the chat.This applies to files brought in through import, or attached in a Bird chat. A
file attached directly to an existing note is stored and previewed, but its
contents are not indexed, so it will not turn up in search.