Skip to content

Instantly share code, notes, and snippets.

View zchen24's full-sized avatar

Zihan Chen zchen24

  • Cornerstone Robotics Limited
View GitHub Profile
#!/usr/bin/env bash
# Set the workspace to the current directory
alias wspwd='export ROS_WORKSPACE=$(pwd)'
# Save the workspace used in this shell as the current workspace
alias wssave='echo -e "$ROS_WORKSPACE" > ~/.curws'
# Load the saved workspace into this shell
alias wsload='source $(cat ~/.curws)/setup.bash'
@zchen24
zchen24 / get_all_pdf_titles.py
Created October 23, 2016 02:34
Script used to extract all PDF file titles (from a conference) and put them into a txt file, which can be used to generate word cloud
#!/usr/bin/env python
from pdfrw import PdfReader
import glob
fobj = open('alltitles.txt', 'w') # output file
allpdf = glob.glob('./*.pdf') # assuming all PDF files in current dir
for fname in allpdf:
ipdf = PdfReader(fname)
title = ipdf.Info.get('/Title')