Commit d5bf2668 authored by Knut Wenzig's avatar Knut Wenzig
Browse files

passe an Linux an

parent 95ace33b
No preview for this file type
......@@ -32,10 +32,11 @@
#codebookcsvpath <- "D:/lokal/soep-more/datasets/more_local/"
codebookcsvpath <- "D:/lokal/core-doku/datasets/bioimmig/"
codebookcsvpath <- "D:/lokal/core-doku/datasets/soep_ts_h_cleaned/"
#codebookcsvpath <- "D:/lokal/core-doku/datasets/pgen/"
codebookcsvpath <- "D:/lokal/core-doku/datasets/pgen/"
#codebookcsvpath <- "D:/lokal/core-doku/datasets/interviewer/"
codebookcsvpath <- "~/DIW/SOEP/git/core-doku/datasets/hbrutto/"
#modus <- "modul"
modus <- ""
#modus <- ""
# dataset.name <- "hbrutto"
# dataset.folder <- ""
# is.internal <- TRUE
......@@ -44,24 +45,25 @@
#distribution <- "2020"
distribution <- "v35"
#distribution <- "v3-0-0"
distribution <- "2019"
#distribution <- "2019"
version <- "from codebook.csv"
study <- "from codebook.csv"
#language <- lang
language <- "de"
#language <- "en"
allow.markdown <- FALSE
language <- "en"
allow.markdown <- TRUE
collapse.variable.groups <- TRUE
calc.abs.frequencies <- TRUE # TRUE: show only all value labels without frequencies
omit.unlabeled.values <- TRUE # if only_labeled_vals==1
optimize.tables <- TRUE
restrict.questions <- TRUE # Anzeige der Fragen begrenzen (unique Fragen im letzten Jahr)
display.question.id <- TRUE
apply.checkl10n <- TRUE # falls nicht uebersetzt: _de nehmen und [de] einfuegen
do.xelatex <- TRUE # LaTeX-Lauf starten
rename.pdf <- TRUE # pdf>questionnaire umbenennen do.xelatex=T
is.surveypaper <- FALSE
is.surveypaper <- TRUE
has.schmutztitel <- FALSE
schmutztitel.has.DIWSOEPLogo <- TRUE
running.title.only <- FALSE # Kolumnentitel (depricated, ergibt sich aus is.surveypaper/has.schmutztitel)
......@@ -120,6 +122,7 @@
datapath <- "//hume/soep-data/MA/mkrieger/austausch/"
datapath <- paste0("//hume/rdc-prod/distribution/soep-core/soep.v35/stata_en/")
datapath <- "//hume/abt/abt-sop/MA/kwenzig/topshareholder/new/"
datapath <- "~/DIW/SOEP/data/"
if(modus=="generation") {
datapath <- "//hume/rdc-gen/consolidated/soep-core/soep.v35/consolidated10/"
......@@ -151,12 +154,15 @@
}
if(modus=="v35") {
datapath <- paste0("//hume/rdc-prod/distribution/soep-core/soep.v35/stata_en/",dataset.folder)
codebookcsvpath <- paste0("D:/lokal/core-doku/datasets/",dataset.name ,"/")
#datapath <- paste0("//hume/rdc-prod/distribution/soep-core/soep.v35/stata_en/",dataset.folder)
datapath <- paste0("~/DIW/SOEP/data/",dataset.folder)
#codebookcsvpath <- paste0("D:/lokal/core-doku/datasets/",dataset.name ,"/")
codebookcsvpath <- paste0("~/DIW/SOEP/git/core-doku/datasets/",dataset.name ,"/")
distribution <- "v35"
version <- "v35"
language <- c("en","de")[is.internal+1]
allow.markdown <- TRUE
apply.checkl10n <- !is.internal # falls nicht uebersetzt: _de nehmen und [de] einfuegen
allow.markdown <- !is.internal
collapse.variable.groups <- TRUE
calc.abs.frequencies <- TRUE # TRUE: show only all value labels without frequencies
omit.unlabeled.values <- TRUE # if only_labeled_vals==1
......@@ -164,6 +170,7 @@
restrict.questions <- !is.internal # Anzeige der Fragen begrenzen (unique Fragen im letzten Jahr)
display.question.id <- TRUE
do.xelatex <- TRUE # LaTeX-Lauf starten
rename.pdf <- TRUE # pdf>questionnaire umbenennen do.xelatex=T
is.surveypaper <- !is.internal
......@@ -236,11 +243,13 @@
# Ordner des repositories (enthaelt Ordner LaTex und R)
path <- "D:/lokal/codebooker/"
path <- "~/DIW/SOEP/git/codebooker/"
titletexfile <- paste0(path,"LaTeX/titlegen.tex")
covertexfile <- paste0(path,"LaTeX/covergen.tex")
texfile <- paste0(path,"LaTeX/codebookgen.tex")
addpath <- "D:/lokal/additionalmetadata/" # additional metadata
addpath <- "~/DIW/SOEP/git/additionalmetadata/" # additional metadata
# Ordner mit Grafiken zu Variablen, wenn leer, dann wird das ignoriert
graphics.path <- "//hume/soep-data/METADATA/SOEP-LONG/ddionrails/v30/gfx_en/hgen/"
......@@ -432,6 +441,9 @@
c("variable", "value",
"label", "label_de",
"frequency")]
if(language=="en" & apply.checkl10n){
variable_categories.csv <- checkl10n(csv=variable_categories.csv, csv.name="variable_categories")
}
# Information aus DDIonRails wird an andere Metadaten angemergt.
......@@ -1020,13 +1032,34 @@
dataset.name, "_", version,"_", language, ".pdf")
}
xelatexpath <- paste0(path,"LaTeX/")
xelatexcmd <- paste0("xelatex --aux-directory=", xelatexpath,
" --include-directory=", xelatexpath,
" --output-directory=", xelatexpath,
" ", xelatexpath, "spp_codebook.tex")
log <- shell(xelatexcmd, invisible=FALSE, intern=TRUE)
log <- shell(xelatexcmd, invisible=FALSE, intern=TRUE)
log <- shell(xelatexcmd, invisible=FALSE, intern=TRUE)
# xelatexcmd <- paste0("xelatex --aux-directory=", xelatexpath,
# " --include-directory=", xelatexpath,
# " --output-directory=", xelatexpath,
# " ", xelatexpath, "spp_codebook.tex")
if(Sys.info()["sysname"]=="Windows"){
# Windows-System
xelatexcmd <- paste0("xelatex --aux-directory=", xelatexpath,
" --include-directory=", xelatexpath,
" --output-directory=", xelatexpath,
" ", xelatexpath, "spp_codebook.tex")
} else {
# Nicht-Windows (Linux)
xelatexcmd <- paste0("cd ", xelatexpath, ";xelatex ", "-output-directory=", xelatexpath, " ", xelatexpath, "spp_codebook.tex")
}
if(Sys.info()["login"]=="knut"){
# knuts ubuntu
xelatexcmd <- paste0("cd ", xelatexpath, ";xelatex spp_codebook.tex")
}
systemoption <- list(command=xelatexcmd, intern = TRUE)
if(Sys.info()["sysname"]=="Windows"){
# Windows-System
systemoption <- c(systemoption, list(invisible= FALSE))
}
#log <- shell(xelatexcmd, invisible=FALSE, intern=TRUE) # 3mal
log <- do.call(system, systemoption)
log <- do.call(system, systemoption)
log <- do.call(system, systemoption)
log <- do.call(system, systemoption)
if(rename.pdf){
file.copy(from=paste0(xelatexpath, "spp_codebook.pdf"),
to=paste0(xelatexpath, rename.to.filename),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment