Skip to content

justin-ys/ArchiveIt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArchiveIt - The Reddit Post Archiver

ArchiveIt is a Reddit bot created to format Reddit posts into a savable filetypes. You can see it in action by visitng /u/archiveitbot on Reddit.

Please note ArchiveIt is currently in the beta stage. That means most core functionality has been implemented and the bot should be usable most of the time, but bugs have not been thoroughly tested for and some major features are likely yet to be created.

Currently, the only supported formats are text and html. Support for more formats may be added in the future. See the FAQ for more information.

Running the bot

First, create a config.txt file with your bot credentials in this format:

User agent
Reddit username
Reddit password
Client ID
Client Secret
Host (Optional, see "Hosts" section)

Optionally, create an RSA keypair and save your private key as a .pem file.

Install the keyring package via pip (pip install keyring) and set these two keys:

keyring.set_password("archiveit", "config", [path to config file])
# if you have an RSA key
keyring.set_password("archiveit", "privatekey", [path to .pem file])

The above can be ran in any Python terminal.

To run the bot, clone this repository and type python3 run.pyin the root directory.

By default, logging to the console is enabled and the default logging level is WARNING. To change this, use the command line argument --ll for run.py. Available logging levels are DEBUG, INFO, WARNING, ERROR, CRITICAL. To save logs to a file, specify the logfile path via the --log_file argument.

Hosts

ArchiveIt has support for several file hosting services for archived posts to be stored. The default host is 0x0.st. Other hosts can be set in the configuration file.

Some hosts may require their own configuration file; to set these up, create a .txt file with the same name as that specified in the host's ''Name to use in config.txt' cell in the table below, then within it write each configuration setting provided in the "Configuration Settings" column on a new line, in the order given.

A list of available hosts is as follows:

Host name Name to use in config.txt Free Storage duration per file Configuration settings Notes
0x0.st 0x0 Y ~300 days (depends on filesize) N/A Will not upload HTML files correctly, should only be used for development
Local storage local N/A N/A • Directory to save in (relative to root directory by default)
FTP ftp N/A N/A • Server URL
• Username
• Password
• Directory to save under

Planned features

  • HTML output
  • Easy verification of signatures
  • Self-hosted file server for archives

About

ArchiveIt bot for Reddit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published