-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
122 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[nigiri] | ||
[email protected]:motis-project/nigiri.git | ||
branch=master | ||
commit=2cf648ac22315fb6578be3f5d689f4d94e81b457 | ||
commit=f647fb695d730f78f925eaed312ca4d849cb1da9 | ||
[cista] | ||
[email protected]:felixguendling/cista.git | ||
branch=master | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#pragma once | ||
|
||
#include <filesystem> | ||
|
||
#include "boost/program_options.hpp" | ||
|
||
namespace motis { | ||
|
||
inline void add_data_path_opt(boost::program_options::options_description& desc, | ||
std::filesystem::path& p) { | ||
desc.add_options()( | ||
"data,d", boost::program_options::value(&p)->default_value(p), | ||
"The data path contains all preprocessed data as well as a `config.yml`. " | ||
"It will be created by the `motis import` command. After the import has " | ||
"finished, `motis server` only needs the `data` folder and can run " | ||
"without the input files (such as OpenStreetMap file, GTFS datasets, " | ||
"tiles-profiles, etc.)"); | ||
} | ||
|
||
inline void add_config_path_opt( | ||
boost::program_options::options_description& desc, | ||
std::filesystem::path& p) { | ||
desc.add_options()( | ||
"config,c", boost::program_options::value(&p)->default_value(p), | ||
"Configuration YAML file. Legacy INI files are still supported but this " | ||
"support will be dropped in the future."); | ||
} | ||
|
||
inline boost::program_options::variables_map parse_opt( | ||
int ac, char** av, boost::program_options::options_description& desc) { | ||
namespace po = boost::program_options; | ||
auto vm = po::variables_map{}; | ||
po::store(po::command_line_parser(ac, av).options(desc).run(), vm); | ||
po::notify(vm); | ||
return vm; | ||
} | ||
|
||
} // namespace motis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters