Skip to content

Commit

Permalink
v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
answerquest committed Sep 19, 2018
1 parent 4dd8d22 commit 3f29b4e
Show file tree
Hide file tree
Showing 46 changed files with 3,873 additions and 990 deletions.
14 changes: 9 additions & 5 deletions GTFSserverfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,16 @@ def GTFSstats():
'''
content = '';

agencyList = readTableDB('agency').agency_name.tolist()
if len(agencyList)>2 : agencyList[:] = agencyList[:2] + ['and {} more'.format(len(agencyList)-2 )]
# if there are excess agencies, mention only first two and then put number of remaining

content += 'Agency: {}<br>'.format( ', '.join(agencyList) )
agencyDF = readTableDB('agency')
if len(agencyDF):
agencyList = agencyDF.agency_name.tolist()
if len(agencyList)>2 : agencyList[:] = agencyList[:2] + ['and {} more'.format(len(agencyList)-2 )]
# if there are excess agencies, mention only first two and then put number of remaining

content += 'Agency: {}<br>'.format( ', '.join(agencyList) )
else:
content += 'Agency: none found.<br>'

filenames = findFiles(dbFolder, ext='.h5', prefix=None, chunk='all')

coveredFiles = []
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

A browser-based user interface for creating, editing, exporting of static GTFS (General Transit Feed Specification Reference) feeds for a public transit authority.

**Development Status** : V 2.1.0
**Development Status** : V 3.0.0
~And Windows binary is available too now.~ Download from [Releases page](https://github.com/WRI-Cities/static-GTFS-manager/releases/).

## Intro
Expand Down
58 changes: 58 additions & 0 deletions agency.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Agency</title>
<link href="lib/jquery-ui.min.css" rel="stylesheet">
<link href="lib/tabulator.min.css" rel="stylesheet">
<link href="lib/bootstrap.v4.0.0.min.css" crossorigin="anonymous" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" rel="stylesheet">
<link rel="stylesheet" href="lib/chosen/chosen.min.css">
<link href="js/commonstyle.css" rel="stylesheet">
<!-- Put the CSSs first and JSs next -->

<script src="lib/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="lib/jquery-ui.min.js" type="text/javascript"></script>
<script src="lib/tabulator.js" type="text/javascript"></script>
<script src="lib/popper.v1.12.9.min.js" crossorigin="anonymous" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" alt="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="lib/bootstrap.v4.0.0.min.js" crossorigin="anonymous" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="lib/papaparse.min.js" type="text/javascript"></script>
<script src="lib/chosen/chosen.jquery.min.js" type="text/javascript"></script>
<style>
#agency-table {
height: 300px;
}
</style></head>
<body>
<div id="navBar"></div>

<div class="container">
<h2>Agency</h2>
<br>
<div class="row">
<div class="col-md-8">

<div id="agency-table"></div>
<br>
<p>Create a new agency:
<input placeholder="agency_id" id="agency2add" size="7"><button class="btn-primary btn-xs" id="addAgencyButton" type="button">Add</button> &nbsp; <small><span id="agencyAddStatus"></span></small></p>

<p><button id="saveAgencyButton" class="btn btn-outline-success btn-md">Save Agency Changes</button> &nbsp; <small id="agencySaveStatus"></small></p>

</div><div class="col-md-4">

<div class="alert alert-info"><small>
Used for the feed's metadata, and in Routes section if there are multiple agencies and the route has to be shown to operate under an agency. <a href="https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#agencytxt" target="_blank">See specs</a>.
<br><br>Note: To delete an agency, please go to <a href="deleteID.html">Tools > Delete ID</a>.
</small></div>

</div></div>



</div>
<script src="config/settings.js" type="text/javascript"></script>
<script src="js/commonfuncs.js" type="text/javascript"></script>
<script src="js/agency.js"></script>

</body>
</html>
54 changes: 54 additions & 0 deletions calendar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Calendar</title>
<link href="lib/jquery-ui.min.css" rel="stylesheet">
<link href="lib/tabulator.min.css" rel="stylesheet">
<link href="lib/bootstrap.v4.0.0.min.css" crossorigin="anonymous" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" rel="stylesheet">
<link rel="stylesheet" href="lib/chosen/chosen.min.css">
<link href="js/commonstyle.css" rel="stylesheet">
<!-- Put the CSSs first and JSs next -->

<script src="lib/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="lib/jquery-ui.min.js" type="text/javascript"></script>
<script src="lib/tabulator.js" type="text/javascript"></script>
<script src="lib/popper.v1.12.9.min.js" crossorigin="anonymous" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" alt="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="lib/bootstrap.v4.0.0.min.js" crossorigin="anonymous" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="lib/papaparse.min.js" type="text/javascript"></script>
<script src="lib/chosen/chosen.jquery.min.js" type="text/javascript"></script>
<style>
#calendar-table {
height: 300px;
}
</style></head>
<body>
<div id="navBar"></div>

<div class="container">
<h2>Calendar</h2>
<div id="instructions" class="container">
<h3>Instructions</h3>
<div>
<p>The service_id is referred to when defining trips. Typically there are different schedules followed on working days and holidays.</p>
<p>The service_id's get used in TRIPS table to define which days of the week a trip operates on. This allows for different timings on weekends.</p>
<p>Use the Tools > Delete ID section to delete a calendar service. Note that because the service_id field is required in trips table, deleting a calendar service will need cascading deleting of all trips and timings data associated with it. It would be a better option to change the service_id instead.</p>
<p>If you have made any additions or changes that you wish to revert and you haven't pressed the big "Save" button below, you may simply reload this page, and all changes will be dropped. Conversely, make sure to Save to preserve any changes you make.</p>
</div></div><!-- Accordion over -->
<br>


<div id="calendar-table"></div>
<br>
<p>Create a new calendar service: <input placeholder="service_id" id="calendar2add" size="6"><button class="btn-primary btn-xs" id="addCalendarButton" type="button">Add</button> &nbsp; <small id="calendarAddStatus"></small></p>

<p><button id="saveCalendarButton" class="btn btn-outline-success btn-md">Save Calendar Changes</button> &nbsp; <small id="calendarSaveStatus"></small></p>


</div>
<script src="config/settings.js" type="text/javascript"></script>
<script src="js/commonfuncs.js" type="text/javascript"></script>
<script src="js/calendar.js"></script>

</body>
</html>
32 changes: 30 additions & 2 deletions config/settings.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
// from commonfuncs.js

const VERSION = 'v2.1.2';
const VERSION = 'v3.0.0';
const APIpath = 'API/';
const CURRENCY = 'INR';
const route_type_options = {0:"0-Tram, Streetcar, Light rail", 1:"1-Subway, Metro", 2:"2-Rail", 3:"3-Bus",4:"4-Ferry" };
//const route_type_lookup = {0:"Tram, Streetcar, Light rail", 1:"Subway, Metro", 2:"Rail", 3:"Bus",4:"Ferry" };
const route_type_lookup = route_type_options;

// this json holds the different pages. If you want to add/remove/rename a page, do so here.
const menu = { 'index.html':'Main', 'stops.html':'Stops', 'routes.html':'Routes', 'schedules.html':'Schedules', 'fares.html':'Fares', 'misc.html':'Misc','kmrl.html':'KMRL', 'hmrl.html':'HMRL'};
const menu = {
"Home": "index.html",
"GTFS": {
"Agency": "agency.html",
"Stops": "stops.html",
"Routes": "routes.html",
"Calendar": "calendar.html",
"Trips and Timings": "tripstimings.html",
"Fares": "fares.html",
"Translations": "translations.html"
},
"Tools": {
// to do: bulk action pages, diagnostic pages etc
"Default Route Sequence": "sequence.html",
"Rename ID": "renameID.html",
"Delete ID": "deleteID.html"
},
"Data": {
//"Import / Export GTFS": "gtfs.html",
"Import KMRL format": "kmrl.html",
"Import HMRL format": "hmrl.html"
}
}

// this flag tells whether it is mandatory for all UIDs to be in capitals or not.
const CAPSLOCK = true;
Expand All @@ -30,3 +52,9 @@ const MARKERSLIMIT = 100;
const shapeAutocompleteOptions = {disable_search_threshold: 1, search_contains:true, width:100};

const stopAutocompleteOptions = {disable_search_threshold: 4, search_contains:true, width:225, placeholder_text_single:'Pick a stop'};

// from tripstimings.js , formerly schedules.js
const wheelchairOptions = {"":"blank-No info", 1:"1-Yes", 2:"2-No"};
const wheelchairOptionsFormat = {"":"", 1:"1 (Yes)", 2:"2 (No)"};
const bikesAllowedOptions = {'':"blank-No info", 1:"1-Yes", 2:"2-No"};
const bikesAllowedOptionsFormat = {"":"", 1:"1 (Yes)", 2:"2 (No)"};
Binary file modified db/agency.h5
Binary file not shown.
Binary file modified db/calendar.h5
Binary file not shown.
Binary file modified db/calendar_dates.h5
Binary file not shown.
Binary file modified db/routes.h5
Binary file not shown.
Loading

0 comments on commit 3f29b4e

Please sign in to comment.