openmainframeproject / software-discovery-tool

Software Discovery Tool
Apache License 2.0
31 stars 40 forks source link

FIx the creation of OpenSUSE data files #145

Closed arshPratap closed 11 months ago

arshPratap commented 1 year ago

Currently, all the OpenSUSE data files that are being generated have an empty JSON file. It would be great to have a fix for this issue and subsequently update the data files in the data repo

arshPratap commented 1 year ago

@aashish-khatri would like to know your thoughts on this ?

aashish-khatri commented 1 year ago

Hi @arshPratap, I would like to work on this issue, I think we would have to look into the opensuse module and make sure everything is working properly.

arshPratap commented 1 year ago

Alright ! @aashish-khatri I have assigned this issue to you

cboltz commented 1 year ago

You can get the file list as json nowadays, for example http://download.opensuse.org/download/ports/zsystems/tumbleweed/repo/oss/noarch/?jsontable&_=1692725244977

The json format should be easy to parse, it looks like that:

{
  "data": [
    {
      "mtime": 1678306410,
      "name": "0ad-data-0.0.26-1.2.noarch.rpm",
      "size": 1494463028
    },
    [... many more files]
}

In case you wonder - the mtime is in unixtime (seconds since 1970).

arshPratap commented 12 months ago

hi @cboltz ..thanks for the response..we will get back to you with updates

pleia2 commented 11 months ago

@cboltz Would you mind taking a look at the raw data files we're now producing, and are in this PR? https://github.com/openmainframeproject/software-discovery-tool-data/pull/61

A quick glance is giving me hope https://raw.githubusercontent.com/openmainframeproject/software-discovery-tool-data/f3f3ca7decbdab1370a5ed90fcc45a71e615e80f/data_files/OpenSUSE_Leap_15_4.json

cboltz commented 11 months ago

These json files look good and correct (at least for a few packages i checked).

Only nitpicking: it's openSUSE, not OpenSUSE or Opensuse ;-)

pleia2 commented 11 months ago

Thank you, @cboltz!

And branding is important, so we'll be more diligent about the proper capitalization in the application moving forward :+1: