mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge branch 'master' of https://github.com/sharelatex/sharelatex
This commit is contained in:
commit
6fe58b7900
2 changed files with 25 additions and 1 deletions
|
@ -49,7 +49,7 @@ services:
|
|||
## Server Pro ##
|
||||
################
|
||||
|
||||
# SANDBOXED_COMPILES: "true"
|
||||
# SANDBOXED_COMPILES:true
|
||||
|
||||
# SHARELATEX_LDAP_HOST: 'ldap://ldap.forumsys.com'
|
||||
# SHARELATEX_LDAP_DN: 'uid=:userKey,dc=example,dc=com'
|
||||
|
|
24
grunt/ProjectSize.coffee
Normal file
24
grunt/ProjectSize.coffee
Normal file
|
@ -0,0 +1,24 @@
|
|||
require("coffee-script")
|
||||
|
||||
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
|
||||
|
||||
ids = _.keys projects
|
||||
console.log "project \t size"
|
||||
ids.forEach (id)->
|
||||
console.log id + "\t" + projects[id]
|
Loading…
Reference in a new issue