-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for generating custom configs.
- Added ability to specify your own filepath in ``ia configure`` and ``internetarchive.configure()``.
- Loading branch information
Showing
8 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,21 @@ The easiest way to create a config file is with the `configure <internetarchive. | |
>>> from internetarchive import configure | ||
>>> configure('[email protected]', 'password') | ||
|
||
Config files are stored in either ``$HOME/.ia`` or ``$HOME/.config/ia.ini`` by default, but other config files can be specified when insantiating an :class:`ArchiveSession` or :class:`Item` object. | ||
Config files are stored in either ``$HOME/.ia`` or ``$HOME/.config/ia.ini`` by default. You can also specify your own path:: | ||
|
||
|
||
>>> from internetarchive import configure | ||
>>> configure('[email protected]', 'password', config_file='/home/jake/.config/ia-alternate.ini') | ||
|
||
Custom config files can be specified when insantiating an :class:`ArchiveSession` object:: | ||
|
||
>>> from internetarchive import get_session | ||
>>> s = get_session(config_file='/home/jake/.config/ia-alternate.ini') | ||
|
||
Or an :class:`Item` object:: | ||
|
||
>>> form internetarchive import get_item | ||
>>> item = get_item('nasa', config_file='/home/jake/.config/ia-alternate.ini') | ||
|
||
IA-S3 Configuration | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters