Part of lp.archivepublisher.scripts.generate_ppa_htaccess View In Hierarchy
| Method | add_my_options | Add script command line options. | 
| Method | ensureHtaccess | Generate a .htaccess for ppa. | 
  
| Method | generateHtpasswd | Generate a htpasswd file for ppa`s `tokens. | 
  
| Method | replaceUpdatedHtpasswd | Compare the new and the old htpasswd and replace if changed. | 
| Method | sendCancellationEmail | Send an email to the person whose subscription was cancelled. | 
| Method | deactivateTokens | Deactivate the given tokens. | 
| Method | deactivateInvalidTokens | Deactivate tokens as necessary. | 
| Method | expireSubscriptions | Expire subscriptions as necessary. | 
| Method | getTimeToSyncFrom | Return the time we'll synchronize from. | 
| Method | getNewTokens | Return result set of new tokens created since the given time. | 
| Method | getDeactivatedNamedTokens | Return result set of named tokens deactivated since given time. | 
| Method | getNewPrivatePPAs | Return the recently created private PPAs. | 
| Method | main | Script entry point. | 
| Method | _getInvalidTokens | Return all invalid tokens. | 
Inherited from LaunchpadCronScript:
| Method | __init__ | Construct new LaunchpadScript. | 
| Method | get_last_activity | Return the last activity, if any. | 
| Method | record_activity | Record the successful completion of the script. | 
Inherited from LaunchpadScript (via LaunchpadCronScript):
| Method | handle_options | Undocumented | 
| Method | name | Enable subclasses to override with command-line arguments. | 
| Method | dbuser | Enable subclasses to override with command-line arguments. | 
| Method | login | Super-convenience method that avoids the import. | 
| Method | lockfilename | Return lockfilename. | 
| Method | lockfilepath | Undocumented | 
| Method | setup_lock | Create lockfile. | 
| Method | lock_or_die | Attempt to lock, and sys.exit(1) if the lock's already taken. | 
| Method | unlock | Release the lock. Do this before going home. | 
| Method | run | Actually run the script, executing zcml and initZopeless. | 
| Method | lock_and_run | Call lock_or_die(), and then run() the script. | 
| Method | _init_zca | Initialize the ZCA, this can be overridden for testing purposes. | 
| Method | _init_db | Initialize the database transaction. | 
ppa`s `tokens.| Parameters | ppa | The context PPA (an IArchive). | 
| Returns | The filename of the htpasswd file that was generated. | |
| Returns | True if the file was replaced. | |
A token is invalid if it is active and the token owner is not a subscriber to the archive that the token is for. The subscription can be either direct or through a team.
| Returns | A set of PPAs affected by the deactivations. | |
If an active token for a PPA no longer has any subscribers, we deactivate the token.
| Parameters | send_email | Whether to send a cancellation email to the owner of the token. This defaults to False to speed up the test suite. | 
| Returns | the set of ppas affected by token deactivations so that we can later update their htpasswd files. | |
If an ArchiveSubscriber's date_expires has passed, then
set its status to EXPIRED.
Any new PPAs or tokens created since this time will be used to generate passwords.