Tool to generate a Dash-compatible PeopleTools docset from Oracle's PeopleTools Online Help.
After following the instructions below, clean up the URLs to make them relative and do not include query strings.
Get the id
of the element with "PeopleCode Built-in Functions and Language
Constructs" in its text from Products > Development Tools > PeopleCode Language
Reference, then use the browser console to run JavaScript similar to the
following:
copy(
Array.prototype.filter
.call(
document.querySelectorAll('#ul_d65e26_tpcl a[role="treeitem"]'),
el => el.textContent !== 'Functions by Category'
)
.map(el => el.href.replace(/.*\/(cd\/.*)\?.*$/, '$1'))
);
Next, get the URLs for the following:
- Meta-SQL Elements > Meta-SQL Reference
- Meta-SQL Elements > Meta-SQL Shortcuts
- System Variables > System Variables Reference
- Meta-HTML > Meta-HTML Reference
Get the id
of the element with "PeopleCode API Reference" in its text from
Products > Development Tools, then use the browser console to run JavaScript
similar to the following:
copy(
Array.prototype.filter
.call(
document.querySelectorAll('#ul_lisbj_d3e48 a[role="treeitem"]'),
el =>
/(Methods|Properties)$/.test(el.textContent) &&
el.href.includes('langref_')
)
.reduce(
(acc, el) => {
const href = el.href.replace(/.*\/(cd\/.*)\?.*$/, '$1');
if (el.textContent.includes('Methods')) acc.Method.push(href);
if (el.textContent.includes('Properties')) acc.Property.push(href);
return acc;
},
{ Method: [], Property: [] }
)
);
Update the index page & copyright page URLs.
Create a SQLite database in the file PeopleTools.docset/Contents/Resources/docSet.dsidx
:
sqlite3 PeopleTools.docset/Contents/Resources/docSet.dsidx
CREATE TABLE SearchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);
CREATE UNIQUE INDEX anchor ON SearchIndex (name, type, path);
(Use ctrl+d to exit sqlite.)
NOTE: If running on Windows, use Windows Subsystem for Linux (WSL). If you
do not, the tgz
file will have permission issues when opening on a *nix
system.
To use:
- Run
yarn install
- Ensure
src/docs.json
is up-to-date - Ensure
dashIndexFilePath
inInfo.plist
is up-to-date - Run
yarn run generate
The script will produce PeopleTools.tgz
.
Next, follow Dash's instructions for contributing the docset.