Skip to content

Commit

Permalink
Create a tool to import Javadocs from other OBA projects; add the `on…
Browse files Browse the repository at this point in the history
…ebusaway-gtfs-modules` docs

* Adds `bin/update_javadocs` to clone, archive, and import the `gh-pages` branch from `onebusaway-gtfs-modules`
* Import the Javadocs for `onebusaway-gtfs-modules`
* Adds a new Javadocs section to the sidebar
  • Loading branch information
aaronbrethorst committed Apr 7, 2024
1 parent 1a529a1 commit a83acc6
Show file tree
Hide file tree
Showing 60 changed files with 3,969 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Welcome to the GitHub project that powers the official [OneBusAway Developer Doc

Want to help improve the documentation? Thank you! You can easily improve the official OneBusAway documentation by modifying the Markdown files that comprise it. We welcome any size of contribution, ranging from typos and corrected links, to brand-new tutorials.

## Import Javadocs from OBA Sites

From the root of the project, run the command `bin/update_javadocs` to see a list of available projects from which Javadocs can be imported.

## Develop New Features/Fix Bugs

### Prerequisites
Expand Down Expand Up @@ -94,7 +98,7 @@ The website built from this project is deployed automatically to a static hostin
- For work in progress pull requests, please use the Draft PR feature.
- Make sure all tests pass and add additional tests for the code you submit.
- Document your reasoning behind the changes. Explain why you wrote the code in the way you did. The code should explain what it does.
- If there's an existing issue, reference to it by adding something like `References/Closes/Fixes/Resolves #123`, where 123 is the issue number.
- If there's an existing issue, reference to it by adding something like `References/Closes/Fixes/Resolves #123`, where 123 is the issue number.
- Please fill out the PR Template when making a PR.
> Please note: maintainers may close your PR if it has gone stale or if we don't plan to merge the code.
Expand All @@ -118,7 +122,3 @@ This project exists because of all the people who have contributed.
## The bottom line
We are all humans trying to work together to improve the community. Let's always be kind and appreciate the importance of making compromises. ❤️




56 changes: 56 additions & 0 deletions bin/update_javadocs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env ruby

require 'tmpdir'

MODULES = {
"onebusaway-gtfs-modules" => (->{ build_gtfs_modules })
}

def build_gtfs_modules
repo_url = 'https://github.com/OneBusAway/onebusaway-gtfs-modules.git'
temp_dir = Dir.mktmpdir

begin
# Clone the repository into the temporary directory
system("git clone --single-branch --branch gh-pages #{repo_url} #{temp_dir}")

if $?.success?
puts "Repository cloned into temporary directory: #{temp_dir}"
else
puts "Failed to clone repository."
exit
end

archive_path = Dir.chdir(temp_dir) do |path|
archive_command = "git archive --format=zip -o gh-pages.zip HEAD"
system(archive_command)

archive_path = File.join(temp_dir, 'gh-pages.zip')

if $?.success?
puts "Archive created successfully: #{archive_path}"
else
puts "Failed to create archive."
exit
end
archive_path
end

system("unzip -o #{archive_path} -d ./src/modules/onebusaway-gtfs-modules/current")
ensure
# Clean up the temporary directory
FileUtils.remove_entry(temp_dir)
end
end

mod = ARGV[0]&.strip
lam = MODULES[mod]

if lam
lam.call
else
puts "Unknown module: '#{mod}'"
puts "Call this script with one of the following options:"
MODULES.keys.each {|k| puts " - #{k}"}
exit
end
8 changes: 8 additions & 0 deletions src/_partials/_navbar.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
current_path: resource.relative_url
)) %>

<%= render(NavigationSection.new(
"Javadocs",
children: {
"onebusaway-gtfs-modules" => '/modules/onebusaway-gtfs-modules/current/'
},
current_path: resource.relative_url
)) %>

