Skip to content

Commit c040ff7

Browse files
greene website
1 parent dc86de4 commit c040ff7

File tree

569 files changed

+19066
-24350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

569 files changed

+19066
-24350
lines changed

404.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: 404
3+
permalink: /404.html
4+
---
5+
6+
{:.center}
7+
Page not found :(
8+
9+
{:.center}
10+
The page you're looking for may have moved.
11+
Try [searching the whole site](https://www.google.com/search?q=site%3A{{ "" | absolute_url }}) for the content you want.

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
greenelab.com

Gemfile

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1-
source 'https://rubygems.org'
1+
source "https://rubygems.org"
22

3-
gem 'jekyll'
3+
gem "jekyll"
4+
group :jekyll_plugins do
5+
gem "jekyll-feed"
6+
gem "jekyll-redirect-from"
7+
end
8+
9+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
10+
# and associated library.
11+
platforms :mingw, :x64_mingw, :mswin, :jruby do
12+
gem "tzinfo", "~> 1.2"
13+
gem "tzinfo-data"
14+
end
15+
16+
# Performance-booster for watching directories on Windows
17+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

Gemfile.lock

+56-37
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,82 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.5.2)
5-
public_suffix (>= 2.0.2, < 4.0)
4+
addressable (2.7.0)
5+
public_suffix (>= 2.0.2, < 5.0)
66
colorator (1.1.0)
7-
concurrent-ruby (1.1.3)
8-
em-websocket (0.5.1)
7+
concurrent-ruby (1.1.7)
8+
em-websocket (0.5.2)
99
eventmachine (>= 0.12.9)
1010
http_parser.rb (~> 0.6.0)
11-
eventmachine (1.2.7)
12-
ffi (1.9.25)
11+
eventmachine (1.2.7-x64-mingw32)
12+
ffi (1.13.1-x64-mingw32)
1313
forwardable-extended (2.6.0)
1414
http_parser.rb (0.6.0)
15-
i18n (0.9.5)
15+
i18n (1.8.5)
1616
concurrent-ruby (~> 1.0)
17-
jekyll (3.8.5)
17+
jekyll (4.1.1)
1818
addressable (~> 2.4)
1919
colorator (~> 1.0)
2020
em-websocket (~> 0.5)
21-
i18n (~> 0.7)
22-
jekyll-sass-converter (~> 1.0)
21+
i18n (~> 1.0)
22+
jekyll-sass-converter (~> 2.0)
2323
jekyll-watch (~> 2.0)
24-
kramdown (~> 1.14)
24+
kramdown (~> 2.1)
25+
kramdown-parser-gfm (~> 1.0)
2526
liquid (~> 4.0)
26-
mercenary (~> 0.3.3)
27+
mercenary (~> 0.4.0)
2728
pathutil (~> 0.9)
28-
rouge (>= 1.7, < 4)
29+
rouge (~> 3.0)
2930
safe_yaml (~> 1.0)
30-
jekyll-sass-converter (1.5.2)
31-
sass (~> 3.4)
32-
jekyll-watch (2.1.2)
31+
terminal-table (~> 1.8)
32+
jekyll-feed (0.15.1)
33+
jekyll (>= 3.7, < 5.0)
34+
jekyll-redirect-from (0.16.0)
35+
jekyll (>= 3.3, < 5.0)
36+
jekyll-sass-converter (2.1.0)
37+
sassc (> 2.0.1, < 3.0)
38+
jekyll-watch (2.2.1)
3339
listen (~> 3.0)
34-
kramdown (1.17.0)
35-
liquid (4.0.1)
36-
listen (3.1.5)
37-
rb-fsevent (~> 0.9, >= 0.9.4)
38-
rb-inotify (~> 0.9, >= 0.9.7)
39-
ruby_dep (~> 1.2)
40-
mercenary (0.3.6)
40+
kramdown (2.3.0)
41+
rexml
42+
kramdown-parser-gfm (1.1.0)
43+
kramdown (~> 2.0)
44+
liquid (4.0.3)
45+
listen (3.3.1)
46+
rb-fsevent (~> 0.10, >= 0.10.3)
47+
rb-inotify (~> 0.9, >= 0.9.10)
48+
mercenary (0.4.0)
4149
pathutil (0.16.2)
4250
forwardable-extended (~> 2.6)
43-
public_suffix (3.0.3)
44-
rb-fsevent (0.10.3)
45-
rb-inotify (0.9.10)
46-
ffi (>= 0.5.0, < 2)
47-
rouge (3.3.0)
48-
ruby_dep (1.5.0)
49-
safe_yaml (1.0.4)
50-
sass (3.7.2)
51-
sass-listen (~> 4.0.0)
52-
sass-listen (4.0.0)
53-
rb-fsevent (~> 0.9, >= 0.9.4)
54-
rb-inotify (~> 0.9, >= 0.9.7)
51+
public_suffix (4.0.6)
52+
rb-fsevent (0.10.4)
53+
rb-inotify (0.10.1)
54+
ffi (~> 1.0)
55+
rexml (3.2.4)
56+
rouge (3.25.0)
57+
safe_yaml (1.0.5)
58+
sassc (2.4.0-x64-mingw32)
59+
ffi (~> 1.9)
60+
terminal-table (1.8.0)
61+
unicode-display_width (~> 1.1, >= 1.1.1)
62+
thread_safe (0.3.6)
63+
tzinfo (1.2.8)
64+
thread_safe (~> 0.1)
65+
tzinfo-data (1.2020.4)
66+
tzinfo (>= 1.0.0)
67+
unicode-display_width (1.7.0)
68+
wdm (0.1.1)
5569

5670
PLATFORMS
57-
ruby
71+
x64-mingw32
5872

5973
DEPENDENCIES
6074
jekyll
75+
jekyll-feed
76+
jekyll-redirect-from
77+
tzinfo (~> 1.2)
78+
tzinfo-data
79+
wdm (~> 0.1.1)
6180

6281
BUNDLED WITH
63-
1.16.2
82+
2.1.4

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
# Mangul Lab
1+
<h1 align="center">Greene Lab Website</h1>
2+
<p align="center"><img height="200" src="https://raw.githubusercontent.com/greenelab/brand/master/text/for-light-bg.png?raw=true" alt="Lab Website Template"></p>
23

3-
University of Southern California
4+
This website was generated from the Greene Lab's own [`lab-website-template`](https://github.com/greenelab/lab-website-template).
5+
See its readme for documentation on how to work with this site.

_config.yml

+47-32
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,55 @@
1-
# Welcome to Jekyll!
2-
#
3-
# This config file is meant for settings that affect your whole blog, values
4-
# which you are expected to set up once and rarely need to edit after that.
5-
# For technical reasons, this file is *NOT* reloaded automatically when you use
6-
# 'jekyll serve'. If you change this file, please restart the server process.
1+
# https://jekyllrb.com/docs/configuration/
72

8-
# Site settings
9-
title: The Sanders Lab
10-
11-
description:
3+
# site-wide variables
4+
title: The Greene Lab # title of site, used in tab name and elsewhere
5+
email: [email protected] # default email
6+
google: Casey Greene # default name to search on Google Scholar
7+
github: greenelab # default GitHub user/org, without the @
8+
twitter: GreeneScientist # default Twitter handle, without the @
9+
instagram: greenelab # default Instagram handle, without the @
10+
youtube: "" # default YouTube channel handle
11+
12+
# base directory where site is hosted
13+
# set to "" if hosting at a custom domain, eg yoursite.com
1214
baseurl: ""
13-
url: ""
1415

15-
include:
16-
- .htaccess
17-
- _pages
16+
# default front matter parameters for markdown files
17+
# defaults can be overridden on a particular page, eg:
18+
# ---
19+
# description: Description unique to this page
20+
# background: images/different-bg-for-this-page.jpg
21+
# ---
22+
defaults:
23+
# all markdown files
24+
- scope:
25+
path: ""
26+
values:
27+
description: Where data and biology # description that will show under search engine results
28+
background: images/backgrounds/laptop-paper.jpg # background image in header and footer
29+
layout: default
30+
# markdown files in /_members
31+
- scope:
32+
type: "members"
33+
values:
34+
layout: member
35+
# markdown files in /_posts
36+
- scope:
37+
type: "posts"
38+
values:
39+
layout: post
40+
41+
collections:
42+
members:
43+
output: true
1844

45+
# sass settings
1946
sass:
20-
sass_dir: _sass
47+
sass_dir: css
2148

22-
# Conversion
23-
markdown: kramdown
49+
# syntax highlighting
2450
highlighter: rouge
25-
lsi: false
26-
excerpt_separator: "\n\n"
27-
incremental: false
28-
29-
# Markdown Processing
30-
kramdown:
31-
input: GFM
32-
hard_wrap: false
33-
auto_ids: true
34-
footnote_nr: 1
35-
entity_output: as_char
36-
toc_levels: 1..6
37-
smart_quotes: lsquo,rsquo,ldquo,rdquo
38-
enable_coderay: false
39-
parse_block_html: true # default for kramdown is false. This will enable using Markdown links
4051

52+
# build settings
53+
plugins:
54+
- jekyll-feed
55+
- jekyll-redirect-from

_data/.DS_Store

-6 KB
Binary file not shown.

_data/build-research.py

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# a script to automatically generate citations for papers the research list component
2+
3+
# before running:
4+
# install python https://www.python.org/downloads/
5+
# install pip https://pip.pypa.io/en/stable/installing/
6+
# install manubot https://github.com/manubot/manubot#installation
7+
8+
import sys
9+
import os
10+
import json
11+
import yaml
12+
import subprocess
13+
from datetime import datetime
14+
15+
# input and output files
16+
current_dir = os.path.dirname(os.path.realpath(__file__))
17+
input_file = os.path.join(current_dir, "research-input.yml")
18+
output_file = os.path.join(current_dir, "research-output.yml")
19+
20+
# load input papers as yaml
21+
try:
22+
with open(input_file, encoding="utf8") as file:
23+
input_papers = yaml.load(file, Loader=yaml.FullLoader)
24+
except Exception:
25+
print("Problem with input file.")
26+
sys.exit(1)
27+
28+
# load existing output papers as yaml
29+
try:
30+
with open(output_file, encoding="utf8") as file:
31+
output_papers = yaml.load(file, Loader=yaml.FullLoader)
32+
except Exception:
33+
output_papers = []
34+
35+
# get citation metadata for each paper
36+
new_papers = []
37+
for index, input_paper in enumerate(input_papers, start=1):
38+
# show progress
39+
print("\n------------------------------")
40+
print(f"Paper {index} of {len(input_papers)}")
41+
print("------------------------------\n")
42+
43+
# if input paper already exists in output, use that citation info to save time
44+
matches = [p for p in output_papers if p.get("id", "") == input_paper.get("id", "")]
45+
if len(matches) > 0:
46+
print("Paper already in output. Using existing citation.")
47+
new_papers.append(matches[0])
48+
49+
# otherwise, run manubot to get new citation metadata
50+
else:
51+
print("Paper not in output. Running Manubot to generate citation.\n")
52+
commands = ["manubot", "cite", input_paper["id"], "--log-level", "DEBUG"]
53+
output = subprocess.Popen(commands, stdout=subprocess.PIPE)
54+
citation = json.loads(output.communicate()[0])[0]
55+
56+
# take only the needed info from the citation
57+
new_paper = {}
58+
# output_ title
59+
new_paper["title"] = citation.get("title", "")
60+
# output_ authors
61+
new_paper["authors"] = []
62+
for author in citation.get("author", []):
63+
new_author = author.get("given", "") + " " + author.get("family", "")
64+
new_paper["authors"].append(new_author)
65+
# output_ publisher
66+
new_paper["publisher"] = citation.get("container-title", citation.get("publisher", citation.get("collection-title", "")))
67+
# output_ date
68+
date_parts = citation.get("issued").get("date-parts")[0]
69+
date_parts += (3 - len(date_parts)) * [1] # default month and day to 1
70+
new_paper["date"] = "-".join([str(part) for part in date_parts])
71+
# output_ link
72+
new_paper["link"] = citation.get("URL", "")
73+
# add to list
74+
new_papers.append(new_paper)
75+
76+
# merge any extra properties specified in the input papers into the final output
77+
print("\nCopying additional metadata from input to output.")
78+
for index, new_paper in enumerate(new_papers):
79+
new_paper.update(input_papers[index])
80+
# ensure date in proper format (w/ leading 0's) for correct date sorting
81+
new_paper["date"] = datetime.strptime(new_paper["date"], "%Y-%m-%d").strftime("%Y-%m-%d")
82+
83+
# write new list of papers to output file
84+
with open(output_file, mode="w") as file:
85+
yaml.dump(new_papers, file, default_flow_style=False, sort_keys=False)

_data/news.yml

-26
This file was deleted.

0 commit comments

Comments
 (0)