X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/e214b5a29252b8865326627d027c51bbe65189e5..c43ce1efcd589ee0ea838d34c011366b1e3bc46a:/blog/index.rss diff --git a/blog/index.rss b/blog/index.rss index 6e281cb80e..94d2578024 100644 --- a/blog/index.rss +++ b/blog/index.rss @@ -6,6 +6,123 @@ http://www.hungry.com/~pere/blog/ + + What is the most supported MIME type in Debian in 2025? + http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2025_.html + http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2025_.html + Sat, 18 Jan 2025 10:30:00 +0100 + <p><a href="http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html">Seven</a> +and +<a href="http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html">twelve</a> +years ago, I measured what the most supported MIME type in Debian +was</a>, 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:</p> + +<p><strong>Debian Unstable:</strong></p> + +<pre> + 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 +</pre> + +<p>The list was created like this using a sid chroot:</p> + +<pre> +cat /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz | \ + zcat | awk '/^ - \S+\/\S+$/ {print $2 }' | sort | \ + uniq -c | sort -nr | head -20 +</pre> + +<p>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 'audio/x-scpls' 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: + +<pre> +% 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 +% +</pre> + +<p>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:</p> + +<pre> +% appstreamcli what-provides mediatype model/stl | grep Package: | sort -u +Package: cura +Package: freecad +Package: open3d-viewer +% +</pre> + +<p>How strange the +<a href="https://tracker.debian.org/pkg/slic3r">slic3r</a> and +<a href="https://tracker.debian.org/pkg/slic3r-prusa">prusa-slicer</a> +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. + +<p>As usual, if you use Bitcoin and want to show your support of my +activities, please send Bitcoin donations to my address +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p> + + + The 2025 LinuxCNC Norwegian developer gathering http://www.hungry.com/~pere/blog/The_2025_LinuxCNC_Norwegian_developer_gathering.html @@ -609,154 +726,6 @@ three times in the begin before I remembered my mistake.</p> <p>So, if you are a Debian Developer and got some spare time, perhaps considering migrating some orphaned packages to git?</p> -<p>As usual, if you use Bitcoin and want to show your support of my -activities, please send Bitcoin donations to my address -<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p> - - - - - Plain text accounting file from your bitcoin transactions - http://www.hungry.com/~pere/blog/Plain_text_accounting_file_from_your_bitcoin_transactions.html - http://www.hungry.com/~pere/blog/Plain_text_accounting_file_from_your_bitcoin_transactions.html - Thu, 7 Mar 2024 18:00:00 +0100 - <p>A while back I wrote a small script to extract the Bitcoin -transactions in a wallet in the -<ahref="https://plaintextaccounting.org/">ledger plain text accounting -format</a>. 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:</p> - -<p><blockquote><pre> -#!/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='-') - -accounts = { - u'amount' : 'Assets:BTC:main', -} - -addresses = { - '<some address>' : 'Assets:bankkonto', - '<some address>' : 'Assets:bankkonto', -} - -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 = ['bitcoin-cli', 'listtransactions', '*', str(limit)] - if True: - txs.extend(exec_json(cmd)) - else: - # Useful for debugging - with open('transactions.json') as f: - txs.extend(json.load(f, parse_float=Decimal)) - #print txs - for tx in sorted(txs, key=lambda a: a['time']): -# print tx['category'] - if 'abandoned' in tx and tx['abandoned']: - continue - if 'confirmations' in tx and 0 >= tx['confirmations']: - continue - when = time.strftime('%Y-%m-%d %H:%M', time.localtime(tx['time'])) - if 'message' in tx: - desc = tx['message'] - elif 'comment' in tx: - desc = tx['comment'] - elif 'label' in tx: - desc = tx['label'] - else: - desc = 'n/a' - print("%s %s" % (when, desc)) - if 'address' in tx: - print(" ; to bitcoin address %s" % tx['address']) - else: - print(" ; missing address in transaction, txid=%s" % tx['txid']) - print(f" ; amount={tx['amount']}") - if 'fee'in tx: - print(f" ; fee={tx['fee']}") - for f in accounts.keys(): - if f in tx and Decimal(0) != tx[f]: - amount = tx[f] - print(" %-20s %s BTC" % (accounts[f], format_float(amount))) - if 'fee' in tx and Decimal(0) != tx['fee']: - # Make sure to list fee used in several transactions only once. - if 'fee' in tx and tx['txid'] in txidfee \ - and tx['fee'] == txidfee[tx['txid']]: - True - else: - fee = tx['fee'] - print(" %-20s %s BTC" % (accounts['amount'], format_float(fee))) - print(" %-20s %s BTC" % ('Expences:BTC-fee', format_float(-fee))) - txidfee[tx['txid']] = tx['fee'] - - if 'address' in tx and tx['address'] in addresses: - print(" %s" % addresses[tx['address']]) - else: - if 'generate' == tx['category']: - print(" Income:BTC-mining") - else: - if amount < Decimal(0): - print(f" Assets:unknown:sent:update-script-addr-{tx['address']}") - else: - print(f" Assets:unknown:received:update-script-addr-{tx['address']}") - - print() - c = c + 1 - print("# Found %d transactions" % c) - if limit == c: - print(f"# Warning: Limit {limit} reached, consider increasing limit.") - -def main(): - list_txs() - -main() -</pre></blockquote></p> - -<p>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.</p> - -<p>To get a more interesting result, it is useful to map accounts sent -to or received from to accounting accounts, using the -<tt>addresses</tt> 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, 'ledger reg BTC:main' 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 <tt>addresses</tt> hash. Here is an example -transaction:</p> - -<p><blockquote><pre> -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 -</pre></blockquote></p> - -<p>It need a running Bitcoin Core daemon running, as it connect to it -using <tt>bitcoin-cli listtransactions * 100000</tt> to extract the -transactions listed in the Wallet.</p> - <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>