diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dateify | 14 | ||||
-rwxr-xr-x | bin/fmt-metadata | 4 | ||||
-rwxr-xr-x | bin/gitthing | 5 | ||||
-rwxr-xr-x | bin/poolify | 3 |
4 files changed, 4 insertions, 22 deletions
diff --git a/bin/dateify b/bin/dateify deleted file mode 100755 index 7aefdd9..0000000 --- a/bin/dateify +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/sed -rf -s/\b([0-9]{2})-([A-Z][a-z][a-z])-([0-9]{4})(\b|T|_)/\3-\2-\1\4/ -s/Jan/01/ -s/Feb/02/ -s/Mar/03/ -s/Apr/04/ -s/May/05/ -s/Jun/06/ -s/Jul/07/ -s/Aug/08/ -s/Sep/09/ -s/Oct/10/ -s/Nov/11/ -s/Dec/12/ diff --git a/bin/fmt-metadata b/bin/fmt-metadata index 0682414..7867d63 100755 --- a/bin/fmt-metadata +++ b/bin/fmt-metadata @@ -4,15 +4,13 @@ require 'time' snapshot = ARGV.first.to_i $stdin.each_line do |line| - m = /^ (\S+) +(..-\S+-.... ..:..) +([0-9.]+)(\S+) *$/.match(line) + m = /^ (\S+) +(..-\S+-.... ..:..) +([0-9.-]+)(\S+) *$/.match(line) raise "Malformed line: #{line}" unless m name = m[1] datetime = m[2] size_numb = m[3] size_unit = m[4] - next if name.downcase == "parent directory" - # The Unicode.org web server switched the timezone of timestamps # in May 2004 if snapshot < 20040500000000 diff --git a/bin/gitthing b/bin/gitthing index 7bac2e2..ff7b5ac 100755 --- a/bin/gitthing +++ b/bin/gitthing @@ -43,12 +43,11 @@ main() { git checkout -b "$branch" || true git checkout "$branch" - waurl="http://web.archive.org/web/$time/$url" if [[ -n "$filepart" ]]; then - file="$top/dat/content-file/$(url2murl "${waurl#http://}")" + file="$top/dat/content-file/$time/$(url2murl "$url")" cp "$file" . else - dir="$top/dat/content-dir/$(url2murl "${waurl#http://}")" + dir="$top/dat/content-dir/$time/$(url2murl "$url")" comm -23 \ <(git ls-files) \ <(< "$dir/metadata.txt" awk '{print $1}') \ diff --git a/bin/poolify b/bin/poolify index 34e0b42..af8bf40 100755 --- a/bin/poolify +++ b/bin/poolify @@ -46,8 +46,7 @@ main() { false fi - waurl="http://web.archive.org/web/$time/$url" - file="dat/content-file/$(url2murl "${waurl#http://}")" + file="dat/content-file/$time/$(url2murl $url)" declare -i i=0 while true; do |