How do I get a list of all packages in the catalog with a 6.0 tag?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I get a list of all packages in the catalog with a 6.0 tag?

Hannes Hirzel
Hello

On 8/17/17, bdurin <[hidden email]> wrote:
> Maybe something like having the list of all packages and their version
> included in a given image version on https://pharo.org could be useful.

What is the code snippet to get a list of all packages with a '6.0'
tag and their description?

The spotter brings up the Catalog Browser but how do I get 'behind the scenes'?

In Squeak I would just bring up the halo menu, then open an inspector
on the Catalog Browser window and see what model is attached.

How do I do this in Pharo these days?

Thank you for the answer in advance

--Hannes

Reply | Threaded
Open this post in threaded view
|

Re: How do I get a list of all packages in the catalog with a 6.0 tag?

Herby Vojčík
H. Hirzel wrote:

> Hello
>
> On 8/17/17, bdurin<[hidden email]>  wrote:
>> Maybe something like having the list of all packages and their version
>> included in a given image version on https://pharo.org could be useful.
>
> What is the code snippet to get a list of all packages with a '6.0'
> tag and their description?
>
> The spotter brings up the Catalog Browser but how do I get 'behind the scenes'?
>
> In Squeak I would just bring up the halo menu, then open an inspector
> on the Catalog Browser window and see what model is attached.
>
> How do I do this in Pharo these days?

Load configuration only, then look into ConfigurationOfXxx /
BaselineOfXxx class.

Herby

> Thank you for the answer in advance
>
> --Hannes
>


Reply | Threaded
Open this post in threaded view
|

Re: How do I get a list of all packages in the catalog with a 6.0 tag?

Hannes Hirzel
This helps me to get at the information for a particular singular
entry. I am looking for a list of all catalog entries in 6.0.

On 8/21/17, Herby Vojčík <[hidden email]> wrote:

> H. Hirzel wrote:
>> Hello
>>
>> On 8/17/17, bdurin<[hidden email]>  wrote:
>>> Maybe something like having the list of all packages and their version
>>> included in a given image version on https://pharo.org could be useful.
>>
>> What is the code snippet to get a list of all packages with a '6.0'
>> tag and their description?
>>
>> The spotter brings up the Catalog Browser but how do I get 'behind the
>> scenes'?
>>
>> In Squeak I would just bring up the halo menu, then open an inspector
>> on the Catalog Browser window and see what model is attached.
>>
>> How do I do this in Pharo these days?
>
> Load configuration only, then look into ConfigurationOfXxx /
> BaselineOfXxx class.
>
> Herby
>
>> Thank you for the answer in advance
>>
>> --Hannes
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How do I get a list of all packages in the catalog with a 6.0 tag?

Herby Vojčík
H. Hirzel wrote:
> This helps me to get at the information for a particular singular
> entry. I am looking for a list of all catalog entries in 6.0.

Ah, sorry. Did not get the question properly.

> On 8/21/17, Herby Vojčík<[hidden email]>  wrote:
>> H. Hirzel wrote:
>>> Hello
>>>
>>> On 8/17/17, bdurin<[hidden email]>   wrote:
>>>> Maybe something like having the list of all packages and their version
>>>> included in a given image version on https://pharo.org could be useful.
>>> What is the code snippet to get a list of all packages with a '6.0'
>>> tag and their description?
>>>
>>> The spotter brings up the Catalog Browser but how do I get 'behind the
>>> scenes'?
>>>
>>> In Squeak I would just bring up the halo menu, then open an inspector
>>> on the Catalog Browser window and see what model is attached.
>>>
>>> How do I do this in Pharo these days?
>> Load configuration only, then look into ConfigurationOfXxx /
>> BaselineOfXxx class.
>>
>> Herby
>>
>>> Thank you for the answer in advance
>>>
>>> --Hannes
>>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: How do I get a list of all packages in the catalog with a 6.0 tag?

Herby Vojčík
In reply to this post by Hannes Hirzel
H. Hirzel wrote:
> This helps me to get at the information for a particular singular
> entry. I am looking for a list of all catalog entries in 6.0.

That said, if it has menu item (and catalog has), I use Finder to look
in source code directly for that string, and that is a good starting
point. I had the impression I found out where catalog is held / updated
using that, but it was few weeks ago.

Herby

> On 8/21/17, Herby Vojčík<[hidden email]>  wrote:
>> H. Hirzel wrote:
>>> Hello
>>>
>>> On 8/17/17, bdurin<[hidden email]>   wrote:
>>>> Maybe something like having the list of all packages and their version
>>>> included in a given image version on https://pharo.org could be useful.
>>> What is the code snippet to get a list of all packages with a '6.0'
>>> tag and their description?
>>>
>>> The spotter brings up the Catalog Browser but how do I get 'behind the
>>> scenes'?
>>>
>>> In Squeak I would just bring up the halo menu, then open an inspector
>>> on the Catalog Browser window and see what model is attached.
>>>
>>> How do I do this in Pharo these days?
>> Load configuration only, then look into ConfigurationOfXxx /
>> BaselineOfXxx class.
>>
>> Herby
>>
>>> Thank you for the answer in advance
>>>
>>> --Hannes
>>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: How do I get a list of all packages in the catalog with a 6.0 tag?

Pierce Ng-3
In reply to this post by Hannes Hirzel
On Mon, Aug 21, 2017 at 11:06:36AM +0200, H. Hirzel wrote:
> What is the code snippet to get a list of all packages with a '6.0'
> tag and their description?

