diff options
author | Sean Allred <code@seanallred.com> | 2015-01-03 23:07:58 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-01-03 23:07:58 -0500 |
commit | 7069ab0b2374bf255425fca6705e85706645b643 (patch) | |
tree | e8db1f9f61630dd1bc75a6af86b6ac5db02a15fc | |
parent | 438d0da40268a1229003c39f922af4a4b780e409 (diff) |
Miscellaneous changes
* Use `sx-load' instead of the specific features we need
* Use one `insert' form instead of two
-rw-r--r-- | bot/sx-bot.el | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bot/sx-bot.el b/bot/sx-bot.el index fe93beb..b32a69c 100644 --- a/bot/sx-bot.el +++ b/bot/sx-bot.el @@ -27,14 +27,13 @@ ;;; Code: -(require 'sx-site) -(require 'sx-tag) - -(setq sx-request-remaining-api-requests-message-threshold 50000) - (require 'package) (package-initialize) +(require 'sx-load) + +(setq sx-request-remaining-api-requests-message-threshold 50000) + (defcustom sx-bot-out-dir "./data/tags/" "Directory where output tag files are saved." :type 'directory @@ -51,15 +50,13 @@ File is savedd in `sx-bot-out-dir'." (repr (prin1-to-string (sort (cdr data) #'string-lessp)))) - (insert repr) - (insert "\n") + (insert repr "\n") (goto-char (point-min)) (while (search-forward "\" \"" nil t) (replace-match "\"\n \"" nil t)))) (message "Wrote %S" file-name) file-name)) - (defun sx-bot-fetch-and-write-tags () "Get a list of all tags of all sites and save to disk." (make-directory sx-bot-out-dir t) |