Added a section creation tool and some minor fixes

The section creation tool is a semi-automated tool for adding new resume sections.
It still requires knowledge of wikitext but it requires far less knowledge of the inner workings of the resume builder
than just creating a section on your own would.
This commit is contained in:
inmysocks 2015-07-19 17:54:46 -06:00
parent 45bf43d8d0
commit 756ebae1f6
5 changed files with 250 additions and 24 deletions

View File

@ -1,5 +1,9 @@
created: 20150719191225198
modified: 20150719234223143
title: Making a new section
There is a [[New Section Creation Tool]] to help with creating new resume sections.
Each section needs the following tiddlers:
#A display tiddler
@ -10,7 +14,17 @@ Each section needs the following tiddlers:
You can have multiple template tiddlers that use the same input and options tiddlers.
!!Display tiddler
Create a tiddler tagged with `Section Display`, I have been naming the tiddlers in the form `$:/display/(section name) Display`, like [[$:/display/Resume Title Display]] and [[$:/display/Objective Display]]. Following this convention isn't strictly necessary, but you should use it to remain consistent with other sections.
This is the container used to display the section in the resume itself, there isn't any customization here.
''Required tags'': `Section Display`<br>
''Required name format'': `$:/display/(section name) Display`<br>
''Additional fields'':
*'section' - the section name, something like 'Resume Title' or 'Objective'.
''Examples'': [[$:/display/Resume Title Display]] and [[$:/display/Objective Display]].<br>
''Other things'':
In the text field put
@ -18,35 +32,57 @@ In the text field put
<$transclude tiddler=GenericSectionDisplayTemplate mode=block/>
```
and nothing else. Additionally, these tiddlers need to have 1 additional field:
and nothing else.
*`section` - the section name (in the ones I have created it is the title of the tiddler you are creating without the Display part at the end, so `Resume Title` and `Objective`)
This tiddler should have only what is listed above.
!!Template tiddler(s)
Create a template tiddler (or multiple templates if you want) for that section. See [[$:/template/ResumeTitleTemplate]] or [[$:/template/EducationTemplate]], or any of the other tiddlers that start with `$:/template/` for examples.
These tiddlers need to have two fields:
These tiddlers determine how the section is displayed on the resume. This sets the look of the final result.
''Required tags'': `DisplayTemplate`<br>
''Required name format'': `$:/template/(template name)`<br>
''Additional fields'':
*`section_name` - the name of the section that the template is for, this must be the same as the value in the `section` field of the section display template you made.
*`input_tiddler` - the name of the tiddler that has the form to take input for this section.
*`template_name` - an optional field containing a more convenient name for the template than the tiddler title. If it exists this will be displayed for the template selection.
*`options_tiddler` - The name of the options tiddler for this template, if any.
''Examples'': [[$:/template/ResumeTitleTemplate]] or [[$:/template/EducationTemplate]], or any of the other tiddlers that start with `$:/template/` for examples.
The data displayed by the templates will be from tiddlers named in the form `$:/data/(section name)/(section item)`.
!!Input Tiddler
A tiddler that contains the input from for adding entries to the section, and if desired options for the section. The title of this tiddler should start with `$:/input/`, this is not strictly required, but it keeps everything consistent.
A tiddler that contains the input from for adding entries to the section, and if desired options for the section.
I don't have any real help for this one, what you do will be dependent on what you want in the section. Look at the examples here, the tiddlers [[$:/input/Resume Title]], [[$:/input/ObjectiveInput1]], [[$:/input/ObjectiveInput2]], [[$:/input/Education]] and [[$:/input/Skills and Expertise]] are examples of what you would make for this.
''Required tags'': none<br>
''Required name format'': `$:/input/(template name)`<br>
''Additional fields'':
*`caption` - The contents of this field will be displayed as the section name in the [[Resume Wizard]].
''Examples'': [[$:/input/Resume Title]], [[$:/input/Education]]
The data taken from the input tiddler should be stored in the fields of a tiddler named in the form `$:/data/(SectionName)/(ItemName)`.
I don't have any real help for this one, what you do will be dependent on what you want in the section. Look at the examples. If you have any questions please feel free to ask on the group (https://groups.google.com/forum/#!forum/tiddlywiki).
!!Options tiddler
And finally, if you wish, you can make an options tiddler for the section you are adding. You would change the fonts used and list types and similar things here. This tiddler should be tagged with `Options` and all of the settings should be stored following the rules below. Other than that there aren't any restrictions on how to make one. Some examples are [[Education Options]] and [[Previous Employment Options]].
A tiddler used to set options for a section.
All settings and state information about each section should be stored in a tiddler named in the form `$:/settings/(ResumeName)/(SectionName)`
''Required tags'': `Options`<br>
''Required name format'': `$:/options/(template name)`<br>
''Additional fields'':
For each item within a section all state and configuration information should be kept in a tiddler with a name in the form `$:/settings/(ResumeName)/(SectionName)/(ItemName)`
*`caption` - a caption field, it should have something like `(section name) Options`. This is what appears on the tabs in the [[Resume Options]] tiddler.
''Examples'': [[$:/options/Education Options]], [[$:/options/Previous Employment Options]].
These need to be different than the tiddlers holding the data that have names in the form `$:/data/(SectionName)` or `$:/data/(SectionName)/(ItemName)`
You would use this tiddler to change the fonts used and list types and similar things here.
All settings and state information about each section should be stored in a tiddler named in the form `$:/settings/(ResumeName)/(SectionName)`.
For each item within a section all state and configuration information should be kept in a tiddler with a name in the form `$:/settings/(ResumeName)/(SectionName)/(ItemName)`.
The options tiddler must only change fields in these tiddlers.
These tiddlers hold the information about which items/sections are visible in each resume. See the list of system tiddlers for many examples. You don't need to make those tiddlers, you just need to make your input and settings tiddlers create or modify the correct tiddler name and they will be created. See the examples.
@ -57,8 +93,4 @@ If you are going to make your own section, in order to allow the items to be in
`[prefix[$:/data/(SectionName)/]removeprefix[$:/data/]addprefix[$:/settings/$(ThisResumeName)$/]!show[false]sort[order]removeprefix[$:/settings/$(ThisResumeName)$/]addprefix[$:/data/]]`
<!--
`[prefix[$:/data/(SectionName)/]removeprefix[$:/data/(SectionName)/]addprefix[$:/settings/$(ThisResumeName)$/(SectionName)/]!show[false]sort[order]removeprefix[$:/settings/$(ThisResumeName)$/(SectionName)/]addprefix[$:/data/(SectionName)/]]`
-->
you need to manually replace `(SectionName)` with the name of the section you are adding, and you need to put `<$vars ThisResumeName={{$:/settings/Global!!selected_resume}}>` and `</$vars>` around the macro that contains the list widget with the above filter. Look at the examples and it will hopefully make more sense. PreviousEmploymentTemplate is one example.
you need to manually replace `(SectionName)` with the name of the section you are adding, and you need to put `<$vars ThisResumeName={{$:/settings/Global!!selected_resume}}>` and `</$vars>` around the macro that contains the list widget with the above filter. Look at the examples and it will hopefully make more sense.

View File

@ -1,6 +1,4 @@
caption: Education
created: 20150719182635535
modified: 20150719182642114
tags: Section
title: $:/input/Education

View File

@ -1,3 +1,5 @@
created: 20150719190741300
modified: 20150719191131503
tags: Options
title: Layout Options
@ -26,7 +28,7 @@ title: Layout Options
\end
\define thisSetOrder()
<$edit-text tiddler='$:/settings/$(ThisResumeName)$/$(currentTiddler)$' field='order'/>
<$edit-text tiddler='$:/settings/$(ThisResumeName)$/$(currentTiddler)$' field='order' size=2/>
\end
<$set name=ThisResumeName value={{$:/settings/Global!!selected_resume}}>
@ -43,7 +45,9 @@ title: Layout Options
<<thisMakeCheckbox>>
</td>
<td>
<$list filter='[<currentTiddler>addprefix[$:/display/]]'>
<$view field='section'/>
</$list>
</td>
<td>
<<thisSelectTemplate>>

View File

@ -15,9 +15,4 @@ title: $:/template/SkillsAndExpertiseTemplate
<ul>
<<thisSkillsAndExpertiseList>>
<!--
<$list filter='[prefix[$:/data/Skills and Expertise/]!show[false]sort[order]]'>
<li><$view field='skill'/></li>
</$list>
-->
</ul>

View File

@ -0,0 +1,197 @@
created: 20150719200725211
modified: 20150719235401264
tags: Tools
title: New Section Creation Tool
\define thisMakeDisplayTiddler()
<$action-setfield $tiddler="""$:/display/$(ThisSection)$""" text="""<$transclude tiddler=GenericSectionDisplayTemplate mode=block/>""" tags="""[[Section Display]]""" section="""$(ThisSection)$"""/>
\end
\define thisInputTiddlerText()
$(TiddlerPreamble)$$(TiddlerPreamble2)$$(TiddlerPreamble3)$
$(ThisAddItemButtonMacro)$
$(UserInputTiddlerText)$
\end
\define thisMakeInputTiddler()
<$action-setfield $tiddler="""$:/input/$(ThisSection)$/$(TemplateName)$""" text=<<thisInputTiddlerText>> tags=Section caption="""$(ThisSection)$"""/>
\end
\define thisOptionsTiddlerText()
$(TiddlerPreamble)$$(TiddlerPreamble2)$$(TiddlerPreamble3)$
$(UserOptionsTiddlerText)$
\end
\define thisMakeOptionsTiddler()
<$action-setfield $tiddler="""$:/options/$(ThisSection)$/$(TemplateName)$""" text=<<thisOptionsTiddlerText>> caption="""$(ThisSection)$ Options"""/>
\end
\define thisTemplateTiddlerText()
$(TiddlerPreamble)$$(TiddlerPreamble2)$$(TiddlerPreamble3)$
$(UserTemplateTiddlerText)$
\end
\define thisMakeTemplateTiddler()
<$action-setfield $tiddler="""$:/template/$(ThisSection)$/$(TemplateName)$""" text=<<thisTemplateTiddlerText>> input_tiddler="""$:/input/$(ThisSection)$/$(TemplateName)$""" options_tiddler="""$:/options/$(ThisSection)$/$(TemplateName)$""" section_name="""$(ThisSection)$""" template_name="""$(TemplateName)$""" tags=DisplayTemplate/>
\end
''Once you have created your new section you have to go to [[Resume Options]] and select a template and set the section as visible before it will appear in the resume.''
This is a tool to aid in the creation of custom resume sections. Fill out each section and then click on the 'Create Section' button below. Click on the ^^(?)^^ next to each tiddler name to get more information and a basic example. If you copy all of the examples given they will work together.
Automatically defined helper macros and values (with the exception of `<<thisAddResumeSectionItem>>` these macros are defined for all of the tiddlers created using this tool.):
*`<<thisAddResumeSectionItem>>` - This macro places a button that will automatically create the data tiddler using the supplied inputs. It is only available in the input tiddler.
*`<<ItemListFilter>>` - This is the list of the names for all items in the current section.
*`<<SortedItemFilterList>>` - This is the sorted list data tiddlers for the visible items in the current section.
*`<<DataTiddler>>` - The data tiddler for the current item, use this for storing data in the input tiddler and for getting data to display for the template tiddler. This macro only works inside a list using the `<<ItemListFilter>>`
*`<<ItemSettingsTiddler>>` - This is where settings should be stored in the options tiddler. This should hold the visibility and order sections for each item. This macro only works inside a list using the `<<ItemListFilter>>`
*`<<SectionName>>` - This is the name of the current section.
*`<<SectionSettingsTiddler>>` - This is the name of the tiddler containing the settings for the current section. It holds the visibility and order settings, but they are automatically created by the [[Layout Options]] tiddler. You shouldn't need to use this unless you are doing something special.
Section Name^^(<$button class='tc-btn-invisible' popup='$:/state/popup/SectionNameHelp'>?</$button><$reveal type='popup' state='$:/state/popup/SectionNameHelp'><div class='tc-drop-down'>This should be a short descriptive section name, like 'Resume Title' or 'Lands Conquered'</div></$reveal>)^^:
<$edit-text tiddler='$:/temp/NewSection' field='section_name' class='tc-edit-texteditor' placeholder='Section Name'/>
Input Tiddler^^(<$reveal type='nomatch' state='$:/state/popup/InputTiddlerHelp' text=show><$button class='tc-btn-invisible' set='$:/state/popup/InputTiddlerHelp' setTo='show'>?</$button></$reveal><$reveal type='match' state='$:/state/popup/InputTiddlerHelp' text=show><$button class='tc-btn-invisible' set='$:/state/popup/InputTiddlerHelp' setTo='hide'>?</$button></$reveal>)^^:
<$reveal type='match' state='$:/state/popup/InputTiddlerHelp' text=show>
<div style="word-wrap: true;">
<hr>
This is the tiddler used to take input. This should have a way to input data for each field you want for your section items (like start date, end date, employer, ...) This must have a field called 'name' to work with the creation tool.
A very simple example is:<br>
<pre>
```
Item Name: <$edit-text tiddler='$:/temp/$(ThisSection)$/NewItem' field=name class='tc-edit-texteditor' placeholder='Item Name'/>
<<thisAddResumeSectionItem>>
<$list filter=<<ItemListFilter>>/>
```
</pre>
</div>
</$reveal>
<$edit-text tiddler='$:/temp/NewSection/InputTiddler' class='tc-edit-texteditor' placeholder='Input Tiddler Text'/>
Options Tiddler^^(<$reveal type='nomatch' state='$:/state/popup/OptionsTiddlerHelp' text=show><$button class='tc-btn-invisible' set='$:/state/popup/OptionsTiddlerHelp' setTo='show'>?</$button></$reveal><$reveal type='match' state='$:/state/popup/OptionsTiddlerHelp' text=show><$button class='tc-btn-invisible' set='$:/state/popup/OptionsTiddlerHelp' setTo='hide'>?</$button></$reveal>)^^:
<$reveal type='match' state='$:/state/popup/OptionsTiddlerHelp' text=show>
<div style="word-wrap: true;">
<hr>
This is the tiddler listing the options, it should have at least two options:
<br>
''Visibility'' - a field called `show` given a value of true or false. Checkboxes work well for this. Example: `<$checkbox tiddler=<<ItemSettingsTiddler>> field=show checked=true unchecked=false/>`.<br>
''Order'' - a field called `order` that contains a numeric value used to sort the items in the section. Example: `<$edit-text tiddler=<<ItemSettingsTiddler>> field=order size=2/>`.<br>
A very simple example is:<br>
<pre>
```
<table>
<tr>
<th>
Visible?
</th>
<th>
Item Name
</th>
<th>
Order
</th>
</tr>
<$list filter=<<ItemListFilter>>>
<tr>
<td>
<$checkbox tiddler=<<ItemSettingsTiddler>> field=show checked=true unchecked=false/>
</td>
<td>
<$view tiddler=<<DataTiddler>> field='name'/>
</td>
<td>
<$edit-text tiddler=<<ItemSettingsTiddler>> field=order size=2/>
</td>
</tr>
</$list>
</table>
```
</pre>
<hr>
</div>
</$reveal>
<$edit-text tiddler='$:/temp/NewSection/OptionsTiddler' class='tc-edit-texteditor' placeholder='Options Tiddler Text'/>
Template Tiddler^^(<$reveal type='nomatch' state='$:/state/popup/TemplateTiddlerHelp' text=show><$button class='tc-btn-invisible' set='$:/state/popup/TemplateTiddlerHelp' setTo='show'>?</$button></$reveal><$reveal type='match' state='$:/state/popup/TemplateTiddlerHelp' text=show><$button class='tc-btn-invisible' set='$:/state/popup/TemplateTiddlerHelp' setTo='hide'>?</$button></$reveal>)^^:
<$reveal type='match' state='$:/state/popup/TemplateTiddlerHelp' text=show>
<div style="word-wrap: true;">
<hr>
A template tiddler is used to display the section in the final resume. Each template must have a unique name. It should be descriptive (like Basic Objective Template).
A very example template tiddler is:
<pre>
```
<h2><$view field='section_name'/></h2>
<$list filter=<<SortedItemListFilter>>>
*<$view field='name'/><br>
</$list>
```
</pre>
<hr>
</div>
</$reveal>
Template Name:
<$edit-text tiddler='$:/temp/NewSection/TemplateTiddler' field=template_name class='tc-edit-texteditor' placeholder='Template Name'/>
Template:
<$edit-text tiddler='$:/temp/NewSection/TemplateTiddler' class='tc-edit-texteditor' placeholder='Template Tiddler Text'/>
<$vars TiddlerPreamble="""\define SectionsSettingsTiddler() $:/settings/$(ThisResume)$/$(ThisSection)$
\define ItemListFilter() [prefix[$:/data/$(ThisSection)$/]removeprefix[$:/data/$(ThisSection)$/]]
\define SortedItemListFilter() [prefix[$:/data/$(ThisSection)$/]removeprefix[$:/data]addprefix[$:/settings/$(ThisResume)$]sort[order]!show[false]removeprefix[$:/settings/$(ThisResume)$]addprefix[$:/data]]
\define SectionName() $(ThisSection)$
\define ItemSettingsTiddler() $:/settings/$(ThisResume)$/$(ThisSection)$/$(current"""
TiddlerPreamble2="""Tiddler)$
\define DataTiddler() $:/data/$(ThisSection)$/$(current"""
TiddlerPreamble3="""Tiddler)$
""" ThisAddItemButtonMacro='\define thisAddResumeSectionItemInside(ItemName)
<$action-setfield $tiddler="""$:/temp/$(ThisSection)$/NewItem""" title="""$:/data/$(ThisSection)$/$ItemName$"""/>
\end
\define thisAddResumeSectionItem()
<$button>Add Item
<$macrocall $name=thisAddResumeSectionItemInside ItemName={{$:/temp/$(ThisSection)$/NewItem!!name}}>
</$button>
\end
' ThisSection={{$:/temp/NewSection!!section_name}} ThisResume={{$:/settings/Global!!selected_resume}} UserInputTiddlerText={{$:/temp/NewSection/InputTiddler}} UserOptionsTiddlerText={{$:/temp/NewSection/OptionsTiddler}} UserTemplateTiddlerText={{$:/temp/NewSection/TemplateTiddler}} TemplateName={{$:/temp/NewSection/TemplateTiddler!!template_name}}>
<$button>Create Section
<$macrocall $name=thisMakeDisplayTiddler/>
<$macrocall $name=thisMakeInputTiddler/>
<$macrocall $name=thisMakeOptionsTiddler/>
<$macrocall $name=thisMakeTemplateTiddler/>
</$button>
</$vars>