bestandless

best&less account stuff

Python command line script to register, lookup, edit, delete accounts. The accounts are sorted by email address.

Changes from current:

ask twice for email and password

force captive

For every account:

Creates a config file. Creates a json object. Creates a markdown blog post with python-nikola. Creates socially awkward seal GOODBYE FIRSTNAME, HELLO FIRSTNAME meme.

3 database record of previous entries.

gender - display male.jpg for male and female.jpg for female

Gets art quote of the day and replaces art with fashion. add fashion to middle of authors name. add quote to top of blog post. TODO: display quote as image

random choice of clothes. Pregenerated random, recommended. currently random choice of -

In [ ]:
 
In [1]:
import requests
import bs4
import getpass
import json
import shutil
import PIL
import json
from PIL import ImageDraw, ImageFont
import os
#import arrow
import configparser
In [2]:
myusr = getpass.getuser()
In [3]:
import arrow
In [4]:
loginda = input('Enter first name: ')
loglast = input('Enter last name: ')
print('Suggestions {}{}'.format(loginda, loglast))
userset = input('Enter username: ')
logemail = input('Enter email: ')
emailtwic = input('Enter email again: ')
if logemail == emailtwic:
    print('Email are the same')
else:
    print('Email is not the same')
        
bodenter = input('date of birth: YEAR/MNTH/DAY: ')
datebith = arrow.get(bodenter)
datebithz = datebith.strftime('%Y')
    
passent = getpass.getpass('Enter password: ')
passagain = getpass.getpass('Enter password again: ')
if passent == passagain:
    print('They are correct')
    
else:
    print('They are not correct')
        
imgend = input('gender: ')
    
    #import ConfigParser

config = configparser.RawConfigParser()

    # When adding sections or items, add them in the reverse order of
    # how you want them to be displayed in the actual file.
    # In addition, please note that using RawConfigParser's and the raw
    # mode of ConfigParser's respective set functions, you can assign
    # non-string values to keys internally, but will receive an error
    # when attempting to write to a file or when you get it in non-raw
    # mode. SafeConfigParser does not allow such assignments to take place.
config.add_section(logemail)
config.set(logemail, 'firstname', loginda)
config.set(logemail, 'lastname', loglast)
config.set(logemail, 'email', logemail)
    # Writing our configuration file to 'example.cfg'
with open('/home/pi/.config/bestless.ini', 'w') as configfile:
    config.write(configfile)
Enter first name: will
Enter last name: mckee
Suggestions willmckee
Enter username: willmckee
Enter email: will@artcontrol.me
Enter email again: will@artcontrol.me
Email are the same
date of birth: YEAR/MNTH/DAY: 2001/12/12
Enter password: ········
Enter password again: ········
They are correct
gender: male
In [5]:
import os
import random
In [92]:
if imgend == 'male':
    genpat = ('/galleries/male.jpg')
    rancho = random.choice(os.listdir('/home/pi/memetest/galleries/male/'))
    genshit = ('/galleries/male/{}'.format(rancho))
    #gmal = requests.get('https://api.gilt.com/v1/sales/men/upcoming.json?apikey=bb7cf716ec52e7a7737705f0129ed4282a35239a0a6b8a821e68f30a00ecc1a7')

elif imgend == 'female':
    genpat = ('/galleries/female.jpg')
    rancho = random.choice(os.listdir('/home/pi/memetest/galleries/female/'))
    #gmal = requests.get('https://api.gilt.com/v1/sales/women/upcoming.json?apikey=bb7cf716ec52e7a7737705f0129ed4282a35239a0a6b8a821e68f30a00ecc1a7')

    genshit = ('/galleries/female/{}'.format(rancho))
