aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-05-13Increase version v0.0.1 -> v0.1.0v0.1.0Teddy Wing
2017-05-13Add CHANGELOGTeddy Wing
2017-05-13Add license (GPLv3+)Teddy Wing
2017-05-13Add READMETeddy Wing
Include a description of the program, example usage with SSH instructions, install & uninstall help, and license information.
2017-05-09Remove TODOTeddy Wing
This tracking file is no longer needed. Finished implementation of the tasks outlined within, and deciding not to bother with the "maybe" configuration file task.
2017-05-09Move `open_stream()` to lib.rsTeddy Wing
Make `main.rs` responsible for only the `main()` function and command line option handling. Move the actual application code to `lib.rs` for clearer separation of concerns.
2017-05-09open_stream(): Don't terminate the TCP listener on errorTeddy Wing
Previously, errors would be returned immediately by the `?`/`try!`s. Handle errors directly instead of returning them. Otherwise, the stream listener would terminate, exiting the program, and forcing users to restart it in order to restore functionality.
2017-05-09open_stream(): Change `write!` to `writeln!` on STDERRTeddy Wing
When printing errors to STDERR, ensure we're writing newlines to separate error messages.
2017-05-09main.rs: Change port parsing `unwrap` to `expect`Teddy Wing
Using `expect` seems nicer here because it allows us to provide a more meaningful error message.
2017-05-09Update TODOTeddy Wing
2017-05-09Merge branch 'parse-url'Teddy Wing
2017-05-09open_steam(): Parse URL inputTeddy Wing
Parse the URL coming in from the TCP stream to check that it's a valid URL. This allows us to fail early and not try to open strings that are not URLs. Leverage the "url" crate to do the parsing. Return a `Box<Error>` from `open_stream()` to enable us to return either an `io` or a `Url` error in our `Result`. Remove the `trim_right()` call on `url` since it's now a `Url` type instead of a `String`, and as a result of parsing to a `Url`, it no longer has the problematic trailing newline.
2017-05-08Update TODOTeddy Wing
Completed command line flag tasks.
2017-05-07Merge branch 'command-line-arguments'Teddy Wing
2017-05-07open_stream(): Remove hard-coded browser & portTeddy Wing
Instead get these from function arguments, which in turn get fed from the command line arguments passed by the user.
2017-05-07main.rs: Add a constant for default portTeddy Wing
Remove the magic number and replace it with a named value.
2017-05-07main.rs: Add port command line optionTeddy Wing
Provide users with an option to change the default port the program listens on.
2017-05-07main.rs: Match `Option` when setting browserTeddy Wing
Instead of checking for the presence of the `-b` option before setting it, just use an `Option` match since `opt_str` returns an `Option<String>`.
2017-05-07main.rs: Add browser optionTeddy Wing
This will be used to set the browser to open URLs in.
2017-05-07main.rs: Add command line options parsingTeddy Wing
Use Getopts to parse command line options. Currently only has a 'help' option, but this lays the foundation for user-customisable browser and port values.
2017-04-23Cargo.*: Add 'getopts' crateTeddy Wing
For easier command line option parsing.
2017-04-23Update TODOTeddy Wing
2017-04-14Cargo.*: Add 'url' crateTeddy Wing
Allow us to parse URLs.
2017-04-13open_url.sh: Add documentation comment for Irssi openurl integrationv0.0.1Teddy Wing
2017-04-13Add open_url.shTeddy Wing
A script that can be installed on a remote machine and invoked with a URL argument that will be opened by Hearurl locally. For use with programs like the "openurl.pl" script for Irssi. The script would function using this SSH command: $ ssh -R 37705:localhost:34254 user@host
2017-04-13Add TODOTeddy Wing
A few ideas for next steps now that we have the foundation working.
2017-04-13main.rs: Clean up `main` error handlingTeddy Wing
Remove the `match` call from efa7f80d962aa0f55f3addbac1da206538d9242e and use `unwrap_or_else` instead since we don't need to do anything extra in the `Ok` case.
2017-04-13main.rs: Handle `main` errorsTeddy Wing
Print all errors to STDERR.
2017-04-13main.rs: Open the stream input in OperaTeddy Wing
Use the Mac OS X `open` command to open Opera and pass in the contents of the TCP stream as an argument, assuming it to be a URL that should be opened in the browser. Only dealing with the `open` command for now. Will be extending this to support user-customisable browsers, so that any GUI browser that can be opened with `open` can be used.
2017-04-13main.rs: Add `try!` around STDERR writerTeddy Wing
The call to write to STDERR returns a `Result`. Wrap it in a `try!` to handle the result and eliminate the "unused result" compilation warning.
2017-04-13main.rs: Remove unused import TcpStreamTeddy Wing
We only need the `TcpListener` for what we're doing.
2017-04-13main.rs: Write TCP stream errors to STDERRTeddy Wing
2017-04-13main.rs: Get rid of UDP codeTeddy Wing
Going with TCP as that seems like it will work well. Get rid of our UDP code.
2017-04-13main.rs: Try out TcpListenerTeddy Wing
Replicate the TcpListener example from the Rust standard library docs. Using TCP instead of UDP allows us to read directly to a string and read arbitrary length streams. Here we just print the stream input to the console.
2017-03-16main.rs: Copy UdpSocket example to test out socketsTeddy Wing
Copies the example given at https://doc.rust-lang.org/std/net/struct.UdpSocket.html to experiment with receiving and sending data over the socket.
2017-03-16Initial commit. Base project generated from `cargo init`.Teddy Wing
Rust v1.13.0. $ cargo init --bin