spry 0.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
spry/__init__.py ADDED
File without changes
spry/__main__.py ADDED
@@ -0,0 +1,8 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+
4
+ """spry.__main__: executed when spry directory is called as script."""
5
+
6
+
7
+ from .spry import main
8
+ main()
File without changes
spry/modules/core.py ADDED
@@ -0,0 +1,24 @@
1
+
2
+ #!/usr/bin/env python
3
+ # -*- coding: utf-8 -*-
4
+
5
+ # ----------------------------------------------------------------------
6
+ # This file is part of spry
7
+ #
8
+ # Spry is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation, either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # Spry is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with Spry. If not, see <http://www.gnu.org/licenses/>.
20
+ # ----------------------------------------------------------------------
21
+ try: import spinner
22
+ except: from spry.modules import spinner
23
+ try: import pdf_maker
24
+ except: from spry.modules import pdf_maker
@@ -0,0 +1,23 @@
1
+ from weasyprint import HTML, CSS
2
+ from weasyprint.fonts import FontConfiguration
3
+
4
+ def create_pdf(username, totals):
5
+ """Test out functionality."""
6
+ html = HTML(string='<body width="600px"><div class="top"><br /><br /><h4>SPRY Report</h4><p>Data about <b>{}</b></p></div>\
7
+ <div><img class="insta" src="./{}.jpg"/></div\
8
+ <div>Total accounts found: {}</div></body>'.format(username, username, totals))
9
+ css = CSS(string='''
10
+ .top { text-align: center; border-bottom: 2px dashed deepskyblue; padding: 5px; }
11
+ p { font-family: mono; font-size: 12px; }
12
+ h2,h3,h4 { font-family: "Andale Mono"; font-size: 14px; }
13
+ ul,li { font-family: "Andale Mono"; font-size: 11px; letter-spacing: 0.08em; }
14
+ ul { list-style: none; }
15
+ ul { width: 500px; margin-bottom: 20px; border-top: 1px solid #ccc; }
16
+ li { border-bottom: 1px solid #ccc; float: left; display: inline;}
17
+ #double li { width:50%;}
18
+ #triple li { width:33.333%; }
19
+ #six li { width:16.666%; }
20
+ #quad li { width:25%; }
21
+ ''')
22
+ html.write_pdf(
23
+ '{}-report.pdf'.format(username), stylesheets=[css])
@@ -0,0 +1,19 @@
1
+ import sys
2
+ import time
3
+
4
+ def spinning_cursor():
5
+ while True:
6
+ for cursor in '|/-\\':
7
+ yield cursor
8
+
9
+ def spinwhile():
10
+ spinner = spinning_cursor()
11
+ try:
12
+ sys.stdout.write(spinner.next())
13
+ except:
14
+ sys.stdout.write(next(spinner)) # python 3
15
+ sys.stdout.flush()
16
+ time.sleep(0.1)
17
+ sys.stdout.write('\b')
18
+
19
+
spry/modules/stuff.py ADDED
@@ -0,0 +1,8 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+
4
+ """spry.stuff: stuff module within the bootstrap package."""
5
+
6
+
7
+ class Stuff(object):
8
+ pass