In [71]:
#salejs = gmal.json()
In [78]:
#salelen = len(salejs['sales'])
In [87]:
#for salele in range(salelen):
#    print(salejs['sales'][salele]['description'])
#    print(salejs['sales'][salele]['image_urls']['686x374'][0]['url'])
Suede boots, leather sneakers, and more for wherever the day (or night) may take you
https://cdn1.gilt.com/images/share/uploads/0000/0005/1726/517269805/orig.jpg
Contemporary picks for partying or parlaying
https://cdn1.gilt.com/images/share/uploads/0000/0005/1752/517526486/orig.jpg
Stay stylishly warm with gloves, scarves, and more
https://cdn1.gilt.com/images/share/uploads/0000/0005/1756/517563618/orig.jpg
Get your wardrobe together at prices you can’t miss
https://cdn1.gilt.com/images/share/uploads/0000/0005/1702/517028519/orig.jpg
The essentials you need to upgrade your look at can’t-beat prices
https://cdn1.gilt.com/images/share/uploads/0000/0005/1756/517565775/orig.jpg
The perfect layering piece to keep you warm in style
https://cdn1.gilt.com/images/share/uploads/0000/0005/1702/517027992/orig.jpg
Minimalist styles for the modern man
https://cdn1.gilt.com/images/share/uploads/0000/0005/1731/517318169/orig.jpg
Sophisticated pieces for an instantly pulled-together look
https://cdn1.gilt.com/images/share/uploads/0000/0005/1726/517269652/orig.jpg
Get your dapper look together—before the ball drops
https://cdn1.gilt.com/images/share/uploads/0000/0005/1656/516565162/orig.jpg
Handsome selects that complete your look
https://cdn1.gilt.com/images/share/uploads/0000/0005/1727/517270236/orig.jpg
From colorful to classic, find the shape that suits you best
https://cdn1.gilt.com/images/share/uploads/0000/0005/1726/517269900/orig.jpg
Elevated basics, from undershirts to briefs
https://cdn1.gilt.com/images/share/uploads/0000/0005/1727/517276348/orig.jpg
In [65]:
#requests.get('https://api.gilt.com/v1/sales/men/upcoming.json?apikey=bb7cf716ec52e7a7737705f0129ed4282a35239a0a6b8a821e68f30a00ecc1a7')
Out[65]:
<Response [200]>
In [ ]:
#https://api.gilt.com/v1/sales/women/active.json?apikey=bb7cf716ec52e7a7737705f0129ed4282a35239a0a6b8a821e68f30a00ecc1a7
In [7]:
genshit
Out[7]:
'/galleries/male/male-shorts.jpeg'
In [8]:
#import random
In [9]:
#ranum = random.randint(100,1000)
In [10]:
#for it in range(100,1000):
#    print('suggestion: {}{}{}'.format(loginda, loglast, it))
In [11]:
#ranum
In [12]:
#reqgif = requests.get('http://api.giphy.com/v1/gifs/search?q={}+fashion&api_key=ee58ff1d10c54fd29ddb0388126c2bcd'.format(datebith))
In [13]:
#gifjs = reqgif.json()
In [14]:
#for himg in range(25):
    
#    img_data = requests.get(gifjs['data'][himg]['images']['fixed_height']['url']).content
#    with open('{}.gif'.format(str(himg)), 'wb') as handler:
#        handler.write(img_data)
#    print(gifjs['data'][himg]['images']['fixed_height']['url'])
In [15]:
with open('/home/{}/account.json'.format(myusr), 'r') as accdict:
    readd = accdict.read()
    readdict = json.loads(readd)
In [16]:
#readdict = json.loads(readd)
In [17]:
#print(readdict)
In [18]:
emailup = input('Email to lookup: ')
Email to lookup: hammersmake@gmail.com
In [19]:
print(readdict[emailup])
{'lastname': 'Bill', 'email': 'hammersmake@gmail.com', 'password': 'hashthis', 'agehuman': '15 years ago', 'firstname': 'Will', 'gender': 'male', 'id': 7, 'dob': '2001/12/25'}
In [20]:
emailcont = ('Hello {},\n\nToday we have sale on {}. It is suitable for someone born {}.\n\nHave a great day,\n\nbest&less.'.format(loginda, imgend, datebith.humanize(), str(datebithz)))
In [21]:
emailcont
Out[21]:
'Hello will,\n\nToday we have sale on male. It is suitable for someone born 16 years ago.\n\nHave a great day,\n\nbest&less.'
In [ ]:
 
In [22]:
lenid = len(readdict)
In [23]:
nexid = lenid + 1
In [24]:
textzero = 'BYE ' + loginda 
textone = 'HELLO ' + loginda
upzero = textzero.upper()

botzero = textone.upper()


