X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/bb38026f1c7da4cc23680c02a66d2912d2925a58..02a04331c0b23eed4f6f12197879b58434851e13:/blog/index.rss diff --git a/blog/index.rss b/blog/index.rss index 85727ea8ef..786e9490d9 100644 --- a/blog/index.rss +++ b/blog/index.rss @@ -7,141 +7,29 @@ - Streaming the Linux desktop to Kodi using VLC and RTSP - http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html - http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html - Thu, 12 Jul 2018 02:00:00 +0200 - <p>A while back, I was asked by a friend how to stream the desktop to -my projector connected to Kodi. I sadly had to admit that I had no -idea, as it was a task I never had tried. Since then, I have been -looking for a way to do so, preferable without much extra software to -install on either side. Today I found a way that seem to kind of -work. Not great, but it is a start.</p> - -<p>I had a look at several approaches, for example -<a href="https://github.com/mfoetsch/dlna_live_streaming">using uPnP -DLNA as described in 2011</a>, but it required a uPnP server, fuse and -local storage enough to store the stream locally. This is not going -to work well for me, lacking enough free space, and it would -impossible for my friend to get working.</p> - -<p>Next, it occurred to me that perhaps I could use VLC to create a -video stream that Kodi could play. Preferably using -broadcast/multicast, to avoid having to change any setup on the Kodi -side when starting such stream. Unfortunately, the only recipe I -could find using multicast used the rtp protocol, and this protocol -seem to not be supported by Kodi.</p> - -<p>On the other hand, the rtsp protocol is working! Unfortunately I -have to specify the IP address of the streaming machine in both the -sending command and the file on the Kodi server. But it is showing my -desktop, and thus allow us to have a shared look on the big screen at -the programs I work on.</p> - -<p>I did not spend much time investigating codeces. I combined the -rtp and rtsp recipes from -<a href="https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/">the -VLC Streaming HowTo/Command Line Examples</a>, and was able to get -this working on the desktop/streaming end.</p> - -<blockquote><pre> -vlc screen:// --sout \ - '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{dst=projector.local,port=1234,sdp=rtsp://192.168.11.4:8080/test.sdp}' -</pre></blockquote> - -<p>I ssh-ed into my Kodi box and created a file like this with the -same IP address:</p> - -<blockquote><pre> -echo rtsp://192.168.11.4:8080/test.sdp \ - > /storage/videos/screenstream.m3u -</pre></blockquote> - -<p>Note the 192.168.11.4 IP address is my desktops IP address. As far -as I can tell the IP must be hardcoded for this to work. In other -words, if someone elses machine is going to do the steaming, you have -to update screenstream.m3u on the Kodi machine and adjust the vlc -recipe. To get started, locate the file in Kodi and select the m3u -file while the VLC stream is running. The desktop then show up in my -big screen. :)</p> - -<p>When using the same technique to stream a video file with audio, -the audio quality is really bad. No idea if the problem is package -loss or bad parameters for the transcode. I do not know VLC nor Kodi -enough to tell.</p> - -<p><strong>Update 2018-07-12</strong>: Johannes Schauer send me a few -succestions and reminded me about an important step. The "screen:" -input source is only available once the vlc-plugin-access-extra -package is installed on Debian. Without it, you will see this error -message: "VLC is unable to open the MRL 'screen://'. Check the log -for details." He further found that it is possible to drop some parts -of the VLC command line to reduce the amount of hardcoded information. -It is also useful to consider using cvlc to avoid having the VLC -window in the desktop view. In sum, this give us this command line on -the source end - -<blockquote><pre> -cvlc screen:// --sout \ - '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{sdp=rtsp://:8080/}' -</pre></blockquote> - -<p>and this on the Kodi end<p> - -<blockquote><pre> -echo rtsp://192.168.11.4:8080/ \ - > /storage/videos/screenstream.m3u -</pre></blockquote> - -<p>Still bad image quality, though. But I did discover that streaming -a DVD using dvdsimple:///dev/dvd as the source had excellent video and -audio quality, so I guess the issue is in the input or transcoding -parts, not the rtsp part. I've tried to change the vb and ab -parameters to use more bandwidth, but it did not make a -difference.</p> - -<p>I further received a suggestion from Einar Haraldseid to try using -gstreamer instead of VLC, and this proved to work great! He also -provided me with the trick to get Kodi to use a multicast stream as -its source. By using this monstrous oneliner, I can stream my desktop -with good video quality in reasonable framerate to the 239.255.0.1 -multicast address on port 1234: - -<blockquote><pre> -gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \ - videoconvert ! queue2 ! \ - x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \ - key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \ - mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \ - udpsink host=239.255.0.1 port=1234 ttl-mc=1 auto-multicast=1 sync=0 \ - pulsesrc device=$(pactl list | grep -A2 'Source #' | \ - grep 'Name: .*\.monitor$' | cut -d" " -f2|head -1) ! \ - audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. -</pre></blockquote> - -<p>and this on the Kodi end<p> - -<blockquote><pre> -echo udp://@239.255.0.1:1234 \ - > /storage/videos/screenstream.m3u -</pre></blockquote> - -<p>Note the trick to pick a valid pulseaudio source. It might not -pick the one you need. This approach will of course lead to trouble -if more than one source uses the same multicast port and address. -Note the ttl-mc=1 setting, which limit the multicast packages to the -local network. If the value is increased, your screen will be -broadcasted further, one network "hop" for each increase (read up on -multicast to learn more. :)!</p> - -<p>Having cracked how to get Kodi to receive multicast streams, I -could use this VLC command to stream to the same multicast address. -The image quality is way better than the rtsp approach, but gstreamer -seem to be doing a better job.</p> - -<blockquote><pre> -cvlc screen:// --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{mux=ts,dst=239.255.0.1,port=1234,sdp=sap}' -</pre></blockquote> + Official MIME type "text/vnd.sosi" for SOSI map data + http://people.skolelinux.org/pere/blog/Official_MIME_type__text_vnd_sosi__for_SOSI_map_data.html + http://people.skolelinux.org/pere/blog/Official_MIME_type__text_vnd_sosi__for_SOSI_map_data.html + Tue, 4 Jun 2019 09:20:00 +0200 + <p>Just 15 days ago, +<ahref="http://people.skolelinux.org/pere/blog/MIME_type__text_vnd_sosi__for_SOSI_map_data.html">I +mentioned</a> my submission to IANA to register an official MIME type +for the SOSI vector map format. This morning, just an hour ago, I was +notified that +<a href="https://www.iana.org/assignments/media-types/text/vnd.sosi">the +MIME type "text/vnd.sosi"</a> is registered for this format. In +addition to this registration, my +<a href="https://github.com/file/file/blob/master/magic/Magdir/sosi">file(1) +patch for a pattern matching rule for SOSI files</a> has been accepted +into the official source of that program (pending a new release), and +I've been told by the team behind +<a href="https://www.nationalarchives.gov.uk/PRONOM/">PRONOM</a> that +the SOSI format will be included in the next release of PRONOM, which +they plan to release this summer around July.</p> + +<p>I am very happy to see all of this fall into place, for use by +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/">the +Noark 5 Tjenestegrensesnitt</a> implementations.</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -150,114 +38,69 @@ activities, please send Bitcoin donations to my address - What is the most supported MIME type in Debian in 2018? - http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html - http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html - Mon, 9 Jul 2018 08:05:00 +0200 - <p>Five years ago, -<a href="http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html">I -measured what the most supported MIME type in Debian was</a>, by -analysing the desktop files in all packages in the archive. Since -then, the DEP-11 AppStream system has been put into production, making -the task a lot easier. This made me want to repeat the measurement, -to see how much things changed. Here are the new numbers, for -unstable only this time: - -<p><strong>Debian Unstable:</strong></p> - -<pre> - count MIME type - ----- ----------------------- - 56 image/jpeg - 55 image/png - 49 image/tiff - 48 image/gif - 39 image/bmp - 38 text/plain - 37 audio/mpeg - 34 application/ogg - 33 audio/x-flac - 32 audio/x-mp3 - 30 audio/x-wav - 30 audio/x-vorbis+ogg - 29 image/x-portable-pixmap - 27 inode/directory - 27 image/x-portable-bitmap - 27 audio/x-mpeg - 26 application/x-ogg - 25 audio/x-mpegurl - 25 audio/ogg - 24 text/html -</pre> - -<p>The list was created like this using a sid chroot: "cat -/var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz| zcat | awk '/^ -- \S+\/\S+$/ {print $2 }' | sort | uniq -c | sort -nr | head -20"</p> - -<p>It is interesting to see how image formats have passed text/plain -as the most announced supported MIME type. These days, thanks to the -AppStream system, if you run into a file format you do not know, and -want to figure out which packages support the format, you can find the -MIME type of the file using "file --mime &lt;filename&gt;", and then -look up all packages announcing support for this format in their -AppStream metadata (XML or .desktop file) using "appstreamcli -what-provides mimetype &lt;mime-type&gt;. For example if you, like -me, want to know which packages support inode/directory, you can get a -list like this:</p> - -<p><blockquote><pre> -% appstreamcli what-provides mimetype inode/directory | grep Package: | sort -Package: anjuta -Package: audacious -Package: baobab -Package: cervisia -Package: chirp -Package: dolphin -Package: doublecmd-common -Package: easytag -Package: enlightenment -Package: ephoto -Package: filelight -Package: gwenview -Package: k4dirstat -Package: kaffeine -Package: kdesvn -Package: kid3 -Package: kid3-qt -Package: nautilus -Package: nemo -Package: pcmanfm -Package: pcmanfm-qt -Package: qweborf -Package: ranger -Package: sirikali -Package: spacefm -Package: spacefm -Package: vifm -% -</pre></blockquote></p> - -<p>Using the same method, I can quickly discover that the Sketchup file -format is not yet supported by any package in Debian:</p> - -<p><blockquote><pre> -% appstreamcli what-provides mimetype application/vnd.sketchup.skp -Could not find component providing 'mimetype::application/vnd.sketchup.skp'. -% -</pre></blockquote></p> - -<p>Yesterday I used it to figure out which packages support the STL 3D -format:</p> - -<p><blockquote><pre> -% appstreamcli what-provides mimetype application/sla|grep Package -Package: cura -Package: meshlab -Package: printrun -% -</pre></blockquote></p> - -<p>PS: A new version of Cura was uploaded to Debian yesterday.</p> + The space rover coquine, or how I ended up on the dark side of the moon + http://people.skolelinux.org/pere/blog/The_space_rover_coquine__or_how_I_ended_up_on_the_dark_side_of_the_moon.html + http://people.skolelinux.org/pere/blog/The_space_rover_coquine__or_how_I_ended_up_on_the_dark_side_of_the_moon.html + Sun, 2 Jun 2019 23:55:00 +0200 + <p>A while back a college and friend from Debian and the Skolelinux / +Debian Edu project approached me, asking if I knew someone that might +be interested in helping out with a technology project he was running +as a teacher at <a href="https://www.ecolefrancodanoise.dk/">L'école +franco-danoise</a> - the Danish-French school and kindergarden. The +kids were building robots, rovers. The story behind it is to build a +rover for use +<a href="http://blog.ecolefrancodanoise.dk/first-week-on-the-dark-side">on +the dark side of the moon</a>, and remote control it. As travel cost +was a bit high for the final destination, and they wanted to test the +concept first, he was looking for volunteers to host a rover for the +kids to control in a foreign country. I ended up volunteering as a +host, and last week the rover arrived. It took a while to arrive +after <a href="http://blog.ecolefrancodanoise.dk/model-moms">it was +built and shipped</a>, because of customs confusion. Luckily we were +able fix it quickly with help from my colleges at work.</p> + +<p>This is what it looked like when the rover arrived. Note the cute +eyes looking up on me from the wrapping</p> + +<img src="http://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-esken-med-det-rare-i.jpeg" width="32%" style="clear:left"/> +<img src="http://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-den-ser-meg.jpeg" width="32%" style="clear:left"/> +<img src="http://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-en-skrue-loes.jpeg" width="32%" style="clear:left"/> + +<p style="text-align:left">Once the robot arrived, we needed to track +down batteries and figure out how to build custom firmware for it with +the appropriate wifi settings. I asked a friend if I could get two +18650 batteries from his pile of Tesla batteries (he had them from the +wrack of a crashed Tesla), so now the rover is running on Tesla +batteries.</p> + +<p>Building +<a href="https://gitlab.com/ecolefrancodanoise/arduino-efd/">the rover +firmware</a> proved a bit harder, as the code did not work out of the +box with the Arduino IDE package in Debian Buster. I suspect this is +due to a unsolved +<a href="https://github.com/arduino/Arduino/pull/2703"> license problem +with arduino</a> blocking Debian from upgrading to the latest version. +In the end we gave up debugging why the IDE failed to find the +required libraries, and ended up using the Arduino Makefile from the +<a href="https://tracker.debian.org/pkg/arduino-mk">arduino-mk Debian +package</a> instead. Unfortunately the camera library is missing from +the Arduino environment in Debian, so we disabled the camera support +for the first firmware build, to get something up and running. With +this reduced firmware, the robot could be controlled via the +controller server, driving around and measuring distance using its +internal acoustic sensor.</p> + +<p>Next, With some help from my friend in Denmark, which checked in the +camera library into the gitlab repository for me to use, we were able +to build a new and more complete version of the firmware, and the +robot is now up and running. This is what the "commander" web page +look like after taking a measurement and a snapshot:</p> + +<img src="http://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-commander.png" width="40%" border="1" align="center"/> + +<p>If you want to learn more about this project, you can check out the +<a href="https://hackaday.io/project/164082-the-dark-side-challenge">The +Dark Side Challenge</a> Hackaday web pages.</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -266,76 +109,66 @@ activities, please send Bitcoin donations to my address - Debian APT upgrade without enough free space on the disk... - http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html - http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html - Sun, 8 Jul 2018 12:10:00 +0200 - <p>Quite regularly, I let my Debian Sid/Unstable chroot stay untouch -for a while, and when I need to update it there is not enough free -space on the disk for apt to do a normal 'apt upgrade'. I normally -would resolve the issue by doing 'apt install &lt;somepackages&gt;' to -upgrade only some of the packages in one batch, until the amount of -packages to download fall below the amount of free space available. -Today, I had about 500 packages to upgrade, and after a while I got -tired of trying to install chunks of packages manually. I concluded -that I did not have the spare hours required to complete the task, and -decided to see if I could automate it. I came up with this small -script which I call 'apt-in-chunks':</p> - -<p><blockquote><pre> -#!/bin/sh -# -# Upgrade packages when the disk is too full to upgrade every -# upgradable package in one lump. Fetching packages to upgrade using -# apt, and then installing using dpkg, to avoid changing the package -# flag for manual/automatic. - -set -e - -ignore() { - if [ "$1" ]; then - grep -v "$1" - else - cat - fi -} - -for p in $(apt list --upgradable | ignore "$@" |cut -d/ -f1 | grep -v '^Listing...'); do - echo "Upgrading $p" - apt clean - apt install --download-only -y $p - for f in /var/cache/apt/archives/*.deb; do - if [ -e "$f" ]; then - dpkg -i /var/cache/apt/archives/*.deb - break - fi - done -done -</pre></blockquote></p> - -<p>The script will extract the list of packages to upgrade, try to -download the packages needed to upgrade one package, install the -downloaded packages using dpkg. The idea is to upgrade packages -without changing the APT mark for the package (ie the one recording of -the package was manually requested or pulled in as a dependency). To -use it, simply run it as root from the command line. If it fail, try -'apt install -f' to clean up the mess and run the script again. This -might happen if the new packages conflict with one of the old -packages. dpkg is unable to remove, while apt can do this.</p> - -<p>It take one option, a package to ignore in the list of packages to -upgrade. The option to ignore a package is there to be able to skip -the packages that are simply too large to unpack. Today this was -'ghc', but I have run into other large packages causing similar -problems earlier (like TeX).</p> - -<p>Update 2018-07-08: Thanks to Paul Wise, I am aware of two -alternative ways to handle this. The "unattended-upgrades ---minimal-upgrade-steps" option will try to calculate upgrade sets for -each package to upgrade, and then upgrade them in order, smallest set -first. It might be a better option than my above mentioned script. -Also, "aptutude upgrade" can upgrade single packages, thus avoiding -the need for using "dpkg -i" in the script above.</p> + Nikita version 0.4 released - free software archive API server + http://people.skolelinux.org/pere/blog/Nikita_version_0_4_released___free_software_archive_API_server.html + http://people.skolelinux.org/pere/blog/Nikita_version_0_4_released___free_software_archive_API_server.html + Wed, 22 May 2019 11:30:00 +0200 + <p>This morning, a new release of +<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">Nikita +Noark 5 core project</a> was +<a href="https://lists.nuug.no/pipermail/nikita-noark/2019-May/000468.html">announced +on the project mailing list</a>. The Nikita free software solution is +an implementation of the Norwegian archive standard Noark 5 used by +government offices in Norway. These were the changes in version 0.4 +since version 0.3, see the email link above for links to a demo site:</p> + +<ul> + + <li>Roll out OData handling to all endpoints where applicable</li> + <li>Changed the relation key for "ny-journalpost" to the official one.</li> + <li>Better link generation on outgoing links.</li> + <li>Tidy up code and make code and approaches more consistent throughout + the codebase</li> + <li>Update rels to be in compliance with updated version in the + interface standard</li> + <li>Avoid printing links on empty objects as they can't have links</li> + <li>Small bug fixes and improvements</li> + <li>Start moving generation of outgoing links to @Service layer so access + control can be used when generating links</li> + <li>Log exception that was being swallowed so it's traceable</li> + <li>Fix name mapping problem</li> + <li>Update templated printing so templated should only be printed if it + is set true. Requires more work to roll out across entire + application.</li> + <li>Remove Record->DocumentObject as per domain model of n5v4</li> + <li>Add ability to delete lists filtered with OData</li> + <li>Return NO_CONTENT (204) on delete as per interface standard</li> + <li>Introduce support for ConstraintViolationException exception</li> + <li>Make Service classes extend NoarkService</li> + <li>Make code base respect X-Forwarded-Host, X-Forwarded-Proto and + X-Forwarded-Port</li> + <li>Update CorrespondencePart* code to be more in line with Single + Responsibility Principle</li> + <li>Make package name follow directory structure</li> + <li>Make sure Document number starts at 1, not 0</li> + <li>Fix isues discovered by FindBugs</li> + <li>Update from Date to ZonedDateTime</li> + <li>Fix wrong tablename</li> + <li>Introduce Service layer tests</li> + <li>Improvements to CorrespondencePart</li> + <li>Continued work on Class / Classificationsystem</li> + <li>Fix feature where authors were stored as storageLocations</li> + <li>Update HQL builder for OData</li> + <li>Update OData search capability from webpage</li> + +</ul> + +<p>If free and open standardized archiving API sound interesting to +you, please contact us on IRC +(<a href="irc://irc.freenode.net/%23nikita">#nikita on +irc.freenode.net</a>) or email +(<a href="https://lists.nuug.no/mailman/listinfo/nikita-noark">nikita-noark +mailing list</a>).</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -344,25 +177,52 @@ activities, please send Bitcoin donations to my address - The worlds only stone power plant? - http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html - http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html - Sat, 30 Jun 2018 10:35:00 +0200 - <p>So far, at least hydro-electric power, coal power, wind power, -solar power, and wood power are well known. Until a few days ago, I -had never heard of stone power. Then I learn about a quarry in a -mountain in -<a href="https://en.wikipedia.org/wiki/Bremanger">Bremanger</a> i -Norway, where -<a href="https://www.bontrup.com/en/activities/raw-materials/bremanger-quarry/">the -Bremanger Quarry</a> company is extracting stone and dumping the stone -into a shaft leading to its shipping harbour. This downward movement -in this shaft is used to produce electricity. In short, it is using -falling rocks instead of falling water to produce electricity, and -according to its own statements it is producing more power than it is -using, and selling the surplus electricity to the Norwegian power -grid. I find the concept truly amazing. Is this the worlds only -stone power plant?</p> + MIME type "text/vnd.sosi" for SOSI map data + http://people.skolelinux.org/pere/blog/MIME_type__text_vnd_sosi__for_SOSI_map_data.html + http://people.skolelinux.org/pere/blog/MIME_type__text_vnd_sosi__for_SOSI_map_data.html + Mon, 20 May 2019 08:35:00 +0200 + <p>As part of my involvement in the work to +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard">standardise +a REST based API for Noark 5</a>, the Norwegian archiving standard, I +spent some time the last few months to try to register a +<a href="https://www.iana.org/assignments/media-types/">MIME type</a> +and <a href="https://www.nationalarchives.gov.uk/PRONOM/">PRONOM +code</a> for the SOSI file format. The background is that there is a +set of formats approved for long term storage and archiving in Norway, +and among these formats, SOSI is the only format missing a MIME type +and PRONOM code.</p> + +<p>What is SOSI, you might ask? To quote Wikipedia: SOSI is short for +Samordnet Opplegg for Stedfestet Informasjon (literally "Coordinated +Approach for Spatial Information", but more commonly expanded in +English to Systematic Organization of Spatial Information). It is a +text based file format for geo-spatial vector information used in +Norway. Information about the SOSI format can be found in English +from <a href="https://en.wikipedia.org/wiki/SOSI">Wikipedia</a>. The +specification is available in Norwegian from +<a href="https://www.kartverket.no/geodataarbeid/Standarder/SOSI/">the +Norwegian mapping authority</a>. The SOSI standard, which originated +in the beginning of nineteen eighties, was the inspiration and formed the +basis for the XML based +<a href="https://en.wikipedia.org/wiki/Geography_Markup_Language">Geography +Markup Language</a>.</p> + +<p>I have so far written +<a href="https://github.com/file/file/pull/67">a pattern matching +rule</a> for the file(1) unix tool to recognize SOSI files, submitted +a request to the PRONOM project to have a PRONOM ID assigned to the +format (reference TNA1555078202S60), and today send a request to IANA +to register the "text/vnd.sosi" MIME type for this format (referanse +<a href="https://tools.iana.org/public-view/viewticket/1143144">IANA +#1143144</a>). If all goes well, in a few months, anyone implementing +the Noark 5 Tjenestegrensesnitt API spesification should be able to +use an official MIME type and PRONOM code for SOSI files. In +addition, anyone using SOSI files on Linux should be able to +automatically recognise the format and web sites handing out SOSI +files can begin providing a more specific MIME type. So far, SOSI +files has been handed out from web sites using the +"application/octet-stream" MIME type, which is just a nice way of +stating "I do not know". Soon, we will know. :)</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -371,59 +231,148 @@ activities, please send Bitcoin donations to my address - Add-on to control the projector from within Kodi - http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html - http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html - Tue, 26 Jun 2018 23:55:00 +0200 - <p>My movie playing setup involve <a href="https://kodi.tv/">Kodi</a>, -<a href="https://openelec.tv">OpenELEC</a> (probably soon to be -replaced with <a href="https://libreelec.tv/">LibreELEC</a>) and an -Infocus IN76 video projector. My projector can be controlled via both -a infrared remote controller, and a RS-232 serial line. The vendor of -my projector, <a href="https://www.infocus.com/">InFocus</a>, had been -sensible enough to document the serial protocol in its user manual, so -it is easily available, and I used it some years ago to write -<a href="https://github.com/petterreinholdtsen/infocus-projector-control">a -small script to control the projector</a>. For a while now, I longed -for a setup where the projector was controlled by Kodi, for example in -such a way that when the screen saver went on, the projector was -turned off, and when the screen saver exited, the projector was turned -on again.</p> - -<p>A few days ago, with very good help from parts of my family, I -managed to find a Kodi Add-on for controlling a Epson projector, and -got in touch with its author to see if we could join forces and make a -Add-on with support for several projectors. To my pleasure, he was -positive to the idea, and we set out to add InFocus support to his -add-on, and make the add-on suitable for the official Kodi add-on -repository.</p> - -<p>The Add-on is now working (for me, at least), with a few minor -adjustments. The most important change I do relative to the master -branch in the github repository is embedding the -<a href="https://github.com/pyserial/pyserial">pyserial module</a> in -the add-on. The long term solution is to make a "script" type -pyserial module for Kodi, that can be pulled in as a dependency in -Kodi. But until that in place, I embed it.</p> - -<p>The add-on can be configured to turn on the projector when Kodi -starts, off when Kodi stops as well as turn the projector off when the -screensaver start and on when the screesaver stops. It can also be -told to set the projector source when turning on the projector. - -<p>If this sound interesting to you, check out -<a href="https://github.com/fredrik-eriksson/kodi_projcontrol">the -project github repository</a>. Perhaps you can send patches to -support your projector too? As soon as we find time to wrap up the -latest changes, it should be available for easy installation using any -Kodi instance.</p> - -<p>For future improvements, I would like to add projector model -detection and the ability to adjust the brightness level of the -projector from within Kodi. We also need to figure out how to handle -the cooling period of the projector. My projector refuses to turn on -for 60 seconds after it was turned off. This is not handled well by -the add-on at the moment.</p> + PlantUML for text based UML diagram modelling - nice free software + http://people.skolelinux.org/pere/blog/PlantUML_for_text_based_UML_diagram_modelling___nice_free_software.html + http://people.skolelinux.org/pere/blog/PlantUML_for_text_based_UML_diagram_modelling___nice_free_software.html + Mon, 25 Mar 2019 09:35:00 +0100 + <p>As part of my involvement with the +<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">Nikita +Noark 5 core project</a>, I have been proposing improvements to the +API specification created by <a href="https://www.arkivverket.no/">The +National Archives of Norway</a> and helped migrating the text from a +version control system unfriendly binary format (docx) to Markdown in +git. Combined with the migration to a public git repository (on +github), this has made it possible for anyone to suggest improvement +to the text.</p> + +<p>The specification is filled with UML diagrams. I believe the +original diagrams were modelled using Sparx Systems Enterprise +Architect, and exported as EMF files for import into docx. This +approach make it very hard to track changes using a version control +system. To improve the situation I have been looking for a good text +based UML format with associated command line free software tools on +Linux and Windows, to allow anyone to send in corrections to the UML +diagrams in the specification. The tool must be text based to work +with git, and command line to be able to run it automatically to +generate the diagram images. Finally, it must be free software to +allow anyone, even those that can not accept a non-free software +license, to contribute.</p> + +<p>I did not know much about free software UML modelling tools when I +started. I have used dia and inkscape for simple modelling in the +past, but neither are available on Windows, as far as I could tell. I +came across a nice +<a href="https://modeling-languages.com/text-uml-tools-complete-list/">list +of text mode uml tools</a>, and tested out a few of the tools listed +there. <a href="http://plantuml.com/">The PlantUML tool</a> seemed +most promising. After verifying that the packages +<a href="https://tracker.debian.org/pkg/plantuml">is available in +Debian</a> and found <a href="https://github.com/plantuml/plantuml">its +Java source</a> under a GPL license on github, I set out to test if it +could represent the diagrams we needed, ie the ones currently in +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/">the +Noark 5 Tjenestegrensesnitt specification</a>. I am happy to report +that it could represent them, even thought it have a few warts here +and there.</p> + +<p>After a few days of modelling I completed the task this weekend. A +temporary link to the complete set of diagrams (original and from +PlantUML) is available in +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/issues/76">the +github issue discussing the need for a text based UML format</a>, but +please note I lack a sensible tool to convert EMF files to PNGs, so +the "original" rendering is not as good as the original was in the +publised PDF.</p> + +<p>Here is an example UML diagram, showing the core classes for +keeping metadata about archived documents:</p> + +<pre> +@startuml +skinparam classAttributeIconSize 0 + +!include media/uml-class-arkivskaper.iuml +!include media/uml-class-arkiv.iuml +!include media/uml-class-klassifikasjonssystem.iuml +!include media/uml-class-klasse.iuml +!include media/uml-class-arkivdel.iuml +!include media/uml-class-mappe.iuml +!include media/uml-class-merknad.iuml +!include media/uml-class-registrering.iuml +!include media/uml-class-basisregistrering.iuml +!include media/uml-class-dokumentbeskrivelse.iuml +!include media/uml-class-dokumentobjekt.iuml +!include media/uml-class-konvertering.iuml +!include media/uml-datatype-elektronisksignatur.iuml + +Arkivstruktur.Arkivskaper "+arkivskaper 1..*" <-o "+arkiv 0..*" Arkivstruktur.Arkiv +Arkivstruktur.Arkiv o--> "+underarkiv 0..*" Arkivstruktur.Arkiv +Arkivstruktur.Arkiv "+arkiv 1" o--> "+arkivdel 0..*" Arkivstruktur.Arkivdel +Arkivstruktur.Klassifikasjonssystem "+klassifikasjonssystem [0..1]" <--o "+arkivdel 1..*" Arkivstruktur.Arkivdel +Arkivstruktur.Klassifikasjonssystem "+klassifikasjonssystem [0..1]" o--> "+klasse 0..*" Arkivstruktur.Klasse +Arkivstruktur.Arkivdel "+arkivdel 0..1" o--> "+mappe 0..*" Arkivstruktur.Mappe +Arkivstruktur.Arkivdel "+arkivdel 0..1" o--> "+registrering 0..*" Arkivstruktur.Registrering +Arkivstruktur.Klasse "+klasse 0..1" o--> "+mappe 0..*" Arkivstruktur.Mappe +Arkivstruktur.Klasse "+klasse 0..1" o--> "+registrering 0..*" Arkivstruktur.Registrering +Arkivstruktur.Mappe --> "+undermappe 0..*" Arkivstruktur.Mappe +Arkivstruktur.Mappe "+mappe 0..1" o--> "+registrering 0..*" Arkivstruktur.Registrering +Arkivstruktur.Merknad "+merknad 0..*" <--* Arkivstruktur.Mappe +Arkivstruktur.Merknad "+merknad 0..*" <--* Arkivstruktur.Dokumentbeskrivelse +Arkivstruktur.Basisregistrering -|> Arkivstruktur.Registrering +Arkivstruktur.Merknad "+merknad 0..*" <--* Arkivstruktur.Basisregistrering +Arkivstruktur.Registrering "+registrering 1..*" o--> "+dokumentbeskrivelse 0..*" Arkivstruktur.Dokumentbeskrivelse +Arkivstruktur.Dokumentbeskrivelse "+dokumentbeskrivelse 1" o-> "+dokumentobjekt 0..*" Arkivstruktur.Dokumentobjekt +Arkivstruktur.Dokumentobjekt *-> "+konvertering 0..*" Arkivstruktur.Konvertering +Arkivstruktur.ElektroniskSignatur -[hidden]-> Arkivstruktur.Dokumentobjekt +@enduml +</pre> + +<p><a href="http://plantuml.com/class-diagram">The format</a> is quite +compact, with little redundant information. The text expresses +entities and relations, and there is little layout related fluff. One +can reuse content by using include files, allowing for consistent +naming across several diagrams. The include files can be standalone +PlantUML too. Here is the content of +<tt>media/uml-class-arkivskaper.iuml<tt>:</p> + +<pre> +@startuml +class Arkivstruktur.Arkivskaper <Arkivenhet> { + +arkivskaperID : string + +arkivskaperNavn : string + +beskrivelse : string [0..1] +} +@enduml +</pre> + +<p>This is what the complete diagram for the PlantUML notation above +look like:</p> + +<p><img width="80%" src="http://people.skolelinux.org/pere/blog/images/2019-03-25-noark5-plantuml-diagrameksempel.png"></p> + +<p>A cool feature of PlantUML is that the generated PNG files include +the entire original source diagram as text. The source (with include +statements expanded) can be extracted using for example +<tt>exiftool</tt>. Another cool feature is that parts of the entities +can be hidden after inclusion. This allow to use include files with +all attributes listed, even for UML diagrams that should not list any +attributes.</p> + +<p>The diagram also show some of the warts. Some times the layout +engine place text labels on top of each other, and some times it place +the class boxes too close to each other, not leaving room for the +labels on the relationship arrows. The former can be worked around by +placing extra newlines in the labes (ie "\n"). I did not do it here +to be able to demonstrate the issue. I have not found a good way +around the latter, so I normally try to reduce the problem by changing +from vertical to horizontal links to improve the layout.</p> + +<p>All in all, I am quite happy with PlantUML, and very impressed with +how quickly its lead developer responds to questions. So far I got an +answer to my questions in a few hours when I send an email. I +definitely recommend looking at PlantUML if you need to make UML +diagrams. Note, PlantUML can draw a lot more than class relations. +Check out the documention for a complete list. :)</p> <p>As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address @@ -432,212 +381,386 @@ activities, please send Bitcoin donations to my address - youtube-dl for nedlasting fra NRK med undertekster - nice free software - http://people.skolelinux.org/pere/blog/youtube_dl_for_nedlasting_fra_NRK_med_undertekster___nice_free_software.html - http://people.skolelinux.org/pere/blog/youtube_dl_for_nedlasting_fra_NRK_med_undertekster___nice_free_software.html - Sat, 28 Apr 2018 10:30:00 +0200 - <p>I <a href="https://no.wikipedia.org/wiki/VHS">VHS-kassettenes</a> -tid var det rett frem å ta vare på et TV-program en ønsket å kunne se -senere, uten å være avhengig av at programmet ble sendt på nytt. -Kanskje ønsket en å se programmet på hytten der det ikke var -TV-signal, eller av andre grunner ha det tilgjengelig for fremtidig -fornøyelse. Dette er blitt vanskeligere med introduksjon av -digital-TV og webstreaming, der opptak til harddisk er utenfor de -flestes kontroll hvis de bruker ufri programvare og bokser kontrollert -av andre. Men for NRK her i Norge, finnes det heldigvis flere fri -programvare-alternativer, som jeg har -<a href="http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK.html">skrevet</a> -<a href="http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK_med_den__nye__l_sningen.html">om</a> -<a href="http://people.skolelinux.org/pere/blog/Nedlasting_fra_NRK__som_Matroska_med_undertekster.html">før</a>. -Så lenge kilden for nedlastingen er lovlig lagt ut på nett (hvilket -jeg antar NRK gjør), så er slik lagring til privat bruk også lovlig i -Norge.</p> - -<p>Sist jeg så på saken, i 2016, nevnte jeg at -<a href="https://rg3.github.com/youtube-dl/">youtube-dl</a> ikke kunne -bake undertekster fra NRK inn i videofilene, og at jeg derfor -foretrakk andre alternativer. Nylig oppdaget jeg at dette har endret -seg. Fordelen med youtube-dl er at den er tilgjengelig direkte fra -Linux-distribusjoner som <a href="https://www.debian.org/">Debian</a> -og <a href="https://www.ubuntu.com/">Ubuntu</a>, slik at en slipper å -finne ut selv hvordan en skal få dem til å virke.</p> - -<p>For å laste ned et NRK-innslag med undertekster, og få den norske -underteksten pakket inn i videofilen, så kan følgende kommando -brukes:</p> - -<p><pre> -youtube-dl --write-sub --sub-format ttml \ - --convert-subtitles srt --embed-subs \ - https://tv.nrk.no/serie/ramm-ferdig-gaa/MUHU11000316/27-04-2018 -</pre></p> - -<p>URL-eksemplet er dagens toppsak på tv.nrk.no. Resultatet er en -MP4-fil med filmen og undertekster som kan spilles av med VLC. Merk -at VLC ikke viser frem undertekster før du aktiverer dem. For å gjøre -det, høyreklikk med musa i fremviservinduet, velg menyvalget for -undertekst og så norsk språk. Jeg testet også '--write-auto-sub', -men det kommandolinjeargumentet ser ikke ut til å fungere, så jeg -endte opp med settet med argumentlisten over, som jeg fant i en -feilrapport i youtube-dl-prosjektets samling over feilrapporter.</p> - -<p>Denne støtten i youtube-dl gjør det svært enkelt å lagre -NRK-innslag, det være seg nyheter, filmer, serier eller dokumentater, -for å ha dem tilgjengelig for fremtidig referanse og bruk, uavhengig -av hvor lenge innslagene ligger tilgjengelig hos NRK. Så får det ikke -hjelpe at NRKs jurister mener at det er -<a href="http://people.skolelinux.org/pere/blog/Best___ikke_fortelle_noen_at_streaming_er_nedlasting___.html">vesensforskjellig -å legge tilgjengelig for nedlasting og for streaming</a>, når det rent -teknisk er samme sak.</p> - -<p>Programmet youtube-dl støtter også en rekke andre nettsteder, se -prosjektoversikten for -<a href="http://rg3.github.io/youtube-dl/supportedsites.html">en -komplett liste</a>.</p> + Release 0.3 of free software archive API system Nikita announced + http://people.skolelinux.org/pere/blog/Release_0_3_of_free_software_archive_API_system_Nikita_announced.html + http://people.skolelinux.org/pere/blog/Release_0_3_of_free_software_archive_API_system_Nikita_announced.html + Sun, 24 Mar 2019 14:30:00 +0100 + <p>Yesterday, a new release of +<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">Nikita +Noark 5 core project</a> was +<a href="https://lists.nuug.no/pipermail/nikita-noark/2019-March/000451.html">announced +on the project mailing list</a>. The free software solution is an +implementation of the Norwegian archive standard Noark 5 used by +government offices in Norway. These were the changes in version 0.3 +since version 0.2.1 (from NEWS.md):</p> + +<ul> + <li>Improved ClassificationSystem and Class behaviour.</li> + <li>Tidied up known inconsistencies between domain model and hateaos links.</li> + <li>Added experimental code for blockchain integration. </li> + <li>Make token expiry time configurable at upstart from properties file.</li> + <li>Continued work on OData search syntax.</li> + <li>Started work on pagination for entities, partly implemented for Saksmappe.</li> + <li>Finalise ClassifiedCode Metadata entity.</li> + <li>Implement mechanism to check if authentication token is still + valid. This allow the GUI to return a more sensible message to the + user if the token is expired.</li> + <li>Reintroduce browse.html page to allow user to browse JSON API using + hateoas links.</li> + <li>Fix bug in handling file/mappe sequence number. Year change was + not properly handled.</li> + <li>Update application yml files to be in sync with current development.</li> + <li>Stop 'converting' everything to PDF using libreoffice. Only + convert the file formats doc, ppt, xls, docx, pptx, xlsx, odt, odp + and ods.</li> + <li>Continued code style fixing, making code more readable.</li> + <li>Minor bug fixes.</li> + +</ul> + +<p>If free and open standardized archiving API sound interesting to +you, please contact us on IRC +(<a href="irc://irc.freenode.net/%23nikita">#nikita on +irc.freenode.net</a>) or email +(<a href="https://lists.nuug.no/mailman/listinfo/nikita-noark">nikita-noark +mailing list</a>).</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> - Stortingsflertallet går inn for ny IP-basert sensurinfrastruktur i Norge - http://people.skolelinux.org/pere/blog/Stortingsflertallet_g_r_inn_for_ny_IP_basert_sensurinfrastruktur_i_Norge.html - http://people.skolelinux.org/pere/blog/Stortingsflertallet_g_r_inn_for_ny_IP_basert_sensurinfrastruktur_i_Norge.html - Tue, 24 Apr 2018 15:00:00 +0200 - <p><a href="https://www.vg.no/sport/i/J1g8zj/stortingsvedtak-snart-ip-blokkerer-utenlandske-spillselskaper">VG</a>, -<a href="https://www.dagbladet.no/nyheter/stortinget-blokkerer-utenlandske-spillselskaper/69740219">Dagbladet</a> -og -<a href="https://www.nrk.no/ostfold/tar-opp-kampen-mot-utenlandske-spillselskap-1.14021381">NRK</a> -melder i dag at flertallet i Familie- og kulturkomiteen på Stortinget -har bestemt seg for å introdusere en ny sensurinfrastruktur i Norge. -Fra før har Norge en «frivillig» sensurinfrastruktur basert på -DNS-navn, der de største ISP-ene basert på en liste med DNS-navn -forgifter DNS-svar og omdirigerer til et annet IP-nummer enn det som -ligger i DNS. Nå kommer altså IP-basert omdirigering i tillegg. Når -infrastrukturen er på plass, er sensur av IP-adresser redusert et -spørsmål om hvilke IP-nummer som skal blokkeres. Listen over -IP-adresser vil naturligvis endre seg etter hvert som myndighetene -endrer seg. Det er ingen betryggende tanke.</p> + Åpen og gjennomsiktig vedlikehold av spesifikasjonen for Noark 5 Tjenestegrensesnitt + http://people.skolelinux.org/pere/blog/_pen_og_gjennomsiktig_vedlikehold_av_spesifikasjonen_for_Noark_5_Tjenestegrensesnitt.html + http://people.skolelinux.org/pere/blog/_pen_og_gjennomsiktig_vedlikehold_av_spesifikasjonen_for_Noark_5_Tjenestegrensesnitt.html + Mon, 11 Mar 2019 16:00:00 +0100 + <p>Et virksomhetsarkiv for meg, er et arbeidsverktøy der en enkelt kan +finne informasjonen en trenger når en trenger det, og der +virksomhetens samlede kunnskap er tilgjengelig. Det må være greit å +finne frem i, litt som en bibliotek. Men der et bibliotek gjerne tar +vare på offentliggjort informasjon som er tilgjengelig flere steder, +tar et arkiv vare på virksomhetsintern og til tider personlig +informasjon som ofte kun er tilgjengelig fra et sted.</p> + +<p>Jeg mistenker den eneste måten å sikre at arkivet inneholder den +samlede kunnskapen i en virksomhet, er å bruke det som virksomhetens +kunnskapslager. Det innebærer å automatisk kopiere (brev, epost, +SMS-er etc) inn i arkivet når de sendes og mottas, og der filtrere +vekk det en ikke vil ta vare på, og legge på metadata om det som er +samlet inn for enkel gjenfinning. En slik bruk av arkivet innebærer at +arkivet er en del av daglig virke, ikke at det er siste hvilested for +informasjon ingen lenger har daglig bruk for. For å kunne være en del +av det daglige virket må arkivet enkelt kunne integreres med andre +systemer. I disse dager betyr det å tilby arkivet som en +nett-tjeneste til hele virksomheten, tilgjengelig for både mennesker +og datamaskiner. Det betyr i tur å både tilby nettsider og et +maskinlesbart grensesnitt.</p> + +<p>For noen år siden erkjente visjonære arkivarer fordelene med et +standardisert maskinlesbart grensesnitt til organisasjonens arkiv. De +gikk igang med å lage noe de kalte +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/">Noark +5 Tjenestegrensesnitt</a>. Gjort riktig, så åpner slike maskinlesbare +grensesnitt for samvirke på tvers av uavhengige programvaresystemer. +Gjort feil, vil det blokkere for samvirke og bidra til +leverandørinnlåsing. For å gjøre det riktig så må grensesnittet være +klart og entydig beskrevet i en spesifikasjon som gjør at +spesifikasjonen tolkes på samme måte uavhengig av hvem som leser den, +og uavhengig av hvem som tar den i bruk.</p> + +<p>For å oppnå klare og entydige beskrivelser i en spesifikasjon, som +trengs for å kunne få en fri og åpen standard (se +<a href="http://people.skolelinux.org/pere/blog/Fri_og__pen_standard__slik_Digistan_ser_det.html">Digistan-definisjon</a>), +så trengs det en åpen og gjennomsiktig inngangsport med lav terskel, +der de som forsøker å ta den i bruk enkelt kan få inn korreksjoner, +etterlyse klargjøringer og rapportere uklarheter i spesifikasjonen. +En trenger også automatiserte datasystemer som måler og sjekker at et +gitt grensesnitt fungerer i tråd med spesifikasjonen.</p> + +<p>For Noark 5 Tjenestegrensesnittet er det nå etablert en slik åpen +og gjennomsiktig inngangsport på prosjekttjenesten github. Denne +inngangsporten består først og fremst av en åpen portal som lar enhver +se hva som er gjort av endringer i spesifikasjonsteksten over tid, men +det hører også med et åpent &quot;diskusjonsforum&quot; der en kan +komme med endringsforslag og forespørsler om klargjøringer. Alle +registrerte brukere på github kan bidra med innspill til disse +henvendelsene.</p> + +<p>I samarbeide med Arkivverket har jeg fått opprettet et git-depot +med spesifikasjonsteksten for tjenestegrensesnittet, der det er lagt +inn historikk for endringer i teksten de siste årene, samt lagt inn +endringsforslag og forespørsler om klargjøring av teksten. Bakgrunnen +for at jeg bidro med dette er at jeg er involvert i +<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core">Nikita-prosjektet</a>, +som lager en fri programvare-utgave av Noark 5 Tjenestegrensesnitt. +Det er først når en forsøker å lage noe i tråd med en spesifikasjon at +en oppdager hvor mange detaljer som må beskrives i spesifikasjonen for +å sikre samhandling.</p> + +<p>Spesifikasjonen vedlikeholdes i et rent tekstformat, for å ha et +format egnet for versjonskontroll via versjontrollsystemet git. Dette +gjør det både enkelt å se konkret hvilke endringer som er gjort når, +samt gjør det praktisk mulig for enhver med github-konto å sende inn +endringsforslag med formuleringer til spesifikasjonsteksten. Dette +tekstformatet vises frem som nettsider på github, slik at en ikke +trenger spesielle verktøy for å se på siste utgave av +spesifikasjonen.</p> + +<p>Fra dette rene tekstformatet kan det så avledes ulike formater, som +HTML for websider, PDF for utskrift på papir og ePub for lesing med +ebokleser. Avlednings-systemet (byggesystemet) bruker i dag +verktøyene pandoc, latex, docbook-xsl og GNU make til +transformasjonen. Tekstformatet som brukes dag er +<a href="https://www.markdownguide.org/">Markdown</a>, men det vurderes +å +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/issues/9">endre +til formatet RST</a> i fremtiden for bedre styring av utseende på +PDF-utgaven.</p> + +<p>Versjonskontrollsystemet git ble valgt da det er både fleksibelt, +avansert og enkelt å ta i bruk. Github ble valgt (foran f.eks. Gitlab +som vi bruker i Nikita), da Arkivverket allerede hadde tatt i bruk +Github i andre sammenhenger.</p> + +<p>Enkle endringer i teksten kan gjøres av priviligerte brukere +direkte i nettsidene til Github, ved å finne aktuell fil som skal +endres (f.eks. kapitler/03-konformitet.md), klikke på den lille +bokstaven i høyre hjørne over teksten. Det kommer opp en nettside der +en kan endre teksten slik en ønsker. Når en er fornøyd med endringen +så må endringen &quot;sjekkes inn&quot; i historikken. Det gjøres ved +å gi en kort beskrivelse av endringen (beskriv helst hvorfor endringen +trengs, ikke hva som er endret), under overskriften &quot;Commit +changes&quot;. En kan og bør legge inn en lengre forklaring i det +større skrivefeltet, før en velger om endringen skal sendes direkte +til 'master'-grenen (dvs. autorativ utgave av spesifikasjonen) eller +om en skal lage en ny gren for denne endringen og opprette en +endringsforespørsel (aka &quot;Pull Request&quot;/PR). Når alt dette +er gjort kan en velge &quot;Commit changes&quot; for å sende inn +endringen. Hvis den er lagt inn i &quot;master&quot;-grenen så er den +en offisiell del av spesifikasjonen med en gang. Hvis den derimot er +en endringsforespørsel, så legges den inn i +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/pulls">listen +over forslag til endringer</a> som venter på korrekturlesing og +godkjenning.</p> + +<p>Større endringer (for eksempel samtidig endringer i flere filer) +gjøres enklest ved å hente ned en kopi av git-depoet lokalt og gjøre +endringene der før endringsforslaget sendes inn. Denne prosessen er +godt beskrivet i dokumentasjon fra github. Git-prosjektet som skal +&quot;klones&quot; er +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/">https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/</a>.</p> + +<p>For å registrere nye utfordringer (issues) eller kommentere på +eksisterende utfordringer benyttes nettsiden +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/issues">https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/issues</a>. +I skrivende stund er det 48 åpne og 11 avsluttede utfordringer. Et +forslag til hva som bør være med når en beskriver en utfordring er +tilgjengelig som utfordring +<a href="https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard/issues/14">#14</a>.</p> + +<p>For å bygge en PDF-utgave av spesifikasjonen så bruker jeg i dag en +Debian GNU/Linux-maskin med en rekke programpakker installert. Når +dette er på plass, så holder det å kjøre kommandoen 'make pdf html' på +kommandolinjen, vente ca. 20 sekunder, før spesifikasjon.pdf og +spesifikasjon.html ligger klar på disken. Verktøyene for bygging av +PDF, HTML og ePub-utgave er også tilgjengelig på Windows og +MacOSX.</p> + +<p>Github bidrar med rammeverket. Men for at åpent vedlikehold av +spesifikasjonen skal fungere, så trengs det folk som bidrar med sin +tid og kunnskap. Arkivverket har sagt de skal bidra med innspill og +godkjenne forslag til endringer, men det blir størst suksess hvis alle +som bruker og lager systemer basert på Noark 5 Tjenestegrensesnitt +bidrar med sin kunnskap og kommer med forslag til forebedringer. Jeg +stiller. Blir du med?</p> + +<p>Det er viktig å legge til rette for åpen diskusjon blant alle +interesserte, som ikke krever at en må godta lange kontrakter med +vilkår for deltagelse. Inntil Arkivverket dukker opp på IRC har vi +laget en IRC-kanal der interesserte enkelt kan orientere seg og +diskutere tjenestegrensesnittet. Alle er velkommen til å ta turen +innom +<a href="https://webchat.freenode.net/?channels=nikita">#nikita</a> +(f.eks. via irc.freenode.net) for å møte likesinnede.</p> + +<p>Det holder dog ikke å ha en god spesifikasjon, hvis ikke de som tar +den i bruk gjør en like god jobb. For å automatisk teste om et konkret +tjenestegrensesnitt følger (min) forståelse av +spesifikasjonsdokumentet, har jeg skrevet et program som kobler seg +opp til et Noark 5v4 REST-tjeneste og tester alt den finner for å se +om det er i henhold til min tolkning av spesifikasjonen. Dette +verktøyet er tilgjengelig fra +<a href="https://github.com/petterreinholdtsen/noark5-tester">https://github.com/petterreinholdtsen/noark5-tester</a>, +og brukes daglig mens vi utvikler Nikita for å sikre at vi ikke +introduserer nye feil. Hvis en skal sikre samvirke på tvers av ulike +systemer er det helt essensielt å kunne raskt og automatisk sjekke at +tjenestegrensesnittet oppfører seg som forventet. Jeg håper andre som +lager sin utgave av tjenestegrensesnittet vi bruke dette verktøyet, +slik at vi tidlig og raskt kan oppdage hvor vi har tolket +spesifikasjonen ulikt, og dermed få et godt grunnlag for å gjøre +spesifikasjonsteksten enda klarere og bedre.</p> + +<p>Dagens beskrivelse av Noark 5 Tjenestegrensesnitt er et svært godt +utgangspunkt for å gjøre virksomhetens arkiv til et dynamisk og +sentralt arbeidsverktøy i organisasjonen. Blir du med å gjøre den +enda bedre?</p> - En grunn til å takke nei til usikker digital post - http://people.skolelinux.org/pere/blog/En_grunn_til___takke_nei_til_usikker_digital_post.html - http://people.skolelinux.org/pere/blog/En_grunn_til___takke_nei_til_usikker_digital_post.html - Mon, 2 Apr 2018 13:30:00 +0200 - <p>Brevpost er beskyttet av straffelovens bestemmelse som gjør det -kriminelt å åpne andres brev. Dette følger av (ny) straffelovs -<a href="https://lovdata.no/dokument/NL/lov/2005-05-20-28/§205">§ 205 -(Krenkelse av retten til privat kommunikasjon)</a>, som sier at «Med -bot eller fengsel inntil 2 år straffes den som uberettiget ... c) -åpner brev eller annen lukket skriftlig meddelelse som er adressert -til en annen, eller på annen måte skaffer seg uberettiget tilgang til -innholdet.» Dette gjelder såvel postbud som alle andre som har -befatning med brevet etter at avsender har befatning med et lukket -brev. Tilsvarende står også tidligere utgaver av den norske -straffeloven.</p> - -<p>Når en registrerer seg på usikre digitale postkasseløsningene, som -f.eks. Digipost og e-Boks, og slik tar disse i bruk, så gir en de som -står bak løsningene tillatelse til å åpne sine brev. Dette er -nødvendig for at innholdet i digital post skal kunne vises frem til -mottaker via tjenestens websider. Dermed gjelder ikke straffelovens -paragraf om forbud mot å åpne brev, da tilgangen ikke lenger er -uberettiget. En gir altså fremmede tilgang til å lese sin -korrespondanse. I tillegg vil bruk av slike usikre digitale -postbokser føre til at det blir registrert når du leser brevene, hvor -du befinner deg (vha. tilkoblingens IP-adresse), hvilket utstyr du -bruker og en rekke annen personlig informasjon som ikke er -tilgjengelig når papirpost brukes. Jeg foretrekker at det er -lovmessig beskyttelse av min korrespondanse, som jo inneholder privat -og personlig informasjon. Det bidrar til litt bedre vern av personlig -integritet i dagens norske samfunn.</p> + Dårlig med sikkerhetsoppdateringer for Ruters billettautomater i Oslo? + http://people.skolelinux.org/pere/blog/D_rlig_med_sikkerhetsoppdateringer_for_Ruters_billettautomater_i_Oslo_.html + http://people.skolelinux.org/pere/blog/D_rlig_med_sikkerhetsoppdateringer_for_Ruters_billettautomater_i_Oslo_.html + Wed, 13 Feb 2019 10:45:00 +0100 + <p><a href="http://people.skolelinux.org/pere/blog/Er_billettautomatene_til_kollektivtrafikken_i_Oslo_uten_sikkerhetsoppdateringer_.html">For +syv år siden</a> oppdaget jeg at billettautomater for +kollektivtrafikken i Oslo kjørte +<a href="http://en.wikipedia.org/wiki/Windows_2000">Windows 2000 +Professional</a>. Operativsystemet har ikke fått sikkerhetsfikser fra +Microsoft siden 2010-07-13 i følge dem selv. Den samme versjonen av +operativsystemet var i bruk +<a href="http://people.skolelinux.org/pere/blog/Fortsatt_ingen_sikkerhetsoppdateringer_for_billettautomatene_til_kollektivtrafikken_i_Oslo_.html">for +to og et halvt år siden</a>, og jammen er det ikke også i bruk den dag +i dag:</p> + +<p align="center"><a href="http://people.skolelinux.org/pere/blog/images/2019-02-13-ruter-win2000pro.jpeg"><img width="40%" src="http://people.skolelinux.org/pere/blog/images/2019-02-13-ruter-win2000pro.jpeg" alt="[Bilde av Ruters billettautomat med Windows 2000-feilmelding]"></a></p> + +<p>Bildet er tatt i dag av Kirill Miazine og tilgjengelig for bruk med +bruksvilkårene til +<a href="http://creativecommons.org/licenses/by/4.0/">Creative +Commons Attribution 4.0 International (CC BY 4.0)</a>.</p> + +<p>Kanskje det hadde vært +<a href="https://www.aftenposten.no/osloby/i/awqgO/Her-kjorer-du-gratis-trikk-og-buss">bedre +med gratis kollektivtrafikk</A>, slik at vi slapp å stole på +datakompetansen til Ruter for å verne våre privatliv samt holde +personopplysninger og betalingsinformasjon unna uvedkommende. Eneste +måten å sikre at hvor en befinner seg ikke kan hentes ut fra Ruters +systemer er å betale enkeltbilletter med kontanter. Jeg vet at Ruter +har en god historie om hvor personvernvennlige mobil-app og +RFID-kortene er, men den historien er ikke mulig å uavhengig +kontrollere uten priviligert tilgang til interne system og blir dermed +bare nok en god historie basert på tillit til de som forteller +historien. Det er ikke slik en sikrer privatsfæren. Det gjør en ved +å sikre at det ikke (kan) registreres informasjon om ens person.</p> + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - Self-appointed leaders of the Free World - http://people.skolelinux.org/pere/blog/Self_appointed_leaders_of_the_Free_World.html - http://people.skolelinux.org/pere/blog/Self_appointed_leaders_of_the_Free_World.html - Thu, 22 Mar 2018 11:00:00 +0100 - <p>The leaders of the worlds have started to congratulate the -re-elected Russian head of state, and this causes some criticism. I -am though a little fascinated by a comment from USA senator John McCain, -<a href="http://thehill.com/homenews/senate/379339-mccain-rips-trumps-congratulatory-call-to-putin-as-insult-to-russian-people">sited -by The Hill and others</a>: - -<p><blockquote> -<p>"An American president does not lead the Free World by -congratulating dictators on winning sham elections."</p> -</blockquote></p> - -<p>While I totally agree with the senator here, the way the quote is -phrased make me suspect that he is unaware of the simple fact that USA -have not lead the Free World since at least before its government -<a href="https://en.wikipedia.org/wiki/Maher_Arar">kidnapped a -completely innocent Canadian citizen in transit on his way home to -Canada via John F. Kennedy International Airport in September 2002 and -sent him to be tortured in Syria for a year</a>.</p> - -<p>USA might be running ahead, but the path they are taking is not the -one taken by any Free World.</p> + Stortinget vedtar maskinlesbart register over 20% av selskapseierne i Norge + http://people.skolelinux.org/pere/blog/Stortinget_vedtar_maskinlesbart_register_over_20__av_selskapseierne_i_Norge.html + http://people.skolelinux.org/pere/blog/Stortinget_vedtar_maskinlesbart_register_over_20__av_selskapseierne_i_Norge.html + Thu, 7 Feb 2019 23:55:00 +0100 + <p>Jeg registrerer med glede at Stortinget i dag har +<a href="https://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/?p=72826">vedtatt +at det skal vedlikeholdes et åpent og maskinlesbart register over +reelle rettighetshavere i Norge</a>. Her kan en kanskje få et +register som kan brukes til å analysere eierskap og kontroll i Norge +maskinelt og knytte det til internasjonale databaser som +<a href="https://opencorporates.com/">OpenCorporates</a>. Det liker +jeg.</p> + +<p>Den vedtatte grense på 25 prosents eierandel fikk stor +oppmerksomhet i debatten. Jeg ser fra enkel analyse av skatteetatens +eierskapsregister at 80.4% av alle selskapseiere i registeret har +mindre enn 25% eierandel, mot 73.8% som har mindre enn 5% eierandel. +En grense på 25% vil altså utelukke 80.4% av selskapseierne fra det +vedtatte registeret, og en grense på 5% vil skjule 73.8%. En må helt +ned i registrering av eierandeler over circa 0.002% for å få mer enn +halvparten av selskapseierne i Norge. Mon tro hvor langt ned en må i +eierprosent for å få med alle eierskapene til politisk valgte +representanter?</p> + +<p>Jeg biter meg også merke i at Sivert Bjørnstad fra FrP +tilsynelatende tror at aksjonærregisteret er et eksisterende åpent +register, på tross av at det så vidt jeg vet kun deles ved personlig +oppmøte hos skatteetaten og ikke er tilgjengelig i maskinlesbart +format for enhver, og dermed så langt ikke er importert inn i +OpenCorporates. Det anser jeg ikke for et spesielt åpent register. +Debatten ga ellers lite håp om at situasjonen bedrer seg, da +finansministeren bare henviste til en fraværende næringsministeren og +ikke ville uttale seg om et skikkelig aksjonærregister snart dukker +opp.</p> + +<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til +det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner +til min adresse +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>. +Merk, betaling med bitcoin er ikke anonymt. :)</p> - Facebooks ability to sell your personal information is the real Cambridge Analytica scandal - http://people.skolelinux.org/pere/blog/Facebooks_ability_to_sell_your_personal_information_is_the_real_Cambridge_Analytica_scandal.html - http://people.skolelinux.org/pere/blog/Facebooks_ability_to_sell_your_personal_information_is_the_real_Cambridge_Analytica_scandal.html - Wed, 21 Mar 2018 16:30:00 +0100 - <p>So, Cambridge Analytica is getting some well deserved criticism for -(mis)using information it got from Facebook about 50 million people, -mostly in the USA. What I find a bit surprising, is how little -criticism Facebook is getting for handing the information over to -Cambridge Analytica and others in the first place. And what about the -people handing their private and personal information to Facebook? -And last, but not least, what about the government offices who are -handing information about the visitors of their web pages to Facebook? -No-one who looked at the terms of use of Facebook should be surprised -that information about peoples interests, political views, personal -lifes and whereabouts would be sold by Facebook.</p> - -<p>What I find to be the real scandal is the fact that Facebook is -selling your personal information, not that one of the buyers used it -in a way Facebook did not approve when exposed. It is well known that -Facebook is selling out their users privacy, but a scandal -nevertheless. Of course the information provided to them by Facebook -would be misused by one of the parties given access to personal -information about the millions of Facebook users. Collected -information will be misused sooner or later. The only way to avoid -such misuse, is to not collect the information in the first place. If -you do not want Facebook to hand out information about yourself for -the use and misuse of its customers, do not give Facebook the -information.</p> - -<p>Personally, I would recommend to completely remove your Facebook -account, and take back some control of your personal information. -<a href="https://www.theguardian.com/technology/2018/mar/19/how-to-protect-your-facebook-privacy-or-delete-yourself-completely">According -to The Guardian</a>, it is a bit hard to find out how to request -account removal (and not just 'disabling'). You need to -<a href="https://www.facebook.com/help/224562897555674?helpref=faq_content">visit -a specific Facebook page</a> and click on 'let us know' on that page -to get to <a href="https://www.facebook.com/help/delete_account">the -real account deletion screen</a>. Perhaps something to consider? I -would not trust the information to really be deleted (who knows, -perhaps NSA, GCHQ and FRA already got a copy), but it might reduce the -exposure a bit.</p> - -<p>If you want to learn more about the capabilities of Cambridge -Analytica, I recommend to see the video recording of the one hour talk -Paul-Olivier Dehaye gave to <a href="">NUUG</a> last april about -<a href="https://www.nuug.no/aktiviteter/20170404-big-data-psychometric/"> -Data collection, psychometric profiling and their impact on -politics</a>.</p> - -<p>And if you want to communicate with your friends and loved ones, -use some end-to-end encrypted method like -<a href="https://www.signal.org/">Signal</a> or -<a href="https://ring.cx/">Ring</a>, and stop sharing your private -messages with strangers like Facebook and Google.</p> + Websocket from Kraken in Valutakrambod + http://people.skolelinux.org/pere/blog/Websocket_from_Kraken_in_Valutakrambod.html + http://people.skolelinux.org/pere/blog/Websocket_from_Kraken_in_Valutakrambod.html + Fri, 1 Feb 2019 22:25:00 +0100 + <p>Yesterday, the Kraken virtual currency exchange announced +<a href="https://blog.kraken.com/post/2019/websockets-public-api-launching-soon/">their +Websocket service</a>, providing a stream of exchange updates to its +clients. Getting updated rates quickly is a good idea, so I used +their <a href="https://www.kraken.com/en-us/help/websocket-api">API +documentation</a> and added Websocket support to the Kraken service in +Valutakrambod today. The python library can now get updates +from Kraken several times per second, instead of every time the +information is polled from the REST API.</p> + +<p>If this sound interesting to you, the code for valutakrambod is +available from +<a href="http://github.com/petterreinholdtsen/valutakrambod">github</a>. +Here is example output from the example client displaying rates in a +curses view:</p> + +<p><blockquote><pre> + Name Pair Bid Ask Spr Ftcd Age + BitcoinsNorway BTCEUR 2959.2800 3021.0500 2.0% 36 nan nan + Bitfinex BTCEUR 3087.9000 3088.0000 0.0% 36 37 nan + Bitmynt BTCEUR 3001.8700 3135.4600 4.3% 36 52 nan + Bitpay BTCEUR 3003.8659 nan nan% 35 nan nan + Bitstamp BTCEUR 3008.0000 3010.2300 0.1% 0 1 1 + Bl3p BTCEUR 3000.6700 3010.9300 0.3% 1 nan nan + Coinbase BTCEUR 2992.1800 3023.2500 1.0% 34 nan nan + Kraken+BTCEUR 3005.7000 3006.6000 0.0% 0 1 0 + Paymium BTCEUR 2940.0100 2993.4400 1.8% 0 2688 nan + BitcoinsNorway BTCNOK 29000.0000 29360.7400 1.2% 36 nan nan + Bitmynt BTCNOK 29115.6400 29720.7500 2.0% 36 52 nan + Bitpay BTCNOK 29029.2512 nan nan% 36 nan nan + Coinbase BTCNOK 28927.6000 29218.5900 1.0% 35 nan nan + MiraiEx BTCNOK 29097.7000 29741.4200 2.2% 36 nan nan + BitcoinsNorway BTCUSD 3385.4200 3456.0900 2.0% 36 nan nan + Bitfinex BTCUSD 3538.5000 3538.6000 0.0% 36 45 nan + Bitpay BTCUSD 3443.4600 nan nan% 34 nan nan + Bitstamp BTCUSD 3443.0100 3445.0500 0.1% 0 2 1 + Coinbase BTCUSD 3428.1600 3462.6300 1.0% 33 nan nan + Gemini BTCUSD 3445.8800 3445.8900 0.0% 36 326 nan + Hitbtc BTCUSD 3473.4700 3473.0700 -0.0% 0 0 0 + Kraken+BTCUSD 3444.4000 3445.6000 0.0% 0 1 0 + Exchangerates EURNOK 9.6685 9.6685 0.0% 36 22226 nan + Norgesbank EURNOK 9.6685 9.6685 0.0% 36 22226 nan + Bitstamp EURUSD 1.1440 1.1462 0.2% 0 1 2 + Exchangerates EURUSD 1.1471 1.1471 0.0% 36 22226 nan + BitcoinsNorway LTCEUR 1.0009 22.6538 95.6% 35 nan nan + BitcoinsNorway LTCNOK 259.0900 264.9300 2.2% 35 nan nan + BitcoinsNorway LTCUSD 0.0000 29.0000 100.0% 35 nan nan + Norgesbank USDNOK 8.4286 8.4286 0.0% 36 22226 nan +</pre></blockquote></p> + +<p>Yes, I notice the strange negative spread on Hitbtc. I've seen the +same on Kraken. Another strange observation is that Kraken some times +announce trade orders a fraction of a second in the future. I really +wonder what is going on there.</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>