GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fullstackpython.com/post.py at master · gurupratap-matharu/fullstackpython.com

Expand file tree

/

post.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
65 lines (39 loc) · 2.03 KB
/

post.py

Copy path

File metadata and controls

65 lines (39 loc) · 2.03 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import argparse
"""Automates posting to social channels and tutorials page on
fullstackpython.com.
Arguments:
-c, --channel which channel to post to, options are "all", "twitter",
"facebook", "tutorials"
-s, --subject custom subject line for the posting, otherwise <h1>
element's content will be used
-t, --tags tags for tutorials page
Examples:
1. Post URL to all channels with the default title found within the page's
<h1> and tagged with any keywords that match between the page content
and the table of contents map.
python post.py https://www.fullstackpython.com/django.html
2. Post URL to all channels with the default title found within the page's
<h1> and tagged "git" and "source control".
python post.py https://www.fullstackpython.com/git.html "git, source control"
3. Post URL to all channels with a custom description of "Newest Mapbox
tutorial is live!" and tagged "django", "web development" and
"web frameworks".
python post.py https://www.fullstackpython.com/blog/maps-django-web-applications-projects-mapbox.html "django, web development, web frameworks" -d "Newest Mapbox tutorial is live!"
4. Post URL only to Twitter with a custom description of "An overview of relational databases for Python."
python post.py https://www.fullstackpython.com/databases.html "postgresql, mysql" -d "An overview of relational databases for Python." -c twitter
"""
def post_to_buffer():
"""See: https://buffer.com/developers/api/updates#updatesshare
"""
pass
parser = argparse.ArgumentParser(description='Post a tutorial.')
parser.add_argument('url', metavar='1', type=str, nargs='?',
help='URL for the tutorial to post')
parser.add_argument("-c", "--channel", help="channel to post tutorial to")
parser.add_argument("-s", "--subject", help="subject line to use with the post")
parser.add_argument("-t", "--tags", help="comma-delimited list of fsp topics")
args = parser.parse_args()
print(args.url)
print(args.channel)
print(args.subject)
print(args.tags)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.