diff --git a/scripts/arch_repopkg_unmonitored b/scripts/arch_repopkg_unmonitored deleted file mode 100755 index 19b3055..0000000 --- a/scripts/arch_repopkg_unmonitored +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -e -# MIT licensed -# Copyright (c) 2013-2017 lilydjwg , et al. - -if [[ $# -ne 2 || ! -r $1 || -z $2 ]]; then - echo >&2 "usage: arch_repopkg_unmonitored config.ini pkg_list or repository_name" - exit 1 -fi - -tmp_configured=$(mktemp) -tmp_list=$(mktemp) - -trap 'rm -f "$tmp_configured" "$tmp_list"' INT QUIT TERM EXIT - -config=$1 -if [[ -r $2 ]]; then - sort "$2" > "$tmp_list" -else - pacman -Sl "$2" | cut -d' ' -f2 | sort > "$tmp_list" -fi - -# Also take commented-out items into account -grep -oP '^(?:[;#]\s*)?\[.*(?=]$)' "$config" | sed 's/^\([;#]\s*\)\?\[//;/^__/d' | sort > "$tmp_configured" - -echo ">>> Un-monitored list:" -comm -23 "$tmp_list" "$tmp_configured" -echo - -echo ">>> Monitored but not in list:" -comm -13 "$tmp_list" "$tmp_configured" -echo diff --git a/scripts/gen_contents b/scripts/gen_contents deleted file mode 100755 index 2e420fa..0000000 --- a/scripts/gen_contents +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python3 -# MIT licensed -# Copyright (c) 2013-2017 lilydjwg , et al. - -import sys -import re - -sections = re.compile(r'[-=]{3,}') -levels = { - '=': 1, - '-': 2, -} - -def to_id(t): - return re.sub(r'[`(),]', '', t).lower().replace(' ', '-') - -def to_text(t): - return t.replace('`', '') - -def main(f): - L = [] - last = None - for l in f: - l = l[:-1] - if sections.fullmatch(l): - L.append((last, levels[l[0]])) - last = l - - last_lvl = 1 - for title, lvl in L: - indent = ' ' * (lvl - 1) - if last_lvl != lvl: - print() - print('{indent}* `{text} <#{id}>`_'.format( - indent = indent, - text = to_text(title), - id = to_id(title), - )) - last_lvl = lvl - -if __name__ == '__main__': - main(sys.stdin)