]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index 6e281cb80e9c25954b84b0634d55277b10686069..94d25780246ea253fc053f4bb432056989822b42 100644 (file)
@@ -6,6 +6,123 @@
                 <link>http://www.hungry.com/~pere/blog/</link>
                 <atom:link href="http://www.hungry.com/~pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
+       <item>
+               <title>What is the most supported MIME type in Debian in 2025?</title>
+               <link>http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2025_.html</link>
+               <guid isPermaLink="true">http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2025_.html</guid>
+                <pubDate>Sat, 18 Jan 2025 10:30:00 +0100</pubDate>
+               <description>&lt;p&gt;&lt;a href=&quot;http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html&quot;&gt;Seven&lt;/a&gt;
+and
+&lt;a href=&quot;http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html&quot;&gt;twelve&lt;/a&gt;
+years ago, I measured what the most supported MIME type in Debian
+was&lt;/a&gt;, first by analysing the desktop files in all packages in the
+archive, then by analysing the DEP-11 AppStream data set.  I guess it
+is time to repeat the measurement, only for unstable as last time:&lt;/p&gt;
+
+&lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
+
+&lt;pre&gt;
+  count MIME type
+  ----- -----------------------
+     63 image/png
+     63 image/jpeg
+     57 image/tiff
+     54 image/gif
+     51 image/bmp
+     50 audio/mpeg
+     48 text/plain
+     42 audio/x-mp3
+     40 application/ogg
+     39 audio/x-wav
+     39 audio/x-flac
+     36 audio/x-vorbis+ogg
+     35 audio/x-mpeg
+     34 audio/x-mpegurl
+     34 audio/ogg
+     33 application/x-ogg
+     32 audio/mp4
+     31 audio/x-scpls
+     31 application/pdf
+     29 audio/x-ms-wma
+&lt;/pre&gt;
+
+&lt;p&gt;The list was created like this using a sid chroot:&lt;/p&gt;
+
+&lt;pre&gt;
+cat /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz | \
+  zcat | awk &#39;/^  - \S+\/\S+$/ {print $2 }&#39; | sort | \
+  uniq -c | sort -nr | head -20
+&lt;/pre&gt;
+
+&lt;p&gt;It is nice to see that the same number of packages now support PNG
+and JPEG.  Last time JPEG had more support than PNG.  Most of the MIME
+types are known to me, but the &#39;audio/x-scpls&#39; one I have no idea what
+represent, except it being an audio format.  To find the packages
+claiming support for this format, the appstreamcli command from the
+appstream package can be used:
+
+&lt;pre&gt;
+% appstreamcli what-provides mediatype audio/x-scpls | grep Package: | sort -u
+Package: alsaplayer-common
+Package: amarok
+Package: audacious
+Package: brasero
+Package: celluloid
+Package: clapper
+Package: clementine
+Package: cynthiune.app
+Package: elisa
+Package: gtranscribe
+Package: kaffeine
+Package: kmplayer
+Package: kylin-burner
+Package: lollypop
+Package: mediaconch-gui
+Package: mediainfo-gui
+Package: mplayer-gui
+Package: mpv
+Package: mystiq
+Package: parlatype
+Package: parole
+Package: pragha
+Package: qmmp
+Package: rhythmbox
+Package: sayonara
+Package: shotcut
+Package: smplayer
+Package: soundconverter
+Package: strawberry
+Package: syncplay
+Package: vlc
+%
+&lt;/pre&gt;
+
+&lt;p&gt;Look like several video and auto tools understand the format.
+Similarly one can check out the number of packages supporting the STL
+format commonly used for 3D printing:&lt;/p&gt;
+
+&lt;pre&gt;
+% appstreamcli what-provides mediatype model/stl | grep Package: | sort -u
+Package: cura
+Package: freecad
+Package: open3d-viewer
+%
+&lt;/pre&gt;
+
+&lt;p&gt;How strange the
+&lt;a href=&quot;https://tracker.debian.org/pkg/slic3r&quot;&gt;slic3r&lt;/a&gt; and
+&lt;a href=&quot;https://tracker.debian.org/pkg/slic3r-prusa&quot;&gt;prusa-slicer&lt;/a&gt;
+packages do not support STL.  Perhaps just missing package metadata?
+Luckily the amount of package metadata in Debian is getting better,
+and hopefully this way of locating relevant packages for any file
+format will be the preferred one soon.
+
+&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
        <item>
                <title>The 2025 LinuxCNC Norwegian developer gathering</title>
                <link>http://www.hungry.com/~pere/blog/The_2025_LinuxCNC_Norwegian_developer_gathering.html</link>
