everything related to duct tape audio suite (dtas)
 help / color / mirror / Atom feed
b411b11bbe65b4e59170e85dc358d2e0e30f6d51 blob 1224 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 
#!/usr/bin/env ruby
# Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
require 'dtas/edit_client'
include DTAS::EditClient
c = client_socket
sources = c.req('source ls') || "(unknown)"
usage = "Usage: #{DTAS_PROGNAME} [-n|--dry-run][-V|--verbose] SOURCENAME\n" \
        "available SOURCENAME values: #{sources}"

# use a real option parser if we have anything more complex
dry_run = !!(ARGV.delete('-n') || ARGV.delete('--dry-run'))
verbose = !!(ARGV.delete('-V') || ARGV.delete('--verbose'))

ARGV.size <= 1 or abort usage
name = ARGV[0] || "sox"

st_in = $stdin.stat

buf = c.req(%W(source cat #{name}))
abort(buf) if buf =~ /\AERR/
orig = YAML.load(buf)

if st_in.file? || st_in.pipe?
  buf = $stdin.read
else
  tmp = tmpyaml
  tmp.write(buf << DTAS_DISCLAIMER)
  cmd = "#{editor} #{tmp.path}"
  system(cmd) or abort "#{cmd} failed: #$?"
  buf = File.read(tmp.path)
end

source = YAML.load(buf)
cmd = %W(source ed #{name})
update_cmd_env(cmd, orig, source)

# nil OK
%w(tryorder command).each do |field|
  cmd << "#{field}=#{source[field]}"
end

if verbose || dry_run
  warn Shellwords.join(cmd)
end

c.req_ok(cmd) unless dry_run
debug log:

solving b411b11 ...
found b411b11 in https://80x24.org/dtas.git

everything related to duct tape audio suite (dtas)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://80x24.org/dtas-all
	git clone --mirror http://ou63pmih66umazou.onion/dtas-all

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 dtas-all dtas-all/ https://80x24.org/dtas-all \
		dtas-all@nongnu.org
	public-inbox-index dtas-all

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.dtas
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.dtas
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	dtas.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git