Skip to content

Commit

Permalink
update of cv and thesis-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
MBrede committed Nov 8, 2023
1 parent 1ecad30 commit 8afcc45
Show file tree
Hide file tree
Showing 886 changed files with 69,662 additions and 142 deletions.
23 changes: 23 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# REMEMBER to restart R after you modify and save this file!

# First, execute the global .Rprofile if it exists. You may configure blogdown
# options there, too, so they apply to any blogdown projects. Feel free to
# ignore this part if it sounds too complicated to you.
if (file.exists("~/.Rprofile")) {
base::sys.source("~/.Rprofile", envir = environment())
}

# Now set options to customize the behavior of blogdown for this project. Below
# are a few sample options; for more options, see
# https://bookdown.org/yihui/blogdown/global-options.html
options(
# to automatically serve the site on RStudio startup, set this option to TRUE
blogdown.serve_site.startup = FALSE,
# to disable knitting Rmd files on save, set this option to FALSE
blogdown.knit.on_save = TRUE,
# build .Rmd to .html (via Pandoc); to build to Markdown, set this option to 'markdown'
blogdown.method = 'html'
)

# fix Hugo version
options(blogdown.hugo.version = "0.91.2")
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata

/.quarto/
Empty file added .hugo_build.lock
Empty file.
59 changes: 59 additions & 0 deletions R/build.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# An optional custom script to run before Hugo builds your site.
# You can delete it if you do not need it.
library(tidyverse)

build_iframe <- function(link = '',
height = "500",
width = '90%') {
cat(
glue::glue(
'<iframe width="{width}" height="{height}" name="iframe" src="{link}"></iframe>'
)
)
cat(glue::glue('Sollte die Darstellung nicht richtig funktionieren, kann das Skript/die App auch [hier]({link}) gefunden werden.'))
}

if(!exists('run_script')){
orcid = "0000-0001-7134-0553"

pubs <-
jsonlite::read_json(
glue::glue(
'https://api.crossref.org/works?filter=orcid:{orcid}&[email protected]'
)
)

pubs <- pubs$message$items %>%
map_dfr(
~ tibble(
title = first(.$title),
authors = map_chr(.$author, ~ paste(.$given, .$family)) %>%
str_replace('Max Brede', 'admin') %>%
str_c(collapse = '\n- '),
date = str_c(unlist(.$published), collapse = '-'),
file_name = str_to_lower(str_c(
unlist(.$published)[1],
first(.$author)$family,
paste0(unlist(str_split(title, ' '))[1:3], collapse = ''),
sep = '_'
)),
doi = .$DOI,
publication_types = case_when(.$type == "journal-article" ~ "2",
T ~ "1"),
publication = first(.$`container-title`),
publication_short = first(.$`short-container-title`),
abstract = .$abstract
)
) %>%
mutate(across(everything(), ~str_remove_all(replace_na(., ''), '<.[^>]+>')))

existing <- list.files('content/publication/')
proto <- read_file('R/proto_article.md')

for(i in seq_len(nrow(pubs))){
if(!(str_c(pubs$file_name[i], '.md') %in% existing)){
out <- glue::glue(proto)
write_file(out, str_c('content/publication/',pubs$file_name[i], '.md'))
}
}
}
2 changes: 2 additions & 0 deletions R/build2.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# An optional custom script to run after Hugo builds your site.
# You can delete it if you do not need it.
18 changes: 18 additions & 0 deletions R/proto_article.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: "{pubs[i,'title']}"
authors:
- {pubs[i,'authors']}
date: "{pubs[i,'date']}"
doi: "{pubs[i,'doi']}"


# Publication type.
# Legend: 0 = Uncategorized; 1 = Conference paper; 2 = Journal article;
# 3 = Preprint / Working Paper; 4 = Report; 5 = Book; 6 = Book section;
# 7 = Thesis; 8 = Patent
publication_types: ["{pubs[i,'publication_types']}"]
publication: "{pubs[i,'publication']}"
publication_short: "{pubs[i,'publication_short']}"

abstract: {pubs[i,'abstract']}
---
42 changes: 42 additions & 0 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
title = "Max Brede"
baseURL = "https://max-bre.de"
copyright = "Copyright &copy; {year}"
googleAnalytics = ""
disqusShortname = ""

