예제 #1
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Funding on Gitcoin | OSS Motivations"

    intro = '''

<p>
    Hi there
</p>
<p>
This week, we shipped <a href="https://medium.com/gitcoin/fund-an-issue-on-gitcoin-3d7245e9b3f3">'Fund an Issue on Gitcoin.'</a>
This piece is geared for our open source funders on Gitcoin. We give you a succinct walkthrough of how
to go from opening a Gitcoin account to funding your first issue.
</p>

<p>
In addition to that, we published a longer thought piece on <a href="https://medium.com/gitcoin/building-a-platform-that-maximizes-freedom-1149968a7b05">
building platforms that maximize freedom.</a>
As cryptoeconomics and decentralized technology matures, we are fast approaching the intersection of
intrinsic and extrinsic motivations in fields such as open source.
 In this post, Vivek takes a deep dive into what defines intrinsic and extrinsic motivations and how they will mix in the future of open source.
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
Our livestream recording from a couple weeks prior is now live on the Gitcoin Youtube.
This talks features Jay Rush of Quickblocks.
<a href="https://www.youtube.com/channel/UCeKRqRjzSzq5yP-zUPwc6_w">Check it out!</a>
        </li>
        <li>
<a href="https://gitcoin.co/livestream">The Gitcoin Livestream</a> is on as regularly scheduled today at 5PM ET.
This week features David Sneider of Deco Network, a project focused on decentralizing the knowledge economy!
        </li>

    </ul>
</p>
<p>
Back to building,
</p>
'''
    highlights = [
        {
            'who': 'jvmaia',
            'who_link': True,
            'what': 'Helped us take the first step towards crowdfunding Gitcoin bounties',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/1380/718',
            'link_copy': 'View more',
        },
        {
            'who': 'StevenJNPearce',
            'who_link': True,
            'what': 'Assisted the YouveGotEth team in making the app more mobile friendly',
            'link': 'https://gitcoin.co/issue/youvegoteth/youvegoteth.github.io/15/734',
            'link_copy': 'View more',
        },
        {
            'who': 'perfectmak',
            'who_link': True,
            'what': 'Added more functions for Market Protocol parameter checking to improve error reports and debugging',
            'link': 'https://gitcoin.co/issue/MARKETProtocol/MARKET.js/67/730',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/spacemeshos/cosmic/issues/2',
            'primer': 'Help the Spacemesh team in developing the alpha of their seed implementation to ship apps cross-platform.',
        },
        {
            'url': 'https://github.com/MARKETProtocol/dApp/issues/227',
            'primer': 'Implement the new explorer UI/UX design in Market Protocol.',
        },
        {
            'url': 'https://github.com/paritytech/parity/issues/7203',
            'primer': 'Solve a puzzle with Parity nodes being bumped for TooManyPeers',
        },
    ]

    #### don't need to edit anything below this line

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            bounties.append({
                'obj': bounty,
                'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(created_on__gt=timezone.now() - timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'ecosystem_bounties': ecosystem_bounties,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #2
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "CodeFund 2.0 | Gitcoin Grants Grows"
    new_kudos_pks = [806, 394, 387]
    new_kudos_size_px = 150
    intro = '''
<p>
Hi Gitcoiners,
<p>
<p>
Over the past 3 months, Eric Berry and Nate Hopkins been heads-down on rebuilding our ethical ad platform
 from the ground up.We are excited to announce that our new and improved version of
 <a href="https://blog.codefund.app/introducing-codefund-2-0/">CodeFund has been released!</a>
CodeFund provides a simple way for open source projects to generate passive income through ethical advertising.
We take care of the details and allow contributors to stay focused on the project.
Running an OSS repo? <a href="https://codefund.app/publishers">Let us know</a>
if you'd be open to ethical, sustainable, developer centric ads on your site or repo.
</p>
<p>
We're hard at work making our first round of Gitcoin Grants successful. <a href="https://consensys1mac.typeform.com/to/HFcZKe">Let us know</a> if you'd like to be in a future cohort and we'll
reach out with more details. Want to contribute to a Gitcoin Grant? <a href="https://gitcoin.co/grants/">Take a look at our launch partners</a>, including Prysmatic Labs, Lighthouse, and more.
</p>
<p>
<h3>Kudos On Open Sea!</h3>
</p>
<p>
''' + "".join([
        f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>"
        for pk in new_kudos_pks
    ]) + '''
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
            Kudos are now live on Open Sea. Want to send a sincere compliment to friends, co-workers, or family? <a href="https://medium.com/opensea/gitcoin-kudos-are-now-tradeable-opensea-ff2e96e74c27">Check
            out our integration details </a>to find out how you can do so on OpenSea.
        </li>
        <li>
            Gitcoin Livestream is back this week! Join us <a href="https://gitcoin.co/livestream">on Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>

'''
    highlights = [
        {
            'who': 'joemphilips',
            'who_link': True,
            'what': 'Completed bounty with Diginex, cool project!',
            'link': 'https://gitcoin.co/issue/diginex/geewallet/39/2088',
            'link_copy': 'View more',
        },
        {
            'who': 'annavladi',
            'who_link': True,
            'what': 'Took notes for ETH Core Devs Call last week!',
            'link': 'https://gitcoin.co/issue/ethereum/pm/69/2062',
            'link_copy': 'View more',
        },
        {
            'who': 'mul1sh',
            'who_link': True,
            'what': 'Completed a bounty with HERCone by fixing a bug!',
            'link':
            'https://gitcoin.co/issue/HERCone/herc-igvc-registrar/1/2081',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url':
            'https://github.com/OpenZeppelin/openzeppelin-solidity/issues/1596',
            'primer': 'Interesting bounty for a new feature on Gitcoin Kudos.',
        },
        {
            'url': 'https://github.com/ethereumjs/rustbn.js/issues/25',
            'primer': 'Bounty on ethereumjs for $60!',
        },
        {
            'url': 'https://github.com/status-im/status-react/issues/7204',
            'primer': 'Extension event for transacation data on Status-React!',
        },
    ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(
            id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(
            txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights':
        kudos_highlights,
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #3
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "Gitcoin on SE Engineering Daily!  "

    intro = '''

<p>
    Hi there 👋
</p>
<p>
    This week I was on <a href="https://softwareengineeringdaily.com/2018/04/03/gitcoin-open-source-bounties-with-kevin-owocki/">Software Engineering Daily</a>! We talked through some cool things about Gitcoin, including aligning users and investors, the blockchain revolution large, and how Gitcoin focuses on making open source software sustainable for developers and repo maintainers. If you’re interested, give it a listen. 
</p>
<p>
We’ve started working towards our <a href="https://github.com/gitcoinco/GIPs/blob/570c2681cacdeaef7f4c73caad1c199b7aa27a9f/GIPS/gip-3.md">Q2 OKRs</a>. To note: if you’re an OSS Repo Maintainer in web3, <a href="https://docs.google.com/forms/d/1AeiKhCO2TefXo8wAbFerjxe2Vgci3ueqzzUpa-PFPLo/edit">we want to talk to you</a> about posting an initial bounty on your repo. Our goal is to have 15 repo’s with 3 or more issues completed through Gitcoin at the end of this quarter. Let us know!
</p>
<p>
    What else is new?
</p>
    <ul>
        <li>
Looking to hack… in South America? <a href="http://ethbuenosaires.com/">ETH Buenos Aires</a> is upcoming and is run by the wonderful team at ETHGlobal, who put on ETHDenver and ETHWaterloo prior. 
        </li>
        <li>
Want to be the first to know when new open issues are added? We launched <a href="https://twitter.com/gitcoinfeed">@gitcoinfeed on Twitter</a> which provides updates on all new activity on Gitcoin. 
        </li>
    </ul>
</p>
<p>
    I hope to see you <a href="https://gitcoin.co/slack">on slack</a>, or on the <a href="https://t.co/Uu6NqCycaR">community livestream</a> TODAY at 3pm MST ! We’ll have demo’s from the MakerDAO team regarding their DAI stable coin and <a href="https://cellarius.network/">Cellarius</a> regarding their cyberpunk universe, as well as more conversations on <a href="http://www.weekinethereum.com/">Week In Ethereum News</a> and other nerdy stuff, as always 🤖
</p>

'''
    highlights = [
        {
            'who': 'bakaoh',
            'who_link': True,
            'what': 'Helped Kames with Webpack server warnings before',
            'link': 'https://gitcoin.co/issue/KamesCG/hackathon/1',
            'link_copy': 'See more',
        },
        {
            'who': 'jeffscottward',
            'who_link': True,
            'what':
            'Completed our first bounty denominated in DAI on the MetaMask repo!',
            'link':
            'https://gitcoin.co/issue/MetaMask/metamask-extension/3621',
            'link_copy': 'View more',
        },
        {
            'who': 'voith',
            'who_link': True,
            'what':
            'Created a Websocket Provider for web3py of the Ethereum Foundation',
            'link': 'https://gitcoin.co/issue/ethereum/web3.py/566',
            'link_copy': 'See more',
        },
    ]

    bounties = [
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact='https://github.com/gitcoinco/web/issues/794'
            ),
            'primer':
            'Gitcoin is working on coding up a drip e-mail campaign on web3, open source, and blockchain. Can you help?',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact=
                'https://github.com/MyCryptoHQ/MyCrypto/issues/382'),
            'primer':
            'MyCryptoWallet is looking to create a new library / reusable module soon!',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact=
                'https://github.com/MetaMask/metamask-extension/issues/3249'),
            'primer':
            'Metamask is looking to create visually customizable keyring format.. ',
        },
    ]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'override_back_color':
        '#15003e',
        'invert_footer':
        True,
        'hide_header':
        True,
        'highlights':
        highlights,
        'subscriber_id':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #4
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from django.conf import settings
    subject = "Dashboard, Ethereal Blocks Midpoint"
    new_kudos_pks = [4553, 4547, 4544]
    new_kudos_size_px = 150
    if settings.DEBUG and False:
        # for debugging email styles
        email_style = 2
    else:
        offset = 2
        email_style = (int(timezone.now().strftime("%V")) + offset) % 7

    kudos_friday = f'''
<h3>Happy Kudos Friday!</h3>
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>
    '''
    intro = f'''
<p>
Hey Gitcoiners,
</p>
<p>
We hope our American folks had an extravagant Labor Day weekend and cruised into a relaxed, enjoyable week. On our end, we've been watching with baited breath as the Gitcoin community transforms the Ethereal Blocks bounties into real, tangible projects. If you're hacking along this go around, be sure you are watching the Discord channel for any updates. The deadline to submit your work is a week from today, September 11th, at 11:59PM EST.
</p>
<p>
It's new feature time. Our devs have been working hard on the latest iteration of the Dashboard, which is now your one stop shop for a high level overview of all your activity on the Gitcoin platform. Monitor your active bounties, applications, and submissions. The dashboard is now live at <a href="gitcoin.co/dashboard">https://gitcoin.co/dashboard/</a>.
</p>
<p>
Inch by inch, row by row, it takes some time to make Gitcoin Grants grow. We promise: we're closer to launch, and we can't wait to see what our community does this time. Have any questions about Grants? Check out the homepage <a href="https://gitcoin.co/grants/">here</a> or send us a tweet. 
</p>
{kudos_friday}
<h3>What else is new?</h3>
    <ul>
        <li>
        The Gitcoin Livestream is back this week! Join us <a href="https://gitcoin.co/livestream"> at 2PM ET this Friday. </a>
        </li>
        <li>
        Interested in our sponsors for Ethereal Blocks? Check out our most recent post featuring <a href="https://gitcoin.co/blog/ethereal-blocks-x-bancor-liquid-bounties/">Bancor.</a>
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>
'''
    highlights = [{
        'who': 'sulliwane',  
        'who_link': True,
        'what': 'Soccer Scores DOracle',
        'link': 'https://gitcoin.co/issue/iExecBlockchainComputing/iexec-apps/11/3196',
        'link_copy': 'View more',
    }, {
        'who': 'MajorTomSec',
        'who_link': True,
        'what': 'Copy updates for consistency',
        'link': 'https://gitcoin.co/issue/status-im/status-react/8846/3391',
        'link_copy': 'View more',
    }, {
        'who': 'batatsar',
        'who_link': True,
        'what': 'eth_getunclebyblockhashandindex typo',
        'link': 'https://gitcoin.co/issue/ethresearch/eth-wiki/7/3361',
        'link_copy': 'View more',
    }, ]

    sponsor = {
        'name': 'Blockmason',
        'title': 'Build and deploy your whole laundry list of microservices in a single afternoon.',
        'image_url': 'https://blockmason.link/wp-content/uploads/2018/11/logo.svg',
        'link': 'http://bit.ly/2L5IA2n',
        'cta': 'Get Started Now',
        'body': [
            'Link creates web-based APIs from your code, so you can deploy microservices instantly.'
        ]
    }

    bounties_spec = [{
        'url': 'https://github.com/MetaMask/metamask-extension/issues/6699',
        'primer': 'Malicious Dependency Update Bug Bounty',
    }, {
        'url': 'https://github.com/Synthetixio/synthetix/issues/196',
        'primer': 'Gas Optimisation R&D',
    }, {
        'url': 'https://github.com/centrifuge/security/issues/1',
        'primer': 'Security Vulnerability Bounty Centrifuge OS',
}, ]


    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 15

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }


    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(network='mainnet', txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]
    if not len(leaderboard['quarterly_payers']['items']):
        leaderboard = []

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
        'sponsor': sponsor,
        'email_style': email_style,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #5
0
파일: emails.py 프로젝트: toucedam/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Gitcoin's Summer Results & Holiday Plans"

    intro = '''

<p>
Hi there,
</p>
<p>
This week, we wrote more about our Q3 Results and Q4 Goals in <a href="https://medium.com/gitcoin/gitcoins-sprint-to-the-holidays-6d4103ad9ea4">Gitcoin's Sprint To The Holiday's</a>. We're excited about
the $350K in work already on the Gitcoin platform, and even more excited about a few things to come this winter. More to come!
</p>
<p>
Perhaps more importantly, we're in swag giveaway mode! If you ever wanted a funky Gitcoin shirt, now's the time to act.
Make a <a href="https://gitcoin.co/requests/">Gitcoin Request</a> on any open source Github issue and you'll be eligible.
</p>
<p>
We're on the move! If you'll be at Github Universe (Oct 16-17), Web 3 Summit (Oct 22 - 24), Sustain OSS (Oct 25) or Devcon 4, give us a shout!
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
        We clarified <a href="https://medium.com/gitcoin/setting-your-oss-repos-monetary-policy-9c493118cd34">Gitcoin's Monetary policy</a> this week - explaining when we provide tips / bounties to contributors.
        We hope this serves as an example for other open source projects who pay fairly for help!
        </li>
        <li>
        The Gitcoin Livestream is back as regularly scheduled this week. <a href="https://gitcoin.co/livestream">Join us at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [
        {
            'who': 'Dan-Nolan',
            'who_link': True,
            'what': 'Received an ETHPrize Bounty via Gitcoin!',
            'link': 'https://gitcoin.co/issue/ChainshotDapps/content/1/1347',
            'link_copy': 'View more',
        },
        {
            'who': 'adamskrodzki',
            'who_link': True,
            'what': 'Added tests for Winding Tree vesting contract!',
            'link':
            'https://gitcoin.co/issue/windingtree/vesting-contract/1/1375',
            'link_copy': 'View more',
        },
        {
            'who': 'barrasso',
            'who_link': True,
            'what': 'Won an ETH SF Bounty from Bloqboard!',
            'link':
            'https://gitcoin.co/issue/ethglobal/ethsanfrancisco-bounties/9/1373',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/prysmaticlabs/prysm/issues/569',
            'primer': 'Work with Prysmatic Labs on Sharding.',
        },
        {
            'url': 'https://github.com/trailofbits/echidna/issues/15',
            'primer': 'Trail Of Bits bounty via Ethereum Community Fund.',
        },
        {
            'url':
            'https://github.com/Bounties-Network/Explorer/issues/237',
            'primer':
            'Know anything about encryption? Bounties Network wants to know.'
        },
    ]

    num_leadboard_items = 5
    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }
    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #6
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Crowdfund bounties with Gitcoin"

    intro = '''

<p>
    Hi there!
</p>
<p>
This week we published <a href="https://medium.com/gitcoin/everything-you-need-to-know-about-gitcoin-fe2e3e292a21">Everything You Need to Know About Gitcoin</a>
This piece is a one stop shop for all things Gitcoin. We explain how Gitcoin works, what progress we’ve made, what cool things we’ve built, who we’ve worked with, and where we’re going next.
This post will be subsequently pinned to our Medium and updated monthly to keep our community up to date on all things Gitcoin.
</p>

<p>
We also launched two new features! The first is <a href="https://medium.com/gitcoin/crowdfunding-bounties-fd821b04309d">Crowdfunding Bounties on Gitcoin.</a>
This feature now allows anyone to contribute to funding a bounty with either social capital or physical funds.
The second feature addition is that funders now have the ability to <a href="https://medium.com/gitcoin/crowdfunding-bounties-fd821b04309d">pay out multiple contributors at once.</a>
Simply add their Github username on the ‘Advanced Payout’ screen and denominate their percent of the bounty total.
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
The <a href="http://gitcoin.co/livestream">Gitcoin Livestream</a> is back! Today at 5pm we'll be joined by Mark Beylin of Bounties Network as well as Chris Slaughter from Samsa.ai
        </li>
        <li>
Our livestreams with Matt Lockyer of ERC-998 protocol and Dave & Chris of Deco Network are now live on the <a href="https://www.youtube.com/channel/UCeKRqRjzSzq5yP-zUPwc6_w">Gitcoin Youtube channel.</a>
        </li>

    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [
        {
            'who': 'scsaba',
            'who_link': True,
            'what': 'Helped implement browser notifications on MetaMask!',
            'link':
            'https://gitcoin.co/issue/MetaMask/metamask-extension/4203/836',
            'link_copy': 'View more',
        },
        {
            'who': 'aerophile',
            'who_link': True,
            'what':
            'Crafted up a blog post on Ethereum Gas and it’s fluctuations.',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/1751/791',
            'link_copy': 'View more',
        },
        {
            'who': 'StevenJNPearce',
            'who_link': True,
            'what':
            'Fixed the collateral deposit, withdraw, and settlement return on MarketProtocol.',
            'link':
            'https://gitcoin.co/issue/MARKETProtocol/MARKET.js/106/856',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/zeppelinos/zos-cli/issues/320',
            'primer':
            'Help Zeppelin OS fix the logic contract kill switch bug',
        },
        {
            'url':
            'https://github.com/gitcoinco/web/issues/1822',
            'primer':
            'Fix an issue with non-Github links not working on Gitcoin bounties',
        },
        {
            'url': 'https://github.com/livepeer/livepeerjs/issues/155',
            'primer':
            'Assist Livepeer in fixing a loading bug in Mist browser',
        },
    ]

    #### don't need to edit anything below this line

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #7
0
파일: emails.py 프로젝트: msuess/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "Gitcoin Weekly | Welcome to Web3 "

    intro = '''

<p>
    Hi there 👋
</p>
<p>
    Many people ask me why web3 matters, philosophically, and how to use it, tactically. @vivek wrote up his thoughts on how <a href=https://media.consensys.net/a-warm-welcome-to-web3-89d49e61a7c5>web3 aims to improve upon our Internet</a> as we near the web’s 30th birthday. Give it a read and let us know what you think.
</p>
<p>
    We also created a <a href=https://www.youtube.com/watch?time_continue=1&v=cZZMDOrIo2k>two-minute video explaining how to interact with web3</a>, namely using MetaMask and ETHGasStation to interact with Ethereum’s blockchain. Hope you enjoy!
</p>
<p>
    What else is new?
    <ul>
        <li>
            Code Sponsor is on track for re-launch April 1. Follow the progress <a href=https://github.com/codesponsor/web>here</a>!
        </li>
        <li>
            We’ll be at SXSW this week! If you’re in town, <a href=https://etherealsxswmaster.splashthat.com/>RSVP here to hang</a>.
        </li>
        <li>
            Have you heard about <a href=https://etherealsummit.com/>Ethereal NY</a>? We’ll be there in May and would love to see you.
        </li>
    </ul>
</p>
<p>
    I hope to see you <a href="https://gitcoin.co/slack">on slack</a>, or on the community livestream TODAY at 3pm MST ! 🤖
</p>

'''
    highlights = [
        {
            'who': 'thelostone-mc',
            'what': 'built out a new look for our premier product, the Issue Explorer! Excited for this to go live soon..',
            'link': 'https://github.com/gitcoinco/web/pull/523',
            'link_copy': 'See more here',
        },
        {
            'who': 'kennethashley',
            'what': 'added consistent form styles across Gitcoin.',
            'link': 'https://gitcoin.co/funding/details?url=https://github.com/gitcoinco/web/issues/498&slack=1',
            'link_copy': 'View more here',
        },
        {
            'who': 'prabhu',
            'what': ' did some phenomenal work at ETH Denver building out ETHAnswer, a Gitcoin like application for Stack Overflow. Check out his demo on our Weekly Livestream today! ',
        },
    ]

    bounties = [
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url='https://github.com/MetaMask/metamask-extension/issues/3133'),
            'primer': 'An oppy to help Metamask with porting to Firefox 👇',
        },
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url='https://github.com/ethereum/py-evm/issues/362'),
            'primer': 'Help @piper at py-EVM formalize an API for a computation object (0.48 ETH, ~$350) ',
        },
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url='https://github.com/ethgasstation/ethgasstation-backend/issues/19'),
            'primer': 'ETHGasStation is on Gitcoin! See if you can help out and earn 0.25ETH along the way :) ',
        },
    ]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'override_back_color': '#15003e',
        'invert_footer': True,
        'hide_header': True,
        'highlights': highlights,
        'subscriber_id': get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #8
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Announcing 1337 (Subscriptions) | More Kudos!"

    intro = '''

<p>
Hi there,
</p>
<p>
Post Devcon, we're excited to share <a href="https://medium.com/gitcoin/eip-1337-subscriptions-launches-eacbb947e229/">we launched EIP 1337</a> (on-chain subscriptions) <a href="https://1337alliance.com/">alongside the 1337 Alliance</a>!
The launch includes a) the EIP entering a pending state, b) <a href="https://github.com/austintgriffith/tokensubscription.com/tree/13ced407c2709e99fbe7838a84a9d53f855b40bc">an audited reference implementation</a>, and c) <a href="https://1337alliance.com/">the launch of 1337 Alliance</a>!
If you're interested in learning more, <a href="https://gitcoin.co/slack">join the Gitcoin Slack</a> and the #proj-subscriptions channel or open an issue on our Github.
</p>
<p>
We're still more than excited about the <a href="https://medium.com/gitcoin/introducing-kudos-10077a4f2def">Kudos launch!</a> This week, we'd like to recognize a few folks
from the 1337 Alliance who have made our progress on subscriptions possible. If you'd like to use Kudos to compliment anyone from your network,
<a href="https://gitcoin.co/kudos/marketplace/">check out the Kudos Marketplace</a> and give it a try!
</p>

<ul>
<li>
    Kudos to <strong>Andrew Redden</strong> for <strong>being a party parrot</strong> at Devcon!
    <img style='max-width: 45px; display: inline; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/395/'>
</li>
<li>
    Kudos to <strong>Austin Griffith</strong> for <strong>being a creative cat</strong>!
    <img style='max-width: 45px; display: inline; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/385/'>
</li>
<li>
    Kudos to <strong>Andy Thudhope</strong> for <strong>being a great mentor</strong> to the Gitcoin team!
    <img style='max-width: 45px; display: inline; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/394/'>
</li>
<li>
    Kudos to <strong>Dean Eigenmann</strong> for <strong>the Kudos Smart Contract Audit</strong>!
    <img style='max-width: 45px; display: inline; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/324/'>
</li>
<li>
    Kudos to <strong>Mark Beylin</strong> for <strong>being a magical unicorn</strong>.  Gitcoin would not be where it is today without Mark's help!
    <img style='max-width: 45px; display: inline; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/185/'>
</li>
</ul>

<p>
Speaking of Kudos, check out all the new kudos launched this week:
</p>

<p>

''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: 75px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in [396, 395, 394, 389, 388, 387, 386, 385]]) + '''


</p>

<h3>What else is new?</h3>
    <ul>
        <li>
        The Gitcoin crew is back from a busy October between ETH SF, Github Universe, SustainOSS, and Devcon.
        We have lots to share about what we learned along the way! Join the livestream and be on the lookout for more.
        </li>
        <li>
        The Gitcoin Livestream will be on as regularly scheduled in two days. <a href="https://gitcoin.co/livestream">Join us Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [{
        'who': 'lastperson',
        'who_link': True,
        'what': 'Worked on a Mythril Bounty with the ConsenSys Diligence team!',
        'link': 'https://gitcoin.co/issue/ConsenSys/mythril-ctf-public/3/1613',
        'link_copy': 'View more',
    }, {
        'who': 'kuhnchris',
        'who_link': True,
        'what': 'Worked with MikeyMicrophone on Commissulator!',
        'link': 'https://gitcoin.co/issue/mikeymicrophone/commissulator/8/1635',
        'link_copy': 'View more',
    }, {
        'who': 'SomniaStellarum',
        'who_link': True,
        'what': 'Worked with the EF on Hive, a testing framework.',
        'link': 'https://gitcoin.co/issue/karalabe/hive/122/1136',
        'link_copy': 'View more',
    }, ]

    bounties_spec = [{
        'url': 'https://github.com/ethereum/vyper/issues/983',
        'primer': 'Work with the Vyper team on improving the language',
    }, {
        'url': 'https://github.com/PwayGames/PWay.Contracts/issues/1',
        'primer': 'Hunt for bugs with PWay Contracts.',
    }, {
        'url': 'https://github.com/gitcoinco/web/issues/2684',
        'primer': 'Add to Gitcoin Avatars in November 2018!'
    }, ]

    num_leadboard_items = 5
    highlight_kudos_ids = []


    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(txid='').order_by('-created_on')[:4]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(created_on__gt=timezone.now() - timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'ecosystem_bounties': ecosystem_bounties,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #9
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Post A Bounty in 90 Seconds"

    intro = '''

<p>
    Hi there 👋
</p>
<p>
    <a href="https://medium.com/gitcoin/tutorial-post-a-bounty-in-90-seconds-a7d1a8353f75">Here’s how to post a bounty in 90 seconds</a>! In less than two minutes, you’ll be well on your way to bringing contributors to your repositories. We plan to continue this tutorial series with more on best practices for using Gitcoin to grow your open source repo.   
</p>
<p>
    What else is new?
</p>
    <ul>
        <li>
This week we’ll have the Aragon project, MARKET Protocol, and Wyvern Protocol on the livestream (in a few hours; at 3pm MST / 5pm EST). <a href="https://calendar.google.com/calendar/r?cid=N3JxN2dhMm91YnYzdGs5M2hrNjdhZ2R2ODhAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ">Add it to your Google Calendar here.</a>
        </li>
        <li>
Want to be the first to know when new open issues are added? We launched <a href="https://twitter.com/gitcoinfeed">@gitcoinfeed on Twitter</a> which provides updates on all new activity on Gitcoin.
        </li>
    </ul>
</p>
<p>
I hope to see you on <a href="https://gitcoin.co/slack">Slack</a> or on <a href="https://github.com/gitcoinco/web">Github</a>. If you’re interested in growing open source and have some extra time, come by. We’re working to make Gitcoin the best place on the internet to do so. 
</p>

'''
    highlights = [
        {
            'who': 'cryptomental',
            'who_link': True,
            'what':
            'Helping Gitcoin to de-couple the floating ETH/USD exchange rate from when the bounty was posted',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/693',
            'link_copy': 'See more',
        },
        {
            'who': 'eemp',
            'who_link': True,
            'what':
            'Worked with @TimVanMourik on some file parsing work for his open source repo, GiraffeTools',
            'link': 'https://github.com/TimVanMourik/GiraffeTools/issues/4',
            'link_copy': 'View more',
        },
        {
            'who': 'bakaoh',
            'who_link': True,
            'what':
            'Back at it again! Created a new deployer for MARKET Protocol using the Binance API.',
            'link': 'https://gitcoin.co/issue/MARKETProtocol/Dapp/85',
            'link_copy': 'See more',
        },
        {
            'who': 'jakerockland',
            'who_link': True,
            'what':
            'Coded up the new email designs on Gitcoin (including the one you\'re looking at now!)',
            'link': 'https://github.com/gitcoinco/web/pull/746',
            'link_copy': 'View more',
        },
    ]

    bounties = [
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact='https://github.com/gitcoinco/web/issues/865'
            ),
            'primer':
            'We’re working on a new project called ETH Avatar! Appreciate anyone interested in contributing. ',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact=
                'https://github.com/TimVanMourik/GiraffeTools/issues/7'),
            'primer':
            'Work with @TimVanMourik on the foundation for a Github OAuth Integration. ',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact='https://github.com/gitcoinco/web/issues/796'
            ),
            'primer':
            'We’re working on making Gitcoin more trustworthy. If you have ideas on best practices, we could use the help. ',
        },
    ]

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber_id':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #10
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Gitcoin Requests | $60K ECF Grant"

    intro = '''

<p>
Hi there,
</p>
<p>
This week, we launched <a href="https://gitcoin.co/requests/">Gitcoin Requests</a>. Gitcoin Requests allows funders and developers to request bounties on
specific Github issues. We hope that maintainers and developers alike use this feature to let us know what else they'd
like to have funded so we can continue building at break-neck speed! <a href="https://gitcoin.co/requests/">Checkout Gitcoin Requests here</a>.
</p>
<p>
To this end, we have recently received $60K grant from the Ethereum Community Fund to post bounties across a variety of Web 3
repo's who are building interesting infrastructure tools in the Ethereum space. Where might you go to request funding on your repo?
You know the answer :)
<p>
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
We're still working with the Ethereum Foundation to find the best and brightest developers to get involved directly on Ethereum's
codebase and would love to hear from you. If you have experience building out test cases and are familiar with consensus systems,
join #focus-dev-testing <a href="https://gitcoin.co/slack">on Gitcoin Slack</a>
        </li>
        <li>
        Did you know <a href="https://codefund.io">CodeFund</a> is part of Gitcoin? <a href="https://codefund.io">CodeFund</a> is an open source advertising platform that is built to help developers generate revenue. We are currently looking for bloggers and websites that focus on blockchain development and have at least 1,000 visitors per month. If you or someone you know fits this, register to be a publisher at <a href="https://codefund.io/register/publisher">https://codefund.io/register/publisher</a>
        </li>
        <li>
We published our recent Gitcoin Livestream with Decentraland on Gitcoin's Youtube. It was a great conversation on NFT's and their virtual world.
Check out Chainshot and Portis on this week's <a href="https://gitcoin.co/livestream">this week's livestream</a> today at 5PM ET. We'd love to have you!
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [
        {
            'who': 'tcrowe',
            'who_link': True,
            'what': 'Build a feedback form on the Plasma Learning page.',
            'link': 'https://gitcoin.co/issue/ethsociety/learn-plasma/17/970',
            'link_copy': 'View more',
        },
        {
            'who': 'pinkiebell',
            'who_link': True,
            'what': 'Built out the Gitcoin Requests highlighted above!',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/2036/982',
            'link_copy': 'View more',
        },
        {
            'who': 'evgeniuz',
            'who_link': True,
            'what': 'Helped MetaMask to remember recent RPC URL\'s.',
            'link':
            'https://gitcoin.co/issue/Bounties-Network/bounties.network/7/927',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url':
            'https://github.com/diadata-org/api-golang/issues/22',
            'primer':
            'Have Go chops? Diadata is building out an API and could use your help.',
        },
        {
            'url':
            'https://github.com/raiden-network/raiden/issues/1426',
            'primer':
            'A longtime open issue to help Raiden with state channels work.',
        },
        {
            'url': 'https://github.com/livepeer/livepeerjs/issues/44',
            'primer': 'Help Livepeer fix a funny bug in fullscreen mode.',
        },
    ]

    num_leadboard_items = 5
    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }
    for key, val in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.filter(
            active=True,
            leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #11
0
파일: emails.py 프로젝트: trustbirungi/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "MetaMask Internationalization | From a Gitcoin Bounty to an Epic "

    intro = '''

<p>
    Hi there 👋
</p>
<p>
    Last week, we saw a bounty on MetaMask snowball into an epic -- all set to be built with Gitcoin bounties. <a href="https://medium.com/gitcoin/metamask-internationalizes-via-gitcoin-bf1390c0301c">Read more</a> on how MetaMask’s internationalization strategy started with a contribution from one Gitcoiner, @mapmeld. 
</p>
<p>
    The <a href="http://gitcoin.co/faucet">Gitcoin Faucet</a> is live for those interested in a small ETH distribution to interact with Ethereum's mainnet for the first time. The first batch of distributions have been made! Want to use your distribution on Gitcoin?  The <a href="https://gitcoin.co/explorer">open issues page</a> is the best place to start. 
<p>
    What else is new?
    <ul>
        <li>
Which blockchain based, open-source projects would you like to see on Gitcoin? <a href="https://docs.google.com/forms/d/e/1FAIpQLSfUDnLRXu03eGldeb3twlgdccg4xvRI22XwRo7pm60pemDEpw/viewform">We’re offering a 15% finders fee</a> if an intro you make leads to a funded issue!
        </li>
        <li>
Revamped <a href="https://gitcoin.co/tools">Tools Page</a> is Up! We just launched an <a href="https://gitcoin.co/universe">Offchain Bounties tool in alpha</a>.
        </li>
        <li>
Looking for the next ETH Hackathon? Check out <a href="http://hackital.io/">Hackital</a>, in Washington DC on April 27- April 29th.
        </li>
        <li>
A <a href="https://github.com/gitcoinco/web/blob/master/readme_widget.md">wild Gitcoin Widget</a> appears for your Github read-me! Looking to get more OSS contributors to your repo? This will quickly show any Gitcoin issues you have open. 
        </li>
    </ul>
</p>
<p>
    I hope to see you <a href="https://gitcoin.co/slack">on slack</a>, or on the community livestream TODAY at 3pm MST ! Agenda items for this week: demo’s from @coderberry at Code Sponsor and 8trac, SXSW Hackathon  winner, as well as more simulation theory conversations, as always 🤖
</p>

'''
    highlights = [
        {
            'who': 'murduk',
            'who_link': True,
            'what':
            'On last week’s newsletter, this was an open bounty. Now, it is in the Ethereum Foundation’s py-evm. Great work!',
            'link': 'https://gitcoin.co/issue/ethereum/py-evm/362',
            'link_copy': 'See more',
        },
        {
            'who': 'maektwain',
            'who_link': True,
            'what':
            'Allowed any ERC20 token to be displayed on MARKET Protocol’s dApp',
            'link': 'https://gitcoin.co/issue/MARKETProtocol/Dapp/71',
            'link_copy': 'View more',
        },
        {
            'who': 'michelgotta',
            'who_link': True,
            'what':
            'built the beautiful Gitcoin widget headlined above. Appreciate your effforts!',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/594',
            'link_copy': 'See more',
        },
    ]

    bounties = [
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url='https://github.com/ipld/js-cid/issues/38'),
            'primer':
            'We want more projects on Gitcoin. Gitcoin Requests is one hypothesis on how to get there. Earn .3ETH along the way!  ',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url='https://github.com/ethereum/web3.py/issues/666'),
            'primer':
            'The Ethereum Foundation’s web3py needs help with Constructor Functions. Any ideas? 0.4 ETH available upon merge. ',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url='https://github.com/gitcoinco/web/issues/671'),
            'primer':
            'Have Webpack experience? IPLD is working on linked data and could use a hand.',
        },
    ]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'override_back_color':
        '#15003e',
        'invert_footer':
        True,
        'hide_header':
        True,
        'highlights':
        highlights,
        'subscriber_id':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #12
0
파일: emails.py 프로젝트: orbweaver-/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from django.conf import settings
    subject = "Last Day Of Gitcoin Grants Round 2 | $65K In Prizes @ MSFT Hackathon"
    new_kudos_pks = [2240, 2243, 2242]
    new_kudos_size_px = 150

    kudos_friday = f'''
<h3>Happy Kudos Friday!</h3>
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>
    '''
    intro = f'''
<p>
Hi Gitcoiners,
</p>
<p>
Today is the last day for your contributions to Gitcoin Grants to be matched with our <a href="https://medium.com/gitcoin/gitcoin-grants-50k-open-source-fund-e20e09dc2110/">$50K Open Source Fund</a>. Head to <a href="https://gitcoin.co/grants">Gitcoin Grants</a> and make your contribution to the
Ethereum ecosystem today!
</p>
<p>
The Ethereal Hackathon is halfway through and is going in full force. 500 hackers, $65K in prizes, and over 50 prizes and bounties to win. <a href="https://gitcoin.co/hackathon/ethhack2019/">Check out the prizes</a> and 'Start Work' on  a bounty today, or refer a friend and get $500 if they complete
a prize. Main track winners will receive free tickets to Ethereal NY to present their project live on stage!
</p>

{kudos_friday}
<h3>What else is new?</h3>
    <ul>
        <li>
            Our <a href="https://medium.com/gitcoin/a-gitcoin-platform-fee-905a0507961f">10% platform fee is now live.</a> <a href="https://twitter.com/owocki/status/1114198908274503680">Join the conversation</a> on how we monetize Gitcoin from here. We'd love to hear your feedback!
        </li>
        <li>
            Gitcoin Livestream is back this week with Status Embark and others from the Ethereal hackathon! Join us <a href="https://gitcoin.co/livestream"> at a new time, 3PM ET, or catch it on <a href="https://twitter.com/gitcoin">Twitter</a>!
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>

'''
    highlights = [{
        'who': 'kielek',
        'who_link': True,
        'what': 'Great work on your first bounty, kielek :)',
        'link': 'https://gitcoin.co/issue/witnet/witnet-rust/567/2802',
        'link_copy': 'View more',
    }, {
        'who': 'nanspro',
        'who_link': True,
        'what': 'Great work on the Solidity repo.',
        'link': 'https://gitcoin.co/issue/ethereum/solidity/6202/2737',
        'link_copy': 'View more',
    }, {
        'who': 'iamonuwa',
        'who_link': True,
        'what': 'Onuwa is back with great work on Status',
        'link': 'https://gitcoin.co/issue/status-im/discover-dapps/25/2818',
        'link_copy': 'View more',
    }, ]

    bounties_spec = [{
        'url': 'https://github.com/smartcontractkit/chainlink/issues/1091',
        'primer': 'Work on Chainlink, an awesome project, as a part of Ethereal Hacks',
    }, {
        'url': 'https://github.com/ConsenSys/mythx-gitcoin/issues/3',
        'primer': 'Build out MythX functionality in the IDE!',
    }, {
        'url': 'https://github.com/Azure-Samples/bc-community-samples/issues/13',
        'primer': 'Computer vision background? MSFT needs you!',
    }, ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 15

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(network='mainnet', txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]
    if not len(leaderboard['quarterly_payers']['items']):
        leaderboard = []

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #13
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Gitcoin's Hacktoberfest | Paying Rent w. Crypto"

    intro = '''

<p>
Hi there,
</p>
<p>
Gitcoin's Hacktoberfest plans <a href="https://gitcoin.co/slack">are live</a>! We're aiming to fund 100 <a href="https://gitcoin.co/requests">Gitcoin Requests</a>
on issues which need help in the open source ecosystem. Know of a project who could use more developers to help the maintainer(s) along? Let us know!
</p>
<p>
We welcomed a guest blog from Joseph Schiarizzi this week on <a href="https://medium.com/gitcoin/how-i-paid-my-rent-with-crypto-3cfa76fe943">how he paid his rent in crypto</a>
in August! Gitcoin is glad to be a place which makes this possible and looks forward to a future where developers can sustain themselves on open source contributions!
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
        There have now been 30 Gitcoin Requests! Do you have a Github issue you want solved? Make <a href="https://gitcoin.co/requests">a Gitcoin Request</a> and we'll review in 24 hours.
        If you're a developer and you see a 'Good First Issue' you'd work on for a bounty, <a href="https://gitcoin.co/requests">let us know</a>! Gitcoin Requests
        is a way for developers and maintainers to make their voice heard.
        </li>
        <li>
        Gitcoin Livestream today includes Bounties Network and EIP-1337 at 5PM ET. We're excited to be back - <a href="https://gitcoin.co/livestream">add to your calendar here!</a>.
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [{
        'who': 'StevenJNPearce',
        'who_link': True,
        'what': 'Added browser reload on file change to Embark!',
        'link': 'https://gitcoin.co/issue/embark-framework/embark/832/1214',
        'link_copy': 'View more',
    }, {
        'who': 'iamonuwa',
        'who_link': True,
        'what': 'Alerted users of the Ethereum network they are using for Electric Feel.',
        'link': 'https://gitcoin.co/issue/electricfeelco/travay/11/1219',
        'link_copy': 'View more',
    }, {
        'who': 'lastmjs',
        'who_link': True,
        'what': 'Helped grow the Ethereum Alarm Clock!',
        'link': 'https://gitcoin.co/issue/ethereum-alarm-clock/timenode-core/194/979',
        'link_copy': 'View more',
    }, ]

    bounties_spec = [{
        'url': 'https://github.com/tkstanczak/nethermind/issues/86',
        'primer': 'Implement Discovery on Nethermind.',
    }, {
        'url': 'https://github.com/PolymathNetwork/polymath-core/issues/272',
        'primer': 'Work on Automated blacklisting from Polymath.',
    }, {
        'url': 'https://github.com/embark-framework/embark/issues/816',
        'primer': 'Pick up the only open Status bounty!',
    }, ]

    num_leadboard_items = 5
    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }
    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(created_on__gt=timezone.now() - timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'ecosystem_bounties': ecosystem_bounties,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #14
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Getting Started With Gitcoin | Gitcoin Profiles"

    intro = '''

<p>
    Hi there
</p>
<p>
This week, we shipped <a href="https://medium.com/gitcoin/getting-started-with-gitcoin-fa7149f2461a">
Getting Started With Gitcoin.</a>
In this post designed for our Gitcoin contributors, you’ll find all the info you
need to set up your Gitcoin account and get to work contributing to open source projects!
</p>
We also published our first installment of
<a href="https://medium.com/gitcoin/gitcoiner-profile-kenneth-ashley-b8f6e8b458a6">Gitcoin Profiles.</a>
Gitcoiner Profiles are our way of saying thank you to our great community of open source developers for
all of their hard work.
This week's profile features Kenneth Ashley who has worked with Market Protocol, MyCrypto, CodeFund, and Gitcoin.

<h3>What else is new?</h3>
    <ul>
        <li>
<a href="https://youtu.be/_VJcqY2t_4U">A Dharma Protocol demo</a> featuring Nadav Hollander is now up on our
Youtube channel.
        </li>
        <li>
<a href="https://gitcoin.co/livestream">The Gitcoin Livestream</a> is on as regularly scheduled today at 5PM ET.
This week features Matt Lockyer of ERC-998 protocol and Jay Rush of QuickBlocks!
        </li>
        <li>
Want to join a global blockchain hack summit and compete for $100k in prizes? Use code "gitcoin" during sign
up at <a href="https://hacksummit.org/hackathon">hacksummit.org/hackathon</a> to join for free!
        </li>
        <li>
Are you a Go developer looking for a role in Ethereum? Respond to this email and we'll let you know about
some interesting opportunities!
        </li>
    </ul>
</p>
<p>
Back to building,
</p>
'''
    highlights = [
        {
            'who': 'iamonuwa',
            'who_link': True,
            'what': 'Added a protocol restriction to limit bonding to one transcoder on Livepeer.',
            'link': 'https://gitcoin.co/issue/livepeer/livepeerjs/94/652',
            'link_copy': 'See more',
        },
        {
            'who': 'scsaba',
            'who_link': True,
            'what': 'Made possible to view address of an added token on MetaMask!',
            'link': 'https://gitcoin.co/issue/MetaMask/metamask-extension/4440/644',
            'link_copy': 'View more',
        },
        {
            'who': 'palevoo',
            'who_link': True,
            'what': 'Worked with Balance to display non-fungible tokens in their wallet.',
            'link': 'https://gitcoin.co/issue/balance-io/balance-manager/240/571',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/zeppelinos/labs/issues/102',
            'primer': 'Help build the future of non-fungible protocols with ZeppelinOS',
        },
        {
            'url': 'https://github.com/AugurProject/augur-core/issues/689',
            'primer': 'Put the finishing touches on Augur less than a month before their main net launch!',
        },
        {
            'url': 'https://github.com/paritytech/polkadot/issues/212',
            'primer': 'Contribute to Parity Tech, a leading Ethereum client.',
        },
    ]

    #### don't need to edit anything below this line

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.get(
                current_bounty=True,
                github_url__iexact=nb['url'],
            )
            bounties.append({
                'obj': bounty,
                'primer': nb['primer']
                })
        except:
            pass

    ecosystem_bounties = ExternalBounty.objects.filter(created_on__gt=timezone.now() - timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'ecosystem_bounties': ecosystem_bounties,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #15
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from django.conf import settings
    subject = "A Free Gitcoin Avatar For YOU!"
    new_kudos_pks = [1904, 1923, 1933]
    new_kudos_size_px = 150


    from dashboard.models import Profile
    from django.templatetags.static import static
    profile = Profile.objects.get(email=to_email)
    if not profile:
        return
    avatars = profile.avatar_baseavatar_related.filter(active=True)
    always_generate_new_avatar = settings.DEBUG
    if not avatars.last() or always_generate_new_avatar:
        avatar = profile.build_random_avatar()
        avatar_url = avatar.avatar_url
    else:
        avatar_url = avatars.first().avatar_url

    kudos_friday = f'''
<h3>Happy Kudos Friday!</h3>
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>
    '''
    kudos_friday = ''    
    animated_avatars = settings.BASE_URL + static('/static/v2/images/animated_avatars.gif')
    intro = f'''
<p>
Hi Gitcoiners,
<p>
There are thousands of community members at Gitcoin.  They each have a diverse set of skills, attributes, preferences, and backgrounds.
</p>
<p>
<a href="https://gitcoin.co/onboard/profile/?steps=avatar#section-title">
<img src='{animated_avatars}'>
</a>
</p>
<p>
In order to celebrate this, we built the <a href="https://gitcoin.co/onboard/profile/?steps=avatar#section-title">Gitcoin avatar builder</a>. The Gitcoin avatar builder allows you to express yourself with 100s of unique items, that together allow you to create millions of permutations of unique avatars.
</p>
<p>
This week, I have a special treat for you.  We've made you a special Gitcoin avatar.
</p>
<p>
Here it is!
</p>
<p>
<img src={avatar_url}
</p>
<p>
Of course, this avatar was just generated for fun :)  We recommend you head over to the <a href="https://gitcoin.co/onboard/profile/?steps=avatar#section-title">Gitcoin Avatar Builder</a> and create an avatar that you think is uniquely *you* today!
</p>

<p>
{kudos_friday}
<h3>What else is new?</h3>
    <ul>
        <li>
            Gitcoin Livestream is back this week! Join us <a href="https://gitcoin.co/livestream">on Friday at 5PM ET or catch it on <a href="https://twitter.com/GetGitcoin">Twitter</a>!
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>

'''
    highlights = [{
        'who': 'malihawrites',
        'who_link': True,
        'what': 'Created an overview of MetaMask!',
        'link': 'https://gitcoin.co/issue/kauri-io/Content/19/2441',
        'link_copy': 'View more',
    }, {
        'who': 'jacobcreech',
        'who_link': True,
        'what': 'Created taxonomy for ETHMagicians Business Ring site',
        'link': 'https://gitcoin.co/issue/FEMBusinessModelsRing/web3_revenue_primitives/12/2473',
        'link_copy': 'View more',
    }, {
        'who': 'eswarasai',
        'who_link': True,
        'what': 'Worked on ESLint Formatting issue on Sabre.',
        'link': 'https://gitcoin.co/issue/b-mueller/sabre/5/2460',
        'link_copy': 'View more',
    }, ]

    bounties_spec = [{
        'url': 'https://github.com/status-im/status-react/issues/4158',
        'primer': 'Status React featured bounty!',
    }, {
        'url': 'https://github.com/status-im/status-channels-dapp/issues/3',
        'primer': 'Big R&D Bounty on Status-Channels-dApp.',
    }, {
        'url': 'https://github.com/Remmeauth/gitcoin-remme-contest/issues/1',
        'primer': 'Build a smart-home solution based on Remme Protocol',
    }, ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 15

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(network='mainnet', txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #16
0
파일: emails.py 프로젝트: spicer23/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "Gitcoin Q1 Updates "

    intro = '''

<p>
    Hi there 👋
</p>
<p>
    This week, Gitcoin Core gave a <a href="https://medium.com/gitcoin/gitcoin-q1-2018-update-1edaf09da3a">Q1 update and a look ahead</a> to what’s up next in 2018. Here are some of the key results.
</p>
    <ul>
        <li>
$20K (42ETH) in funded issues has made its way through the platform in the first 6 months of launch, leading 14.5k lines of (good) code on Pilot Projects like MetaMask, Truffle, web3py, MyCryptoWallet and more :)          </li>
        <li>
We’ve reached over 4096 Gitcoiners on the Newsletter & over 2048 Gitcoiners on Slack & Twitter, respectively
        </li>
        <li>
Our <a href="https://github.com/gitcoinco/GIPs/blob/master/GIPS/gip-3.md">Q2 OKR’s are finalized</a>. We intend to scale our core product, <a href="http://gitcoin.co/explorer">the Issue Explorer</a>, and add more to the toolset useful to the mission to grow open source        </li>
        </li>
    </ul>
<p>
    What else is new?
</p>
    <ul>
        <li>
Want to be the first to know when new open issues are added? We launched <a href="https://twitter.com/gitcoinfeed">@gitcoinfeed on Twitter</a> which provides updates on all new activity on Gitcoin. 
        </li>
        <li>
What open source projects do you want to see on Gitcoin? <a href="https://docs.google.com/forms/d/1AeiKhCO2TefXo8wAbFerjxe2Vgci3ueqzzUpa-PFPLo/edit">Let us know!</a> We’re offering a 15% finders fee if an intro you make leads to a funded issue!
        </li>
    </ul>
</p>
<p>
    I hope to see you <a href="https://gitcoin.co/slack">on slack</a>, or on the community livestream TODAY at 3pm MST ! We’ll have a demo from Nick Neuman on <a href="https://medium.com/@nickneuman/keysplit-private-key-security-for-cryptocurrency-owners-d1653ea9631d">KeySplit</a> as well as more conversations on <a href="http://www.weekinethereum.com/">Week In Ethereum News</a> and other nerdy stuff, as always 🤖
</p>

'''
    highlights = [
        {
            'who': 'zoek',
            'who_link': True,
            'what': 'Gave our good friend Gitcoin Bot a much needed tune up! Thank you for your efforts.',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/596',
            'link_copy': 'See more',
        },
        {
            'who': 'cassidypignatello',
            'who_link': True,
            'what': 'Image compression work across the Gitcoin platform',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/608',
            'link_copy': 'View more',
        },
        {
            'who': 'msuess',
            'who_link': True,
            'what': 'Implemented the contribute() method from StandardBounties, allowing Gitcoin funders to increase the funding amount for any bounty!',
            'link': 'https://gitcoin.co/issue/gitcoinco/web/617',
            'link_copy': 'See more',
        },
    ]

    bounties = [
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url__iexact='https://github.com/TrustWallet/trust-wallet-ios/issues/493'),
            'primer': 'Work with TrustWallet to improve their CoinTicker functionality (from CoinMarketCap)   ',
        },
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url__iexact='https://github.com/MarketProject/Dapp/issues/53'),
            'primer': 'Create a guided deployment between Binance and MARKET Protocol ',
        },
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url__iexact='https://github.com/MetaMask/metamask-extension/issues/3249'),
            'primer': '1.1 ETH bounty on a Customizable Keyring Format alongside the great developers at MetaMask ',
        },
    ]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'override_back_color': '#15003e',
        'invert_footer': True,
        'hide_header': True,
        'highlights': highlights,
        'subscriber_id': get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #17
