diff --git a/bashrc.d/local/Pauls-new-MacBook-Pro.local.bash b/bashrc.d/local/Pauls-new-MacBook-Pro.local.bash index 298ac13..0f1d539 100644 --- a/bashrc.d/local/Pauls-new-MacBook-Pro.local.bash +++ b/bashrc.d/local/Pauls-new-MacBook-Pro.local.bash @@ -1,3 +1,5 @@ alias serv="cd ~/src/servicesmart" addpath /Users/paul/Library/Python/3.7/bin addpath ~/.npm-global/bin + +`netrc news.xcski.com NNTP` diff --git a/bashrc.d/local/secbri-vmhost-1.bash b/bashrc.d/local/secbri-vmhost-1.bash index b5b9231..3b2f06c 100644 --- a/bashrc.d/local/secbri-vmhost-1.bash +++ b/bashrc.d/local/secbri-vmhost-1.bash @@ -23,3 +23,5 @@ addpath $ANDROID_HOME/platform-tools export TERM=xterm-256color alias k="khal interactive" + +`netrc news.xcski.com NNTP` diff --git a/bin/netrc b/bin/netrc new file mode 100755 index 0000000..023ca22 --- /dev/null +++ b/bin/netrc @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +import sys +from netrc import netrc + +if len(sys.argv) < 2: + print("Usage: netrc machine [env_prefix]") + sys.exit(1) + +prefix="" +machine = sys.argv[1] +if len(sys.argv) > 2: prefix = sys.argv[2] + +n = netrc() +if machine in n.hosts.keys(): + entry = n.hosts[machine] + print("export %sUSER=%s" % (prefix, entry[0])) + print("export %sPASS=%s" % (prefix, entry[2])) +else: + print("echo %s not found in .netrc" % machine) + sys.exit(2) diff --git a/slrnrc b/slrnrc index 25fcea8..286a100 100644 --- a/slrnrc +++ b/slrnrc @@ -16,6 +16,7 @@ %nnrpaccess "HOSTNAME" "USERNAME" "" % Prompt for password %nnrpaccess "HOSTNAME" "" "" % Prompt for username and password +%nnrpaccess news.xcski.com blacksun2 vD82QRK6 set hostname "blacksun.org.uk" set username "paul" @@ -187,8 +188,8 @@ set abort_unmodified_edits 1 % Command used to invoke editor. In the following example, %s represents % the file name and %d represents the starting line number %set editor_command "jed '%s' -g %d -tmp" -%set editor_command "joe '%s'" -set editor_command "~/.edit.sh '%s'" +set editor_command "joe '%s'" +%set editor_command "~/.edit.sh '%s'" % Editor command for editing posts, mail, and score files. Note the use of % single quotes around %s. This is only necessary if you use filenames @@ -307,7 +308,7 @@ set spoiler_display_mode 2 %almost redundant, whereas with others which don't expire entries from %overview files regularly, it's almost vital. If the users sees a lot of %"article not available" errors, they should probably try turning it on. -set spool_check_up_on_nov 0 +% set spool_check_up_on_nov 0 %--------------------------------------------------------------------------- % GroupLens Support @@ -520,4 +521,4 @@ setkey readline trim "\e/" % Trim whitespace setkey readline quoted_insert "^Q" % Quoted insert %interpret /usr/local/share/slrn/search.sl -interpret /home/paul/.slrn/approved.sl +%interpret /home/paul/.slrn/approved.sl