Code Monkey home page Code Monkey logo

Comments (13)

derekmahar avatar derekmahar commented on May 24, 2024 2

I'm now waiting patiently for the Nix maintainers to release tidy-viewer 1.5.2 in branch nixos-unstable of flake nixpkgs so that I can test it on my Linux hosts which use the Nix package manager.

That was quick! Less than a day has passed and tidy-viewer 1.5.2 is already available in nixpkgs! Option --number-of-rows-to-output is working in that release, too:

$ tidy-viewer --number-of-rows-to-output 5 currency_exchange_rates.csv

        tv dim: 11903 x 4
        date                 source_currency_code target_currency_code exchange_rate
     1  1999-12-31T20:00:00Z PHP                  CAD                  0.0358
     2  1999-12-31T20:00:00Z USD                  CAD                  1.44
     3  2000-01-04T20:00:00Z PHP                  CAD                  0.0364
     4  2000-01-04T20:00:00Z USD                  CAD                  1.45
     5  2000-01-05T20:00:00Z PHP                  CAD                  0.037
        … with 11898 more rows

from tv.

alexhallam avatar alexhallam commented on May 24, 2024 1

What the ... Who wrote this package? lol

I will make a fix. Thanks for letting me know.

from tv.

derekmahar avatar derekmahar commented on May 24, 2024 1

To run it on my NAS, I'll have to build tidy-viewer from source inside a FreeBSD jail and then install it in my TrueNAS home directory. Fortunately, I have such a FreeBSD jail whose main purpose is for building FreeBSD binaries.

Update: I built tidy-viewer from source inside a FreeBSD jail and installed it in $HOME/bin on my NAS.

[derek@truenas ~]$ uname -a
FreeBSD truenas.local 13.1-RELEASE-p7 FreeBSD 13.1-RELEASE-p7 n245418-79e75956dbb TRUENAS amd64
[derek@truenas ~]$ which tidy-viewer
/mnt/zdd/home/derek/bin/tidy-viewer
[derek@truenas ~]$ tidy-viewer --version
tv 1.4.30

from tv.

alexhallam avatar alexhallam commented on May 24, 2024 1

I will look into a FreeBDS release. I am pushing this change to #166 . This comes with config file fixes and a new flag for checking which parameters have been picked up from the config. The idea came from #165

from tv.

derekmahar avatar derekmahar commented on May 24, 2024

I'm surprised that no one else noticed before now. Might not have been a very popular option, users never bothered to enter the long option, or simply never bothered to report it.

from tv.

derekmahar avatar derekmahar commented on May 24, 2024

Found the culprit:

    #[structopt(
        short = "n",
        long = "number of rows to output",
        default_value = "25",
        help = "Show how many rows to display."
    )]

Looks like you may have confused parameter long with help.

from tv.

alexhallam avatar alexhallam commented on May 24, 2024

#164

This is a fix. It is always good to have a second set of eyes even for small changes. Let me know what you think. Also, I am not sure I will make a new version number for this. So you would have to download and compile from source. How does that sound?

from tv.

derekmahar avatar derekmahar commented on May 24, 2024

The fix looks correct.

I've installed tidy-viewer from source on one of my hosts, but on four others, I used Nix to install version 1.4.30 of the tidy-viewer binary. I could install tidy-viewer from source on these other hosts, too, since they also have Cargo and the Rust compiler installed, but I might just wait until you release the next version of tidy-viewer. Nix tends to update its packages soon after developers release new versions.

from tv.

alexhallam avatar alexhallam commented on May 24, 2024

Wow, I love how strong of a user you are! Five hosts in total!

Just because of that, I will make a release. Give me a couple of days.

from tv.

derekmahar avatar derekmahar commented on May 24, 2024

I run tidy-viewer on the following systems:

  • Ubuntu 22.04 in Windows Subsystem for Linux on a Windows 11 laptop
  • Ubuntu Server 22.04 on two Raspberry Pi 4s
  • Ubuntu Server 20.04 on an AMD Ryzen 3 1300X
  • Ubuntu Server 22.04 virtual machine running in Proxmox on an AMD Ryzen 9 6900HX

I would have installed it on an Alpine Linux container that is also running in Proxmox, but tidy-viewer isn't yet available in the Alpine Linux package repository and I haven't yet installed the Rust tool set in this container. I would have also installed it on my NAS running TrueNAS (FreeBSD) on an AMD A4-5300, but tidy-viewer isn't yet available in the FreeBSD ports tree, either. To run it on my NAS, I'll have to build tidy-viewer from source inside a FreeBSD jail and then install it in my TrueNAS home directory. Fortunately, I have such a FreeBSD jail whose main purpose is for building FreeBSD binaries.

tidy-viewer nicely complements the other CSV related tools that I use including csvq, csvtk, DuckDB, Miller, qsv, and SQLite.

from tv.

derekmahar avatar derekmahar commented on May 24, 2024

I built and tested the fix in tidy-viewer 1.5.2 in FreeBSD. Option --number-of-rows-to-output worked as I expected. I'm now waiting patiently for the Nix maintainers to release tidy-viewer 1.5.2 in branch nixos-unstable of flake nixpkgs so that I can test it on my Linux hosts which use the Nix package manager. If it takes too long, I might just build and install it using Cargo.

from tv.

alexhallam avatar alexhallam commented on May 24, 2024

I am going to see if cross can turn a binary into something compatible with FreeBSD. What is the file extension.

from tv.

derekmahar avatar derekmahar commented on May 24, 2024

File extension?

from tv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.