# In[ ]:
In [25]:
botzero
Out[25]:
'HELLO WILL'
In [26]:
#gheigh = (gtm['height'])
#gwth = (gtm['width'])
        #response = requests.get(gtm['url'], stream=True)
        #with open('{}{}-reference.jpg'.format(repathz, str(rdz.author)), 'wb') as out_file:
        #    shutil.copyfileobj(response.raw, out_file)
        #    del response
        
        #with open('/home/{}/memetest/galleries/{}.png'.format(myusr, gtm['id']), 'wb') as out_file:
        #    shutil.copyfileobj(response.raw, out_file)
        #    del response
            
img = PIL.Image.open('/home/{}/Downloads/seal.jpg'.format(myusr))

imageSize = img.size
print(imageSize)
        # find biggest font size that works
fontSize = int(imageSize[1]/5)
print(fontSize)
font = ImageFont.truetype("/home/{}/impact.ttf".format(myusr), fontSize)
topTextSize = font.getsize(upzero)
bottomTextSize = font.getsize(botzero)
print(topTextSize)
while topTextSize[0] > imageSize[0]-20 or bottomTextSize[0] > imageSize[0]-20:
    fontSize = fontSize - 1
    font = ImageFont.truetype("/home/{}/impact.ttf".format(myusr), fontSize)
    topTextSize = font.getsize(upzero)
    bottomTextSize = font.getsize(botzero)
    print(bottomTextSize)

        # find top centered position for top text
topTextPositionX = (imageSize[0]/2) - (topTextSize[0]/2)
topTextPositionY = 0
topTextPosition = (topTextPositionX, topTextPositionY)

        # find bottom centered position for bottom text
bottomTextPositionX = (imageSize[0]/2) - (bottomTextSize[0]/2)
bottomTextPositionY = imageSize[1] - bottomTextSize[1] -10
bottomTextPosition = (bottomTextPositionX, bottomTextPositionY)

draw = ImageDraw.Draw(img)

outlineRange = int(fontSize/15)
for x in range(-outlineRange, outlineRange+1):
    for y in range(-outlineRange, outlineRange+1):
            draw.text((topTextPosition[0]+x, topTextPosition[1]+y), upzero, (0,0,0), font=font)
            draw.text((bottomTextPosition[0]+x, bottomTextPosition[1]+y), botzero, (0,0,0), font=font)

    draw.text(topTextPosition, upzero, (255,255,255), font=font)
    draw.text(bottomTextPosition, botzero, (255,255,255), font=font)

    img.save("/home/{}/memetest/galleries/{}.jpg".format(myusr, str(nexid)))
            #print(gtm['id'])
            #filemh = gtm['id']
    #print('hello')
(620, 397)
79
(275, 80)
In [27]:
#reqote = requests.get('https://www.goodreads.com/quotes/tag/clothes')
In [28]:
somequote = requests.get('http://quotes.rest/qod.json?category=art')
In [29]:
quotejs = (somequote.json())
In [30]:
myqute = (quotejs['contents']['quotes'][0]['quote'])
In [31]:
lenqute = (quotejs['contents']['quotes'][0]['length'])
In [32]:
qutefas = myqute.replace('art', 'fashion')
In [33]:
qutefas
Out[33]:
'The whole culture is telling you to hurry, while the fashion tells you to take your time. Always listen to the fashion.'
In [34]:
quoteauth = quotejs['contents']['quotes'][0]['author']
In [35]:
auspit = quoteauth.split(' ')
In [36]:
fashauthz = (auspit[0] + " 'fashion' " + auspit[1])
In [37]:
bothquote = '"' + qutefas + '" - ' + fashauthz
In [38]:
print(bothquote)
"The whole culture is telling you to hurry, while the fashion tells you to take your time. Always listen to the fashion." - Junot 'fashion' Diaz
In [ ]:
 
In [39]:
print(lenqute)
111
In [40]:
lenqute
Out[40]:
'111'
In [41]:
#if lenqute < 20:
    
In [42]:
#print(quotejs['contents']['quotes'][0]['id'])
In [43]:
#float(lenqute) /2
In [44]:
#gheigh = (gtm['height'])
#gwth = (gtm['width'])
        #response = requests.get(gtm['url'], stream=True)
        #with open('{}{}-reference.jpg'.format(repathz, str(rdz.author)), 'wb') as out_file:
        #    shutil.copyfileobj(response.raw, out_file)
        #    del response
        
        #with open('/home/{}/memetest/galleries/{}.png'.format(myusr, gtm['id']), 'wb') as out_file:
        #    shutil.copyfileobj(response.raw, out_file)
        #    del response
            
