python3-aur

2024-05-17 22:37 UTC
  • Xyne

Metadata

Description: AUR-related modules and helper utilities (aurploader, aurquery, aurtomatic).
Latest Version: 2021.11.20.1
Source Code: src/
Architecture:
  • any
Dependencies:
Build Dependencies:
  • python-setuptools
Provides:
  • aurploader
Replaces:
  • aurploader
Conflicts:
  • aurploader
Optional Dependencies:
  • curl: Aurploader support
  • git: Clone AUR Git repositories.
Arch Repositories:
  • [xyne-any]
  • [xyne-i686]
  • [xyne-x86_64]
AUR Page: python3-aur
Arch Forum Thread: 121663
Tags:

About

This package contains Python 3 modules for interacting with the AUR along with some tools that use them.

Example scripts are provided in the scripts directory.

See paconky.py for an example of how this can be used with pyalpm.

Command-Line Utilities

The following are installed with the package. See help messages below for more information.

aurtomatic

Aurtomatic lets you do the following from the command-line for multiple packages:

  • comment
  • vote
  • unvote
  • notify
  • unnotify
  • flag
  • unflag

Show support for the AUR packages that you use by running

aurtomatic -i -a vote

aurquery

Aurquery is a caching wrapper around the AUR’s RPC interface for querying package information from the command line. Information is returned in a format similar to pacman’s “-Si” output.

aurploader

** Note: uploading is deprecated since the switch to Git repos. **

Aurploader is a command-line utility for uploading packages to the AUR. You can do the following when uploading a package:

  • select a category (with automatic detection for existing packages)
  • post a comment
  • request notifications
  • vote

Usage

aurcomment <pkgname> [<pkgname>...]

aurpkglist

Print the list of AUR packages. The script also maintains a locally cached list.

Modules

AUR.RPC

Retrieve and cache data from the AUR’s RPC interface. Results are cached in an SQLite3 database and are refreshed after a configurable interval.

This was the original AUR module before Aurploader was included.

AUR.Aurtomatic

Interact with the AUR. The following actions are supported:

  • log in
  • upload packages
  • post comments
  • all package actions (vote, unvote, notify, unnotify, change tags, etc.)

This module was originally part of aurploader.

AUR.PkgList

Retrieve a full list of AUR packages. The module provides a class for mirroring the remote file and iterating over the package names in the list. The gzipped list is available online here.

AUR.SRCINFO

Parse information in a .SRCINFO file.

Complementary Modules

Aurquery Help Message

$ aurquery -h

usage: aurquery [-h] [-i] [-s] [--by {name,name-desc,maintainer}] [--debug]
                [--log <path>] [--ttl <minutes>] [--full-info] [--intersect]
                <arg> [<arg> ...]

Query the AUR RPC interface.

positional arguments:
  <arg>

options:
  -h, --help            show this help message and exit
  -i, --info            Query package information.
  -s, --search          Search the AUR.
  --by {name,name-desc,maintainer}
                        By which fields to search. Default: name-desc
  --debug               Enable debugging.
  --log <path>          Log debugging information to <path>.
  --ttl <minutes>       Time-to-live of cached data (default: 15)
  --full-info           Return full information for searches and msearches.
  --intersect           When searching for packages, only return results that
                        match all search terms.

For maintainer searches, use an empty string ('') as an argument to search for
orphans.

Aurquery Example Output 1

$ aurquery -i python3-aur

Repository            : AUR
PackageBase           : python3-aur
Name                  : python3-aur
Version               : 2021.11.20.1-14
Description           : AUR-related modules and helper utilities (aurploader, aurquery, aurtomatic).
URL                   : https://xyne.dev/projects/python3-aur
AURPage               : https://aur.archlinux.org/packages/python3-aur
URLPath               : https://aur.archlinux.org/cgit/aur.git/snapshot/python3-aur.tar.gz
Maintainer            : Xyne
Depends               : pyalpm python-pyxdg python3 python3-xcgf python3-xcpf
MakeDepends           : None
CheckDepends          : None
OptDepends            : curl
                        git
Conflicts             : aurploader
Provides              : aurploader
Replaces              : aurploader
Groups                : None
License               : GPL
NumVotes              : 219
FirstSubmitted        : 2011-07-04 05:22:15 CEST
LastModified          : 2023-06-27 11:34:01 CEST
OutOfDate             : 
ID                    : 1279449
PackageBaseID         : 50424
Keywords              : arch_linux aur python

Aurtomatic Help Message Output

$ aurtomatic -h

usage: aurtomatic [-h]
                  [-a {adopt,comment,delete,disown,flag,notify,setkeywords,unflag,unnotify,unvote,vote} [{adopt,comment,delete,disown,flag,notify,setkeywords,unflag,unnotify,unvote,vote} ...]]
                  [--comment COMMENT] [--comment-from-file <path>]
                  [--keywords [KEYWORD ...]] [-i] [-q] [-c <path>]
                  [-j {ask,keep,remove}] [-l <path>] [--confirm]
                  [--merge-into MERGE_INTO]
                  [<pkgname> ...]

