Branch creator: Difference between revisions
(→Answer) |
|||
Line 100: | Line 100: | ||
== Answer == | == Answer == | ||
¤rcode embed=1 variables=' | |||
name:PAGEID|type:hidden|default: | name:PAGEID|type:hidden|default:{{PAGEID}} | ||
'> | '> | ||
# This is code Op_enXXXX/ on page [[", | # This is code Op_enXXXX/ on page [[", | ||
Line 122: | Line 122: | ||
")) | ")) | ||
¤/rcode> | |||
== Rationale == | == Rationale == | ||
Line 139: | Line 139: | ||
", | ", | ||
t2bdata, | t2bdata, | ||
" | "¤rcode name='", | ||
data.ovariable, | data.ovariable, | ||
"' embed=1 label='Initiate ", | "' embed=1 label='Initiate ", | ||
data.ovariable, | data.ovariable, | ||
" (for developers only)' variables=' | " (for developers only)' variables=' | ||
name:PAGEID|type:hidden|default: | name:PAGEID|type:hidden|default:{{PAGEID}} | ||
'> | '> | ||
# This is code Op_enXXXX/ | # This is code Op_enXXXX/", | ||
data.ovariable, | data.ovariable, | ||
" on page [[", | " on page [[", | ||
Line 166: | Line 166: | ||
data.ovariable, | data.ovariable, | ||
") | ") | ||
cat('", | cat('Object',", | ||
data.ovariable, | data.ovariable, | ||
"stored.@@') | "@name, 'stored.@@') | ||
", | ", | ||
" | "¤/rcode> | ||
", | ", | ||
Line 187: | Line 187: | ||
" === | " === | ||
¤rcode name='", | |||
formula.ovariable, | formula.ovariable, | ||
"' embed=1 label='Initiate ", | "' embed=1 label='Initiate ", | ||
formula.ovariable, | formula.ovariable, | ||
" (for developers only)'> | " (for developers only)'> | ||
# This is code Op_enXXXX/ | # This is code Op_enXXXX/", | ||
formula.ovariable, | formula.ovariable, | ||
" on page [[", | " on page [[", | ||
Line 218: | Line 218: | ||
formula.ovariable, | formula.ovariable, | ||
") | ") | ||
cat(' | cat('Object ',", | ||
formula.ovariable, | formula.ovariable, | ||
", ' stored.@@') | "@name, ' stored.@@') | ||
¤/rcode> | |||
", | ", | ||
Line 250: | Line 250: | ||
text2 <- strsplit(text1, split = "\n")[[1]] | text2 <- strsplit(text1, split = "\n")[[1]] | ||
text2 <- gsub("@@", "\n", text2) | text2 <- gsub("@@", "\\n", text2) | ||
text2 <- gsub(" | text2 <- gsub("¤", "<", text2) | ||
text2 <- data.frame(Pagetemplate = text2) | text2 <- data.frame(Pagetemplate = text2) | ||
Revision as of 20:47, 10 March 2016
Moderator:Jouni (see all) |
|
Upload data
|
Question
How to create a branch for handprinter?
Answer
Step 1: Create a page for branch
If the branch that you are working with already has a page, open the page for editing and go to step 2.
Open two copies of this page to your browser.
Give a name to your branch and click to create a new page for it.
On the other page, continue from step 2.
<createbox> break=yes width=50 buttonlabel=Create branch align=left </createbox>
Step 2: Fill in data about your branch
In step 2, you can create a new branch page or add more ovariables to an existing page. Fill in the form below, click to create content for the page, and copy-paste that onto the page you created in step 1.
Each branch is a model that consists of sub-models called ovariables. If you don´t know what they are, you should first read pages Ovariable and Modelling in Opasnet.
If you need more ovariables for your branch model, you can simply rerun this code. Just remember to copy-paste the previous content first, as it will be replaced by the new ovariables. Each ovariable has its own sub-heading under the heading "Rationale".
Step 3. Finalize the page
In step 2, page content is created. You can rerun the step 2 code as many times as you need to define all the ovariables. Remember to copy-paste the outputs each time to the branch page.
In the end, you have to adjust the page content, because there is a tiny error that has not yet been fixed. In the text produced, there is an extra space in tags "< rcode" and "< /rcode". You should find and replace them with "<rcode" and "</rcode", respectively. Then you can save your page.