theme = "academia-hugo"
enableGitInfo = true
defaultContentLanguage = "de"
hasCJKLanguage = false
defaultContentLanguageInSubdir = false
removePathAccents = true
paginate = 10
enableEmoji = false
footnotereturnlinkcontents = "<sup>^</sup>"
ignoreFiles = ["\\.qmd$", "\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
publishDir = "docs"
summaryLength = 20

[markup.goldmark.renderer]
unsafe= true

[outputs]
home = [ "HTML", "RSS", "JSON" ]
section = [ "HTML", "RSS" ]

[blackfriday]
hrefTargetBlank = true
angledQuotes = false
latexDashes = true
extensions = ["backslashLineBreak"]

[imaging]
resampleFilter = "lanczos"
quality = 90
anchor = "smart"

[taxonomies]
tag = "tags"
category = "categories"
publication_type = "publication_types"
author = "authors"
11 changes: 11 additions & 0 deletions config/_default/languages.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Languages
# Create a `[X]` block for each language you want, where X is the language ID.
# Refer to https://sourcethemes.com/academic/docs/language/

# Configure the English version of the site.
#[en]
# languageCode = "en-us"
# contentDir = "content/en" # Uncomment for multi-lingual sites, and move English content into `en` sub-folder.

[de]
languageCode = "de-de"
53 changes: 53 additions & 0 deletions config/_default/menus.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Navigation Links
# To link a homepage widget, specify the URL as a hash `#` followed by the filename of the
# desired widget in your `content/home/` folder.
# The weight parameter defines the order that the links will appear in.


[[main]]
name = "Impressum"
url = "privacy#imp"
weight = 50

[[main]]
name = "Skripte"
url = "#skripte"
hasChildren = true
weight = 40

[[main]]
parent = "Skripte"
name = "EDV I"
url = "skripte/edvi"

[[main]]
parent = "Skripte"
name = "EDV II"
url = "skripte/edvii"

[[main]]
parent = "Skripte"
name = "Programmieren in R/Experimente in Psychopy"
url = "skripte/assumptions"

[[main]]
parent = "Skripte"
name = "Versuchsplanung"
url = "skripte/vplan"

[[main]]
parent = "Skripte"
name = "R Crashkurs"
url = "skripte/crash"

[[main]]
parent = "Skripte"
name = "Thesis in R"
url = "skripte/thesisr"

# Link to a PDF of your resume/CV from the menu.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# [[main]]
# name = "CV"
# url = "files/cv.pdf"
# weight = 70
138 changes: 138 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# SITE SETUP
# Documentation: https://sourcethemes.com/academic/

# marketing
microsoft_clarity = ""

# Color theme.
# Choose from `default`, `ocean`, `forest`, `dark`, `apogee`, `1950s`, `coffee`, `cupcake`, `strawberry`.
color_theme = "dark"
day_night = true
font = "classic"
description = ""
sharing_image = ""
twitter = "BredeMax"
logo = ""
highlight = true
highlight_languages = ["r"] # Add support for highlighting additional languages
highlight_style = "github" # For supported styles, see https://cdnjs.com/libraries/highlight.js/
math = true
privacy_pack = true

date_format = "2 Jan 2006"
time_format = "15:04"

############################
## Contact Widget setup ##
############################

# Enter contact details (optional). To hide a field, clear it to "".
email = "[email protected]"
phone = "+178~5501989"
address = "CAU zu Kiel, Olshausenstraße 40, 24098 Kiel"

# Office hours: use `<br>` to insert a line break, or set to "" to remove office hours
office_hours = ""

# Enter an optional link for booking appointments (e.g. calendly.com).
appointment_url = ""

# Contact links
# Set to `[]` to disable, or comment out unwanted lines with a hash `#`.
contact_links = [
# {icon = "twitter", icon_pack = "fab", name = "DM Me", link = "https://twitter.com/Twitter"},
# {icon = "skype", icon_pack = "fab", name = "Skype Me", link = "skype:echo123?call"},
# {icon = "keybase", icon_pack = "fab", name = "Chat on Keybase", link = "https://keybase.io/"},
# {icon = "comments", icon_pack = "fas", name = "Discuss on Forum", link = "https://discourse.gohugo.io"},
# {icon = "telegram", icon_pack = "fab", name = "Telegram Me", link = "https://telegram.me/@Telegram"},
]

# Display a map.
# To show your address on a map in the contact widget, you need to enter your latitude, longitude and choose
# a map provider below.
# To use Google Maps, set `map = 1` and enter your API key that can be obtained here:
# https://developers.google.com/maps/documentation/javascript/get-api-key
# To use OpenStreetMap tiles, set `map = 2`.
# To use OpenStreetMap on a high traffic site, set `map = 3` and enter your API key that can be obtained here:
# https://www.mapbox.com/studio/account/tokens
# To get your coordinates, right-click on Google Maps and choose "What's here?". The coords will show up at the bottom.
#
# Map provider:
# 0: No map
# 1: Google Maps
# 2: OpenStreetMap (Mapnik)
# 3: OpenStreetMap (Mapbox)
map = 0
map_api_key = "AIzaSyBu5nZKbeK-WHQ70oqOWo-_4VmwOwKP9YQ"
latitude = "37.4275"
longitude = "-122.1697"
zoom = 15

############################
## Plugins ##
############################

# Load CSS and JS plugins
# E.g. To load `/assets/css/custom.css`, set `plugins_css = ["custom"]`.
# E.g. To load `/assets/js/custom.js`, set `plugins_js = ["custom"]`.
plugins_css = []
plugins_js = []

############################
## Advanced options ##
############################

# Get user avatars from Gravatar.com? (true/false)
gravatar = false

# Align the main menu to the right of the page? (true/false)
menu_align_right = true

# Show estimated reading time for posts? (true/false)
reading_time = true

# Display comment count (if commenting enabled in config.toml)? (true/false)
comment_count = true

# Display next/previous section pager? (true/false)
section_pager = false
docs_section_pager = true # Display pager in Docs layout (e.g. tutorials)?

# Enable in-built social sharing buttons? (true/false)
sharing = false

# Configuration of publication pages.
[publications]
# Date format (refer to https://sourcethemes.com/academic/docs/customization/#date-format )
# Examples: "Mon, Jan 2, 2006" or "2006-01-02"
date_format = "Jan 2006"

# Citation style ("apa" or "mla")
citation_style = "apa"

# Configuration of project pages.
[projects]
# Views for associated content.
# 1: List
# 2: Compact
# 3: Card
# 4: Citation (publications only)
post_view = 3
publication_view = 3
talk_view = 2

# Search.
[search]
# Search provider:
# 0: No search engine
# 1: academia (built-in)
# 2: Algolia (https://www.algolia.com)
engine = 0

# Configuration of Algolia search engine.
# Paste the values from your Algolia dashboard.
[search.algolia]
app_id = ""
api_key = ""
index_name = ""
show_logo = false
Loading

0 comments on commit 8afcc45

Please sign in to comment.