"CatalogProject availableRepositoryURLStrings" gives:

  #('http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main' 
    'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main' 
    'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main' 
    'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo50/main' 
    'http://www.squeaksource.com/MetacelloRepository')

"CatalogProvider default retrieveProjects" gives an array of 456 items.  Each
item is a dictionary with a "repositoryUrl" key which matches one of the above
strings. Therefore:

  CatalogProvider default retrieveProjects select: [ :x |
    (x at: 'repositoryUrl') = 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main' ]


> In Squeak I would just bring up the halo menu, then open an inspector
> on the Catalog Browser window and see what model is attached.
>
> How do I do this in Pharo these days?

On Linux, shift-ctrl click the window, then from the menu select debug...
inspect model.

Pierce


Reply | Threaded
Open this post in threaded view
|

Re: How do I get a list of all packages in the catalog with a 6.0 tag?

Hannes Hirzel
Thank you!


"Produce a list of Pharo 6 catalog entries (tag: 'Pharo 6.0') in
markdown format"

| catalog |
catalog :=  CatalogProvider default retrieveProjects select: [ :x |
    (x at: 'repositoryUrl') =
'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main' ].

Transcript show: '# Pharo 6 catalog list'; cr.

(catalog asSortedCollection: [ :a :b | (a at: 'name') < (b at: 'name')
]) do: [ :entry | Transcript show: '## ', (entry at: 'name') ; cr;
        show:  (entry at: 'description'); cr;cr.
        Transcript show: 'keywords: '.
        (entry at: 'keywords') sorted do: [ :keyword | Transcript show:
keyword; space ].
        Transcript cr; cr].

Transcript show: '# Pharo 6 catalog list - description is missing'; cr.

(catalog asSortedCollection: [ :a :b | (a at: 'name') < (b at: 'name') ])
do: [:entry | (entry at: 'description') ifNil: [ Transcript show: '-
', (entry at: 'name'); cr ]
        ].


--Hannes

On 8/21/17, Pierce Ng <[hidden email]> wrote:

> On Mon, Aug 21, 2017 at 11:06:36AM +0200, H. Hirzel wrote:
>> What is the code snippet to get a list of all packages with a '6.0'
>> tag and their description?
>
> "CatalogProject availableRepositoryURLStrings" gives:
>
>   #('http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main'
>     'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main'
>     'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main'
>     'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo50/main'
>     'http://www.squeaksource.com/MetacelloRepository')
>
> "CatalogProvider default retrieveProjects" gives an array of 456 items.
> Each
> item is a dictionary with a "repositoryUrl" key which matches one of the
> above
> strings. Therefore:
>
>   CatalogProvider default retrieveProjects select: [ :x |
>     (x at: 'repositoryUrl') =
> 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main' ]
>
>
>> In Squeak I would just bring up the halo menu, then open an inspector
>> on the Catalog Browser window and see what model is attached.
>>
>> How do I do this in Pharo these days?
>
> On Linux, shift-ctrl click the window, then from the menu select debug...
> inspect model.
>
> Pierce
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How do I get a list of all packages in the catalog with a 6.0 tag?

Stephane Ducasse-3
You can use the Catalog Browser?
In tools.
Is it not what you are looking for?

Stef

On Mon, Aug 21, 2017 at 3:58 PM, H. Hirzel <[hidden email]> wrote:

> Thank you!
>
>
> "Produce a list of Pharo 6 catalog entries (tag: 'Pharo 6.0') in
> markdown format"
>
> | catalog |
> catalog :=  CatalogProvider default retrieveProjects select: [ :x |
>     (x at: 'repositoryUrl') =
> 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main' ].
>
> Transcript show: '# Pharo 6 catalog list'; cr.
>
> (catalog asSortedCollection: [ :a :b | (a at: 'name') < (b at: 'name')
> ]) do: [ :entry | Transcript show: '## ', (entry at: 'name') ; cr;
>         show:  (entry at: 'description'); cr;cr.
>         Transcript show: 'keywords: '.
>         (entry at: 'keywords') sorted do: [ :keyword | Transcript show:
> keyword; space ].
>         Transcript cr; cr].
>
> Transcript show: '# Pharo 6 catalog list - description is missing'; cr.
>
> (catalog asSortedCollection: [ :a :b | (a at: 'name') < (b at: 'name') ])
> do: [:entry | (entry at: 'description') ifNil: [ Transcript show: '-
> ', (entry at: 'name'); cr ]
>         ].
>
>
> --Hannes
>
> On 8/21/17, Pierce Ng <[hidden email]> wrote:
>> On Mon, Aug 21, 2017 at 11:06:36AM +0200, H. Hirzel wrote:
>>> What is the code snippet to get a list of all packages with a '6.0'
>>> tag and their description?
>>
>> "CatalogProject availableRepositoryURLStrings" gives:
>>
>>   #('http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main'
>>     'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main'
>>     'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main'
>>     'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo50/main'
>>     'http://www.squeaksource.com/MetacelloRepository')
>>
>> "CatalogProvider default retrieveProjects" gives an array of 456 items.
>> Each
>> item is a dictionary with a "repositoryUrl" key which matches one of the
>> above
>> strings. Therefore:
>>
>>   CatalogProvider default retrieveProjects select: [ :x |
>>     (x at: 'repositoryUrl') =
>> 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo60/main' ]
>>
>>
>>> In Squeak I would just bring up the halo menu, then open an inspector
>>> on the Catalog Browser window and see what model is attached.
>>>
>>> How do I do this in Pharo these days?
>>
>> On Linux, shift-ctrl click the window, then from the menu select debug...
>> inspect model.
>>
>> Pierce
>>
>>
>>
>