-
What is Scripting & Why learn?
- Files that tell a computer what to do in order
- Programing
- Automate common tasks
- file rename
- image processing
-
How do you script?
- Most programming languages can be used
- Ruby, Python, Js in Node, PHP, Bash/Shell/Batch, whatever
-
Introduction to the Terminal
- File navigation (cd, ls/dir .., /)
- Not covered: installing the languages.
-
Writing a basic script
- Using a text editor
- runme.py
-
Running files
- ruby file.rb
- node file.js
- python file.py
-
Running a basic script
- Renaming a file (renamer.rb)
- Rename one file (then undo that)
-
Intro to Variables
- (comment out old stuff)
- Storing information
- Rename with a variable (and then undo)
-
Intro to arrays
- Iterating
- Accessing Indexes
- Difference from Hash/Dictionary/Object
- Rename with arguments passed from the command line
-
Extensibility
- Node modules, Ruby Gems
-
Getting Help
- Docs
- Ruby: http://www.ruby-doc.org/
- node: http://nodejs.org/api/
- python: https://docs.python.org/2/
- Stack Overflow: http://stackoverflow.com/
- Docs
-
Conclusion
- Scheduling scripts
- Other uses of scripts
- opening, reading, modifying files
- scraping web pages
- calling other scripts
scit106/script-demo
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|