aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
AgeCommit message (Collapse)Author
2018-04-15Add license (GNU GPLv3+)Teddy Wing
2018-04-15Pass `latitude`, `longitude`, `end_date` to `build_rss::write_feed`Teddy Wing
Make these values user-modifiable finally.
2018-04-15Always print help message if `-h` or `--help` flags passedTeddy Wing
Since we've set up required arguments, 'getopts' fails fast and complains about missing required args even if the only one used was `-h` or `--help`. Why should you care about required arguments? You wanted help in the first place, how are you going to know? Thankfully, this message from 'prasannavl' pointed me in the right direction: https://github.com/rust-lang-nursery/getopts/issues/46#issuecomment-343842947 If there's an option parse failure, we can just look for the help flags in the args vec to see if we should display the help.
2018-04-15Add `latitude`, `longitude`, `end-date` command line argumentsTeddy Wing
These will be passed to `build_rss::write_feed`.
2018-04-15build_rss(write_feed): Automatically handle date formattingTeddy Wing
* Take a date formatted in `%Y-%m-%d` and append the extra `THH:MM:SS` that the Meetup API requires. We'll just be taking a regular string from a user-inputted command line argument instead of a real date type because it's easier and simpler. * Use the name `end_date` to distinguish it from the `end_date_range` parameter used by the API.
2018-04-15Use the correct time format for `end_date_range`Teddy Wing
The Meetup API requires the `end_date_range` param to use this format, otherwise it responds with an error. Eventually we'll want to make this an actual time type and then `strftime` it to this string.
2018-04-15Use 'error-chain' in `main()`Teddy Wing
Display all our errors this way.
2018-04-14Pass `find_upcoming_events` parameters along through the programTeddy Wing
2018-04-13Output a feed to STDOUT when running the executableTeddy Wing
* Add a new module that contains a "main" library function that does the integration for generating the feed and outputting it to STDOUT. * Call this function from `main()` and have it output a real feed.
2018-04-12Make `meetup-api-token` a required argument, print its valueTeddy Wing
Use `reqopt` since this is a required option. Since the `opts.parse` call will catch it if it isn't present earlier in the `main` function, just unwrap it when extracting it.
2018-04-12Print Getopts errors with a newlineTeddy Wing
2018-04-12Parse command line arguments and add help outputTeddy Wing
Include an option to pass a Meetup.com API token (not saved yet).
2018-04-12Initial commit. Generated Rust v1.25.0 project.Teddy Wing
Generated with: $ cargo new --bin meetup-find-events-rss