What if we could transform our online networks from something we passively receive to something we actively create? Folder Poetry is the practice of using the structure of computer folder organization as a new kind of poetic form like the haiku or iambic pentameter. By naming and nesting folders and files, we can create unfolding narratives, rhythmic prose, and choose-your-own-adventure poetry.
- Folder Poetry is the practice of using the structure of computer folder organization as a new kind of poetic form like the haiku or iambic pentameter. By naming and nesting folders and files, we can create unfolding narratives, rhythmic prose, and choose-your-own-adventure poetry.
- The Terminal is desktop application to control and make changes to your operating system by typing text commands. In this class we'll use the terminal to create folder poetry.
- Bash is the programming language we'll use in the terminal, often one line at a time, but we can also put Bash code in a file and run that file.
- Every file has to contain text in it.
- Underscores and dashes are ok. for example:
my_file.txt
ormy-file.txt
, case sensitivity matters! no spaces! - All files must have a file extension such as .txt
Applications/utilities/terminal.app
Command | Description |
---|---|
cd |
change directory |
cd .. |
change directory one level back |
ls |
list contents of directory |
pwd |
print working directory |
mkdir foldername |
create a folder named foldername . |
touch dandelion.txt |
create a file named dandelion.txt |
echo "woof woof" > kitty.txt |
create a text file called kitty.txt containing the words, "woof woof" |
echo "bark bark" >> kitty.txt |
append the words "bark bark" to the end of text file called kitty.txt |
cat filename.txt |
print contents of file |
rm -rf filename.txt . |
remove a file or folder this way |
mv filename.txt newfilename.txt |
rename a file (you can also move anywhere by providing filepaths) |
open . |
open the current folder in Finder |
open filename.txt |
open file in Text Edit |
nano filename.txt |
open file in nano text editor (in terminal editor) |
atom filename.txt |
open file in Atom.io |
cp sourcefile.txt destfile.txt |
copy file (source filepath first, destination filepath second) |
say "hello, what is poetic computation?" |
speak out loud |
man cd |
show the manual for 'cd'. Press q to quit |
source ~/.bash_profile |
restart your terminal config file |
tree |
list file tree (if aliased, info below) |
treefile |
list file tree with file contents (if aliased, info below) |
Command | Description |
---|---|
Up + Down Arrow keys | scroll through history of commands entered |
Tab Key | autocomplete |
CMD + CTRL + SPACE | Emoji Keyboard (Mac OS) |
CTRL + c | escape the current terminal opperation |
CTRL + x , y , enter | exit nano and save/overwrite changes |
command | Description |
---|---|
echo "woof woof" > kitty.txt |
creates a text file called kitty.txt that contains the words, "woof woof" |
echo "bark bark" >> kitty.txt |
append the words "bark bark" to the end of text file called kitty.txt |
nano textfile.txt |
open file in the nano text editor |
CTRL + X , y , ENTER | exit and save changes |
The ~./bash_profile is a configuration file for the terminal.
nano ~/.bash_profile
to open your ~./bash_profile in the nano editor
Copy the commands in steps 2,3,4 into the text area in nano
-
alias tree="find . -not -path '*/\.*' -print | sed -e 's;[^/]*/;|;g;s;|; |;g'"
-
alias treefile="find . -not -path '*/\.*' | xargs -I {} bash -c 'f={}; echo \$f | sed -e \"s;[^/]*/;|;g;s;|; |;g\"; if [[ \$f == *.txt ]]; then echo; cat \$f; echo; echo; fi'"
- steps 2 and 3 create aliass AKA shortcuts that will help us visualize our folder poem structures.
-
export PS1="\n🍋 \w\n\u$ "
- This will customize your Bash prompt. Feel free to change the emoji. (skip if you use zshell)
- Explanation:
\w
shows your full file path so you'll always know where you are in the terminal,\n
creates a new line in your bash prompt.\u
shows your computer username, and$
symoolizes the end of a bash prompt.
Terminal configured! time to exit nano and reset the session!
-
CTRL + X
to exit nano, then pressY
for yes to overwrite the buffer, then pressenter
to save the file. -
source ~/.bash_profile
to reboot your terminal session.
cd
mkdir folder-friends
mkdir folder-poetry
cd folder-poetry
mkdir yourname-home
cd yourname-home
- ^ where we'll make our poems