Comments (3)
@orwonthe I pushed this issue into v1, since it would be nice to use it in the docs. Please write out how you plan on implementing it in this issue first, before implementing it, so we can discuss.
from rdm.
It will be implemented as a AutoDefinition object that is created if auto_definition
is in the list of filters in post_filters
attribute of system.yml
The AutoDefinition object will have two sequential processes.
The first process starts with a dictionary of pre-defined terms.
It then scans the document to see which pre-defined terms are used in the document.
A dictionary is produced which contains only the terms actually used.
The second process locates a specially marked definition section.
It scans that section for other already existing definitions (Call them in-line definitions).
Pre-defined definitions are merged alphabetically with the in-line definitions.
Initially, two different formats will be available.
A plain text format simply inserts text with the defined word or phrase marked in bold:
A foobot is an automated process that implements foo.
A tabular format uses the defined word as a prefix to a shortened definition.
foobot: Automated process that implements foo.
The begin marker for the start of definitions should specify a format.
The dictionary of predefined terms should provide both formats.
In-line definitions should separate individual definitions with blank lines and mark the defined word,
and only the defined word, as bold text.
The word or phrase can appear more than once in the definition but no other words should be bold.
In-line definitions that are not in alphabetical order will raise an exception.
Missing or unmatched definition section end markers will raise an exception.
In-line definitions with no bold keyword or multiple conflicting keywords will raise exceptions.
If the begin marker provides a list of formats, the process will search the pre-defined dictionary will with each format until a definition is found.
Predefined definitions are not used if the same term exists in-line.
from rdm.
Input dictionary.yml
:
definitions:
- keyword: 'apple'
plain: An apple is a type of quasi-spherical red or green fruit.
formatted: apple: Type of fruit. - keyword: 'apple computer'
plain: An apple compputer is a popular brand of computer.
formatted: apple computer: Brand of computer. - keyword: 'banana'
plain: A banana is a type of yellow fruit.
formatted: banana: Type of fruit. - keyword: 'pit'
plain: A pit is a hole in the ground.
formatted: pit: Hole in ground. - keyword: 'technician'
plain: A technician is any trained person participating in a procedure.
formatted: technician: Trained person participating in a procedure.
Input spec.md
:
Eyelashectomy Patient Preparation
Prior to the procedure the patient should be offered an apple or a cherry.
Patient should NOT be offered a banana as the peel may be slippery.
To avoid choking hazards technician should ensure cherry has no pit.
Definitions
RDM_DEFINITIONS_BEGIN format=plain exclude=technician
A cherry is a small red fruit.
A pit is the stone or seed inside of a cherry.
RDM_DEFINITIONS_END
Output release/spec.md
Eyelashectomy Patient Preparation
Prior to the procedure the patient should be offered an apple or a cherry.
Patient should NOT be offered a banana as the peel may be slippery.
To avoid choking hazards technician should ensure cherry has no pit.
Definitions
An apple is a type of quasi-spherical red or green fruit.
A banana is a type of yellow fruit.
A cherry is a small red fruit.
A pit is the stone or seed inside of a cherry.
from rdm.
Related Issues (20)
- Getting issue while running the make command in windows
- Alter and/or document hook logic HOT 5
- Update definition of a change (merged PR) HOT 1
- Update RDM hooks to handle rebasing HOT 2
- Windows-Friendly Makefile
- Incorrect handling of user+password authentication
- Encountering error using Quick Start instructions HOT 2
- Broken link in GH_API_TOKEN error message
- Error during history.yml file generation HOT 4
- How is the RDM tool integrated with the source code repo ? HOT 1
- How do I insert name of own project in documents? HOT 2
- Generated files are in ANSI format, not UTF-8 HOT 5
- Get our test running to work on windows
- Add option to print matching checklist items during gap analysis
- Top down meeting changes into existing init projects. HOT 1
- Makefile not moving images into tmp for pdf rendering HOT 3
- Add support for including other markdown files within a file
- Release record only records the name of the last person to verify a change request
- Move several useful utility scripts into a top-level "contrib" folder
- Migrate some new templates over
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rdm.