diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-14 09:20:58 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-14 09:20:58 -0700 |
commit | 2d0dca840b95edaaf45e17d7250ea16f12d51e41 (patch) | |
tree | 783d792df0fef1b49882908ebbd5cd1cc18db43b /lib | |
parent | 639b9795c0ada8432f8b42a59509e654e1a2bc7b (diff) | |
download | dotfiles-2d0dca840b95edaaf45e17d7250ea16f12d51e41.tar.gz |
stop stowing lib/aid into homedir
It's pointless complexity, so far as I can tell right now.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/aid/README | 9 | ||||
-rwxr-xr-x | lib/aid/arizona/d2ldlrn | 22 | ||||
-rwxr-xr-x | lib/aid/arizona/mmg/lsumm | 15 | ||||
-rwxr-xr-x | lib/aid/debian/alioth-to-salsa | 23 | ||||
-rwxr-xr-x | lib/aid/debian/rebuild-rdeps | 34 | ||||
-rwxr-xr-x | lib/aid/web/goodreads_library_export.pl | 57 |
6 files changed, 0 insertions, 160 deletions
diff --git a/lib/aid/README b/lib/aid/README deleted file mode 100644 index 374de533..00000000 --- a/lib/aid/README +++ /dev/null @@ -1,9 +0,0 @@ -This is for helper scripts and programs that I don't want on PATH. -Shell pipelines, scripts for `git bisect`, and Perl one-liners turned -into files commencing `#!/usr/bin/perl -wnl`, are the sort of thing we -have in here. - -Loosely categorise the scripts, e.g. dgit/ might contain tools useful -when developing dgit. - -Note that repos other than ~/src/dotfiles might stow into ~/lib/aid. diff --git a/lib/aid/arizona/d2ldlrn b/lib/aid/arizona/d2ldlrn deleted file mode 100755 index ad5b3302..00000000 --- a/lib/aid/arizona/d2ldlrn +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/perl - -use 5.028; -use strict; -use warnings; - -die "you probably wanted to pass '*' as an additional command line argument\n" - if @ARGV == 0; - -for (@ARGV) { - my ($name, $ext) = - /\A[0-9]{6}-[0-9]{7} - ([^-]+)- [A-Z].+?\.([^.]+)\z/; - next unless defined $name and defined $ext; - - my $target = "$name.$ext"; - my $i = 2; - while (-e $target) { - $target = "$name-$i++.$ext"; - } - die "would overwrite $target" if -e $target; # check - rename $_, $target; -} diff --git a/lib/aid/arizona/mmg/lsumm b/lib/aid/arizona/mmg/lsumm deleted file mode 100755 index 3dee0ee6..00000000 --- a/lib/aid/arizona/mmg/lsumm +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/perl -wl - -open my $fh, '<', '../Lecture summary.txt'; -chomp(my @summary = <$fh>); -for (glob "*") { - /^(.+)\.([a-z]+)$/; - next if $2 eq 'txt'; - my $txt = "$1.txt"; - open my $fh, '>', $txt; - print $fh $1; - print $fh ""; - print $fh $_ for @summary; - print $fh ""; - print $fh $1; -} diff --git a/lib/aid/debian/alioth-to-salsa b/lib/aid/debian/alioth-to-salsa deleted file mode 100755 index e5bede91..00000000 --- a/lib/aid/debian/alioth-to-salsa +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# original: http://www.df7cb.de/blog/2017/Salsa_batch_import.html -# example usage: alioth-to-salsa deft.git pkg-emacsen/pkg emacsen-team - -set -eux - - -PROJECT="${1%.git}" -DESCRIPTION="$PROJECT packaging" -ALIOTH_URL="https://anonscm.debian.org/git" -ALIOTH_GROUP="$2" -SALSA_GROUP="$3" -SALSA_URL="https://salsa.debian.org/api/v4" -SALSA_TOKEN=`cat ~/local/auth/salsa` -SALSA_NAMESPACE=$(curl $SALSA_URL/groups?private_token=$SALSA_TOKEN | jq ".[] | select(.path == \"$SALSA_GROUP\") | .id") - -curl -f "$SALSA_URL/projects?private_token=$SALSA_TOKEN" \ - --data "path=$PROJECT&namespace_id=$SALSA_NAMESPACE&description=$DESCRIPTION&import_url=$ALIOTH_URL/$ALIOTH_GROUP/$PROJECT&visibility=public" - -ssh alioth "~hertzog/bin/disable-repository /git/$ALIOTH_GROUP/$1 $SALSA_GROUP" - -git remote set-url origin salsa:$SALSA_GROUP/$PROJECT diff --git a/lib/aid/debian/rebuild-rdeps b/lib/aid/debian/rebuild-rdeps deleted file mode 100755 index 8dcbc7ef..00000000 --- a/lib/aid/debian/rebuild-rdeps +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -us="$(basename $0)" - -# TODO apparently ratt (rebuild all the things) does this - -# first arg is root of dep tree. other args passed on to sbuild -# (e.g. --extra-package="$HOME/src/dh-elpa_1.0_all.deb" --add-depends="dh-elpa (>= 1.0)") -root="$1" -shift - -# ensure our sources are up-to-date -#sudo apt-get update - -# logs of failed builds will go here -mkdir -p $HOME/tmp -# need a temporary directory, as sbuild will download source packages -work=$(mktemp --tmpdir=$HOME/tmp -d ${us}XXXX) -( - cd $work - - build-rdeps --quiet $root | while read p; do - sbuild --no-apt-update --no-apt-upgrade --no-apt-distupgrade \ - --no-run-piuparts --no-run-lintian --no-run-autopkgtest \ - "$p" "$@" - if [ $? != 0 ]; then - echo "failed: $p" - mv ${p}_*Z.build $HOME/tmp - fi - done -) - -# clean up -rm -rf $work diff --git a/lib/aid/web/goodreads_library_export.pl b/lib/aid/web/goodreads_library_export.pl deleted file mode 100755 index fd1a4f5a..00000000 --- a/lib/aid/web/goodreads_library_export.pl +++ /dev/null @@ -1,57 +0,0 @@ -use 5.028; -use strict; -use warnings; - -use Text::CSV_XS qw(csv); - -open my $fh, ">:encoding(utf8)", "$ENV{HOME}/doc/org/goodreads_library_export.org"; -my $grle = csv( - in => "$ENV{HOME}/tmp/goodreads_library_export.csv", - headers => 'auto', - encoding => 'UTF-8' -); -my (@read, @to_read); -foreach my $gr (@$grle) { - my %book = ( - title => $gr->{Title}, - author => $gr->{Author}, - year => $gr->{'Original Publication Year'}, - tags => $gr->{Bookshelves} || undef, - rating => $gr->{'My Rating'}, - date_added => $gr->{'Date Added'} || undef, - date_read => $gr->{'Date Read'} || undef, - ); - if ($gr->{'Exclusive Shelf'} eq 'read') { - push @read, \%book; - } elsif ($gr->{'Exclusive Shelf'} eq 'to-read') { - push @to_read, \%book; - } -} - -# use Data::Dumper; -# print Dumper @read; -# print Dumper @to_read; - -say $fh "Warning: This file gets overwritten by a script!"; -say $fh "* To read"; -foreach my $to_read (@to_read) { - say $fh "** " . $to_read->{title} . " by " - . $to_read->{author} . " (" - . $to_read->{year} . ")"; -} -say $fh "* Read"; -foreach my $read (@read) { - say $fh "** " . $read->{title} . " by " - . $read->{author} . " (" - . $read->{year} . ")"; - say $fh "- rating :: " . $read->{rating}; - if (defined $read->{tags}) { - say $fh "- tags :: " . $read->{tags}; - } - if (defined $read->{date_added}) { - say $fh "- date added :: " . $read->{date_added}; - } - if (defined $read->{date_read}) { - say $fh "- date read :: " . $read->{date_read}; - } -} |