img = PIL.Image.open('/home/pi/Downloads/seal.jpg')

imageSize = img.size
print(imageSize)
        # find biggest font size that works
fontSize = int(imageSize[1]/5)
print(fontSize)
font = ImageFont.truetype("/home/{}/impact.ttf".format(myusr), fontSize)
topTextSize = font.getsize(quotejs['contents']['quotes'][0]['quote'])
#bottomTextSize = font.getsize(quotejs['contents']['quotes'][0]['quote'])
print(topTextSize)
while topTextSize[0] > imageSize[0]-20:
    fontSize = fontSize - 1
    font = ImageFont.truetype("/home/{}/impact.ttf".format(myusr), fontSize)
    topTextSize = font.getsize(quotejs['contents']['quotes'][0]['quote'])
    #bottomTextSize = font.getsize(quotejs['contents']['quotes'][0]['quote'])
    #print(bottomTextSize)

        # find top centered position for top text
topTextPositionX = (imageSize[0]/2) - (topTextSize[0]/2)
topTextPositionY = 100
topTextPosition = (topTextPositionX, topTextPositionY)

        # find bottom centered position for bottom text
#bottomTextPositionX = (imageSize[0]/2) - (bottomTextSize[0]/2)
#bottomTextPositionY = imageSize[1] - bottomTextSize[1] -10
#bottomTextPosition = (bottomTextPositionX, bottomTextPositionY)

draw = ImageDraw.Draw(img)

outlineRange = int(fontSize/15)
for x in range(-outlineRange, outlineRange+1):
    for y in range(-outlineRange, outlineRange+1):
            draw.text((topTextPosition[0]+x, topTextPosition[1]+y), quotejs['contents']['quotes'][0]['quote'], (0,0,0), font=font)
            #draw.text((bottomTextPosition[0]+x, bottomTextPosition[1]+y), quotejs['contents']['quotes'][0]['quote'], (0,0,0), font=font)

    draw.text(topTextPosition, quotejs['contents']['quotes'][0]['quote'], (255,255,255), font=font)
    #draw.text(bottomTextPosition, quotejs['contents']['quotes'][0]['quote'], (255,255,255), font=font)
    img2 = img.crop((0, 80, 610,200))
    #img2.save("img2.jpg")

    img2.save("/home/{}/memetest/galleries/{}.jpg".format(myusr, str(quotejs['contents']['quotes'][0]['id'])))
            #print(gtm['id'])
            #filemh = gtm['id']
    #print('hello')
(620, 397)
79
(3317, 88)
In [ ]:
 
In [ ]:
 
In [45]:
#print(reqote)
In [46]:
#quotbs = bs4.BeautifulSoup(reqote.text)
In [47]:
#print(quotbs)
In [48]:
#allquote = quotbs.find('div', {'class' : "quoteText"})
In [49]:
#print(quotbs.find_all('a'))
In [50]:
#for allq in allquote:
#    print(allq)
In [ ]:
 
In [51]:
accdict = ({logemail : dict({'firstname' : loginda, 'lastname' : loglast, 'email' : logemail, 'password' : 'hashthis', 'gender': imgend, 'agehuman' : datebith.humanize(),'dob' : bodenter, 'id' : nexid, 'image' : '/galleries/{}.jpg', 'username' : userset, 'post' : '/posts/{}.md'.format(str(nexid), str(nexid))})})
In [52]:
#print(accdict)
In [53]:
import json
In [54]:
z = {**readdict, **accdict}
In [55]:
z
Out[55]:
{'beer@gmail.com': {'agehuman': '14 years ago',
  'dob': '2003/12/12',
  'email': 'beer@gmail.com',
  'firstname': 'be',
  'gender': 'male',
  'id': 17,
  'image': '/galleries/{}.jpg',
  'lastname': 'er',
  'password': 'hashthis',
  'post': '/posts/17.md',
  'username': 'beer'},
 'debian@deb.com': {'agehuman': '15 years ago',
  'dob': '2001/12/25',
  'email': 'debian@deb.com',
  'firstname': 'deb',
  'gender': 'male',
  'id': 8,
  'lastname': 'ian',
  'password': 'hashthis'},
 'dude@gmail.com': {'agehuman': '16 years ago',
  'dob': '2001/12/12',
  'email': 'dude@gmail.com',
  'firstname': 'dude',
  'gender': 'female',
  'id': 14,
  'image': '/galleries/{}.jpg',
  'lastname': 'liss',
  'password': 'hashthis',
  'post': '/posts/14.md',
  'username': 'dudeliss'},
 'dude@hayden.com': {'agehuman': '16 years ago',
  'dob': '2001/09/11',
  'email': 'dude@hayden.com',
  'firstname': 'hay',
  'gender': 'male',
  'id': 10,
  'lastname': 'den',
  'password': 'hashthis'},
 'funguy@gmail.com': {'agehuman': '16 years ago',
  'dob': '2001/09/12',
  'email': 'funguy@gmail.com',
  'firstname': 'fun',
  'gender': 'male',
  'id': 12,
  'image': '/galleries/{}.jpg',
  'lastname': 'nny',
  'password': 'hashthis',
  'post': '/posts/12.md'},
 'hammersmake@gmail.com': {'agehuman': '15 years ago',
  'dob': '2001/12/25',
  'email': 'hammersmake@gmail.com',
  'firstname': 'Will',
  'gender': 'male',
  'id': 7,
  'lastname': 'Bill',
  'password': 'hashthis'},
 'holley@mckee.com': {'agehuman': '29 years ago',
  'dob': '1988/03/09',
  'email': 'holley@mckee.com',
  'firstname': 'Holley',
  'gender': 'female',
  'lastname': 'Mckee',
  'password': 'hashthis'},
 'joe@bin.com': {'agehuman': '72 years ago',
  'dob': '1945/12/25',
  'email': 'joe@bin.com',
  'firstname': 'joe',
  'gender': 'male',
  'lastname': 'bin',
  'password': 'hashthis'},
 'lin@gmail.com': {'agehuman': '15 years ago',
  'dob': '2001/12/25',
  'email': 'lin@gmail.com',
  'firstname': 'lin',
  'gender': 'female',
  'id': 7,
  'lastname': 'dea',
  'password': 'hashthis'},
 'losers@gmail.com': {'agehuman': '29 years ago',
  'dob': '1988/04/01',
  'email': 'losers@gmail.com',
  'firstname': 'los',
  'gender': 'male',
  'id': 16,
  'image': '/galleries/{}.jpg',
  'lastname': 'ers',
  'password': 'hashthis',
  'post': '/posts/16.md',
  'username': 'losers'},
 'myself@gmail.com': {'agehuman': '16 years ago',
  'dob': '2001/02/12',
  'email': 'myself@gmail.com',
  'firstname': 'myse',
  'gender': 'male',
  'id': 18,
  'image': '/galleries/{}.jpg',
  'lastname': 'lf',
  'password': 'hashthis',
  'post': '/posts/18.md',
  'username': 'myself'},
 'p@moodley.com': {'agehuman': '41 years ago',
  'dob': '1976/12/12',
  'email': 'p@moodley.com',
  'firstname': 'Peter',
  'gender': 'female',
  'lastname': 'Moodley',
  'password': 'hashthis'},
 'qwerty@gmail.com': {'agehuman': '16 years ago',
  'dob': '2001/09/11',
  'email': 'qwerty@gmail.com',
  'firstname': 'qwe',
  'gender': 'male',
  'id': 13,
  'image': '/galleries/{}.jpg',
  'lastname': 'erty',
  'password': 'hashthis',
  'post': '/posts/13.md',
  'username': 'qwerty'},
 'random@gmail.com': {'agehuman': '16 years ago',
  'dob': '2001/09/11',
  'email': 'random@gmail.com',
  'firstname': 'ran',
  'gender': 'male',
  'id': 11,
  'lastname': 'dom',
  'password': 'hashthis'},
 'samsung@gmail.com': {'agehuman': '5 years ago',
  'dob': '2012/02/02',
  'email': 'samsung@gmail.com',
  'firstname': 'sam',
  'gender': 'male',
  'id': 21,
  'image': '/galleries/{}.jpg',
  'lastname': 'sung',
  'password': 'hashthis',
  'post': '/posts/21.md',
  'username': 'samsung'},
 'somez@gmail.com': {'agehuman': '3 years ago',
  'dob': '2013/12/25',
  'email': 'somez@gmail.com',
  'firstname': 'Someone',
  'gender': 'male',
  'lastname': 'Now',
  'password': 'hashthis'},
 'ubun@nut.com': {'agehuman': '16 years ago',
  'dob': '2001/11/11',
  'email': 'ubun@nut.com',
  'firstname': 'ubun',
  'gender': 'male',
  'id': 9,
  'lastname': 'tu',
  'password': 'hashthis'},
 'wazza@gmail.com': {'agehuman': '16 years ago',
  'dob': '2001/02/02',
  'email': 'wazza@gmail.com',
  'firstname': 'waz',
  'gender': 'female',
  'id': 20,
  'image': '/galleries/{}.jpg',
  'lastname': 'za',
  'password': 'hashthis',
  'post': '/posts/20.md',
  'username': 'wazza'},
 'will@art.com': {'agehuman': '29 years ago',
  'dob': '1988/12/12',
  'email': 'will@art.com',
  'firstname': 'seal',
  'gender': 'female',
  'id': 15,
  'image': '/galleries/{}.jpg',
  'lastname': 'aermy',
  'password': 'hashthis',
  'post': '/posts/15.md',
  'username': 'sealaermy'},
 'will@artcontrol.me': {'agehuman': '16 years ago',
  'dob': '2001/12/12',
  'email': 'will@artcontrol.me',
  'firstname': 'will',
  'gender': 'male',
  'id': 22,
  'image': '/galleries/{}.jpg',
  'lastname': 'mckee',
  'password': 'hashthis',
  'post': '/posts/22.md',
  'username': 'willmckee'},
 'willmckee@gmail.com': {'agehuman': '16 years ago',
  'dob': '2001/12/04',
  'email': 'willmckee@gmail.com',
  'firstname': 'will',
  'gender': 'male',
  'id': 19,
  'image': '/galleries/{}.jpg',
  'lastname': 'mckee',
  'password': 'hashthis',
  'post': '/posts/19.md',
  'username': 'willmckee'},
 'wow@gmail.com': {'agehuman': '32 years ago',
  'dob': '1985/12/04',
  'email': 'wow@gmail.com',
  'firstname': 'woowa',
  'gender': 'male',
  'id': 6,
  'lastname': 'never',
  'password': 'hashthis'}}
