Commit 61ef9d42 authored by Matheus Horstmann's avatar Matheus Horstmann 🐴
Browse files

Add doc


Signed-off-by: Matheus Horstmann's avatarMatheus Horstmann <mch15@inf.ufpr.br>
parent 55ac625c
This diff is collapsed.
......@@ -7,61 +7,11 @@
### bin/automigrate.js
#### criaBloco(cb)
Parse old database file to a new instace of blocos.
criaBloco(cb);
##### Parameters
| Name | Type | Description | |
| ---- | ---- | ----------- | -------- |
| cb | `Callback` | | &nbsp; |
##### Returns
- `Void`
#### criaSala(cb)
Parse old database file to a new instace of salas.
criaSala(cb);
##### Parameters
| Name | Type | Description | |
| ---- | ---- | ----------- | -------- |
| cb | `Callback` | | &nbsp; |
##### Returns
- `Void`
#### criaRecursodesala(cb)
#### criaTipodesala(cb)
Parse old database file to a new instace of Recursodesala.
Parse old database file to a new instace of Tipoodesala.
criaRecursodesala(cb);
criaTipodesala(cb);
......@@ -82,11 +32,11 @@ Parse old database file to a new instace of Recursodesala.
#### criaTipodesala(cb)
#### criaUser(cb)
Parse old database file to a new instace of Tipoodesala.
Populate initials user to system.
criaTipodesala(cb);
criaUser(cb);
......@@ -107,9 +57,9 @@ Parse old database file to a new instace of Tipoodesala.
#### criaUser(cb)
#### criaEquivalencia(cb)
Populate initials user to system.
Defines which Disciplina is equivalent
criaUser(cb);
......@@ -132,11 +82,11 @@ Populate initials user to system.
#### criaEquivalencia(cb)
#### criaDisciplina(cb)
Defines which Disciplina is equivalent
Parse old database file to a new instace of Disciplina.
criaUser(cb);
criaDisciplina(cb);
......@@ -157,20 +107,19 @@ Defines which Disciplina is equivalent
#### criaDisciplina(cb)
Parse old database file to a new instace of Disciplina.
### bin/discover-and-build-models.js
criaDisciplina(cb);
#### discoverAndBuildModels()
Discover And Build Models
discoverAndBuildModels();
For each Models: Ask to database the schema and show all data on it
##### Parameters
| Name | Type | Description | |
| ---- | ---- | ----------- | -------- |
| cb | `Callback` | | &nbsp; |
......@@ -183,17 +132,16 @@ Parse old database file to a new instace of Disciplina.
### bin/discover-and-build-models.js
### bin/discover-schema.js
#### test()
Discover table on database
#### discoverSchema()
Discover();
Discover Schema
discoverSchema();
For each
For each Models: Ask to database the schema and print it
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1">
<title> &#8212; Source code of webservice. Each directory contains a documentation.
de seus módulos.</title>
<meta name="description" content="Source code of webservice. Each directory contains a documentation.
de seus módulos.">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<style>
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button;
}
.jumbotron {
margin-bottom: 0;
border-radius: 0;
background-color: #2B303E;
-webkit-font-smoothing: antialiased;
}
.jumbotron h1 {
font-size: 3.5rem;
line-height: 1;
}
.jumbotron h1,
.jumbotron h1 a {
color: #eee;
}
.jumbotron small {
font-weight: 200;
color: #777;
}
.jumbotron p {
font-size: 1.5rem;
font-weight: 200;
line-height: 1.2;
color: #ccc;
}
.wrap {
padding: 2rem 1rem;
}
.search {
margin: 0 0 1rem 0;
width: 90%;
}
.menu {
padding: 0;
}
.menu li {
list-style: none;
}
.menu li ul {
padding: 0;
}
.menu li a {
display: block;
padding: .25rem;
overflow: hidden;
text-overflow: ellipsis;
}
.menu .file {
color: #E54D89;
}
.menu .file + ul {
margin: 0 0 1rem 0;
}
.menu .scope-private a {
color: #8BAAC6;
}
.method {
margin: 0 0 4rem 0;
}
.method .method-name {
display: inline-block;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.method .method-name + .scope-private {
color: #AAAAAA;
}
.method section {
margin: 2rem 0;
}
.method h3 {
margin: 0 0 1rem 0;
}
.method .table,
.method .table p,
.method .table ol,
.method .table ul {
margin: 0;
}
.permalink {
position: absolute;
margin-left: -1em;
font-weight: normal;
color: #eee;
text-decoration: none;
}
.permalink:hover {
color: #E54D89;
}
.back-to-top {
display: none;
position: fixed;
right: 1rem;
bottom: 1rem;
padding: .5rem .6rem;
line-height: 1;
background: #fff;
z-index: 999;
}
.back-to-top.visible {
display: block;
}
.back-to-top svg {
vertical-align: middle;
}
.bs-footer {
margin: 3rem auto;
color: #777;
text-align: center;
}
</style>
</head>
<body>
<a href="#" class="back-to-top"><svg xmlns="http://www.w3.org/2000/svg" width="13px" height="14px" viewBox="0 0 13 14"><path d="M7.18761156,13 L7.18761156,5.49249703 L10.4587853,5.49249703 L5.09931763,0.113558129 L-0.26015,5.49249703 L3.01102371,5.49249703 L3.01102371,13 L7.18761156,13 Z" fill="#428bca"></path></svg> Back to Top</a>
<div class="jumbotron">
<div class="container">
<h1>
</h1>
<p>Source code of webservice. Each directory contains a documentation.
de seus módulos.</p>
</div>
</div>
<div class="wrap">
<div class="container">
<div class="row">
<div class="col-md-3 hidden-sm hidden-xs">
<input type="search" class="form-control search" id="search-methods" placeholder="Search..." autocomplete="off">
<ul class="menu">
<li>
<a href="#common/models/models.js" class="file"><b>common/models/models.js</b></a>
<ul>
<li class="method-link scope-public">
<a href="#common-models-models.js-models" title="models">models</a>
</li>
<li class="method-link scope-public">
<a href="#common-models-models.js-models_lower" title="models_lower">models_lower</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="col-md-9">
<a id="common/models/models.js"></a>
<div class="method scope-public">
<h2 id="common-models-models.js-models">
<a href="#common-models-models.js-models" class="permalink">#</a>
<span class="method-name" title="models()">models()</span>
</h2>
<div class="description lead">
<p>Models are used in a lot of script, so we created this file to unify.</p>
</div>
<section class="returns">
<h3>Returns</h3>
<p><code>Void</code></p>
</section>
</div>
<div class="method scope-public">
<h2 id="common-models-models.js-models_lower">
<a href="#common-models-models.js-models_lower" class="permalink">#</a>
<span class="method-name" title="models_lower()">models_lower()</span>
</h2>
<div class="description lead">
<p>Some scripts need the lower case version of it</p>
</div>
<section class="returns">
<h3>Returns</h3>
<p><code>Void</code></p>
</section>
</div>
</div>
</div>
</div>
</div>
<footer class="bs-footer">
<div class="container">
<p>Documentation generated with <a href="https://github.com/neogeek/doxdox">doxdox</a>.</p>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>
(function () {
'use strict';
var headerHeight = $('.jumbotron').outerHeight(true),
$backToTop = $('.back-to-top');
function handleScrollEvent() {
if (window.scrollY > headerHeight && $backToTop.not('.visible')) {
$backToTop.addClass('visible');
} else if (window.scrollY < headerHeight && $backToTop.is('.visible')) {
$backToTop.removeClass('visible');
}
}
$('pre code:not(.hljs)').each(function () {
hljs.highlightBlock(this);
});
var $searchInput = $('#search-methods');
var $methodLinks = $('.method-link');
var $methodNames = $('.method .method-name');
var urlQuery = window.location.search.match(/q=([^&]+)/);
$searchInput.on('keyup', function (e) {
var query = new RegExp(e.target.value.replace(' ', '|'), 'ig');
$methodLinks.each(function () {
var $this = $(this);
if (!$this.text().match(query)) {
$this.hide();
} else {
$this.show();
}
});
$methodNames.each(function () {
var $this = $(this);
if (!$this.text().match(query)) {
$this.closest('.method').hide();
} else {
$this.closest('.method').show();
}
});
window.history.replaceState({}, '', window.location.pathname + '?q=' + e.target.value);
});
$searchInput.on('search', function () {
$searchInput.trigger('keyup');
});
if (urlQuery && urlQuery.length > 1) {
$searchInput.val(urlQuery[1]).trigger('keyup');
}
$(window).on('scroll', handleScrollEvent);
handleScrollEvent();
})();
</script>
</body>
</html>
......@@ -18,24 +18,6 @@ function createREADME(dir, desc){
});
}
function createPages(dir, desc){
doxdox.parseInputs([dir+'/*.js'], {
'parser': 'dox',
'layout': 'bootstrap',
'description': desc
}).then(content => {
fs.writeFile(dir+'/README.html', content, function(err) {
if(err) {
return console.log(err);
}
console.log(dir+'/README.html was updated.');
});
process.stdout.write(content);
});
}
var documents = [
{
dir:"./bin",
......@@ -56,7 +38,3 @@ var documents = [
documents.map(function(x){
createREADME(x.dir,x.desc);
});
documents.map(function(x){
createPages(x.dir,x.desc);
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment