Improve documentation, add sample config and readme.
This commit is contained in:
parent
321d770263
commit
469212c74c
3 changed files with 29 additions and 0 deletions
|
@ -26,12 +26,14 @@ serial_posts.sort! { |x,y| y.time <=> x.time }
|
|||
domains = []
|
||||
serial_posts.each do |post|
|
||||
metric[:posts] += 1
|
||||
# Extract the domain from the full URL
|
||||
domain = post.href.sub(/^https?:\/\/(.*?)\/.*$/, "\\1")
|
||||
|
||||
if !domains.include? domain
|
||||
# Record that we've seen the domain now.
|
||||
domains.push domain
|
||||
else
|
||||
# If this is a duplicate, soft-delete it.
|
||||
post.tag.delete config['active_tag_name']
|
||||
post.tag.push config['deleted_tag_name']
|
||||
post.shared = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue