Skip to content

Instantly share code, notes, and snippets.

@puttin
Last active Dec 22, 2015
Embed
What would you like to do?
Some tools may possibly help you to watch WWDC 2013 videos.

Where Is The Name?

Be careful before you use these tools.

#What's this? what's this?

Some tools may possibly help you to watch WWDC 2013 videos.

#Why should I use? WWDC 2013 videos don't exist in iTunes U like before. And when you downloaded them from here, you will find out the files' names only contain the session IDs.
And maybe you will find some list that contains the names and the session IDs.

Thanks to @lexrus for providing the list.

Thanks to @qiaoxueshi for subtitle

#How to use? You can:

  1. use search.sh to search which video you want to watch
  2. use rename.sh to convert the damn name from 101.mov to 101 - Platforms State of the Union.mov or vice versa. Only work for mov&pdf&srt

Yeah, you can search with browser. But I am such a lazy and stupid person who would like to use scripts.

#License MIT

#/bin/bash
usage="$(basename "$0") [-h] [-d directory] [-f listFile]
where:
-h show this help text
-d set the directory
-f set the listFile"
directory=.
listFile=./TITLE.txt
while getopts ':hd:f:' option; do
case "$option" in
h) echo "$usage"
exit
;;
d) directory=$OPTARG
;;
f) listFile=$OPTARG
;;
:) echo "missing argument for -$OPTARG\n" >&2
echo "$usage" >&2
exit 1
;;
\?) echo "illegal option: -$OPTARG\n" >&2
echo "$usage" >&2
exit 1
;;
esac
done
shift $((OPTIND - 1))
if [[ ! -f "$listFile" ]]; then
echo "$listFile not exist!"
exit 3
fi
echo "What do you want?"
option_readability="Add some readability to the videos' name"
option_reverse="Remove some readability to the videos' name"
readability=NO
select entry in "$option_readability" "$option_reverse"; do
case "$entry" in
"$option_readability" )
readability=YES
break
;;
"$option_reverse" )
readability=NO
break
;;
* )
echo "ERROR: Invalid selection" >&2
exit 2
;;
esac
done
#echo $readability
while read line
do
id=`echo "$line"|cut -d':' -f1`
name=`echo "$line"|cut -d':' -f2`
find "$directory" -name "$id*" | while read file
do
dir="${file%/*}"
filename="${file%.*}"
extension="${file##*.}"
#only rename pdf&mov file &srt
if [[ "$extension" != "mov" && "$extension" != "pdf" && "$extension" != "srt" ]]; then
continue
fi
if [[ "$readability" == "YES" ]]; then
mv "$file" "$dir/$id - $name.$extension"
else
mv "$file" "$dir/$id.$extension"
fi
done
done < "$listFile"
#!/bin/bash
usage="$(basename "$0") [-h] [-f listFile]
where:
-h show this help text
-f set the listFile"
listFile=./TITLE.txt
while getopts ':hf:' option; do
case "$option" in
h) echo "$usage"
exit
;;
f) listFile=$OPTARG
;;
:) echo "missing argument for -$OPTARG\n" >&2
echo "$usage" >&2
exit 1
;;
\?) echo "illegal option: -$OPTARG\n" >&2
echo "$usage" >&2
exit 1
;;
esac
done
shift $((OPTIND - 1))
if [[ ! -f "$listFile" ]]; then
echo "$listFile not exist!"
exit 3
fi
echo "input a string to search:"
read string
clear
#echo
while read line
do
echo "$line" | grep -qi "$string"
if [ $? -eq 0 ]; then
id=`echo "$line"|cut -d':' -f1`
name=`echo "$line"|cut -d':' -f2`
echo "$id - $name"
fi
done < "$listFile"
710:A Practical Guide to the App Sandbox
202:Accessibility in iOS
200:Accessibility in OS X
413:Advanced Debugging with LLDB
612:Advanced Editing with AV Foundation
221:Advanced Techniques with UIKit Dynamics
220:Advanced Text Layouts and Effects with Text Kit
711:Advances in AirPrint
404:Advances in Objective-C
505:Advances in OpenGL ES
213:Best Practices for Cocoa Animation
225:Best Practices for Great iOS UI Design
216:Bringing Your iOS Apps to OS X
611:Building Advanced iBooks HTML 5 Widgets and iAd Rich Media Ads
704:Building Efficient OS X Apps
201:Building User Interfaces for iOS 7
412:Continuous Integration with Xcode 5
703:Core Bluetooth
211:Core Data Performance Optimization and Debugging
509:Core Image Effects and Techniques
218:Custom Transitions Using View Controllers
214:Customizing Your App’s Appearance for iOS 7
407:Debugging with Xcode
700:Designing Accessories for iOS and OS X
224:Designing Code for Performance
503:Designing Games with Sprite Kit
702:Efficient Design with XPC
712:Energy Best Practices
217:Exploring Scroll Views on iOS 7
301:Extending Your Apps for Enterprise and Education Use
410:Fixing Memory Issues
403:From Zero to App Store in Xcode 5
206:Getting Started with UIKit Dynamics
603:Getting the Most Out of Web Inspector
601:Getting to Know Web Inspector
310:Harnessing iOS to Create Magic in Your Apps
228:Hidden Gems in Cocoa and Cocoa Touch
613:iAd Integration and Best Practices
226:Implementing Engaging UI on iOS
614:Implementing OS X Push Notifications for Websites
209:Improving Power Efficiency with App Nap
615:Integrating JavaScript into Native Apps
303:Integrating Passbook into your Ecosystem
501:Integrating with Game Controllers
405:Interface Builder Core Concepts
416:Introducing AppleScript Libraries
604:Introducing iAd Workbench, The Best Way to Market Your App
210:Introducing Text Kit
609:Introduction to iBooks Author Widget and iAd Rich Media Ad Development with iAd Producer 4
502:Introduction to Sprite Kit
100:Keynote
219:Making Your App World-Ready
300:Managing Apple Devices
415:Maximizing Apple Development Resources
701:Maximizing Battery Life on OS X
606:Moving to AV Kit and AV Foundation
708:Nearby Networking with Multipeer Connectivity
408:Optimize Your Code Using LLVM
215:Optimizing Drawing and Scrolling on OS X
417:OS X Automation Update
109:Painting the Future
101:Platforms State of the Union
607:Power and Performance: Optimizing Your Website for Great Battery Life and Responsive Scrolling
608:Preparing and Presenting Media for Accessibility
709:Protecting Secrets with the Keychain
714:Protecting your Users’ Privacy
309:Putting Map Kit in Perspective
227:Solutions to Common Date and Time Challenges
406:Taking Control of Auto Layout in Xcode 5
409:Testing in Xcode 5
713:The Accelerate Framework
506:Turn-Based Gaming with Game Center
414:Understanding Source Control in Xcode
223:Using Fonts with Text Kit
308:Using Receipts to Protect Your Digital Sales
305:Using Store Kit for In-App Purchases
610:What’s New in Camera Capture
203:What’s New in Cocoa Touch
205:What’s New in Cocoa
602:What’s New in Core Audio for iOS
207:What’s New in Core Data and iCloud
307:What’s New in Core Location
705:What’s New in Foundation Networking
504:What’s New in Game Center
605:What’s New in iBooks Author
208:What’s New in iOS User Interface Design
306:What’s New in iTunes Connect
707:What’s New in Kext Development
304:What’s New in Map Kit
507:What’s New in OpenGL for OS X
302:What’s New in Passbook
600:What’s New in Safari and WebKit for Web Developers
500:What’s New in Scene Kit
222:What’s New in State Restoration
402:What’s New in the LLVM Compiler
400:What’s New in Xcode 5
204:What’s New with Multitasking
508:Working with OpenCL
401:Xcode Core Concepts
@XueshiQiao

This comment has been minimized.

Copy link

@XueshiQiao XueshiQiao commented Sep 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment