Primitive Archer

Main Discussion Area => Around the Campfire => Topic started by: loon on May 26, 2017, 11:39:01 pm

Title: loony rants
Post by: loon on May 26, 2017, 11:39:01 pm
About D97... I don't know why there isn't a cheaper competitor already. A lower density, lower strength HMPE (with the same strength/weight ratio - I don't know if it's really possible) could actually be better? It'd make a lighter string for the same thickness...? I think fast flight is overkill in terms of strength and one gets best performance with skinny strings, and since they're stretchier they're a bit less harmful on the bow? at least if the loops aren't too thin. But I think it'd be better to just have a thicker string with thinner serving..
But I'm sure the bowstring companies know a lot more about that than I do.  )-w(

At least D-97 seems like the cheapest HMPE bowstring material compared to all the competitors, and it's really good anyway.
Title: Re: loony rants
Post by: willie on May 27, 2017, 01:46:22 am
Quote
But I'm sure the bowstring companies know a lot more about that than I do

A fair assumption, but doesn't mean their product offerings are optimized for what you want to do.

a lower density product with the same strength/ weight ratio? wouldn't you just need more to do the same job?

Looking for a product with a higher strength/weight ratio? Hmmm

Quote
and since they're stretchier
not necessarily, and there are some vectrans that offer even less stretch.

Title: Re: loony rants
Post by: loon on May 27, 2017, 05:15:27 am
a lower density product with the same strength/ weight ratio? wouldn't you just need more to do the same job?

It'd give a thicker string for the same weight, which'd be nicer on the fingers. even though one could just do thick serving.. I guess thicker would look nicer. And such a product may end up being less expensive..