Post comments to the AUR.

positional arguments:
  <pkgname>

options:
  -h, --help            show this help message and exit
  -a {adopt,comment,delete,disown,flag,notify,setkeywords,unflag,unnotify,unvote,vote} [{adopt,comment,delete,disown,flag,notify,setkeywords,unflag,unnotify,unvote,vote} ...], --action {adopt,comment,delete,disown,flag,notify,setkeywords,unflag,unnotify,unvote,vote} [{adopt,comment,delete,disown,flag,notify,setkeywords,unflag,unnotify,unvote,vote} ...]
                        Action(s) to perform for each specified package.
  --comment COMMENT     Post a comment without the interactive prompt.
  --comment-from-file <path>
                        Load a comment from a path without the interactive
                        prompt.
  --keywords [KEYWORD ...]
                        Set keywords without the interactive prompt.
  -i, --installed       Perform action for all installed AUR packages. Use
                        this to vote for the packages that you use and show
                        support.
  -q, --quiet           Suppress output.

cookie-management arguments:
  -c <path>, --cookiejar <path>
                        Specify the path of the cookie jar. The file follows
                        the Netscape format.
  -j {ask,keep,remove}, --jar {ask,keep,remove}
                        What to do with the cookiejar. Default: ask.
  -l <path>, --login <path>
                        Read name and password from a file. The first line
                        should contain the name and the second the password.

deletion arguments:
  --confirm             Confirm deletion and other actions requiring
                        additional confirmation.
  --merge-into MERGE_INTO
                        Merge target when deleting package.

Aurpkglist Help Message Output

$ aurpkglist -h

usage: aurpkglist [-h] [-f] [-t TTL] [-p PATH] [-q]

Retrieve and print the full list of AUR packages.

options:
  -h, --help            show this help message and exit
  -f, --force           Force a refresh of the local file.
  -t TTL, --ttl TTL, --time TTL
                        The time, in seconds, to cache the local file, counted
                        from the last modification. Default: 900
  -p PATH, --path PATH  Set the local file path.
  -q, --quiet           Refresh the local file without printing the list of
                        packages.

AurTUs Help Message Output

$ aurtus -h

usage: aurtus [-h] [-c <path>] [-j {ask,keep,remove}] [-l <path>]

Retrieve the current list of trusted users (TUs) from the AUR.

options:
  -h, --help            show this help message and exit
  -c <path>, --cookiejar <path>
                        Specify the path of the cookie jar. The file follows
                        the Netscape format.
  -j {ask,keep,remove}, --jar {ask,keep,remove}
                        What to do with the cookiejar. Default: ask.
  -l <path>, --login <path>
                        Read name and password from a file. The first line
                        should contain the name and the second the password.

CHANGELOG

2017-05-15

  • AUR.RPC.download_git_repo not logs warning or errors instead of raising AurError exceptions. All found packages are still iterated. Check that the list is complete if you need to detect errors.

2016-04-04

  • Added AUR.AurPkg.
  • Tweaked RPC code to ensure generators.
  • Renamed AUR.RCP.AUR class to AUR.RPC.AurRpc to avoid name collisions and for clarity.
  • Added function to clone AUR git repos.

2016-04-03

  • Update AUR.RPC to handle aurweb RPC Interface version 5.
  • Replace caching database functionality in AUR.RPC with MemoizeDB (major changes).
  • Update AUR.SRCINFO.

2016-02-01

  • Handle 414 errors by splitting multiinfo queries.

2016-01-30

  • Do not cache incomplete package info from search and msearch queries. Pass the search results to a multiinfo query instead.
  • Support maintainer searches via None and aurquery -m ’’.

2015-12-06

  • Renamed AUR.Aurploader to AUR.Aurtomatic along with internal Aurploader class and error.

2015-12-04

  • Multiple changes for Bauerbill.
  • Added account search functions.
  • Added aurtus utility to query list of current TUs on AUR.
  • Added support for submitting keywords via aurtomatic.

2015-07-11

  • Collect common constants and functions in AUR.common.
  • Added AUR.SRCINFO for parsing SRCINFO files.
  • Deprecated package uploading with aurploader due to move to SSH and Git in AUR 4.
  • Added --comment option to aurtomatic.

2014-05-31

  • updated for AUR 3.0.0

2013-03-08

New actions:

  • adopt
  • disown
  • delete

2013-03-03

  • logging now uses Python’s logging module
  • replaced old %-formatting with new format syntax
  • fixed error when aurtomatic is invoked with no arguments

2013-03-01

  • removed aurcomment script
  • added aurtomatic script (supports comments, votes, notifications, flagging, etc.)
  • added CookieWrapper context manager to Aurploader.py

2013-02-04

  • fixed cookie bug

2012-11-05

  • added Aurploader module to package
  • moved existing AUR module to AUR.RPC
  • included aurploader script
Contact
echo xyne.archlinux.org | sed 's/\./@/'
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0