Skip to content

Instantly share code, notes, and snippets.

Avatar

Zihan Chen zchen24

View GitHub Profile
@zchen24
zchen24 / get_all_pdf_titles.py
Created Oct 23, 2016
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
View get_all_pdf_titles.py
#!/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')
View wstool_aliases.bash
#!/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'
You can’t perform that action at this time.