mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
comment out project size for test
This commit is contained in:
parent
1707ea187d
commit
78008cd2a6
1 changed files with 21 additions and 21 deletions
|
@ -1,24 +1,24 @@
|
|||
require("coffee-script")
|
||||
# require("coffee-script")
|
||||
|
||||
fs = require("fs")
|
||||
_ = require("underscore")
|
||||
# fs = require("fs")
|
||||
# _ = require("underscore")
|
||||
|
||||
if not process.argv[2]
|
||||
console.log "Usage: coffee project_size.coffee user_files_path"
|
||||
else
|
||||
dirPath = process.argv[2]
|
||||
if not fs.lstatSync(dirPath).isDirectory()
|
||||
console.log dirPath + " directory not exist"
|
||||
else
|
||||
fs.readdir dirPath, (err, files)->
|
||||
projects = []
|
||||
files.forEach (file)->
|
||||
project_id = file.split("_")[0]
|
||||
if !projects[project_id]
|
||||
projects[project_id] = 0
|
||||
projects[project_id] += fs.lstatSync(dirPath+"/"+file).size
|
||||
# if not process.argv[2]
|
||||
# console.log "Usage: coffee project_size.coffee user_files_path"
|
||||
# else
|
||||
# dirPath = process.argv[2]
|
||||
# if not fs.lstatSync(dirPath).isDirectory()
|
||||
# console.log dirPath + " directory not exist"
|
||||
# else
|
||||
# fs.readdir dirPath, (err, files)->
|
||||
# projects = []
|
||||
# files.forEach (file)->
|
||||
# project_id = file.split("_")[0]
|
||||
# if !projects[project_id]
|
||||
# projects[project_id] = 0
|
||||
# projects[project_id] += fs.lstatSync(dirPath+"/"+file).size
|
||||
|
||||
ids = _.keys projects
|
||||
console.log "project \t size"
|
||||
ids.forEach (id)->
|
||||
console.log id + "\t" + projects[id]
|
||||
# ids = _.keys projects
|
||||
# console.log "project \t size"
|
||||
# ids.forEach (id)->
|
||||
# console.log id + "\t" + projects[id]
|
||||
|
|
Loading…
Reference in a new issue