Hello community,
here is the log from the commit of package duc for openSUSE:Factory checked in at 2018-10-04 19:01:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/duc (Old)
and /work/SRC/openSUSE:Factory/.duc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "duc"
Thu Oct 4 19:01:27 2018 rev:2 rq:639719 version:1.4.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/duc/duc.changes 2018-02-27 17:00:14.667084936 +0100
+++ /work/SRC/openSUSE:Factory/.duc.new/duc.changes 2018-10-04 19:01:28.303204792 +0200
@@ -1,0 +2,12 @@
+Wed Oct 3 07:52:49 UTC 2018 - Michael Vetter
+
+- Update to 1.4.4:
+ * new: added --directory/-D option to 'duc ls' to allow listing of only directory itself (#196[1])
+ * new: 'duc ls' now handles multiple path arguments
+ * new: added 'o' key to duc-ui to pass current file to xdg-open
+ * new: added DPI handing for graph font size (#201[2])
+ * new: added '-a/--apparent' option to 'duc xml' (#171[3])
+ * fix: improved cairo and SVG graph rendering (#202[4])
+ * cha: changed license from GPL to LGPL (#190[5])
+
+-------------------------------------------------------------------
Old:
----
duc-1.4.3.tar.gz
New:
----
duc-1.4.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ duc.spec ++++++
--- /var/tmp/diff_new_pack.J6qUsJ/_old 2018-10-04 19:01:28.871204196 +0200
+++ /var/tmp/diff_new_pack.J6qUsJ/_new 2018-10-04 19:01:28.871204196 +0200
@@ -12,12 +12,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: duc
-Version: 1.4.3
+Version: 1.4.4
Release: 0
Summary: Collection of tools for inspecting and visualizing disk usage
License: LGPL-3.0-only
++++++ duc-1.4.3.tar.gz -> duc-1.4.4.tar.gz ++++++
++++ 2078 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/ChangeLog new/duc-1.4.4/ChangeLog
--- old/duc-1.4.3/ChangeLog 2017-01-02 09:23:18.000000000 +0100
+++ new/duc-1.4.4/ChangeLog 2018-09-28 11:13:41.000000000 +0200
@@ -1,4 +1,15 @@
+1.4.4 (2018-09-28)
+
+ - new: added --directory/-D option to 'duc ls' to allow listing
+ of only directory itself (#196)
+ - new: 'duc ls' now handles multiple path arguments
+ - new: added 'o' key to duc-ui to pass current file to xdg-open
+ - new: added DPI handing for graph font size (#201)
+ - new: added '-a/--apparent' option to 'duc xml' (#171)
+ - fix: improved cairo and SVG graph rendering (#202)
+ - cha: changed license from GPL to LGPL (#190)
+
1.4.3 (2017-01-02)
- fix: fixed mouse and tooltip coordinates in scrolled CGI
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/INSTALL new/duc-1.4.4/INSTALL
--- old/duc-1.4.3/INSTALL 2016-12-29 23:03:14.000000000 +0100
+++ new/duc-1.4.4/INSTALL 2018-08-20 19:33:39.000000000 +0200
@@ -76,6 +76,25 @@
1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667979
+When picking a backend you probably need to choose between speed, size and
+robustness. Some measurements on my system of a 372G directory with 1.6M files:
+
+----------------------------------
+ Database Run time Db size
+ (s) (kB)
+----------------------------------
+ tokyocabinet [*] 8.4 19.2
+ leveldb 7.1 31.5
+ sqlite3 13.5 71.1
+ lmdb 5.9 78.7
+ kyotocabinet 8.3 26.7
+----------------------------------
+
+[*] Tokyocabinet currenty is the default used by Duc because of the good
+compression and reasonable performance. A problem is that Tokyocabinet is not
+very stable and can create corrupt databases when interrupting the indexing. If
+this is a problem for you, choose a different db backend.
+
Graphics
--------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/configure.ac new/duc-1.4.4/configure.ac
--- old/duc-1.4.3/configure.ac 2017-01-02 09:23:24.000000000 +0100
+++ new/duc-1.4.4/configure.ac 2018-09-28 11:06:11.000000000 +0200
@@ -7,7 +7,7 @@
AC_PREREQ([2.13])
-AC_INIT([duc], [1.4.3], [duc@zevv.nl])
+AC_INIT([duc], [1.4.4], [duc@zevv.nl])
LIB_CURRENT=1
LIB_REVISION=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/doc/duc.1 new/duc-1.4.4/doc/duc.1
--- old/duc-1.4.3/doc/duc.1 2017-01-02 09:23:39.000000000 +0100
+++ new/duc-1.4.4/doc/duc.1 2018-09-28 11:09:49.000000000 +0200
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "DUC" "1" "January 2017" "" ""
+.TH "DUC" "1" "September 2018" "" ""
.
.SH "NAME"
\fBduc\fR \- index, query and graph disk usage
@@ -22,6 +22,9 @@
Duc comes with a command line tool called \fBduc\fR, which is used to create, maintain and query the disk usage database\. run \fBduc help\fR to get a list of available commands\. \fBduc help <subcommand>\fR describes the usage of a specific subcommand\. Run \fBduc help \-\-all\fR for an extensive list of all commands and their options\.
.
.P
+Some commands might not be available on your system, depending on the exact configuration chosen when building Duc\. (For example, the \fBduc gui\fR command is not available in the \fBduc\-nox\fR package on Debian and Ubuntu)
+.
+.P
Duc allows any option to be placed either on the command line or in a configuration file\. Options on the command line are preceded by a double\-leading\-dash (\fB\-\-option\fR), some options have a corresponding short option which can be used as well with a single leading dash\. (\fB\-o\fR)
.
.P
@@ -55,7 +58,7 @@
By default Duc indexes all directories it encounters during file system traversal, including special file systems like /proc and /sys, and network file systems like NFS or Samba mounts\. There are a few options to select what parts of your filesystem you want to include or exclude from the scan, check the documentation below for the options \-\-one\-file\-system, \-\-exclude, \-\-fs\-exclude and \-\-fs\-include for more details\.
.
.SH "QUERYING THE INDEX"
-Duc has various subcommands for querying or exploring the index:
+Duc has various subcommands for querying or exploring the index: (Note that depending on your configuration, some of these commands might not be available)
.
.IP "\(bu" 4
\fBduc info\fR shows a list of available directory trees in the database, and the time and date of the last scan\.
@@ -181,7 +184,7 @@
The \'ls\' subcommand queries the duc database and lists the inclusive size of all files and directories on the given path\. If no path is given the current working directory is listed\.
.
.P
-Options for command \fBduc ls [options] [PATH]\fR:
+Options for command \fBduc ls [options] [PATH]\.\.\.\fR:
.
.TP
\fB\-a\fR, \fB\-\-apparent\fR
@@ -212,6 +215,10 @@
select database file to use [~/\.duc\.db]
.
.TP
+\fB\-D\fR, \fB\-\-directory\fR
+list directory itself, not its contents
+.
+.TP
\fB\-\-dirs\-only\fR
list only directories, skip individual files
.
@@ -239,6 +246,10 @@
Options for command \fBduc xml [options] [PATH]\fR:
.
.TP
+\fB\-a\fR, \fB\-\-apparent\fR
+interpret min_size/\-s value as apparent size
+.
+.TP
\fB\-d\fR, \fB\-\-database=VAL\fR
select database file to use [~/\.duc\.db]
.
@@ -272,6 +283,10 @@
show number of files instead of file size
.
.TP
+\fB\-\-dpi=VAL\fR
+set destination resolution in DPI [96\.0]
+.
+.TP
\fB\-f\fR, \fB\-\-format=VAL\fR
select output format \fIpng|svg|pdf|html\fR [png]
.
@@ -327,6 +342,10 @@
select database file to use [~/\.duc\.db]
.
.TP
+\fB\-\-dpi=VAL\fR
+set destination resolution in DPI [96\.0]
+.
+.TP
\fB\-\-footer=VAL\fR
select HTML file to include as footer
.
@@ -455,6 +474,7 @@
c: Toggle between file size and file count
h: show help\. press \'q\' to return to the main screen
n: toggle sort order between \'size\' and \'name\'
+o: try to open the file using xdg\-open
q, escape: quit
.
.fi
@@ -551,7 +571,7 @@
.IP "" 0
.
.P
-The default mode used by duc is to use the \'actual size\'\. Most duc commands to report disk usage (\fBduc ls\fR, \fBduc graph\fR, \fBduc gui\fR, etc) have an option to change between these two modes (usually the \fB\-a\fR), in the gui tool use the \'a\' key to toggle\.
+The default mode used by duc is to use the \'actual size\'\. Most duc commands to report disk usage (\fBduc ls\fR, \fBduc graph\fR, \fBduc ui\fR, etc) have an option to change between these two modes (usually the \fB\-a\fR), or use the \'a\' key to toggle\.
.
.SH "BUILDING from git"
If you use git clone to pull down the latest release, you will have to do the following:
@@ -563,10 +583,7 @@
cd duc
.
.br
-aclocal
-.
-.br
-automake \-\-add\-missing \-c
+autoreconf \-i
.
.P
Then you can run the regular
@@ -685,7 +702,7 @@
.IP "" 0
.
.P
-The following sample configuration file defines default parameters for the \fBduc ls\fR and \fBduc gui\fR commands and defines a global option to configure the database path which is used by all subcommands
+The following sample configuration file defines default parameters for the \fBduc ls\fR and \fBduc ui\fR commands and defines a global option to configure the database path which is used by all subcommands
.
.IP "" 4
.
@@ -699,13 +716,9 @@
classify
color
-[gui]
-fuzz 0\.7
-palette rainbow
-levels 4
-
[ui]
-color
+no\-color
+apparent
.
.fi
.
@@ -725,6 +738,12 @@
.IP
By default Duc uses the Tokyocabinet database backend\. Tokyocabinet is pretty fast, stores the database in a single file and has nice compression support to keep the database small\. Unfortunately, it is not always robust and sometimes chokes on corrupt database files\. Try to remove the database and rebuild the index\. If the error persists contact the authors\.
.
+.IP "\(bu" 4
+Some of the Duc subcommands like \fBduc gui\fR are not available on my system?
+.
+.IP
+Depending on the configuration that was chosen when building Duc, some options might or might not be available in the \fBduc\fR utility\. For example, on Debian or Ubuntu Duc comes in two flavours: there is a full featured package called \fBduc\fR, or a package without dependencies on X\-windows called \fBduc\-nox\fR, for which the latter lacks the \fBduc gui\fR command\.
+.
.IP "" 0
.
.SH "FILES"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/doc/duc.1.html new/duc-1.4.4/doc/duc.1.html
--- old/duc-1.4.3/doc/duc.1.html 2017-01-02 09:23:39.000000000 +0100
+++ new/duc-1.4.4/doc/duc.1.html 2018-09-28 11:09:49.000000000 +0200
@@ -116,6 +116,10 @@
subcommand. Run <code>duc help --all</code> for an extensive list of all commands and
their options.</p>
+<p>Some commands might not be available on your system, depending on the exact
+configuration chosen when building Duc. (For example, the <code>duc gui</code> command is
+not available in the <code>duc-nox</code> package on Debian and Ubuntu)</p>
+
<p>Duc allows any option to be placed either on the command line or in a
configuration file. Options on the command line are preceded by a
double-leading-dash (<code>--option</code>), some options have a corresponding short
@@ -159,7 +163,8 @@
<h2 id="QUERYING-THE-INDEX">QUERYING THE INDEX</h2>
-<p>Duc has various subcommands for querying or exploring the index:</p>
+<p>Duc has various subcommands for querying or exploring the index: (Note that
+depending on your configuration, some of these commands might not be available)</p>
<ul>
<li><p><code>duc info</code> shows a list of available directory trees in the database, and the time
@@ -242,7 +247,7 @@
all files and directories on the given path. If no path is given the current
working directory is listed.</p>
-<p>Options for command <code>duc ls [options] [PATH]</code>:</p>
+<p>Options for command <code>duc ls [options] [PATH]...</code>:</p>
<dl>
<dt><code>-a</code>, <code>--apparent</code></dt><dd><p>show apparent instead of actual file size</p></dd>
@@ -252,6 +257,7 @@
<dt><code>-c</code>, <code>--color</code></dt><dd><p>colorize output (only on ttys)</p></dd>
<dt class="flush"><code>--count</code></dt><dd><p>show number of files instead of file size</p></dd>
<dt><code>-d</code>, <code>--database=VAL</code></dt><dd><p>select database file to use [~/.duc.db]</p></dd>
+<dt><code>-D</code>, <code>--directory</code></dt><dd><p>list directory itself, not its contents</p></dd>
<dt><code>--dirs-only</code></dt><dd><p>list only directories, skip individual files</p></dd>
<dt><code>--full-path</code></dt><dd><p>show full path instead of tree in recursive view</p></dd>
<dt><code>-g</code>, <code>--graph</code></dt><dd><p>draw graph with relative size for each entry</p></dd>
@@ -266,6 +272,7 @@
<p>Options for command <code>duc xml [options] [PATH]</code>:</p>
<dl>
+<dt><code>-a</code>, <code>--apparent</code></dt><dd><p>interpret min_size/-s value as apparent size</p></dd>
<dt><code>-d</code>, <code>--database=VAL</code></dt><dd><p>select database file to use [~/.duc.db]</p></dd>
<dt><code>-x</code>, <code>--exclude-files</code></dt><dd><p>exclude file from xml output, only include directories</p></dd>
<dt><code>-s</code>, <code>--min_size=VAL</code></dt><dd><p>specify min size for files or directories</p></dd>
@@ -288,6 +295,7 @@
<dt><code>-a</code>, <code>--apparent</code></dt><dd><p>Show apparent instead of actual file size</p></dd>
<dt><code>-d</code>, <code>--database=VAL</code></dt><dd><p>select database file to use [~/.duc.db]</p></dd>
<dt class="flush"><code>--count</code></dt><dd><p>show number of files instead of file size</p></dd>
+<dt><code>--dpi=VAL</code></dt><dd><p>set destination resolution in DPI [96.0]</p></dd>
<dt><code>-f</code>, <code>--format=VAL</code></dt><dd><p>select output format <var>png|svg|pdf|html</var> [png]</p></dd>
<dt><code>--fuzz=VAL</code></dt><dd><p>use radius fuzz factor when drawing graph [0.7]</p></dd>
<dt><code>--gradient</code></dt><dd><p>draw graph with color gradient</p></dd>
@@ -309,6 +317,7 @@
<dt class="flush"><code>--count</code></dt><dd><p>show number of files instead of file size</p></dd>
<dt><code>--css-url=VAL</code></dt><dd><p>url of CSS style sheet to use instead of default CSS</p></dd>
<dt><code>-d</code>, <code>--database=VAL</code></dt><dd><p>select database file to use [~/.duc.db]</p></dd>
+<dt><code>--dpi=VAL</code></dt><dd><p>set destination resolution in DPI [96.0]</p></dd>
<dt><code>--footer=VAL</code></dt><dd><p>select HTML file to include as footer</p></dd>
<dt><code>--fuzz=VAL</code></dt><dd><p>use radius fuzz factor when drawing graph [0.7]</p></dd>
<dt><code>--gradient</code></dt><dd><p>draw graph with color gradient</p></dd>
@@ -377,6 +386,7 @@
c: Toggle between file size and file count
h: show help. press 'q' to return to the main screen
n: toggle sort order between 'size' and 'name'
+o: try to open the file using xdg-open
q, escape: quit
</code></pre>
@@ -460,9 +470,9 @@
<p>The default mode used by duc is to use the 'actual size'. Most duc commands to
-report disk usage (<code>duc ls</code>, <code>duc graph</code>, <code>duc gui</code>, etc) have an option to
-change between these two modes (usually the <code>-a</code>), in the gui tool use the 'a'
-key to toggle.</p>
+report disk usage (<code>duc ls</code>, <code>duc graph</code>, <code>duc ui</code>, etc) have an option to
+change between these two modes (usually the <code>-a</code>), or use the 'a' key to
+toggle.</p>
<h2 id="BUILDING-from-git">BUILDING from git</h2>
@@ -471,8 +481,7 @@
<p> git clone https://github.com/zevv/duc<br />
cd duc<br />
- aclocal<br />
- automake --add-missing -c</p>
+ autoreconf -i</p>
<p>Then you can run the regular</p>
@@ -543,7 +552,7 @@
</code></pre>
<p>The following sample configuration file defines default parameters for the <code>duc
-ls</code> and <code>duc gui</code> commands and defines a global option to configure the database
+ls</code> and <code>duc ui</code> commands and defines a global option to configure the database
path which is used by all subcommands</p>
<pre><code>[global]
@@ -554,13 +563,9 @@
classify
color
-[gui]
-fuzz 0.7
-palette rainbow
-levels 4
-
[ui]
-color
+no-color
+apparent
</code></pre>
<h2 id="FREQUENTLY-ASKED-QUESTIONS">FREQUENTLY ASKED QUESTIONS</h2>
@@ -578,6 +583,13 @@
to keep the database small. Unfortunately, it is not always robust and
sometimes chokes on corrupt database files. Try to remove the database
and rebuild the index. If the error persists contact the authors.</p></li>
+<li><p>Some of the Duc subcommands like <code>duc gui</code> are not available on my system?</p>
+
+<p>Depending on the configuration that was chosen when building Duc, some
+options might or might not be available in the <code>duc</code> utility. For example, on
+Debian or Ubuntu Duc comes in two flavours: there is a full featured package
+called <code>duc</code>, or a package without dependencies on X-windows called
+<code>duc-nox</code>, for which the latter lacks the <code>duc gui</code> command.</p></li>
</ul>
@@ -593,8 +605,8 @@
<h2 id="AUTHORS">AUTHORS</h2>
<ul>
-<li>Ico Doornekamp <a href="mailto:duc@zevv.nl" data-bare-link="true">duc@zevv.nl</a></li>
-<li>John Stoffel <a href="mailto:john@stoffel.org" data-bare-link="true">john@stoffel.org</a></li>
+<li>Ico Doornekamp <a href="mailto:duc@zevv.nl" data-bare-link="true">duc@zevv.nl</a></li>
+<li>John Stoffel <a href="mailto:john@stoffel.org" data-bare-link="true">john@stoffel.org</a></li>
</ul>
@@ -612,7 +624,7 @@
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
- <li class='tc'>January 2017</li>
+ <li class='tc'>September 2018</li>
<li class='tr'>duc(1)</li>
</ol>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/doc/duc.md new/duc-1.4.4/doc/duc.md
--- old/duc-1.4.3/doc/duc.md 2017-01-02 09:23:38.000000000 +0100
+++ new/duc-1.4.4/doc/duc.md 2018-09-28 11:09:49.000000000 +0200
@@ -27,6 +27,10 @@
subcommand. Run `duc help --all` for an extensive list of all commands and
their options.
+Some commands might not be available on your system, depending on the exact
+configuration chosen when building Duc. (For example, the `duc gui` command is
+not available in the `duc-nox` package on Debian and Ubuntu)
+
Duc allows any option to be placed either on the command line or in a
configuration file. Options on the command line are preceded by a
double-leading-dash (`--option`), some options have a corresponding short
@@ -71,7 +75,8 @@
## QUERYING THE INDEX
-Duc has various subcommands for querying or exploring the index:
+Duc has various subcommands for querying or exploring the index: (Note that
+depending on your configuration, some of these commands might not be available)
* `duc info` shows a list of available directory trees in the database, and the time
and date of the last scan.
@@ -191,7 +196,7 @@
working directory is listed.
-Options for command `duc ls [options] [PATH]`:
+Options for command `duc ls [options] [PATH]...`:
* `-a`, `--apparent`:
show apparent instead of actual file size
@@ -214,6 +219,9 @@
* `-d`, `--database=VAL`:
select database file to use [~/.duc.db]
+ * `-D`, `--directory`:
+ list directory itself, not its contents
+
* `--dirs-only`:
list only directories, skip individual files
@@ -236,6 +244,9 @@
Options for command `duc xml [options] [PATH]`:
+ * `-a`, `--apparent`:
+ interpret min_size/-s value as apparent size
+
* `-d`, `--database=VAL`:
select database file to use [~/.duc.db]
@@ -267,6 +278,9 @@
* `--count`:
show number of files instead of file size
+ * `--dpi=VAL`:
+ set destination resolution in DPI [96.0]
+
* `-f`, `--format=VAL`:
select output format [png]
@@ -311,6 +325,9 @@
* `-d`, `--database=VAL`:
select database file to use [~/.duc.db]
+ * `--dpi=VAL`:
+ set destination resolution in DPI [96.0]
+
* `--footer=VAL`:
select HTML file to include as footer
@@ -415,6 +432,7 @@
c: Toggle between file size and file count
h: show help. press 'q' to return to the main screen
n: toggle sort order between 'size' and 'name'
+ o: try to open the file using xdg-open
q, escape: quit
@@ -502,9 +520,9 @@
multiple of 512 bytes.
The default mode used by duc is to use the 'actual size'. Most duc commands to
-report disk usage (`duc ls`, `duc graph`, `duc gui`, etc) have an option to
-change between these two modes (usually the `-a`), in the gui tool use the 'a'
-key to toggle.
+report disk usage (`duc ls`, `duc graph`, `duc ui`, etc) have an option to
+change between these two modes (usually the `-a`), or use the 'a' key to
+toggle.
## BUILDING from git
@@ -513,8 +531,7 @@
git clone https://github.com/zevv/duc
cd duc
- aclocal
- automake --add-missing -c
+ autoreconf -i
Then you can run the regular
@@ -582,7 +599,7 @@
The following sample configuration file defines default parameters for the `duc
-ls` and `duc gui` commands and defines a global option to configure the database
+ls` and `duc ui` commands and defines a global option to configure the database
path which is used by all subcommands
[global]
@@ -593,13 +610,10 @@
classify
color
- [gui]
- fuzz 0.7
- palette rainbow
- levels 4
-
[ui]
- color
+ no-color
+ apparent
+
## FREQUENTLY ASKED QUESTIONS
@@ -617,6 +631,14 @@
sometimes chokes on corrupt database files. Try to remove the database
and rebuild the index. If the error persists contact the authors.
+* Some of the Duc subcommands like `duc gui` are not available on my system?
+
+ Depending on the configuration that was chosen when building Duc, some
+ options might or might not be available in the `duc` utility. For example, on
+ Debian or Ubuntu Duc comes in two flavours: there is a full featured package
+ called `duc`, or a package without dependencies on X-windows called
+ `duc-nox`, for which the latter lacks the `duc gui` command.
+
## FILES
At startup duc tries to read its configuration from three locations in this
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/duc/cmd-cgi.c new/duc-1.4.4/src/duc/cmd-cgi.c
--- old/duc-1.4.3/src/duc/cmd-cgi.c 2017-01-01 20:25:55.000000000 +0100
+++ new/duc-1.4.4/src/duc/cmd-cgi.c 2018-09-13 08:47:12.000000000 +0200
@@ -37,6 +37,7 @@
static char *opt_palette = NULL;
static bool opt_tooltip = false;
static int opt_ring_gap = 4;
+static double opt_dpi = 96.0;
static struct param *param_list = NULL;
@@ -249,7 +250,6 @@
);
}
-
static void include_file(const char *fname)
{
FILE *f = fopen(fname, "rb");
@@ -267,10 +267,34 @@
}
-static void do_index(duc *duc, duc_graph *graph, duc_dir *dir)
+static void print_html_header(const char *path)
{
+ printf(
+ "Content-Type: text/html\n"
+ "\n"
+ "<!DOCTYPE html>\n"
+ "<head>\n"
+ " \n"
+ );
+
+ if(opt_css_url) {
+ printf("\n", opt_css_url);
+ } else {
+ print_css();
+ }
+
+ if(path) {
+ print_script(path);
+ }
+
+ printf("</head>\n");
+ printf("<body>\n");
+
+ include_file(opt_header);
+}
-
+static void do_index(duc *duc, duc_graph *graph, duc_dir *dir)
+{
char *path = cgi_get("path");
char *script = getenv("SCRIPT_NAME");
if(!script) return;
@@ -278,6 +302,9 @@
char url[DUC_PATH_MAX];
snprintf(url, sizeof url, "%s?cmd=index", script);
+ /* If 'x' and 'y' CGI parameters are given, lookup the new path in the
+ * database. If found, generate a HTTP redirect to the new path. */
+
char *xs = cgi_get("x");
char *ys = cgi_get("y");
@@ -290,34 +317,17 @@
if(dir2) {
dir = dir2;
path = duc_dir_get_path(dir);
+ printf("Status: 302 Found\n");
+ printf("Location: ?path=%s\n", path);
+ printf("\n");
+ return;
}
}
struct duc_index_report *report;
int i = 0;
- printf(
- "Content-Type: text/html\n"
- "\n"
- "<!DOCTYPE html>\n"
- "<head>\n"
- " \n"
- );
-
- if(opt_css_url) {
- printf("\n", opt_css_url);
- } else {
- print_css();
- }
-
- if(path) {
- print_script(path);
- }
-
- printf("</head>\n");
- printf("<body>\n");
-
- include_file(opt_header);
+ print_html_header(path);
printf("<div id=main>\n");
printf("<div id=index>");
@@ -517,6 +527,7 @@
duc_graph *graph = duc_graph_new_html(duc, stdout, 0);
duc_graph_set_size(graph, opt_size, opt_size);
+ duc_graph_set_dpi(graph, opt_dpi);
duc_graph_set_max_level(graph, opt_levels);
duc_graph_set_fuzz(graph, opt_fuzz);
duc_graph_set_palette(graph, palette);
@@ -540,6 +551,7 @@
{ &opt_count, "count", 0, DUCRC_TYPE_BOOL, "show number of files instead of file size" },
{ &opt_css_url, "css-url", 0, DUCRC_TYPE_STRING, "url of CSS style sheet to use instead of default CSS" },
{ &opt_database, "database", 'd', DUCRC_TYPE_STRING, "select database file to use [~/.duc.db]" },
+ { &opt_dpi, "dpi", 0 , DUCRC_TYPE_DOUBLE, "set destination resolution in DPI [96.0]" },
{ &opt_footer, "footer", 0, DUCRC_TYPE_STRING, "select HTML file to include as footer" },
{ &opt_fuzz, "fuzz", 0, DUCRC_TYPE_DOUBLE, "use radius fuzz factor when drawing graph [0.7]" },
{ &opt_gradient, "gradient", 0, DUCRC_TYPE_BOOL, "draw graph with color gradient" },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/duc/cmd-graph.c new/duc-1.4.4/src/duc/cmd-graph.c
--- old/duc-1.4.3/src/duc/cmd-graph.c 2016-12-28 22:44:27.000000000 +0100
+++ new/duc-1.4.4/src/duc/cmd-graph.c 2018-09-28 11:00:24.000000000 +0200
@@ -27,6 +27,7 @@
static enum duc_graph_palette palette = 0;
static int opt_ring_gap = 4;
static bool opt_gradient = false;
+static double opt_dpi = 96.0;
#ifdef ENABLE_CAIRO
static char *opt_format = "png";
@@ -119,6 +120,7 @@
opt_apparent ? DUC_SIZE_TYPE_APPARENT : DUC_SIZE_TYPE_ACTUAL;
duc_graph_set_size(graph, opt_size, opt_size);
+ duc_graph_set_dpi(graph, opt_dpi);
duc_graph_set_fuzz(graph, opt_fuzz);
duc_graph_set_max_level(graph, opt_levels);
duc_graph_set_palette(graph, palette);
@@ -140,6 +142,7 @@
{ &opt_apparent, "apparent", 'a', DUCRC_TYPE_BOOL, "Show apparent instead of actual file size" },
{ &opt_database, "database", 'd', DUCRC_TYPE_STRING, "select database file to use [~/.duc.db]" },
{ &opt_count, "count", 0, DUCRC_TYPE_BOOL, "show number of files instead of file size" },
+ { &opt_dpi, "dpi", 0 , DUCRC_TYPE_DOUBLE, "set destination resolution in DPI [96.0]" },
{ &opt_format, "format", 'f', DUCRC_TYPE_STRING,
#ifdef ENABLE_CAIRO
"select output format [png]" },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/duc/cmd-gui.c new/duc-1.4.4/src/duc/cmd-gui.c
--- old/duc-1.4.3/src/duc/cmd-gui.c 2016-12-28 22:44:52.000000000 +0100
+++ new/duc-1.4.4/src/duc/cmd-gui.c 2018-09-14 11:53:17.000000000 +0200
@@ -260,10 +260,15 @@
cs = cairo_xlib_surface_create(dpy, win, DefaultVisual(dpy, 0), win_w, win_h);
cr = cairo_create(cs);
-
-
graph = duc_graph_new_cairo(duc, cr);
+ int w_px = DisplayWidth(dpy, 0);
+ int w_mm = DisplayWidthMM(dpy, 0);
+ if(w_px && w_mm) {
+ double dpi = 25.4 * w_px / w_mm;
+ duc_graph_set_dpi(graph, dpi);
+ }
+
do_gui(duc, graph, dir);
duc_dir_close(dir);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/duc/cmd-guigl.c new/duc-1.4.4/src/duc/cmd-guigl.c
--- old/duc-1.4.3/src/duc/cmd-guigl.c 2016-12-28 22:45:13.000000000 +0100
+++ new/duc-1.4.4/src/duc/cmd-guigl.c 2018-09-13 09:00:58.000000000 +0200
@@ -201,6 +201,18 @@
sc2fb(window, &font_scale, NULL);
graph = duc_graph_new_opengl(duc, font_scale);
+ GLFWmonitor* mon = glfwGetPrimaryMonitor();
+ const GLFWvidmode* mode = glfwGetVideoMode(mon);
+ if(mode) {
+ int w_mm = 0, h_mm = 0;
+ glfwGetMonitorPhysicalSize(mon, &w_mm, &h_mm);
+ if(mode && mode->width && w_mm) {
+ double dpi = 25.4 * mode->width / w_mm;
+ printf("dpi %f\n", dpi);
+ duc_graph_set_dpi(graph, dpi);
+ }
+ }
+
glfwSetKeyCallback(window, cb_keyboard);
glfwSetFramebufferSizeCallback(window, cb_winsize);
glfwSetMouseButtonCallback(window, cb_mouse_button);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/duc/cmd-ls.c new/duc-1.4.4/src/duc/cmd-ls.c
--- old/duc-1.4.3/src/duc/cmd-ls.c 2016-12-31 22:26:28.000000000 +0100
+++ new/duc-1.4.4/src/duc/cmd-ls.c 2018-09-08 21:27:41.000000000 +0200
@@ -47,6 +47,7 @@
static bool opt_ascii = false;
static bool opt_bytes = false;
static bool opt_classify = false;
+static bool opt_directory = false;
static bool opt_color = false;
static bool opt_full_path = false;
static int width = 80;
@@ -191,11 +192,49 @@
}
-static int ls_main(duc *duc, int argc, char **argv)
+/*
+ * Show size of this directory only
+ */
+
+static void ls_dir_only(const char *path, duc_dir *dir)
{
- char *path = ".";
- if(argc > 0) path = argv[0];
+ struct duc_size size;
+ char siz[32];
+
+ duc_size_type st = opt_count ? DUC_SIZE_TYPE_COUNT :
+ opt_apparent ? DUC_SIZE_TYPE_APPARENT : DUC_SIZE_TYPE_ACTUAL;
+ duc_dir_get_size(dir, &size);
+ duc_human_size(&size, st, opt_bytes, siz, sizeof siz);
+
+ printf("%s %s", siz, path);
+
+ if(opt_classify) {
+ putchar('/');
+ }
+ putchar('\n');
+}
+
+
+static void do_one(struct duc *duc, const char *path)
+{
+ duc_dir *dir = duc_dir_open(duc, path);
+ if(dir == NULL) {
+ duc_log(duc, DUC_LOG_FTL, "%s", duc_strerror(duc));
+ }
+
+ if(opt_directory) {
+ ls_dir_only(path, dir);
+ } else {
+ ls_one(dir, 0, 0);
+ }
+
+ duc_dir_close(dir);
+}
+
+
+static int ls_main(duc *duc, int argc, char **argv)
+{
/* Get terminal width */
#ifdef TIOCGWINSZ
@@ -226,15 +265,15 @@
return -1;
}
- duc_dir *dir = duc_dir_open(duc, path);
- if(dir == NULL) {
- duc_log(duc, DUC_LOG_FTL, "%s", duc_strerror(duc));
- return -1;
+ if(argc > 0) {
+ int i;
+ for(i=0; itype == DUC_FILE_TYPE_DIR) {
dir2 = duc_dir_openent(dir, e);
if(dir2) {
@@ -262,6 +263,21 @@
}
}
break;
+ case 'o':
+ duc_dir_seek(dir, cur);
+ e = duc_dir_read(dir, st, sort);
+ if(e) {
+ char cmd[DUC_PATH_MAX] = "true";
+ char *path = duc_dir_get_path(dir);
+ if(path) {
+ snprintf(cmd, sizeof(cmd), "xdg-open \"%s/%s\"", path, e->name);
+ free(path);
+ }
+ endwin();
+ system(cmd);
+ doupdate();
+ }
+ break;
default:
break;
}
@@ -356,6 +372,7 @@
" c: Toggle between file size and file count\n"
" h: show help. press 'q' to return to the main screen\n"
" n: toggle sort order between 'size' and 'name'\n"
+ " o: try to open the file using xdg-open\n"
" q, escape: quit\n"
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/duc/cmd-xml.c new/duc-1.4.4/src/duc/cmd-xml.c
--- old/duc-1.4.3/src/duc/cmd-xml.c 2016-12-28 22:46:58.000000000 +0100
+++ new/duc-1.4.4/src/duc/cmd-xml.c 2017-01-20 20:58:59.000000000 +0100
@@ -14,6 +14,7 @@
#include "duc.h"
+static bool opt_apparent = false;
static char *opt_database = NULL;
static double opt_min_size = 0;
static bool opt_exclude_files = false;
@@ -56,9 +57,13 @@
{
struct duc_dirent *e;
+ duc_size_type st = opt_apparent ? DUC_SIZE_TYPE_APPARENT : DUC_SIZE_TYPE_ACTUAL;
+
while( (e = duc_dir_read(dir, DUC_SIZE_TYPE_ACTUAL, DUC_SORT_SIZE)) != NULL) {
- if(e->type == DUC_FILE_TYPE_DIR && e->size.apparent >= min_size) {
+ off_t size = duc_get_size(&e->size, st);
+
+ if(e->type == DUC_FILE_TYPE_DIR && size>= min_size) {
duc_dir *dir_child = duc_dir_openent(dir, e);
if(dir_child) {
indent(depth);
@@ -70,7 +75,7 @@
printf("</ent>\n");
}
} else {
- if(!ex_files && e->size.apparent >= min_size) {
+ if(!ex_files && size >= min_size) {
indent(depth);
printf("name);
@@ -116,6 +121,7 @@
static struct ducrc_option options[] = {
+ { &opt_apparent, "apparent", 'a', DUCRC_TYPE_BOOL, "interpret min_size/-s value as apparent size" },
{ &opt_database, "database", 'd', DUCRC_TYPE_STRING, "select database file to use [~/.duc.db]" },
{ &opt_exclude_files, "exclude-files", 'x', DUCRC_TYPE_BOOL, "exclude file from xml output, only include directories" },
{ &opt_min_size, "min_size", 's', DUCRC_TYPE_DOUBLE, "specify min size for files or directories" },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/libduc/index.c new/duc-1.4.4/src/libduc/index.c
--- old/duc-1.4.3/src/libduc/index.c 2017-01-02 09:21:31.000000000 +0100
+++ new/duc-1.4.4/src/libduc/index.c 2018-05-14 08:51:43.000000000 +0200
@@ -370,7 +370,7 @@
scanner->ent.type = DUC_FILE_TYPE_DIR,
st_to_devino(st, &scanner->ent.devino);
st_to_size(st, &scanner->ent.size);
-
+ scanner->ent.size.apparent = 0;
buffer_put_dir(scanner->buffer, &devino_parent, st->st_mtime);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/libduc-graph/duc-graph.h new/duc-1.4.4/src/libduc-graph/duc-graph.h
--- old/duc-1.4.3/src/libduc-graph/duc-graph.h 2016-11-09 21:22:25.000000000 +0100
+++ new/duc-1.4.4/src/libduc-graph/duc-graph.h 2018-09-13 08:39:07.000000000 +0200
@@ -41,6 +41,7 @@
void duc_graph_set_max_level(duc_graph *g, int max_level);
void duc_graph_set_size(duc_graph *g, int w, int h);
+void duc_graph_set_dpi(duc_graph *g, double dpi);
void duc_graph_set_position(duc_graph *g, double x, double y);
void duc_graph_set_tooltip(duc_graph *g, double x, double y);
void duc_graph_set_palette(duc_graph *g, enum duc_graph_palette p);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/libduc-graph/graph-cairo.c new/duc-1.4.4/src/libduc-graph/graph-cairo.c
--- old/duc-1.4.3/src/libduc-graph/graph-cairo.c 2016-12-30 08:27:51.000000000 +0100
+++ new/duc-1.4.4/src/libduc-graph/graph-cairo.c 2017-05-09 14:41:39.000000000 +0200
@@ -195,7 +195,7 @@
}
cairo_set_source(cr, pat);
- cairo_fill_preserve(cr);
+ cairo_fill(cr);
cairo_pattern_destroy(pat);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/libduc-graph/graph-private.h new/duc-1.4.4/src/libduc-graph/graph-private.h
--- old/duc-1.4.3/src/libduc-graph/graph-private.h 2016-12-30 08:36:51.000000000 +0100
+++ new/duc-1.4.4/src/libduc-graph/graph-private.h 2018-09-13 08:42:14.000000000 +0200
@@ -31,6 +31,8 @@
struct duc *duc;
double size;
+ double dpi;
+ double font_scale;
double cx, cy;
double pos_x, pos_y;
double width, height;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/duc-1.4.3/src/libduc-graph/graph-svg.c new/duc-1.4.4/src/libduc-graph/graph-svg.c
--- old/duc-1.4.3/src/libduc-graph/graph-svg.c 2016-12-30 08:27:45.000000000 +0100
+++ new/duc-1.4.4/src/libduc-graph/graph-svg.c 2018-09-28 11:00:15.000000000 +0200
@@ -36,8 +36,9 @@
fprintf(f, "<?xml version='1.0' standalone='no'?>\n");
fprintf(f, "<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' \n");
fprintf(f, " 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>\n");
- fprintf(f, "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink= 'http://www.w3.org/1999/xlink'>\n");
-
+ fprintf(f, "