Maybe mixing plant fiber with d-97 would give a similar result
Title: Re: loony rants
Post by: bubby on May 27, 2017, 11:03:27 am
Why in the world would u mix plant fibre with d97, this makes no sense
Title: Re: loony rants
Post by: loon on May 27, 2017, 04:55:59 pm
if it has lower density, and I recall someone mixing FF and linen in the flight bows forum???, but yeah it's totally pointless compared to just using thicker serving/padding loops
Title: Re: loony rants
Post by: loon on May 29, 2017, 07:09:12 pm
I have this picture of a Miwok style sinew backed cedar bow that someone made... 39" long? 46#@24"!? 24"? That means I could get 32" out of a 52" long bow of that design, width, draw weight? It's got such a nice looking bend. Hopefully it's not too overstressed. Reverse image search didn't work. Guess I'll look for it in the forums later.
(https://i.imgur.com/OZ75XYm.png)




This bow has a pleasing width taper. It just still seems like it could still be unstable. I don't know why they went with narrower inner limbs now...
(https://pcoutin.gitlab.io/a0101440_4965f4e42d4c3.jpg)
Title: Re: loony rants
Post by: bubby on May 29, 2017, 11:53:49 pm
Loon if you are planning ona 32" draw on a 52" bow you better get started building bows, going to need a bunch under your belt to get to that level😉
Title: Re: loony rants
Post by: loon on June 07, 2017, 07:51:04 pm
true

Just got a 100.5" long, 2 3/8" wide and just over 3/4" thick hard maple board with mediocre grain. I could either make two 50" modoc style (bendy pyramid) bows? or a 56" one. or just a 74" D bow. Or even longer. I dunno. I think I'd want 26" out of a short bow and 32" out of a longer one. 35-40# from a short, 40-60# out of a long bow. the grain is wavy so it could make a character bow...

so. 74"ntn, 1 3/8" max width, 60#@32" D bow vs
56"ntn, 40#@26", 2 3/8" max width, slight bendy handle pyramid

Finals week is next week. Then I graduate and will hopefully have some time to make bows..


edit: Well... a shorter bow would be more strained, so I think I should go with a long D bow, and get a better hickory board later for a paddle bow. Dunno if I could get 60#@32"...

56/26 ~= 2.154, but the bow'd be wider
76/32 ~= 2.375

Problem would be putting that thing on the car when I have to move away... it'd be easier with a 56" bow :p but I think it should be fine either way.

And I already broke a lamp with a 72" bow once... always seem to bang those things everywhere, which is not a problem with my short bows

But I still want one. Yeah. Fairly certain I'll just make a 76" long D bow.

May do the width taper tomorrow with a bandsaw.



(https://lh3.googleusercontent.com/Um_BCAtWxE4rDxFLbhotYO7phP-9IT2O0OdlDkaycF709vVGKfOQo2aGzyHHJBxSVLcs6IBgVfvJyfwFteImlkfesZR8rd7Qrb_Ll1BQVtUCHmSLHzzNa7J9xyXaMuEL4czgwMJoa6IzUyimxf_A5PN7tK6OriXh-HiBswtDzD4nHHdzTsVrTmI-XNwoYKznFcVgEThV8nhwGugOWgvyxh_PMLl5ev885CYpWLCQv-IheZyYOXrwdGxvvFXgR8BOuP0z4ty_IUcIRD2XLcm6GVbmc2BbnNC24HhO-WXiYwrE_k6kLcegZKNJ6KmKEy4O_LbxiLjMJIDTGHO8xPz9o8VX4n7oEAVRdLXCeivU03uew5Iv5OcT2Vgt9SZv1IYyag9D0cec6ji0o-xmBo9aGkfmVRGP3M8wipLw4BMkhCTLVcWnl3j-hjyNxYH-msUJo6zHKCm2RwIyqRu5CuaU9y69K_W_qPdzt7QASRkeboPYMtDmQbVyDkDdcVKgOYH9ScVt-4VEJ4jsSZITB1ZTHoBQvbQlEbOcCDTQkdxHELb2XLQ26OxKGq5BZwM5gNIaHMuX-peF5tpafTMCFZNhKnWe-XqB9SrIuxGqjEbAry5zIQYnzMlT=w790-h445-no)


(https://lh3.googleusercontent.com/qdsMT9cvTZ1oukLFeyZmlr39WJvtXOuPP-KiuJtTfJs_UwrYiw8T0qhLzDKjHD9DQcaxDSU484m5H8SGZJ3GmztgoCnwz8ib5W9IXImOHyNN5xoupX3DlidX2WyX6LvFlQhWVr1dIjarqQ7eLd7cp_OSQ9oQjNgnw27bB6CpK7znr3lpr5Rl2nDCw6LEeaymtza2mCrp5tCrWceSagoTTCgG4LwWI1l_Z9Wd77FO1F1an3K6r8EgnR0zAcXZnqi1osAmYbojyGvXckAYFv2vlcxButXo8jPusVuADzFyLPSMEE64q-2TgfP-Rf0McV2f3w8P90l30RVkPqUUDwf_hW8z74RthARUX9EKxWthogBY2TV-QAEinQ1drI5WiMT0JCzqqlxyxbWsAO4UsQHWpZsGhJBnYoel375muE0Fo09qcw3yLYFR9J763jzT1lnhvQ7lFR_nWk40N0_1_97FPo7St83gbqKfw7Lz_2HkKAata6jfnBhudW_9jl-Y6Z__rEz7iW9mzvUPd-pBXFMPgXF71hhiiER7uTAPq8XOHS5cS_Qmzgu7MOCXXzshLN383rtcYy7tTkHQm72mZ4O6Ni6scARjc5OIjy0O3q55AqtSKKgv=w790-h445-no)



Title: Re: loony rants
Post by: loon on June 08, 2017, 02:07:40 pm
mostly concerned about it being quartersawn, and grain violations through the bow.. (ie not the sides but back to belly/belly to back)
Title: Re: loony rants
Post by: PEARL DRUMS on June 08, 2017, 03:51:12 pm
Here are some fun numbers to compare and ponder.

1/4# of D97 has about 1675 feet on it - per BCY site - $23.00 1/8# avg
1/4# of B50 has about 1075 feet on it - per BCY site - $13.00 1/8# avg

D97 needs 6-10 strands - 8 is most common
B55 needs no less than 12 and most often 14-16 strands

Which costs more per string?
Title: Re: loony rants
Post by: bjrogg on June 08, 2017, 03:58:35 pm
Very interesting numbers there Pearl.
Bjrogg
Title: Re: loony rants
Post by: Danzn Bar on June 08, 2017, 06:07:53 pm
Here are some fun numbers to compare and ponder.

1/4# of D97 has about 1675 feet on it - per BCY site - $23.00 1/8# avg
1/4# of B50 has about 1075 feet on it - per BCY site - $13.00 1/8# avg

D97 needs 6-10 strands - 8 is most common
B55 needs no less than 12 and most often 14-16 strands

Which costs more per string?
Hummmmmmm.......let me guess.
DBar
Title: Re: loony rants
Post by: loon on June 08, 2017, 08:15:43 pm
Here are some fun numbers to compare and ponder.

1/4# of D97 has about 1675 feet on it - per BCY site - $23.00 1/8# avg
1/4# of B50 has about 1075 feet on it - per BCY site - $13.00 1/8# avg

D97 needs 6-10 strands - 8 is most common
B55 needs no less than 12 and most often 14-16 strands

Which costs more per string?
Assuming 6ft long strands,

6*8/1675 * 23
6*12/1075 * 13

D97 string: 66 cents
B55 string: 88 cents

Nice.

I was complaining over nothing. there's nothing wrong with thin strings with thicker serving and padded loops. Guess the title is accurate  :laugh:

I made poplar tepeliks and... got the maple board cut to length. Well, at least I decided what design I'm gonna do.
Title: Re: loony rants
Post by: loon on June 09, 2017, 03:57:34 am
With maple, is 3/4" thickness at the handle too thin for a 76"ntn bow, 1 3/8" wide at the handle, 60#@32"?
Title: Re: loony rants
Post by: loon on June 10, 2017, 07:10:22 am
Considering whether or not i should use the rather poor hemp twine for crafts for a bow backing. Maybe linen canvas would be better. In TBB(4 I think) I didn't see if they use titebond or just hide glue for the plant fiber backings... they make it sound like it works really awesome. almost like a primitive thing with fiberglass backing-like effects. i think i should just be careful not to overpower the maple belly
Title: Re: loony rants
Post by: bubby on June 13, 2017, 11:52:51 am
Here are some fun numbers to compare and ponder.

1/4# of D97 has about 1675 feet on it - per BCY site - $23.00 1/8# avg
1/4# of B50 has about 1075 feet on it - per BCY site - $13.00 1/8# avg

D97 needs 6-10 strands - 8 is most common
B55 needs no less than 12 and most often 14-16 strands

Which costs more per string?

On ebay you can generally get d97 for $14 a roll, figure up the price now
Title: Re: loony rants
Post by: loon on June 17, 2017, 01:22:09 am
The graduation ceremony is tomorrow. School is over. I'm getting my B.S. in Computer Science.
I left the maple board laying hidden behind a building for move-out, since there was no space. Hopefully I can get it back.
Title: Re: loony rants
Post by: Hawkdancer on June 17, 2017, 11:09:45 am
Loon,
Congratulations on the B.S.!  Degree, that is >:D!   Should be a very good career field to support the archery addiction 8).  Puts you in the geek squad, but it pays better than most fields. We may have to consult you professionally😂👹
Hawkdancer
Title: Re: loony rants
Post by: loon on June 19, 2017, 01:31:55 pm
Thank you! I'd love to help out.
Title: Re: loony rants
Post by: EdwardS on June 19, 2017, 04:20:32 pm
I was forcibly retired after 16 years in IT.  If you have questions, I'll help as I can.  Been out of the game a few years, but I still build some masterpieces.
Title: Re: loony rants
Post by: loon on June 19, 2017, 05:50:42 pm
That sucks.
I've had some burn-out (startup..), but CS still seems to make more sense to me than any other careers. And some fields/languages are more enjoyable to me. I think I want to look further into F# and computer security, though I know the latter is very tough. I've gone to a few CTFs and could do a lot better, but haven't given up yet. I think you could find a job if you got good at security..?
What sort of stuff do you build?
Title: Re: loony rants
Post by: EdwardS on June 19, 2017, 10:01:30 pm
Let me suitably geek out here...

The setup I'm using to post this is a x79 i7 with 64 GB of RAM, a Titan Black and a full watercooling setup.  For storage it runs a SSD RAID10.  My newer computer is a Bulldozer, 16GB of RAM and a 1070.  I've still got a quad-socket Opteron setup, thinking about turning it into a coffee table.  I spent more than twenty years doing stuff like that.  Kinda hard to quit now, but the archery business gives me new stuff to work on.
Title: Re: loony rants
Post by: loon on June 21, 2017, 02:53:20 pm
Let me suitably geek out here...

The setup I'm using to post this is a x79 i7 with 64 GB of RAM, a Titan Black and a full watercooling setup.  For storage it runs a SSD RAID10.  My newer computer is a Bulldozer, 16GB of RAM and a 1070.  I've still got a quad-socket Opteron setup, thinking about turning it into a coffee table.  I spent more than twenty years doing stuff like that.  Kinda hard to quit now, but the archery business gives me new stuff to work on.

Cool. My most powerful machine is just an i5 4460, 8GB of DDR3, a GTX 960, air cooled, an SSD w/ the OS and an HDD. Though my Thinkpad T530 has an i7-3630QM, and also 8GB of RAM. I was being foolish and thinking that it'd be okay to build standing in carpet (to avoid being yelled at by putting it on the dinner table...) if I just kept touching the case, now I get some graphics artifacts. Could've been worse. So now I got an anti-static wrist band and swore to never touch the circuits while on carpet again.


Today, I ruined what I thought was a very nice 3/8", 36" long poplar dowel. I got tired of reducing it with a rasp and tried using a knife. From now on I'll only use the knife for the area nearest to the nock. I can't seem to control using my knife on wood. It just always goes too deep and makes nicks. So the previously stiff shaft ended up being floppy like a wet noodle. And I should've figured out where and how much to taper and used calipers, instead of trying to just do it until it 'looked good'.

Considering making a tapering jig, but I barely have enough space for more jigs in here.

The shaft on drill thing is pretty slow, it only seems to work well for smoothing the shaft a bit more after using a rasp. Then maybe a card scraper could be used, but I don't seem to be good with scrapers either, always leaving nicks and parts of it going too deep at the end.
Title: Re: loony rants
Post by: Hawkdancer on June 21, 2017, 03:06:30 pm
I drilled a piece of hard maple with a 3/8" Forster bit and used a gooseneck scrap to get a fit.  I will try a thumb plane on the thicker shafts to get them to size.  Also have to find an 11/32nd bit for the next down size.  Gentle taps with a small mallet help a bit, too, on the maple, not the shaft!   Easier on the fingers that way >:D
Hawkdancer
Title: Re: loony rants
Post by: loon on June 22, 2017, 12:22:09 am
What do you do with that maple piece, though? Just a piece of board with a hole drilled on it?

edit to avoid bump: cool thanks, I see. so for bamboo shafts
Title: Re: loony rants
Post by: Hawkdancer on June 22, 2017, 12:47:56 pm
Right, I drilled about an inch or so from the end of the board and use the hole to size the shaft, also, seems to help burnish the wood a bit.  It takes a bit of work, especially around the nodes, but it works, I think.  Got to sinew wrap and cut the nocks yet to see how uniform the set shoots, working on a half dozen.  Spine is pretty heavy right now, but my other set of POC are spined heavy also.
I will mark the hole size before I drill a smaller hole(11/32).   Don't think I want to go any smaller.  I start the shaft and keep scraping, forcing,  making with pencil, tapping loose scrape some more, force
Keep after it 'till it fits through all the way. 
Hawkdancer
Title: Re: loony rants
Post by: loon on June 28, 2017, 01:04:11 pm
Should I get a hatchet for reducing width profile? (ie in bamboo as well as wood) Maybe a single bevel one. Thing is i already have trouble controlling my knife with a symmetric scandi grind. and I'm not very good at sharpening. I'll probably just use my ryoba saw and shinto rasp for now.

todo:
spine tester
blunt bareshaft bamboo and sitka spruce arrows
red oak long pyramid
maple D bow - edit 7/6/2017 yeah, we got the maple board back... still haven't started. need to back with with something eventually too.


That garage is like a toaster oven... but I can deal with it

Also want to make a chair. And maybe a portable bench/'horse' with a vise i can take outside
Title: Re: loony rants
Post by: loon on July 05, 2017, 06:13:58 pm
Code: [Select]
from bs4 import BeautifulSoup
import requests

ua = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
url = 'http://i984.photobucket.com/albums/ae321/isaacscr/Misc/HPIM5242.jpg'

headers = {'Upgrade-Insecure-Requests': '1', 'User-Agent': ua, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
           'DNT':'1'}

requests.get(url, headers=headers)

IT WORKS?!?!? Before putting in all those headers, it just gave me that blasted "give us your money" image. This is the first step. Making it redirect to the actual PhotoBucket photo page. Then hopefully somehow being able to actually pull the image. Then I'll build a dictionary of image links to other image links so that all the PB links can be replaced.

I think I just need to get the cookie it gives me and send it back while requesting the same thing again.

I... started making a spine tester. Haven't been very productive.. the garage isn't a very pleasant place.. It's a big board, the supports for the arrow are pieces of wood glued on with TB3.

I guess I should taper one of the Sitka spruce shafts from Wayne, and put a wooden blunt head on it for short range practice. All it takes is one arrow with no fletchings to be able to practice well...



edit: This saves the proper image from a given PhotoBucket URL. BeautifulSoup isn't even being used yet. It works... next, just write some code to extract all the PhotoBucket paths from a forum thread or whatever, and repeat this process. I should probably add diagnostic error checking stuff as well. This would probably be easier with a browser macro, but meh. Slower.

Code: [Select]
from bs4 import BeautifulSoup
import requests
from io import BytesIO
from urllib.parse import urlparse
from os.path import splitext, basename

s = requests.Session()

ua = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
url = 'http://i984.photobucket.com/albums/ae321/isaacscr/Misc/HPIM5242.jpg'

# haha i'm totally Chrome
headers = {'Upgrade-Insecure-Requests': '1',
           'User-Agent': ua,
           'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
           'DNT':'1'}

s.headers.update(headers)

req1 = s.get(url)
s.headers.update({'referer': req1.url})
img_req = s.get(url.replace('http', 'https'))

img_data = BytesIO(img_req.content)

img_url_path = urlparse(img_req.url).path
img_filename = basename(img_url_path)

with open(img_filename, 'wb') as out:
    out.write(img_data.read())


...
photobucket is a slow piece of trash, so it times out sometimes :\
never liked photobucket...
Title: Re: loony rants
Post by: loon on July 06, 2017, 02:34:16 am
getting late

more pieces of the puzzle
Code: [Select]
from bs4 import BeautifulSoup
import requests

pa_session = requests.Session()
PA_THREAD = "http://www.primitivearcher.com/smf/index.php/topic,27206.0.html"

thread_page = BeautifulSoup(pa_session.get(PA_THREAD).content, "html.parser")

thread_pageno = int(thread_page.select(".pagelinks strong")[0].string)
print(thread_pageno)


print(thread_page.select(".pagelinks")[0].find_all("a")) # can increment thread_pageno and try to find if it's here to keep going through pages

pb_imgs = [img.get("src") for img in thread_page.find_all("img") if "photobucket.com" in img.get("src")]
print(pb_imgs)


will continue tomorrow...

my spine tester's coming together. need a weight and a wire coathanger for a hook etc
Title: Re: loony rants
Post by: loon on July 06, 2017, 06:28:51 pm
so close. with this i can just make a loop that keeps fetching images rather easily for all pages in a thread.

Code: [Select]
thread_pagelinks = thread_page.select(".pagelinks")[0]
thread_pageno = int(thread_pagelinks.find("strong").text)
next_page_link = thread_pagelinks.find("a", text = str(thread_pageno+1))
# if next_page_link: repeat..

filename of saved image should be a hash of the URL, and i will store... probably pairs of photobucket image URL to new URL, after images are uploaded

What DB do the PA forums use? MySQL? Postgres? I think I'd need a query somewhat like

UPDATE posts SET text = replace(text, "http://photobucket.com/blah/blah.jpg", "http://example.com/blergonagr.jpg");

on postgres for every single image that is to be replaced. Should do a DB backup beforehand... maybe there's a better way to do it with less queries or prepared queries or something


This would actually be easier for me and cleaner if I was given a list of all photobucket img links, which could be acquired from a database query as well...
Title: Re: loony rants
Post by: loon on July 07, 2017, 01:11:50 am
Okay, it's working. I think I just need to... save the tuples of hash to URLs (both photobucket and imgur), and add code to automagically upload to imgur using its API. Actually, I need to remove that PA_THREAD and TEST_URL stuff.

Code: [Select]
from bs4 import BeautifulSoup
import requests
import sys, os
import hashlib, base64
from io import BytesIO
from urllib.parse import urlparse
from os.path import splitext, basename


UA = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
TEST_URL = 'http://i984.photobucket.com/albums/ae321/isaacscr/Misc/HPIM5242.jpg'

# haha i'm totally Chrome
HEADERS = {'Upgrade-Insecure-Requests': '1',
           'User-Agent': UA,
           'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
           'DNT': '1'}

def filename_of_url(u):
    img_url_path = basename(urlparse(u).path)
    img_ext = os.path.splitext(img_url_path)[1]
    url_hash = base64.urlsafe_b64encode(hashlib.sha3_224(u.encode('utf-8')).digest()).decode("ascii")
    return url_hash + "." + img_ext

# Returns: None
# Saves PhotoBucket image at given url
def fetch_pb_image(url):
    try:
        s = requests.Session()
        s.headers.update(HEADERS)
        req1 = s.get(url)
        s.headers.update({'referer': req1.url})
        img_req = s.get(url)#.replace('http', 'https'))

        img_data = BytesIO(img_req.content)

        img_filename = filename_of_url(url)

        with open(img_filename, 'wb') as out:
            out.write(img_data.read())

    except Exception as err:
        # Anything could've gone wrong. Hope that it doesn't for
        # the next image.
        # stderr should be saved to log failed images
        print(err.__class__, file=sys.stderr)
        print(err, file=sys.stderr)
        print("failed to get", url, file=sys.stderr)

pa_session = requests.Session()
PA_THREAD = "http://www.primitivearcher.com/smf/index.php/topic,27206.0.html"

thread_page = BeautifulSoup(requests.get(PA_THREAD).content, "html.parser")
current_pagenum = 420

TEST_URL = 'http://i1278.photobucket.com/albums/y506/psmith311/Mobile%20Uploads/2017-05/3896EDFF-DA57-41F2-9D8B-DDF95DED3F01_zps70czmzvh.jpg'

fetch_pb_image(TEST_URL)

def process_thread(url, session):
    while True:
        thread_page = BeautifulSoup(session.get(url).content, "html.parser")

        thread_pagelinks = thread_page.select(".pagelinks")[0]
        thread_pageno = int(thread_pagelinks.find("strong").text)
        next_page_link = thread_pagelinks.find("a", text=str(thread_pageno + 1))

        pb_imgs = [img.get("src") for img in thread_page.find_all("img") if "photobucket.com" in img.get("src")]

        for pb_img in pb_imgs:
            fetch_pb_image(pb_img)

        if next_page_link:
            url = next_page_link.get("href")
        else:
            break

pa_session = requests.Session()
process_thread("http://www.primitivearcher.com/smf/index.php/topic,60633.0.html", pa_session)
Title: Re: loony rants
Post by: loon on July 07, 2017, 01:17:20 am
You know, the next thing I should do is a 'web app' that takes an imgur album link and turns it into BBcode img tags to paste into PA.

but EFFORT

edit: last iteration for today i guess. works for a single thread w/ url hard-coded in.

Code: [Select]
from bs4 import BeautifulSoup
import requests
import sys, os
import hashlib, base64
import pickle
from io import BytesIO
from urllib.parse import urlparse
from os.path import splitext, basename


UA = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"

# haha i'm totally Chrome
HEADERS = {'Upgrade-Insecure-Requests': '1',
           'User-Agent': UA,
           'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
           'DNT': '1'}

hash_to_url = {}

def filename_of_url(u):
    img_url_path = basename(urlparse(u).path)
    img_ext = os.path.splitext(img_url_path)[1]
    url_hash = base64.urlsafe_b64encode(hashlib.sha3_224(u.encode('utf-8')).digest()).decode("ascii")
    hash_to_url[url_hash] = u
    return url_hash + "." + img_ext

# Returns: None
# Saves PhotoBucket image at given url
def fetch_pb_image(url):
    try:
        s = requests.Session()
        s.headers.update(HEADERS)
        req1 = s.get(url)
        s.headers.update({'referer': req1.url})
        img_req = s.get(url)#.replace('http', 'https'))

        img_data = BytesIO(img_req.content)

        img_filename = filename_of_url(url)

        with open("imgs/"+img_filename, 'wb') as out:
            out.write(img_data.read())

    except Exception as err:
        # Anything could've gone wrong. Hope that it doesn't for
        # the next image.
        # stderr should be saved to log failed images
        print(err.__class__, file=sys.stderr)
        print(err, file=sys.stderr)
        print("failed to get", url, file=sys.stderr)

def process_thread(url, session):
    while True:
        thread_page = BeautifulSoup(session.get(url).content, "html.parser")

        thread_pagelinks = thread_page.select(".pagelinks")[0]
        thread_pageno = int(thread_pagelinks.find("strong").text)
        next_page_link = thread_pagelinks.find("a", text=str(thread_pageno + 1))

        pb_imgs = [img.get("src") for img in thread_page.find_all("img") if "photobucket.com" in img.get("src")]

        for pb_img in pb_imgs:
            fetch_pb_image(pb_img)

        if next_page_link:
            url = next_page_link.get("href")
        else:
            break

try:
    with open("rels.pkl", "rb") as f:
        hash_to_url = pickle.load(f)
except FileNotFoundError:
    pass

pa_session = requests.Session()
process_thread("http://www.primitivearcher.com/smf/index.php/topic,60645.0.html", pa_session)

with open("rels.pkl", "wb") as f:
    pickle.dump(hash_to_url, f, pickle.HIGHEST_PROTOCOL)
Title: Re: loony rants
Post by: loon on July 07, 2017, 01:13:16 pm
Turns out I don't need to make anything to do the img code stuff. Here's how to most easily get BBcode links in the imgur desktop website. So the [ img ] stuff you can use in the forums.

1. Be logged into imgur. Upload your images into an album/post in "New post". You can give it a name to make it easier to find in the next steps.

2. Click on your name (with the arrow), then click on images. Not albums.

(http://i.imgur.com/NgaoyN7.png)

3. Click on the left where it says all images. Select your album with the images that you want to put on PA.

(http://i.imgur.com/J68M6g8.png)

4. Click where it says "View image info", then click on "generate image links"

(http://i.imgur.com/K95foy5.png)

5. click/drag on one of the pics to box-select them all

(http://i.imgur.com/RFH2AEL.png)

6. click on Done. Now click where it says Link (email & IM) and then on BBcode (message boards & forums). Just copypaste that stuff into PA

(http://i.imgur.com/vMSH7Wd.png)




yay tepeliks
(http://i.imgur.com/pUzcEuP.jpg)

that hornbow... bleh...

I haven't forgotten UtahChippewa's antler that he very generously sent to me. I have a dremel tool, a vise, and a drill, so I don't see why I couldn't make thumbrings pretty easily.. also thought of making deer antler guitar picks
Title: Re: loony rants
Post by: loon on July 09, 2017, 01:01:16 am
an electrical high voltage thing blew up and we lost power

still no power hours later

(https://s12.postimg.org/7jdbncnql/20170708_190710.jpg)
Title: Re: loony rants
Post by: loon on July 09, 2017, 01:21:51 pm
power is back

Well, extracting photobucket URLs from the database using MySQL from a Unix-like environment (GNU utils at least) isn't as clean as I'd hoped. it would be something like

Code: [Select]
SELECT body FROM smf_messages WHERE body LIKE "%photobucket.com%" INTO OUTFILE '/tmp/msgswithpb.csv' LINES TERMINATED BY '\n';

then from a shell..

Code: [Select]
sed -r 's/(\[\/img\])/\1\n/g' /tmp/msgswithpb.csv | grep -Po '\[img.*\]?http://.*photobucket.com/.*' | grep -o 'http.*' | sed 's|\[/img\]||'

may be easier with postgres..

if this is too complicated, I guess I'll have to do what I originally planned to (go through all the threads on the forums)


about imgur -

Quote
The Imgur API uses a credit allocation system to ensure fair distribution of capacity. Each application can allow approximately 1,250 uploads per day or approximately 12,500 requests per day

hmm..

Or I could make it into a PHP script that you can run somehow
Title: Re: loony rants
Post by: Marc St Louis on July 09, 2017, 06:51:40 pm
power is back

Well, extracting photobucket URLs from the database using MySQL from a Unix-like environment (GNU utils at least) isn't as clean as I'd hoped. it would be something like

Code: [Select]
SELECT body FROM smf_messages WHERE body LIKE "%photobucket.com%" INTO OUTFILE '/tmp/msgswithpb.csv' LINES TERMINATED BY '\n';

then from a shell..

Code: [Select]
sed -r 's/(\[\/img\])/\1\n/g' /tmp/msgswithpb.csv | grep -Po '\[img.*\]?http://.*photobucket.com/.*' | grep -o 'http.*' | sed 's|\[/img\]||'

may be easier with postgres..

if this is too complicated, I guess I'll have to do what I originally planned to (go through all the threads on the forums)


about imgur -

Quote
The Imgur API uses a credit allocation system to ensure fair distribution of capacity. Each application can allow approximately 1,250 uploads per day or approximately 12,500 requests per day

hmm..

Cripes, makes me wish I knew more about computers, well maybe not  :D
Title: Re: loony rants
Post by: Marc St Louis on July 11, 2017, 07:59:53 am
It's my understanding, from what amateurhour said, is that it's too risky and could crash the whole message board, we can't afford that
Title: Re: loony rants
Post by: amateurhour on July 11, 2017, 04:16:47 pm
To clarify that, it's risking taking a sql database as large as PA and trying to run a query this large on it and make changes. The chance of DB corruption would be there, even if low.

That being said, I don't want to have to be on standby to backup the database and do a master restore if it doesn't work.

Title: Re: loony rants
Post by: loon on July 11, 2017, 06:09:49 pm
😂

766918 posts... 6 GB max?

I could just make some sort of web app that you'd paste either a link or BBcode into..
Title: Re: loony rants
Post by: loon on July 14, 2017, 08:17:47 pm
Tapered blunt arrow with ugly composite nock. Sitka spruce
The nock is too tight. It's not that easy to do. Maybe I should've made it 1/8".
The blunt is not even/symmetrical. Sometimes it seems like I have trouble with basic stuff, such as making straight cuts, though it helps to focus.
Sigh.

(http://i.imgur.com/VEWHEfr.jpg)
(http://i.imgur.com/wkHTK7U.jpg)
(http://i.imgur.com/xRKJtSm.jpg)
Title: Re: loony rants
Post by: Hawkdancer on July 15, 2017, 12:02:06 am
Loon,
Some judicious filing with a flat diamond needle file should loosen the nock(very judicious) (R ;D >:D!  Looks like it would stop a bunny rabbit!
Hawkdancer
Title: Re: loony rants
Post by: TimBo on July 15, 2017, 05:10:10 pm
When my nocks are snug, I double fold some not-too-aggressive sandpaper and work them down that way.  That's an interesting nock design!
Title: Re: loony rants
Post by: loon on July 15, 2017, 06:31:04 pm
Thanks, I filed it some with needle files, and now it's too loose, but it's fine for me. Should've listened to "judicious" more. Gotta be patient and go slow, same applies to tillering.
It seems like it can fly straight enough.
These sort of nocks were used by the Turks.

I'm hoping that the AWS free tier will be enough for that web app.