How to check the information of a PPA without adding it

user364819

Is there any way without running:

sudo apt-add-repository [PPA]

That you can get the description (and possibly some other additional information) of a PPA through Terminal?

Florian Diesch

A quick hack (needs package python3-launchpadlib):

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys,re

from launchpadlib.launchpad import Launchpad
import httplib2
import  lazr.restfulclient.errors

if len(sys.argv) < 2:
    print('Syntax: {cmd} ppa'.format(cmd=sys.argv[0]))
    print()
    print('For example: {cmd}  ppa://diesch/testing'.format(cmd=sys.argv[0]))
    sys.exit(2)


try:
    lp = Launchpad.login_anonymously('foo', 'production', None)
except  httplib2.HttpLib2Error as e:
    print('Error connection to launchpad.net:', e)
    sys.exit(1)


ppa_name = sys.argv[1].strip()

m = re.search(r'^(ppa:)?(?P<user>[^/]+)/(?P<name>.+)', ppa_name)
if m:
    user, name = m.group('user', 'name')
else:
    print('Unvalid PPA name:', ppa)
    sys.exit(1)

try:    
    owner =  lp.people[user]
    ppa = owner.getPPAByName(name=name)

    print('PPA {name} at {url}'.format(name=ppa_name, url=ppa.web_link))
    print()
    print('Owner: {owner} ({url})'.format(owner=owner.display_name,
                                            url=owner.web_link))
    print()
    print(ppa.description) 
except lazr.restfulclient.errors.RestfulError as e:
    print('Error getting PPA info:', e)
    exit(1)

Save this as e.g. ppa-info, make it executable and run it like

ppa-info ppa:diesch/testing

If the PPA exists, you will get some information, like owner and description, otherwise you'll get an error message.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Install package from without adding PPA

From Dev

Install package from without adding PPA

From Dev

how does adding a ppa with a curl command work?

From Dev

How to install nwchem by adding a launchpad source (not PPA)

From Dev

How do I refresh software sources after adding a PPA

From Dev

How do I resolve unmet dependencies after adding a PPA?

From Dev

How do I refresh software sources after adding a PPA

From Dev

How do I resolve unmet dependencies after adding a PPA?

From Dev

Adding PPA on install

From Dev

How to check if checkbox-unity from ppa:unity-team/ppa succesfully send my report?

From Dev

How to check if checkbox-unity from ppa:unity-team/ppa succesfully send my report?

From Dev

How can I check if a PPA has packages for another Ubuntu version?

From Dev

How can I check if a PPA has packages for another Ubuntu version?

From Dev

How to join without losing information?

From Dev

How do I add a PPA in a shell script without user input?

From Dev

How would I install Budgie in 16.04 without using a PPA?

From Dev

PPA without release file

From Dev

How to check more detailed information on a wireless network?

From Dev

How to get system configuration information without dmidecode

From Dev

How to get dmidecode information without root privileges?

From Dev

How to pull information in Wordpress without a loop?

From Dev

How to format Index() without TZ information in R?

From Dev

how to check list before adding items?

From Dev

Adding ppa:deadsnakes/ppa via ssh on home server 18.04

From Dev

How to modify a Skobbler Annotation without re adding it

From Dev

How to convert a string to float (without adding lines)

From Dev

How to hash a string without adding a trailing '\n' to it?

From Dev

How to modify a Skobbler Annotation without re adding it

From Dev

How to use NSManagedObject without adding it to db?

Related Related

  1. 1

    Install package from without adding PPA

  2. 2

    Install package from without adding PPA

  3. 3

    how does adding a ppa with a curl command work?

  4. 4

    How to install nwchem by adding a launchpad source (not PPA)

  5. 5

    How do I refresh software sources after adding a PPA

  6. 6

    How do I resolve unmet dependencies after adding a PPA?

  7. 7

    How do I refresh software sources after adding a PPA

  8. 8

    How do I resolve unmet dependencies after adding a PPA?

  9. 9

    Adding PPA on install

  10. 10

    How to check if checkbox-unity from ppa:unity-team/ppa succesfully send my report?

  11. 11

    How to check if checkbox-unity from ppa:unity-team/ppa succesfully send my report?

  12. 12

    How can I check if a PPA has packages for another Ubuntu version?

  13. 13

    How can I check if a PPA has packages for another Ubuntu version?

  14. 14

    How to join without losing information?

  15. 15

    How do I add a PPA in a shell script without user input?

  16. 16

    How would I install Budgie in 16.04 without using a PPA?

  17. 17

    PPA without release file

  18. 18

    How to check more detailed information on a wireless network?

  19. 19

    How to get system configuration information without dmidecode

  20. 20

    How to get dmidecode information without root privileges?

  21. 21

    How to pull information in Wordpress without a loop?

  22. 22

    How to format Index() without TZ information in R?

  23. 23

    how to check list before adding items?

  24. 24

    Adding ppa:deadsnakes/ppa via ssh on home server 18.04

  25. 25

    How to modify a Skobbler Annotation without re adding it

  26. 26

    How to convert a string to float (without adding lines)

  27. 27

    How to hash a string without adding a trailing '\n' to it?

  28. 28

    How to modify a Skobbler Annotation without re adding it

  29. 29

    How to use NSManagedObject without adding it to db?

HotTag

Archive