-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmake_learn.R
67 lines (53 loc) · 1.91 KB
/
make_learn.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
## make_learn.r
## this script will stitch or 'knit' together all the individual .md files and push online to ohi-science.org.
# also required if you get the pdflatex error: www.tug.org/mactex
## setup ----
source('~/github/ohimanual/make_functions.r') # rendering functions for OHI
title_header = 'The Ocean Health Index - Learn Phase'
subtitle_header = 'Conceptual Guide'
title_short = 'Learn'
wd = '~/github/ohimanual/1_learn_concguide'
setwd(wd)
## .md files to be included in this order: ----
in_md = c(
# 'Phase_1.md', # currently this file is in 0_orientation; JSL not sure it fits here?
# Note to Erich: These are a few files that were removed from the Manual (Phase 3)--we'll need to
# make sure they are covered Guide (Phase 1):
# '~/github/ohimanual/README.md',
# '~/github/ohimanual/3_conduct_manual/what_is_OHI+.md',
# '~/github/ohimanual/3_conduct_manual/conduct_assessment.md',
# '~/github/ohimanual/3_conduct_manual/before_conduct_assessment.md',
'Intro_framework.md',
'Understand_Scales_of_Assessement.md',
'Determine_the_Need_and_Purpose.md',
#'Why_ten_goals.md',
'How_Is_The_Index_Calculated.md',
'How_Are_Goals_Weighted.md',
'Reference_Points.md',
'Understanding_Pressures.md',
'Understanding_Resilience.md',
'Pres_Resi_interactions.md',
'Understanding_Trend.md',
'Understanding_Status.md',
# 'WebApp_intro.md',
'FP_Philosophy.md',
'AO_Philosophy.md',
'NP_Philosophy.md',
'CS_Philosophy.md',
'CP_Philosophy.md',
'LE_Philosophy.md',
'TR_Philosophy.md',
'SP_Philosophy.md',
'CW_Philosophy.md',
'BD_Philosophy.md')
# summarzing ending # add some kind of summary
## final .md filename
out_md = 'ohi-concguide.md'
## concatenate md ----
cat_md(in_md, out_md)
pfx = tools::file_path_sans_ext(out_md)
## render and save html, pdf ----
ohi_html(out_md)
ohi_pdf(out_md)
## push to ohi-science.org website ----
push_to_web(out_md)