<%= render(NavigationSection.new(
"Features",
children: {
Expand Down
116 changes: 116 additions & 0 deletions src/modules/onebusaway-gtfs-modules/current/ci-management.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!DOCTYPE html>


<!--
| Generated by Apache Maven Doxia Site Renderer 1.11.1 from org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2:ci-management at 2024-02-01
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
<title>onebusaway-gtfs-modules &#x2013; CI Management</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.11.1.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script src="./js/apache-maven-fluido-1.11.1.min.js"></script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<header>
<div id="banner">
<div class="pull-left"><a href="http://developer.onebusaway.org/" id="bannerLeft"><img src="http://developer.onebusaway.org/images/OneBusAway.png" alt="OneBusAway" style="" /></a></div>
<div class="pull-right"></div>
<div class="clear"><hr/></div>
</div>

<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2024-02-01</li>
<li id="projectVersion" class="pull-right"><span class="divider">|</span>Version: 1.4.16-SNAPSHOT</li>
<li class="pull-right"><a href="../" title="GitHub Project">GitHub Project</a></li>
</ul>
</div>
</header>
<div class="row-fluid">
<header id="leftColumn" class="span2">
<nav class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Introduction</li>
<li><a href="index.html" title="About"><span class="none"></span>About</a></li>
<li><a href="../" title="GitHub Project"><span class="none"></span>GitHub Project</a></li>
<li><a href="release-notes.html" title="Release Notes"><span class="none"></span>Release Notes</a></li>
<li><a href="apidocs/index.html" title="API Javadoc"><span class="none"></span>API Javadoc</a></li>
<li><a href="onebusaway-gtfs-hibernate-cli.html" title="GTFS Database Loader"><span class="none"></span>GTFS Database Loader</a></li>
<li><a href="onebusaway-gtfs-transformer-cli.html" title="GTFS Transformer"><span class="none"></span>GTFS Transformer</a></li>
<li><a href="onebusaway-gtfs-merge-cli.html" title="GTFS Merge"><span class="none"></span>GTFS Merge</a></li>
<li class="nav-header">Project Documentation</li>
<li><a href="project-info.html" title="Project Information"><span class="icon-chevron-down"></span>Project Information</a>
<ul class="nav nav-list">
<li class="active"><a><span class="none"></span>CI Management</a></li>
<li><a href="dependency-convergence.html" title="Dependency Convergence"><span class="none"></span>Dependency Convergence</a></li>
<li><a href="dependency-info.html" title="Dependency Information"><span class="none"></span>Dependency Information</a></li>
<li><a href="dependency-management.html" title="Dependency Management"><span class="none"></span>Dependency Management</a></li>
<li><a href="distribution-management.html" title="Distribution Management"><span class="none"></span>Distribution Management</a></li>
<li><a href="index.html" title="About"><span class="none"></span>About</a></li>
<li><a href="issue-management.html" title="Issue Management"><span class="none"></span>Issue Management</a></li>
<li><a href="licenses.html" title="Licenses"><span class="none"></span>Licenses</a></li>
<li><a href="mailing-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a></li>
<li><a href="modules.html" title="Project Modules"><span class="none"></span>Project Modules</a></li>
<li><a href="plugin-management.html" title="Plugin Management"><span class="none"></span>Plugin Management</a></li>
<li><a href="plugins.html" title="Plugins"><span class="none"></span>Plugins</a></li>
<li><a href="scm.html" title="Source Code Management"><span class="none"></span>Source Code Management</a></li>
<li><a href="summary.html" title="Summary"><span class="none"></span>Summary</a></li>
<li><a href="team.html" title="Team"><span class="none"></span>Team</a></li>
</ul></li>
<li class="nav-header">Modules</li>
<li><a href="onebusaway-gtfs/index.html" title="onebusaway-gtfs"><span class="none"></span>onebusaway-gtfs</a></li>
<li><a href="onebusaway-gtfs-hibernate/index.html" title="onebusaway-gtfs-hibernate"><span class="none"></span>onebusaway-gtfs-hibernate</a></li>
<li><a href="onebusaway-gtfs-hibernate-cli/index.html" title="onebusaway-gtfs-hibernate-cli"><span class="none"></span>onebusaway-gtfs-hibernate-cli</a></li>
<li><a href="onebusaway-gtfs-transformer/index.html" title="onebusaway-gtfs-transformer"><span class="none"></span>onebusaway-gtfs-transformer</a></li>
<li><a href="onebusaway-gtfs-transformer-cli/index.html" title="onebusaway-gtfs-transformer-cli"><span class="none"></span>onebusaway-gtfs-transformer-cli</a></li>
<li><a href="onebusaway-gtfs-transformer-cli-aws/index.html" title="onebusaway-gtfs-transformer-cli-aws"><span class="none"></span>onebusaway-gtfs-transformer-cli-aws</a></li>
<li><a href="onebusaway-gtfs-merge/index.html" title="onebusaway-gtfs-merge"><span class="none"></span>onebusaway-gtfs-merge</a></li>
<li><a href="onebusaway-gtfs-merge-cli/index.html" title="onebusaway-gtfs-merge-cli"><span class="none"></span>onebusaway-gtfs-merge-cli</a></li>
</ul>
</nav>
<div class="well sidebar-nav">
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
</div>
</div>
</header>
<main id="bodyColumn" class="span10" >
<section>
<h2><a name="Overview"></a>Overview</h2><a name="Overview"></a>
<p>This project uses <a class="externalLink" href="https://www.jenkins.io/">Jenkins</a>.</p></section><section>
<h2><a name="Access"></a>Access</h2><a name="Access"></a>
<p>The following is a link to the continuous integration system used by the project:</p>
<div>
<pre><a class="externalLink" href="http://ci.onebusaway.org/">http://ci.onebusaway.org/</a></pre></div></section><section>
<h2><a name="Notifiers"></a>Notifiers</h2><a name="Notifiers"></a>
<p>No notifiers are defined. Please check back at a later date.</p></section>
</main>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>&#169; 2024
<a href="http://onebusaway.org/">OneBusAway</a>
</p>
</div>
</div>
</footer>
<script>
if(anchors) {
anchors.add();
}
</script>
</body>
</html>

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions src/modules/onebusaway-gtfs-modules/current/css/print.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {display: none !important;}
#bodyColumn, body.docs div.docs {margin: 0 !important;border: none !important}
1 change: 1 addition & 0 deletions src/modules/onebusaway-gtfs-modules/current/css/site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* You can override this file with your own styles */
Loading

0 comments on commit a83acc6

Please sign in to comment.