In [56]:
#json.dumps(accdict)
In [57]:
with open('/home/pi/account.json', 'w') as blacc:
    blacc.write(json.dumps(z))
          
In [58]:
#cat /home/pi/account.json
In [59]:
timnow = arrow.now()
In [60]:
timnowz = timnow.datetime
In [61]:
#print(timnowz)
In [62]:
with open('/home/{}/memetest/posts/{}.md'.format(myusr, str(nexid)), 'w') as resulmd:
    resulmd.write('{}\n\n![{}](/galleries/{}.jpg)\n\n First name: {}\n\nLast name: {}\n\nEmail: {}\n\nGender: {}\n\n{}\n\n![gender]({})\n\n![cloth]({})'.format(bothquote, str(nexid), str(nexid), loginda, loglast, logemail, imgend, emailcont, genpat, genshit))
        
with open ('/home/{}/memetest/posts/{}.meta'.format(myusr, str(nexid)), 'w') as opmetat:
    #opmetat.write("{}".format(str(curtim))
            #for arage in alltags:
            #    print(arage)
    opmetat.write('.. title: {}\n.. slug: {}\n.. date: {}\n.. tags: \n.. link:\n.. description:\n.. type: text'.format(str(nexid), str(nexid), timnowz))
In [63]:
#with open('/home/pi/hugosite/content/post/{}.md'.format(str(nexid)), 'w') as hupost:
 #   hupost.write('+++\ndate = "{}"\ntitle = {}\n\n+++\n\nFirst name: {}\n\nLast name: {}\n\nUsername: {}\n\nEmail: {}\n\nGender: {}'.format(timnowz, str(nexid), loginda, loglast, logemail, imgend))
    #hupost.write('+++\ndate = "{}"\ntitle = {}\n\n+++\n\nFirst name: '.format(timnowz))
In [91]:
#for salele in range(salelen):
    

#    descript = (salejs['sales'][salele]['description'])
#    imurl = (salejs['sales'][salele]['image_urls']['686x374'][0]['url'])
#    with open('/home/{}/memetest/posts/{}.md'.format(myusr, str(nexid)), 'a') as resulmd:
#        resulmd.write('\n\n![photo]({})\n\n'.format(imurl))
In [ ]:
 
In [64]:
#cat /home/pi/hugosite/content/post/6.md
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 

Comments

Comments powered by Disqus