crystal-netrc

netrc

A simple library to read and write .netrc files based on autocompletion from AI.

Installation

Add this to your application's shard.yml:

dependencies:
  netrc:
    github: usiegj00/crystal-netrc

Usage

Write:

user_netrc = Netrc.read
user_netrc["some.host.name"]  = {"email", "password"}
user_netrc.save

Read:

user_netrc = Netrc.read
puts user_netrc.unparse
ent = user_netrc["some.host.name"]
exit if ent.nil?
puts ent.password

Contributing

  1. Fork it (https://github.com/your-github-user/netrc/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Copyright

Copyright 2024 usiegj00. All rights reserved.

Repository

crystal-netrc

Owner
Statistic
  • 0
  • 0
  • 0
  • 1
  • 0
  • 7 months ago
  • May 23, 2024
License

Links
Synced at

Sat, 21 Dec 2024 21:14:06 GMT

Languages