0
파일: emails.py 프로젝트: ej-sanmartin/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "In Pursuit Of Open Source Financial Freemdom"
    new_kudos_pks = [528, 588, 589]
    new_kudos_size_px = 150
    intro = '''
<p>
Hi there,
</p>
<p>
We wrote a post this week on the pursuit of <a href="https://medium.com/gitcoin/open-source-financial-freedom-8d852cbb6247">Open Source Financial Freedom</a>.
It explains a bit more about how we think about open source sustainability, paths towards financial freedom, and why blockchain is important in the journey.
Please do give it a read and let us know what you think.
</p>
<p>
Austin Griffith with Gitcoin Labs continues to churn out great developer guides. Check out his latest work <a href="https://medium.com/gitcoin/moloch-rises-b292b64565f2">on the Moloch DAO</a>
and see how easy it is to spin up a minimum viable decentralized organization, today.
</p>
<p>
Last chance! Who is making the most impact on your OSS or Web3 project? Do you know someone that solved a problem in a creative way,
built something interesting, or truly deserves a thanks? <a href='https://github.com/gitcoinco/web/issues/2816'>Nominate open source contributors to receive a limited edition and unique Kudos!</a>
</p>
<h3>New Kudos This Week</h3>
<p>
Check out a few of the new kudos launched this week:
</p>
<p>
''' + "".join([
        f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>"
        for pk in new_kudos_pks
    ]) + '''
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
            Colony is running an on-going bug bounty program using Gitcoin for the <a href="https://github.com/JoinColony/colonyNetwork">colonyNetwork repository</a>. 
            Awards go up to $20,000 DAI for critical bugs. <a href="https://docs.colony.io/colonynetwork/bug-bounty-program-overview/">See the Rules page for more.</a>
        </li>
        <li>
            Gitcoin Livestream is back this week! Polkadot will be on, alongside a guest to be named. Join us <a href="https://gitcoin.co/livestream">Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Thanks for reading to the end!  <a href="https://gitcoin.co/kudos/redeem/red_staplers_for_all">Here's a kudos just for you :)</a>. 
<BR>
<BR>
OK, Back to BUIDLing,
</p>
'''
    highlights = [
        {
            'who': 'pvienhage',
            'who_link': True,
            'what': 'Reviewed Bloom smart contract for bugs!',
            'link': 'https://gitcoin.co/issue/hellobloom/core/35/1854',
            'link_copy': 'View more',
        },
        {
            'who': 'frederikbolding',
            'who_link': True,
            'what': 'Great work on Embark things!',
            'link':
            'https://gitcoin.co/issue/status-im/status-react/6780/1806',
            'link_copy': 'View more',
        },
        {
            'who': 'chriscates',
            'who_link': True,
            'what':
            'Helped build a Hamburger menu on mobile for Unlock Protocol',
            'link': 'https://gitcoin.co/issue/unlock-protocol/unlock/431/1820',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/centrifuge/precise-proofs/issues/29',
            'primer': 'Work with centrifuge on Precise Proofs.',
        },
        {
            'url': 'https://github.com/status-im/status-react/issues/6199',
            'primer': 'Add support for Universal Links on Status React.',
        },
        {
            'url': 'https://github.com/hellobloom/share-kit/issues/28',
            'primer': 'Complete Bloom sign-in kit example!',
        },
    ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(
            id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(
            txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights':
        kudos_highlights,
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #18
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from django.conf import settings
    subject = "Waterloo Sunrise"
    new_kudos_pks = [5163, 5077, 5126]
    new_kudos_size_px = 150
    if settings.DEBUG and False:
        # for debugging email styles
        email_style = 2
    else:
        offset = 2
        email_style = (int(timezone.now().strftime("%V")) + offset) % 7

    kudos_friday = f'''
<h3>Happy Kudos Friday!</h3>
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>
    '''
    intro = f'''
<p>
Hey Gitcoiners,
</p>
<p>
    I'm back on the road again, hitting the tarmac once more to join the hacking goodness and celebration at ETH Waterloo. If you'll be attending, be sure to say hello: I'm looking forward to seeing all of your incredible faces.  You can check out the schedule <a href="https://ethwaterloo.com/#schedule"> with more information about my talk here.</a> Tweet at me: I'm <a href="https://twitter.com/owocki">@owocki.</a>
</p>
<p>
    The development team is hard at work again with the successful push to release another version of Gitcoin. If you'd like to take a look at our release notes (with fun goodies such as new Kudos, fresh quests, and boundless bug fixes) be sure to take a look at our Github repo. The latest release notes live <a href="https://github.com/gitcoinco/web/releases/tag/20191106master"> here</a>.
</p>
<p>
    Web3 World is progressing along! If you're joining us for this fall/winter hack, be sure to get your submissions in by 11:59 PM EST on November 11th. We're excited to see your work and projects you've put together.
</p>
{kudos_friday}
<h3>What else is new?</h3>
    <ul>
        <li>
        The Gitcoin Livestream is on for this week! Join us <a href="https://gitcoin.co/livestream"> at 2PM ET this Friday!</a>
        </li>
        <li>
        As we mentioned earlier this week, YouTube recordings of our livestreams are finally being released. Check them out at <a href="https://youtube.com/gitcoinmedia"> our YouTube channel. </a>
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>
'''
    highlights = [{
        'who': 'nionis',
        'who_link': True,
        'what': 'Create HOPR Widget According To Design Mockup',
        'link': 'https://gitcoin.co/issue/hoprnet/hopr-website/16/3607',
        'link_copy': 'View more',
    }, {
        'who': 'frippo40',
        'who_link': True,
        'what': 'Ultimate Package Tracker',
        'link': 'https://gitcoin.co/issue/iExecBlockchainComputing/iexec-apps/23/3420',
        'link_copy': 'View more',
    }, {
        'who': 'janus',
        'who_link': True,
        'what': 'Ethereum Anemometer',
        'link': 'https://gitcoin.co/issue/iExecBlockchainComputing/iexec-apps/24/3421',
        'link_copy': 'View more',
    }, ]

    sponsor = {
        'name': 'Sarchy',
        'title': '5 minute thinking game with Ether for winner',
        'image_url': '',
        'link': 'http://bit.ly/sarchy-gitcoin-weekly',
        'cta': 'Play the \'Trusting Trust\' game',
        'body': [
           'Due to data manipulation by big tech companies, Trust is becoming a key issue in the internet.',
           '"Trusting Trust" is a game about Trust. It uses the "Prisoners Dilemma" concept. This concept has even been used in the movie "The Dark Knight" by the Joker in the climax scene.'
        ]
    }
    
    bounties_spec = [{
        'url': 'https://github.com/diadata-org/diadata/issues/181',
        'primer': 'Scraper For Bitflyer Futures',
    }, {
        'url': 'https://github.com/fsprojects/fantomas/issues/555',
        'primer': 'SpaceBeforeArguments Inconsistency: Should Apply To Functions That Receive `Unit` Arg Too',
    }, {
        'url': 'https://github.com/gitcoinco/skunkworks/issues/134',
        'primer': 'Web3 Sustain Event Page',
}, ]


    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 15

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }


    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(network='mainnet', txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]
    if not len(leaderboard['quarterly_payers']['items']):
        leaderboard = []

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
        'sponsor': sponsor,
		'email_type': 'roundup',
        'email_style': email_style,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #19
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "$40K To OSS | Gitcoin's ETHDenver "
    new_kudos_pks = [1839, 1838, 1837]
    new_kudos_size_px = 150
    intro = '''
<p>
Hi Gitcoiners,
<p>
<p>
This week we announced the results of <a href="https://twitter.com/vsinghdothings/status/1098996827704180736">our Radical Experiment.</a>
From 2/1 - 2/15, we matched $13K in contributions across <a href="https://gitcoin.co/grants">25 Ethereum projects</a> with $25,000 in funding.
We used Liberal Radicalism matching as the mechanism, which made small contributions (less than $5!) go a long way. To learn more about the match, check out our <a href="https://www.youtube.com/watch?v=GBVJKB-qZuM">interview with Glen Weyl</a>,
who co-wrote the Liberal Radicalism paper.
</p>
<p>
Aside from CLR, we're catching up from <a href="https://medium.com/gitcoin/a-recap-gitcoin-at-ethdenver-1e48bfc93805">a fantastic weekend at ETHDenver.</a> Gitcoin was involved via CLR,
Kudos (Trophies), the Burner Wallet, and of course - a massive Plinko Board. <a href="https://medium.com/gitcoin/a-recap-gitcoin-at-ethdenver-1e48bfc93805">Read more here</a> to learn
about what's likely to be the biggest crypto hackathon of 2019.
</p>
<p>
<h3>Happy Kudos Friday!</h3>
</p>
<p>
''' + "".join([
        f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>"
        for pk in new_kudos_pks
    ]) + '''
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
            Gitcoin Livestream is back this week! Great conversations pending. Join us <a href="https://gitcoin.co/livestream">on Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>

'''
    highlights = [
        {
            'who': 'charlie4biz',
            'who_link': True,
            'what': 'Worked with W3F on a PolkaDot post!',
            'link': 'https://gitcoin.co/issue/w3f/Web3-collaboration/63/2437',
            'link_copy': 'View more',
        },
        {
            'who': 'stevenjnpearce',
            'who_link': True,
            'what': 'Created an Under Maintenance website for MyBitFoundation',
            'link':
            'https://gitcoin.co/issue/MyBitFoundation/MyBit.website/72/2431',
            'link_copy': 'View more',
        },
        {
            'who': 'eswarasai',
            'who_link': True,
            'what': 'Compile Precise-Proofs to Web Assembly.',
            'link':
            'https://gitcoin.co/issue/centrifuge/precise-proofs/63/2383',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/TrustWallet/wallet-core/issues/3',
            'primer': 'Add Cosmos support to TrustWallet!',
        },
        {
            'url': 'https://github.com/status-im/status-react/issues/7472',
            'primer': 'Continue work on Status-React with Hutch.',
        },
        {
            'url': 'https://github.com/Giveth/giveth-dapp/issues/342',
            'primer': 'Work on Giveth milestones with Griff / Scott.',
        },
    ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(
            id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(
            txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights':
        kudos_highlights,
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #20
0
파일: emails.py 프로젝트: pacoard/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "$10,000 of Dai-based Gitcoin Bounties! "

    intro = '''

<p>
    Hi there
</p>
<p>
We announced <a href="https://medium.com/gitcoin/grow-open-source-gitcoin-makerdao-4f9df702afea">a partnership with MakerDAO this week</a> to provide $10,000 worth of bounties, denominated in Dai! We will start by allocation ~$2,000 to Ethereum Foundation repo’s. From here, we are open to suggestions on open source projects which may be interested in support through bounties. Please let us know <a href="https://gitcoin.co/slack">on Slack</a> or on <a href="https://twitter.com/MakerDAO/status/989641464001904641">Twitter</a>.
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
Have you used <a href="https://medium.com/gitcoin/tutorial-send-a-tip-to-any-github-user-in-60-seconds-2eb20a648bc8">Gitcoin Tips</a> before? Tips are a great way to show appreciation for contributions while growing an open source community - in 60 seconds or less! 
        </li>
        <li>
Want to be the first to know when new open issues are added? <a href="http://twitter.com/gitcoinfeed">@gitcoinfeed</a> on Twitter which provides updates on all new activity on Gitcoin.
        </li>
    </ul>
</p>
<p>
On today’s <a href="http://gitcoin.co/livestream">Gitcoin Livestream</a>, we’re excited to host 1)  <a href="https://publisher.adchain.com/">AdChain</a>, a live TCR-based project, 2) <a href="https://www.uport.me/">uPort</a>, who will tell the group about their Gitcoin Bounty program, and 3) <a href="http://airswap.io/">Airswap</a>, who launched their decentralized exchange to mainnet today . <a href="https://gitcoin.co/livestream">Add it to your Google Calendar</a> and come hang out! 
</p>
<p>
I hope to see you on <a href="https://gitcoin.co/slack">Slack</a> or on <a href="https://github.com/gitcoinco/web">Github</a>. If you’re interested in growing open source and have some extra time, come by. We’re working to make Gitcoin is the best place on the internet to do so.

</p>

'''
    highlights = [
        {
            'who': 'justpixel',
            'who_link': True,
            'what':
            'Worked with Bounties Network to draw up a new ‘Getting Started’ page.',
            'link':
            'https://gitcoin.co/issue/Bounties-Network/bounties.network/2/309',
            'link_copy': 'See more',
        },
        {
            'who': 'agni21',
            'who_link': True,
            'what': 'Helped Tim van Mourik out on the Giraffe Tools repo.',
            'link':
            'https://gitcoin.co/issue/TimVanMourik/GiraffeTools/16/262',
            'link_copy': 'View more',
        },
        {
            'who': 'netrunnerX',
            'who_link': True,
            'what': 'Made his first submission on Ethereum’s Solidity repo!',
            'link': 'https://gitcoin.co/issue/ethereum/solidity/3750/216',
            'link_copy': 'See more',
        },
    ]

    bounties = [
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact=
                'https://github.com/PolymathNetwork/polymath-core/issues/87'),
            'primer':
            'Polymath released a Bug Bounty which pays up to 10ETH for critical issues. ',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact='https://github.com/gitcoinco/web/issues/865'
            ),
            'primer':
            'ETHAvatar is a project aiming at improving blockchain UX holistically. Interested in building out the web app?',
        },
        {
            'obj':
            Bounty.objects.get(
                current_bounty=True,
                github_url__iexact=
                'https://github.com/uport-project/buidlbox/issues/3'),
            'primer':
            'uPort is searching for ideas for applications which can be built on top of their platform! ',
        },
    ]

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #21
0
파일: emails.py 프로젝트: gaybro8777/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Our EOY Letter | Happy Holidays"
    new_kudos_pks = [866, 811, 810]
    new_kudos_size_px = 150
    intro = '''
<p>
<h3>Happy Holidays From Gitcoin!</h3>
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>
<p>
The Gitcoin team has been taking a collective breath at the end of our year and have gotten a chance to look back on
late 2017 and 2018, while looking ahead to our future. <a href="https://twitter.com/GetGitcoin/status/1078686012514226177">The Gitcoin EOY Letter</a>
shows our continued excitement towards the mission of growing a more open (source) internet, together. We're thankful to you for taking part
in our journey and hope to reward each of you for your support with a great 2019.
</p>
<p>
Since you're here... we'll start now! We've been hard at work on <a href="https://gitcoin.co/grants/">Gitcoin Grants</a>, a new tool hyperfocused on
recurring funding for open source developers. We're looking to provide an initial list of OSS projects some funding to carry their projects into 2019.
<a href="https://gitcoin.co/grants/">Give it a look</a> and let us know if you have any feedback.
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
            I wrote up a post on <a href="https://medium.com/gitcoin/progressive-elaboration-of-scope-on-gitcoin-3167742312b0">progressive elaboration of scope</a>
            for Gitcoin funders!
        </li>
        <li>
            No Gitcoin Livestream this week, but we'll be back on 1/5. In the future, join us <a href="https://gitcoin.co/livestream">Friday's at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Happy holidays,
</p>

'''
    highlights = [{
        'who': 'iamonuwa',
        'who_link': True,
        'what': 'Worked on Fraktal with Julien',
        'link': 'https://gitcoin.co/issue/julienbrg/fraktal/1/2007',
        'link_copy': 'View more',
    }, {
        'who': 'brascoder',
        'who_link': True,
        'what': 'Worked on CodeFund with us!',
        'link': 'https://gitcoin.co/issue/gitcoinco/code_fund_ads/85/1931',
        'link_copy': 'View more',
    }, {
        'who': 'elemino',
        'who_link': True,
        'what': 'Worked on Javascript Practice, a cool bounty.',
        'link': 'https://gitcoin.co/issue/lastmjs/javascript-practice/179/1917',
        'link_copy': 'View more',
    }, ]

    bounties_spec = [{
        'url': 'https://github.com/Giveth/giveth-bot/issues/39',
        'primer': 'Work on Giveth with Griff and team.',
    }, {
        'url': 'https://github.com/unlock-protocol/unlock/issues/334',
        'primer': 'Bounty from Unlock Protocol',
    }, {
        'url': 'https://github.com/status-im/status-react/issues/7076',
        'primer': 'Work on Status-React on Whisper!',
    }, ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(created_on__gt=timezone.now() - timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'ecosystem_bounties': ecosystem_bounties,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #22
0
파일: emails.py 프로젝트: protofire/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from django.conf import settings
    subject = "The action starts *Monday 1/6/2020*!"
    new_kudos_pks = [7315, 7275, 6188]
    new_kudos_size_px = 150
    if settings.DEBUG and False:
        # for debugging email styles
        email_style = 2
    else:
        offset = 2
        email_style = (int(timezone.now().strftime("%V")) + offset) % 7

    kudos_friday = f'''
<h3>New Kudos This Month</h3>
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>
    '''

    intro = f'''
<p>
Hey Gitcoiners,
</p>
<p>
    Happy New Years :)  The Gitcoin team has been spending time with friends & family for the last two weeks, celebrating the end of the decade.
</p>
<p>
   Next week we're back in action + looking to start the new year off strong with over $200k in OSS Funding for our community.  The <a href="https://gitcoin.co/hackathon/take-back-the-web/?">Take Back the Web</a> Virtual Hackathon starts 1/6.  And so does <a href="https://gitcoin.co/blog/gitcoin-grants-2020/">Gitcoin Grants Round 4</a>.  Click <a href="https://gitcoin.co/hackathon/take-back-the-web/?">here</a> to checkout Take Back the Web, and click <a href="https://gitcoin.co/grants/">here</a> to checkout Gitcoin Grants.
</p>

{kudos_friday}
<h3>What else is new?</h3>
    <ul>
        <li>
            Join us on todays Gitcoin Livestream to chat Web3 Business Models with Thibauld from Fairmint, Paul from Sablier, and more! <a href="https://gitcoin.co/livestream">Join at 2pm ET</a>.
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [{
        'who': 'iamonuwa',
        'who_link': True,
        'what': 'Removed Civic from the MyBit application',
        'link': 'https://gitcoin.co/issue/MyBitFoundation/MyBit-Go.app/515/3801',
        'link_copy': 'View more',
    }, {
        'who': 'seichris',
        'who_link': True,
        'what': 'Re-Designed Mockup For Zero-Knowledge Assets',
        'link': 'https://gitcoin.co/issue/invisible-college/democracy/36/3786',
        'link_copy': 'View more',
    }, {
        'who': 'mul1sh',
        'who_link': True,
        'what': 'Removed Cursor Drifts During Navigation on IOS',
        'link': 'https://gitcoin.co/issue/cybersemics/em/4/3715',
        'link_copy': 'View more',
    }, ]

    sponsor = {
    'name': 'CodeFund',
    'title': 'Does your project need 🦄 developers?',
    'image_url': '',
    'link': 'http://bit.ly/codefund-gitcoin-weekly',
    'cta': 'Learn More',
    'body': [
       'CodeFund is a privacy-focused ethical advertising network (by Gitcoin) that funds open source projects.',
       'We specialize in helping companies connect with talented developers and potential customers on developer-centric sites that typically do not allow ads.'
    ]
}

    bounties_spec = [{
        'url': 'https://github.com/gitcoinco/web/issues/5465',
        'primer': 'Are you an illustrator?  Design a Gitcoin bot + earn some DAI!',
    }, {
        'url': 'https://github.com/gitcoinco/web/issues/4943',
        'primer': 'Find an area where Gitcoins documentation is lacking + earn some ETH by fixing it',
    }, ]


    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 15

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }


    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(network='mainnet', txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key, product='all').order_by('rank')[0:num_leadboard_items]
    if not len(leaderboard['quarterly_payers']['items']):
        leaderboard = []

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
        'sponsor': sponsor,
		'email_type': 'roundup',
        'email_style': email_style,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #23
0
파일: emails.py 프로젝트: mfwarren/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Introducing Gitcoin Ambassadors | MetaTX Grows"
    new_kudos_pks = [486, 485, 484]
    new_kudos_size_px = 150
    intro = '''
<p>
Hi there,
</p>
<p>
This week, we welcomed <a href="https://medium.com/gitcoin/introducing-the-gitcoin-ambassadors-7eddb5f4d507">eight fantastic Gitcoin ambassadors to the Gitcoin community.</a>
Each of these people has organically proved themselves to be a valuable part of the Gitcoin community,
all behind the mission to grow and sustain open source. We're grateful for the opportunity to provide a platform
from where they can contribute their vision to our shared, open, future. Say hello to them on Gitcoin Slack.
</p>
<p>
In blockchain UX world, Gitcoin Labs is continuing it's industry leading work. Austin Griffith's post on native MetaTX's within smart contracts is a must read
for anyone interested in 'gas-less' dApps. <a href="https://medium.com/gitcoin/native-meta-transactions-e509d91a8482">Check it out!</a>
</p>
<h3>New Kudos This Week</h3>
<p>
Check out a few of the new kudos launched this week:
</p>
<p>
''' + "".join([
        f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>"
        for pk in new_kudos_pks
    ]) + '''
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
            Gitcoin is hiring for a Principal Engineer. Know a superstar Python/Django engineer? <a href="https://consensys.net/open-roles/1333457/">Send him or her our way!</a>
        </li>
        <li>
            Gitcoin Livestream is back this week! Hear more about Gnosis Safe + another project to be named. Join us <a href="https://gitcoin.co/livestream">Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Thanks for reading! Back to BUIDLing,
</p>

'''
    highlights = [
        {
            'who': 'bhargavasomu',
            'who_link': True,
            'what': 'Worked on py-szz with the Ethereum Foundation',
            'link': 'https://gitcoin.co/issue/ethereum/py-ssz/1/1878',
            'link_copy': 'View more',
        },
        {
            'who': 'dylanjw',
            'who_link': True,
            'what': 'Great work on Status React!',
            'link':
            'https://gitcoin.co/issue/status-im/status-react/6199/1865',
            'link_copy': 'View more',
        },
        {
            'who': 'cryptomental',
            'who_link': True,
            'what': 'Completed work on Py-EVM with their core team!',
            'link': 'https://gitcoin.co/issue/ethereum/py-evm/1472/1769',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/ethereum/py-ssz/issues/4',
            'primer':
            'Serialization and Deserialization of Remaining Base Types.',
        },
        {
            'url': 'https://github.com/trailofbits/slither/issues/85',
            'primer': 'Improve Remix plugin on Trail Of Bits!',
        },
        {
            'url': 'https://github.com/spacemeshos/POET/issues/20',
            'primer': 'Add interoperability tests on Spash Mesh OS!',
        },
    ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(
            id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(
            txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights':
        kudos_highlights,
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #24
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "CodeFund Grows | Hacktober Begins"

    intro = '''

<p>
Hi there,
</p>
<p>
<a href="https://codefund.io/">CodeFund</a> wants to support open source projects everywhere!
By placing ethical ads in beautiful places, <a href="https://twitter.com/codeberry">Eric Berry</a> and team have been providing Discourse, CodeSandbox, and Material-UI
and countless others with sources of revenue to support their projects. The CodeFund team just added a superstar, <a href="https://codefund.io/team">Nate Hopkins</a>,
to the team as CTO, and we're excited about the future of the product. If you want to advertise to developers, there's no better way!
<br>
<a href="https://codefund.io">Checkout CodeFund's new website to learn more</a>
</p>
<p>
Hacktoberfest is in full swing! Take a look here for issues tagged <a href="https://gitcoin.co/explorer?network=mainnet&keywords=hacktoberfest&order_by=-web3_created">'Hacktoberfest'</a>
 which have been funded with Gitcoin bounties, across projects like Ruby For Good, Peepeth, Giveth and more.
</p>
<p>
The Gitcoin Core team is on the move! If you'll be at ETH SF (Oct 5-7), Github Universe (Oct 16-17), Web 3 Summit (Oct 22 - 24), SustainOSS (Oct 25), or Devcon 4, give us a shout!
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
        With travel, Gitcoin Livestream is cancelled this week. We'll be back next week as regularly scheduled.
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [
        {
            'who': 'cryptomental',
            'who_link': True,
            'what': 'Back to help out on Status Embark!',
            'link':
            'https://gitcoin.co/issue/embark-framework/embark/946/1306',
            'link_copy': 'View more',
        },
        {
            'who': 'evgeniuz',
            'who_link': True,
            'what': 'Fixed an Avatar Bug this week!',
            'link': 'https://gitcoin.co/issue/diadata-org/coindata/1/1259',
            'link_copy': 'View more',
        },
        {
            'who': 'sameer2800',
            'who_link': True,
            'what': 'Completed a UI makeover funded in \'RHOC\' token!',
            'link': 'https://gitcoin.co/issue/JoshOrndorff/BitStory/1/1298',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/matterinc/PeepethClient/issues/14',
            'primer': 'Hacktoberfest alert! A Peepeth client.',
        },
        {
            'url': 'https://github.com/EthWorks/UniversalLoginSDK/issues/88',
            'primer': 'Work on an EthWorks bounty funded by the ECF.',
        },
        {
            'url': 'https://github.com/walleth/kethereum/issues/44',
            'primer': 'Work on SpongyCastle with Walleth',
        },
    ]

    num_leadboard_items = 5
    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }
    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #25
0
파일: emails.py 프로젝트: mukulverm4/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "Liberal Radicalism In Open Source Software"
    new_kudos_pks = [1053, 1059, 866]
    new_kudos_size_px = 150
    intro = '''
<p>
Hi Gitcoiners,
<p>
<p>
This week, we wrote about <a href="https://medium.com/gitcoin/experiments-with-liberal-radicalism-ad68e02efd4">Liberal Radicalism</a>, a paper proposed by Vitalik Buterin, Glen Weyl, and Zoe Hitzig. Our thinking
describes a public good problem in open source, the CLR mechanism, and how we are experimenting with it via Gitcoin Grants. If you're interested in joining the discussion,
<a href="https://discourse.gitcoin.co/t/liberal-radicalism-in-open-source-software/16">our Discourse</a> is a good place to start.
</p>
<p>
The potential with Gitcoin Grants is high, and we're excited to explore. <a href="https://consensys1mac.typeform.com/to/HFcZKe">Let us know</a> if you'd like to be in a future cohort and we'll
reach out with more details. Want to contribute to a Gitcoin Grant? <a href="https://gitcoin.co/grants/">Take a look at our launch partners</a>, including Prysmatic Labs, Ethereum PM, and more.
</p>
<p>
<h3>Happy Kudos Friday!</h3>
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
            Gitcoin Livestream is back this week! Join us <a href="https://gitcoin.co/livestream">on Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>

'''
    highlights = [{
        'who': 'lrgeoemtry',
        'who_link': True,
        'what': 'Great Linux skills!',
        'link': 'https://gitcoin.co/issue/HERCone/herc-edge-login/130/2114',
        'link_copy': 'View more',
    }, {
        'who': 'johngrantuk',
        'who_link': True,
        'what': 'More great work on the Burner Wallet!',
        'link': 'https://gitcoin.co/issue/austintgriffith/burner-wallet/72/2111',
        'link_copy': 'View more',
    }, {
        'who': 'zyfrank',
        'who_link': True,
        'what': 'Great work on the Centrifuge repo!',
        'link': 'https://gitcoin.co/issue/centrifuge/precise-proofs/43/2090',
        'link_copy': 'View more',
    }, ]

    bounties_spec = [{
        'url': 'https://github.com/austintgriffith/burner-wallet/issues/78',
        'primer': 'Burner Wallet, a very important crypto project!',
    }, {
        'url': 'https://github.com/gitcoinco/web/issues/3561',
        'primer': 'Help us get images on the Gitcoin Blog!',
    }, {
        'url': 'https://github.com/NethermindEth/nethermind/issues/334',
        'primer': '.NET skills? Here is the bounty for you!',
    }, ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #26
0
파일: emails.py 프로젝트: matthewlilley/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Send A Firehose Of Talent To Your Repo"

    intro = '''

<p>
    Hi there
</p>
<p>
<a href="https://medium.com/gitcoin/tutorial-leverage-gitcoins-firehose-of-talent-to-do-more-faster-dcd39650fc5">Here’s how to leverage a firehose of developer talent to do more, faster</a>. Gitcoin Core is 4 team members, yet we’ve seen contributions from well over 30 developers using Gitcoin. We’d like to see you do the same! We plan to continue this series with more on best practices for using Gitcoin to grow your open source repo.   
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
MARKET Protocol hired Eswara, a great developer and person, after working with him on Gitcoin. <a href="https://medium.com/gitcoin/gitcoin-testimonials-market-protocol-722dbb263d19">Read more about the story here</a>.
        </li>
        <li>
Want to be the first to know when new open issues are added? <a href="http://twitter.com/gitcoinfeed">@gitcoinfeed</a> on Twitter which provides updates on all new activity on Gitcoin. 
        </li>
        <li>
Today we’ll have uPort and Kauri on the livestream at 5PM ET. <a href="https://calendar.google.com/calendar/r?cid=N3JxN2dhMm91YnYzdGs5M2hrNjdhZ2R2ODhAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ">Add it to your Google Calendar</a> and come hang out!
        </li>
    </ul>
</p>
<p>
I hope to see you on <a href="https://gitcoin.co/slack">Slack</a> or on <a href="https://github.com/gitcoinco/web">Github</a>. If you’re interested in growing open source and have some extra time, come by. We’re working to make Gitcoin is the best place on the internet to do so. 

</p>

'''
    highlights = [
        {
            'who': 'agni21',
            'who_link': True,
            'what': 'Github OAuth Integration complete, one week after posting! Great work.',
            'link': 'https://gitcoin.co/issue/TimVanMourik/GiraffeTools/7',
            'link_copy': 'See more',
        },
        {
            'who': 'lucaguglielmi',
            'who_link': True,
            'what': 'Some cool stuff coming together with ETHAvatar. Fantastic contribution',
            'link': 'https://gitcoin.co/issue/gitcoinco/skunkworks/63',
            'link_copy': 'View more',
        },
        {
            'who': 'cryptomental',
            'who_link': True,
            'what': 'Helped MARKET Protocol with a funky MetaMask error. Nice!',
            'link': 'https://gitcoin.co/issue/MARKETProtocol/dApp/111',
            'link_copy': 'See more',
        },
    ]

    bounties = [
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url__iexact='https://github.com/uport-project/buidlbox/issues/2'),
            'primer': 'uPort has released a series of bounties on their Buidl Box repo! Check them out here. ',
        },
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url__iexact='https://github.com/uport-project/buidlbox/issues/5'),
            'primer': '',
        },
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url__iexact='https://github.com/uport-project/buidlbox/issues/3'),
            'primer': '',
        },
        {
            'obj': Bounty.objects.get(current_bounty=True, github_url__iexact='https://github.com/uport-project/uport-verify'),
            'primer': '',
        },
    ]

    ecosystem_bounties = ExternalBounty.objects.filter(created_on__gt=timezone.now() - timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'ecosystem_bounties': ecosystem_bounties,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #27
0
파일: emails.py 프로젝트: harish-a/web
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    subject = "Last Week of CLR Matching | Glen Weyl Joins Livestream"
    new_kudos_pks = [1404, 1401, 1368]
    new_kudos_size_px = 150
    intro = '''
<p>
Hi Gitcoiners,
<p>
<p>
This week marks the last week of <a href="https://medium.com/gitcoin/gitcoin-grants-clr-matching-ecbc87b10038">our Radical Experiment for funding ETH 2.0 projects.</a>
For one more week (until February 15th), we'll be matching any contributions you make to <a href="https://gitcoin.co/grants">these 20 Ethereum projects</a> with $25,000 in funding.
Because we are using Liberal Radicalism as the mechanism, small contributions (even $5!) can go a long way.
</p>
<p>
To continue the discussion, we're hosting Glen Weyl, author of <a href='http://radicalmarkets.com/'>Radical Markets</a>, on the <a href="https://gitcoin.co/livestream">Gitcoin Livestream</a> today. Join us <a href="https://gitcoin.co/livestream">at 5PM ET today</a>
and add any questions you have to <a href="https://sli.do">the Slido</a> with code D842!
</p>
<p>
<h3>Happy Kudos Friday!</h3>
</p>
<p>
''' + "".join([
        f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>"
        for pk in new_kudos_pks
    ]) + '''
</p>

<h3>What else is new?</h3>
    <ul>
        <li>
            Gitcoin Livestream is back this week! Great conversations pending. Join us <a href="https://gitcoin.co/livestream">on Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Back to shipping,
</p>

'''
    highlights = [
        {
            'who': 'luiserebii',
            'who_link': True,
            'what': 'Completed work on a Plasma bounty!',
            'link':
            'https://gitcoin.co/issue/plasma-group/plasma-core/60/2266',
            'link_copy': 'View more',
        },
        {
            'who': 'dbrettrobertson',
            'who_link': True,
            'what': 'Helped with Core Dev call notes!',
            'link': 'https://gitcoin.co/issue/ethereum/pm/75/2242',
            'link_copy': 'View more',
        },
        {
            'who': 'lazaridis-com',
            'who_link': True,
            'what': 'Completed work on a Goerli bounty.',
            'link': 'https://gitcoin.co/issue/goerli/parity-goerli/46/2210',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/trailofbits/manticore/issues/1343',
            'primer': 'Work with Trail of Bits on manticore!',
        },
        {
            'url': 'https://github.com/dannovikov/crypto-lending/issues/1',
            'primer': 'Help build a Multi-Sig ETH Wallet.',
        },
        {
            'url': 'https://github.com/textileio/textile-explore/issues/1',
            'primer': 'Build a Flickr import/export tool.',
        },
    ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(
            id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(
            txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights':
        kudos_highlights,
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #28
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "A Maintainers Guide To Hacktoberfest | ETH Travels"

    intro = '''

<p>
Hi there,
</p>
<p>
<a href="https://medium.com/gitcoin/gitcoins-hacktoberfest-98825f199af2">Gitcoin's Hacktoberfest</a> starts on Monday! Post your favorite 3 open source projects on twitter & tag us (<a href="https://twitter.com/GetGitcoin">@GetGitcoin</a>), then make a <a href="https://gitcoin.co/requests">Gitcoin Request</a> to give those projects a boost!
</p>
<p>
If you're an OSS maintainer, we wrote a <a href="https://medium.com/gitcoin/a-maintainers-guide-to-hacktoberfest-21405c8ff09f">Guide to Hacktoberfest for maintainers!</a> It's
a great look at how to manage an open source project generally, let us know what you think.
</p>
<p>
Lastly, October marks a month of travel for the Gitcoin team. If you'll be at ETH SF (Oct 5-7), Github Universe (Oct 16-17), Web 3 Summit (Oct 22 - 24), or Devcon 4, give us a shout!
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
        <a href="https://consensys.net/academy/2018developer/?utm_source=ConsenSys+Academy%3A+General+Mailing+List&utm_campaign=88c5836e4a-EMAIL_CAMPAIGN_2018_09_10_02_13_COPY_01&utm_medium=email&utm_term=0_30e33caef0-88c5836e4a">ConsenSys Academy's Developer Program</a> is a 11-week program that equips developers with all the knowledge, skills, and
         hands on mentorship essential to become industry-leading Ethereum developers. You can register now <a href="https://form.jotform.com/DeveloperProgram/Bootcamp?utm_source=ConsenSys+Academy%3A+General+Mailing+List&utm_campaign=88c5836e4a-EMAIL_CAMPAIGN_2018_09_10_02_13_COPY_01&utm_medium=email&utm_term=0_30e33caef0-88c5836e4a-">here!</a>
        </li>
        <li>
        Gitcoin Livestream today includes ConsenSys Academy and FOAM Protocol at 5PM ET. We're excited and hope to see you - <a href="https://gitcoin.co/livestream">add to your calendar here!</a>.
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [
        {
            'who': 'dryajov',
            'who_link': True,
            'what':
            'Completed one of the largest bounties of all time on MetaMask!',
            'link': 'https://gitcoin.co/issue/MetaMask/mustekala/21/1279',
            'link_copy': 'View more',
        },
        {
            'who': 'mul1sh',
            'who_link': True,
            'what': 'Completed his first bounty! Congrats.',
            'link': 'https://gitcoin.co/issue/diadata-org/coindata/1/1259',
            'link_copy': 'View more',
        },
        {
            'who': 'zachzundel',
            'who_link': True,
            'what': 'Moving Sharding forward with Prysmatic Labs!',
            'link': 'https://gitcoin.co/issue/prysmaticlabs/prysm/497/1212',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/ethereum/EIPs/issues/1442',
            'primer': 'Document JSON-RPC interface in an EIP.',
        },
        {
            'url': 'https://github.com/NethermindEth/nethermind/issues/86',
            'primer': 'Implement discovery v5 on Nethermind.',
        },
        {
            'url': 'https://github.com/ethereum/solidity/issues/4648',
            'primer': 'Solidity: Display Large Values In A Nicer Format',
        },
    ]

    num_leadboard_items = 5
    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }
    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #29
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Gitcoin on Epicenter | Marketing Your Bounties"

    intro = '''

<p>
Hi there,
</p>
<p>
This week, we were on <a href="https://epicenter.tv/episode/257/">Epicenter</a>, a leading blockchain podcast. I talked about Gitcoin's platform and progress, our interest in
growing open source, and the future of Gitcoin. There are a few sneak peeks in there for those interested in our Q4 plans :)
</p>
<p>
We also released a post about <a href="https://medium.com/gitcoin/increasing-action-on-your-gitcoin-bounty-61bb278f6f54">increasing action on Gitcoin bounties</a>. This is an important post for funders looking to grow their
open source project with top notch Gitcoiners. Give it a look and let us know if you have any feedback!
</p>
<p>
We had a great time at Github Universe (Oct 16-17) this past week representing Gitcoin and CodeFund.
If you'll be at Web 3 Summit (Oct 22 - 24), Sustain OSS (Oct 25) or Devcon 4, give us a shout!
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
        The Gitcoin Livestream is back as regularly scheduled this week. <a href="https://gitcoin.co/livestream">Join us at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Back to BUIDLing,
</p>
'''
    highlights = [
        {
            'who': 'g-r-a-n-t',
            'who_link': True,
            'what': 'Congrats to g-r-a-n-t on his first bounty!',
            'link': 'https://gitcoin.co/issue/ethereum/eth-bloom/22/1534',
            'link_copy': 'View more',
        },
        {
            'who': 'svenski123',
            'who_link': True,
            'what':
            'A new Gitcoiner contributing to a new Gitcoin Project, Node Stratum!',
            'link':
            'https://gitcoin.co/issue/foxer666/node-stratum-pool/32/1493',
            'link_copy': 'View more',
        },
        {
            'who': 'satyamakgec',
            'who_link': True,
            'what': 'Helped build a sample app for Pulse Blockchain!',
            'link':
            'https://gitcoin.co/issue/PulseBlockchain/oz-sample-app/10/1479',
            'link_copy': 'View more',
        },
    ]

    bounties_spec = [
        {
            'url': 'https://github.com/karalabe/hive/issues/133',
            'primer': 'Help move forward Ethereum testing.',
        },
        {
            'url': 'https://github.com/dckc/RSign/issues/1',
            'primer': 'Get paid in RHOC for helping with FireFox support.',
        },
        {
            'url': 'https://github.com/poanetwork/blockscout/issues/942',
            'primer': 'Work on POA Network, a leading blockchain project.'
        },
    ]

    num_leadboard_items = 5
    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }
    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'], ).order_by(
                    '-web3_created').first()
            if bounty:
                bounties.append({'obj': bounty, 'primer': nb['primer']})
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(
        created_on__gt=timezone.now() -
        timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro':
        intro,
        'intro_txt':
        strip_double_chars(
            strip_double_chars(strip_double_chars(strip_html(intro), ' '),
                               "\n"), "\n "),
        'bounties':
        bounties,
        'leaderboard':
        leaderboard,
        'ecosystem_bounties':
        ecosystem_bounties,
        'invert_footer':
        False,
        'hide_header':
        False,
        'highlights':
        highlights,
        'subscriber':
        get_or_save_email_subscriber(to_email, 'internal'),
    }

    response_html = premailer_transform(
        render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject
예제 #30
0
def render_new_bounty_roundup(to_email):
    from dashboard.models import Bounty
    from external_bounties.models import ExternalBounty
    subject = "Introducing Gitcoin Labs | Join The Gitcoin Discourse"
    new_kudos_pks = [486, 485, 484]
    new_kudos_size_px = 150
    intro = '''
<p>
Hi there,
</p>
<p>
We're excited to introduce <a href="https://medium.com/gitcoin/announcing-gitcoin-labs-ba400522d697">Gitcoin Labs</a>, our new R&D arm focused on blockchain UX, open source sustainability,
and a variety of open research topics in Web 3. Gitcoin Labs is led by <a href="https://twitter.com/austingriffith">Austin Griffith</a>, who is best known in the Web 3 ecosystem for his
work on meta transactions, burner wallets, and universal logins alongside Alex Van De Sande. Have interesting research problems? Let us know!
<BR>
<BR>
<a href='https://medium.com/gitcoin/announcing-gitcoin-labs-ba400522d697'>
<img style='max-width: 300px;' src="https://cdn-images-1.medium.com/max/800/1*dZRwgrgBIV9Dd4gsjYbssQ.png"'>
</a>
<BR>
<BR>
</p>
<p>
In order to foster longer form conversation around meta transactions, UX, we've launched a <a href="https://discourse.gitcoin.co/">Gitcoin Discourse</a>. Come join us for initial conversations around
<a href="https://discourse.gitcoin.co/t/open-source-sustainability-via-liberal-radicalism/22/3">Liberal Radicalism by Vitalik Buterin & Glen Weyl</a> and start your own conversations for topics of interest
for Web 3 UX research or open source sustainability. We're excited to see you there!
</p>
<p>
Who’s making the most impact on your OSS or Web3 project? Do you know someone that solved a problem in a creative way,
built something interesting, or truly deserves a thanks? <a href='https://github.com/gitcoinco/web/issues/2816'>Nominate open source contributors to receive a limited edition and unique Kudos!</a>
</p>
<h3>New Kudos This Week</h3>
<p>
Check out a few of the new kudos launched this week:
</p>
<p>
''' + "".join([f"<a href='https://gitcoin.co/kudos/{pk}/'><img style='max-width: {new_kudos_size_px}px; display: inline; padding-right: 10px; vertical-align:middle ' src='https://gitcoin.co/dynamic/kudos/{pk}/'></a>" for pk in new_kudos_pks]) + '''
</p>
<h3>What else is new?</h3>
    <ul>
        <li>
            Gitcoin now supports EIP--1102 (Metamask Privacy Mode).  To use Gitcoin in privacy mode, <a href="https://medium.com/metamask/introducing-privacy-mode-42549d4870fa">checkout this post</a>.
        </li>
        <li>
            No Gitcoin Livestream this week due to Thanksgiving in the USA. We'll be back <a href="https://gitcoin.co/livestream">next Friday at 5PM ET</a>!
        </li>
    </ul>
</p>
<p>
Thanks for reading! Back to BUIDLing,
</p>
'''
    highlights = [{
        'who': 'evgeniuz',
        'who_link': True,
        'what': 'Added Python Support to blockchain-etl',
        'link': 'https://gitcoin.co/issue/blockchain-etl/ethereum-etl/123/1723',
        'link_copy': 'View more',
    }, {
        'who': 'dryajov',
        'who_link': True,
        'what': 'Implemented Kitsunet PoC for MetaMask!',
        'link': 'https://gitcoin.co/issue/MetaMask/kitsunet-js/11/1775',
        'link_copy': 'View more',
    }, {
        'who': 'frederikbolding',
        'who_link': True,
        'what': 'Worked on Status-React',
        'link': 'https://gitcoin.co/issue/status-im/status-react/6353/1742',
        'link_copy': 'View more',
    }, ]

    bounties_spec = [{
        'url': 'https://github.com/status-im/status-react/issues/6789',
        'primer': 'Allow ENS names to be used for Ethereum events',
    }, {
        'url': 'https://github.com/web3j/web3j/issues/769',
        'primer': 'Prepare Web3j for an Android release.',
    }, {
        'url': 'https://github.com/ethereum/py-evm/issues/1472',
        'primer': 'Add integration tests to py-evm',
    }, ]

    num_leadboard_items = 5
    highlight_kudos_ids = []
    num_kudos_to_show = 10

    #### don't need to edit anything below this line
    leaderboard = {
        'quarterly_payers': {
            'title': _('Top Payers'),
            'items': [],
        },
        'quarterly_earners': {
            'title': _('Top Earners'),
            'items': [],
        },
        'quarterly_orgs': {
            'title': _('Top Orgs'),
            'items': [],
        },
    }

    from kudos.models import KudosTransfer
    if highlight_kudos_ids:
        kudos_highlights = KudosTransfer.objects.filter(id__in=highlight_kudos_ids)
    else:
        kudos_highlights = KudosTransfer.objects.exclude(txid='').order_by('-created_on')[:num_kudos_to_show]

    for key, __ in leaderboard.items():
        leaderboard[key]['items'] = LeaderboardRank.objects.active() \
            .filter(leaderboard=key).order_by('rank')[0:num_leadboard_items]

    bounties = []
    for nb in bounties_spec:
        try:
            bounty = Bounty.objects.current().filter(
                github_url__iexact=nb['url'],
            ).order_by('-web3_created').first()
            if bounty:
                bounties.append({
                    'obj': bounty,
                    'primer': nb['primer']
                })
        except Exception as e:
            print(e)

    ecosystem_bounties = ExternalBounty.objects.filter(created_on__gt=timezone.now() - timezone.timedelta(weeks=1)).order_by('?')[0:5]

    params = {
        'intro': intro,
        'intro_txt': strip_double_chars(strip_double_chars(strip_double_chars(strip_html(intro), ' '), "\n"), "\n "),
        'bounties': bounties,
        'leaderboard': leaderboard,
        'ecosystem_bounties': ecosystem_bounties,
        'invert_footer': False,
        'hide_header': False,
        'highlights': highlights,
        'subscriber': get_or_save_email_subscriber(to_email, 'internal'),
        'kudos_highlights': kudos_highlights,
    }

    response_html = premailer_transform(render_to_string("emails/bounty_roundup.html", params))
    response_txt = render_to_string("emails/bounty_roundup.txt", params)

    return response_html, response_txt, subject