Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ruby/google_drive/bin/files_to_spreadsheet
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Dotenv.load
require './lib/google_drive_spreadsheet'

title, path = ARGV
abort "Usage: #{__FILE__} worksheet_title [files_path]" unless title
abort "Usage: #{__FILE__} worksheet_title files_path" unless title && path

path ||= `pwd`

cells = [%w[Name Ext Size MTime]]
cells += Pathname.glob("#{path}/*.*").sort.map{|file| [file.basename('.*'), file.extname, file.size, file.mtime] }
cells += Pathname.glob("#{path}/*").sort.map{|file| [file.basename('.*'), file.extname, file.size, file.mtime] }

GoogleDriveSpreadsheet.write(title, cells)
2 changes: 1 addition & 1 deletion ruby/showoff/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GEM
parslet (1.5.0)
blankslate (~> 2.0)
pdfkit (0.5.3)
rack (1.5.2)
rack (1.6.13)
rack-protection (1.5.0)
rack
redcarpet (2.2.2)
Expand Down