@@ -609,154 +726,6 @@ three times in the begin before I remembered my mistake.&lt;/p&gt;
 &lt;p&gt;So, if you are a Debian Developer and got some spare time, perhaps
 considering migrating some orphaned packages to git?&lt;/p&gt;
 
-&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
-activities, please send Bitcoin donations to my address
-&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
-</description>
-       </item>
-       
-       <item>
-               <title>Plain text accounting file from your bitcoin transactions</title>
-               <link>http://www.hungry.com/~pere/blog/Plain_text_accounting_file_from_your_bitcoin_transactions.html</link>
-               <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Plain_text_accounting_file_from_your_bitcoin_transactions.html</guid>
-                <pubDate>Thu, 7 Mar 2024 18:00:00 +0100</pubDate>
-               <description>&lt;p&gt;A while back I wrote a small script to extract the Bitcoin
-transactions in a wallet in the
-&lt;ahref=&quot;https://plaintextaccounting.org/&quot;&gt;ledger plain text accounting
-format&lt;/a&gt;.  The last few days I spent some time to get it working
-better with more special cases.  In case it can be useful for others,
-here is a copy:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
-#!/usr/bin/python3
-#  -*- coding: utf-8 -*-
-#  Copyright (c) 2023-2024 Petter Reinholdtsen
-
-from decimal import Decimal
-import json
-import subprocess
-import time
-
-import numpy
-
-def format_float(num):
-    return numpy.format_float_positional(num, trim=&#39;-&#39;)
-
-accounts = {
-    u&#39;amount&#39; : &#39;Assets:BTC:main&#39;,
-}
-
-addresses = {
-    &#39;&lt;some address&gt;&#39; : &#39;Assets:bankkonto&#39;,
-    &#39;&lt;some address&gt;&#39; : &#39;Assets:bankkonto&#39;,
-}
-
-def exec_json(cmd):
-    proc = subprocess.Popen(cmd,stdout=subprocess.PIPE)
-    j = json.loads(proc.communicate()[0], parse_float=Decimal)
-    return j
-
-def list_txs():
-    # get all transactions for all accounts / addresses
-    c = 0
-    txs = []
-    txidfee = {}
-    limit=100000
-    cmd = [&#39;bitcoin-cli&#39;, &#39;listtransactions&#39;, &#39;*&#39;, str(limit)]
-    if True:
-        txs.extend(exec_json(cmd))
-    else:
-        # Useful for debugging
-        with open(&#39;transactions.json&#39;) as f:
-            txs.extend(json.load(f, parse_float=Decimal))
-    #print txs
-    for tx in sorted(txs, key=lambda a: a[&#39;time&#39;]):
-#        print tx[&#39;category&#39;]
-        if &#39;abandoned&#39; in tx and tx[&#39;abandoned&#39;]:
-            continue
-        if &#39;confirmations&#39; in tx and 0 &gt;= tx[&#39;confirmations&#39;]:
-            continue
-        when = time.strftime(&#39;%Y-%m-%d %H:%M&#39;, time.localtime(tx[&#39;time&#39;]))
-        if &#39;message&#39; in tx:
-            desc = tx[&#39;message&#39;]
-        elif &#39;comment&#39; in tx:
-            desc = tx[&#39;comment&#39;]
-        elif &#39;label&#39; in tx:
-            desc = tx[&#39;label&#39;]
-        else:
-            desc = &#39;n/a&#39;
-        print(&quot;%s %s&quot; % (when, desc))
-        if &#39;address&#39; in tx:
-            print(&quot;  ; to bitcoin address %s&quot; % tx[&#39;address&#39;])
-        else:
-            print(&quot;  ; missing address in transaction, txid=%s&quot; % tx[&#39;txid&#39;])
-        print(f&quot;  ; amount={tx[&#39;amount&#39;]}&quot;)
-        if &#39;fee&#39;in tx:
-            print(f&quot;  ; fee={tx[&#39;fee&#39;]}&quot;)
-        for f in accounts.keys():
-            if f in tx and Decimal(0) != tx[f]:
-                amount = tx[f]
-                print(&quot;  %-20s   %s BTC&quot; % (accounts[f], format_float(amount)))
-        if &#39;fee&#39; in tx and Decimal(0) != tx[&#39;fee&#39;]:
-            # Make sure to list fee used in several transactions only once.
-            if &#39;fee&#39; in tx and tx[&#39;txid&#39;] in txidfee \
-               and tx[&#39;fee&#39;] == txidfee[tx[&#39;txid&#39;]]:
-                True
-            else:
-                fee = tx[&#39;fee&#39;]
-                print(&quot;  %-20s   %s BTC&quot; % (accounts[&#39;amount&#39;], format_float(fee)))
-                print(&quot;  %-20s   %s BTC&quot; % (&#39;Expences:BTC-fee&#39;, format_float(-fee)))
-                txidfee[tx[&#39;txid&#39;]] = tx[&#39;fee&#39;]
-
-        if &#39;address&#39; in tx and tx[&#39;address&#39;] in addresses:
-            print(&quot;  %s&quot; % addresses[tx[&#39;address&#39;]])
-        else:
-            if &#39;generate&#39; == tx[&#39;category&#39;]:
-                print(&quot;  Income:BTC-mining&quot;)
-            else:
-                if amount &lt; Decimal(0):
-                    print(f&quot;  Assets:unknown:sent:update-script-addr-{tx[&#39;address&#39;]}&quot;)
-                else:
-                    print(f&quot;  Assets:unknown:received:update-script-addr-{tx[&#39;address&#39;]}&quot;)
-
-        print()
-        c = c + 1
-    print(&quot;# Found %d transactions&quot; % c)
-    if limit == c:
-        print(f&quot;# Warning: Limit {limit} reached, consider increasing limit.&quot;)
-
-def main():
-    list_txs()
-
-main()
-&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;It is more of a proof of concept, and I do not expect it to handle
-all edge cases, but it worked for me, and perhaps you can find it
-useful too.&lt;/p&gt;
-
-&lt;p&gt;To get a more interesting result, it is useful to map accounts sent
-to or received from to accounting accounts, using the
-&lt;tt&gt;addresses&lt;/tt&gt; hash.  As these will be very context dependent, I
-leave out my list to allow each user to fill out their own list of
-accounts.  Out of the box, &#39;ledger reg BTC:main&#39; should be able to
-show the amount of BTCs present in the wallet at any given time in the
-past.  For other and more valuable analysis, a account plan need to be
-set up in the &lt;tt&gt;addresses&lt;/tt&gt; hash.  Here is an example
-transaction:&lt;/p&gt;
-
-&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
-2024-03-07 17:00 Donated to good cause
-    Assets:BTC:main                           -0.1 BTC
-    Assets:BTC:main                       -0.00001 BTC
-    Expences:BTC-fee                       0.00001 BTC
-    Expences:donations                         0.1 BTC
-&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
-
-&lt;p&gt;It need a running Bitcoin Core daemon running, as it connect to it
-using &lt;tt&gt;bitcoin-cli listtransactions * 100000&lt;/tt&gt; to extract the
-transactions listed in the Wallet.&lt;/p&gt;
-
 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
 activities, please send Bitcoin donations to my address
 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;