-
Notifications
You must be signed in to change notification settings - Fork 46
/
index.html
150 lines (119 loc) · 7.35 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>GTFS Manager : Main info</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 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>
<style>
pre {
white-space: pre-wrap; /* Since CSS 2.1 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style></head>
<body>
<div id="navBar"></div>
<div class="container-fluid">
<h1 align="center"><small><i>static</i> </small><img src="extra_files/GTFS.png" height="100%" width="auto" alt="GTFS"> Manager</h1>
<p align="center"><small><i>An open source tool for managing and creating public transit schedules data in static GTFS format.</i></small></p>
<div id="instructions" class="container">
<h4>Instructions</h4>
<div>
<p align="center"><a href="https://www.youtube.com/embed/n8BuDM51QyU?rel=0&autoplay=1" target="_blank"><img class="videothumb" src="extra_files/demo-video.jpg"><br><small>Click here to see a demo video.</small></a></p>
<ul>
<li>This is the home/main page of the tool. It gives you and overview of your data, and here you can import/export your GTFS feeds.</li>
<li>There are 4 sections on this page:</li>
<li><b>Current GTFS data</b> : current stats of data in database.</li>
<li><b>Import GTFS</b> : Import a GTFS feed to load it into the database and edit it with this tool. You can also load in other formats or start a Blank Slate (blank GTFS feed).</li>
<li><b>Browse past GTFS Exports</b> : See past exports and backups of the database. To revert to an older version of the data, download a past feed and re-import it using the Import GTFS section.</li>
<li><b>Commit and Export GTFS</b> : Feeling ready with the data? Or just want to keep a backup? Type in a name for easy identification, and press the big green button!</li>
<li>Please make sure you are well versed with the <a href="https://developers.google.com/transit/gtfs/reference/">static GTFS standard</a> before using this tool.</li>
</ul>
</div>
</div><!-- Accordion over -->
<br><hr>
<div class="row">
<div class="col">
<h3>Current GTFS data</h3>
<p>Display stats on current data.</p>
<pre class="card mb-3 card-body bg-light" id="GTFSstats">
Loading stats..
</pre>
</div>
<div class="col">
<h3>Import GTFS</h3>
<!-- Tabs Menu -->
<div id="tabs">
<ul>
<li><a href="#tab1">1. GTFS ZIP</a></li>
<li><a href="#tab2">2. Other Formats</a></li>
<li><a href="#tab3">3. Blank Slate</a></li>
</ul>
<!-- 1 ############################-->
<div id="tab1">
<h6>1. Import an existing GTFS feed. <small>(.zip file)</small></h6>
<p><input type="file" id="gtfsZipFile" name="gtfsZipFile" class="btn btn-sm btn-outline-secondary" accept=".zip">
<button id="importGTFSbutton" class="btn btn-outline-primary" data-toggle="popover" data-trigger="hover" data-placement="right" data-html="true" title="Importing GTFS zip" data-content="Note: <br>1. All files inside the ZIP file must be at top level (no subfolders) and properly named, in lowercase, with .txt extensions as per the accepted static GTFS standards.<br>2. <b>stop_times.txt</b> <i>must</i> be sorted by trip_id.<br>3. <b>shapes.txt</b> <i>must</i> be sorted by shape_id.<br>4. Its ok if some tables are absent - import whatever you have and then build remaining tables with this tool.">Upload >></button></p>
<div id="importGTFSStatus"></div>
</div>
<!-- 2 ############################-->
<div id="tab2">
<h6>2. Import data in other formats</h6>
<ul>
<li>If your data is in Kochi Metro's XML format, <a href="kmrl.html">click here</a>.</li>
<li>If your data is in Hyderabad Metro's CSV format, <a href="hmrl.html">click here</a>.</li>
</ul>
</div>
<!-- 3 ############################-->
<div id="tab3">
<p>3. <button id="gtfsBlankSlateButton" class="btn btn-outline-danger">Create a Blank Slate DB</button> to start making a GTFS feed from scratch.</p>
<p id="gtfsBlankSlateStatus"></p>
</div>
</div>
<div class="alert alert-warning"><small>Note: All of the above 3 actions will wipe out the current data in the db. A backup GTFS export will be made just in case you want to revert later. You can find it from the past commits section after refreshing this page.</small>
</div>
<hr>
<h3>Export GTFS Feed</h3>
<p>If you feel like your data is ready, choose a commit name and press the button to create a freshly minted GTFS feed!</p>
<p><input id="commitName" placeholder="choose a name, eg: first-try" data-toggle="popover" data-trigger="hover" data-placement="top" data-html="true" title="Pick a name" data-content="So that it's easy for you to identify later, type in a word or so to give your export a name.<br><small>Note: No special characters. Keep lowercase. Can use alphabets, digits, hyphen (-), underscore (_). Spaces will be converted to _"></p>
<p><button class="btn btn-bg btn-success" id="exportGTFS">Generate and Export GTFS</button></p>
<div class="card mb-3 card-body bg-light" id="exportGTFSlog">Log</div>
</div>
</div>
<br><hr>
<div class="row">
<div class="col">
<h3>Browse past GTFS Exports</h3>
<p>Listing past commits with links to download GTFS feed zip.<br><small>(latest first, oldest last)</small></p>
<div class="card mb-3 card-body bg-light" id="pastCommits"><small>Loading past commits..</small></div>
</div>
<div class="col">
<!--
<h3>Export GTFS Feed</h3>
<p>If you feel like your data is ready, choose a commit name and press the button to create a freshly minted GTFS feed!</p>
<p><input id="commitName" placeholder="choose a name, eg: first-try" data-toggle="popover" data-trigger="hover" data-placement="top" data-html="true" title="Pick a name" data-content="So that it's easy for you to identify later, type in a word or so to give your export a name.<br><small>Note: No special characters. Keep lowercase. Can use alphabets, digits, hyphen (-), underscore (_). Spaces will be converted to _"></p>
<p><button class="btn btn-bg btn-success" id="exportGTFS">Generate and Export GTFS</button></p>
<div class="card mb-3 card-body bg-light" id="exportGTFSlog">Log</div>
-->
</div>
</div>
<br><hr><br>
</div>
<script src="config/settings.js" type="text/javascript"></script>
<script src="js/commonfuncs.js" type="text/javascript"></script>
<script src="js/homepage.js" type="text/javascript"></script>
</body>
</html>