Compare commits

..

12 Commits

Author SHA1 Message Date
aacc0af901 API for Calendars 2026-01-12 22:48:08 -05:00
f6672a880a updated to running 2026-01-09 22:44:40 -05:00
11b4a422a2 update gitignore 2025-11-30 15:37:28 -05:00
e06a5d49f8 lots of updates :/ 2025-11-30 15:34:08 -05:00
61e198ff55 update to prod,removed db 2025-10-13 17:44:00 -05:00
31845835e3 updated settings | random social_links returned now 2025-10-13 00:22:26 +00:00
1ad86cb1f4 update reqs 2025-10-11 21:47:21 -05:00
d3bc2d3b5b updated settings 2025-10-11 21:43:11 -05:00
f966084407 Merge pull request #1 from DreamFreely/feat_apikey
API KEYS working
2025-10-11 20:21:48 -05:00
e2e8757452 API KEYS working 2025-10-11 20:21:01 -05:00
aef63f1a08 scraper updates 2025-10-11 10:58:35 -05:00
0e686c91e4 update reqs.txt 2025-10-11 03:57:13 -05:00
116 changed files with 2480 additions and 6960 deletions

BIN
.bak Normal file

Binary file not shown.

6
.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
*/__pycache__
*/*/__pycache__
.env
db.sqlite3
baks
*.bak

View File

@@ -11,6 +11,6 @@ import os
from django.core.asgi import get_asgi_application from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ds_events.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.django.local')
application = get_asgi_application() application = get_asgi_application()

View File

60
config/django/base.py Normal file
View File

@@ -0,0 +1,60 @@
import os
from config.env import BASE_DIR, env
# PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__))
env.read_env(os.path.join(BASE_DIR, '.env'))
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_filters',
'corsheaders',
'rest_framework',
# 'rest_framework.authtoken',
"rest_framework_api_key",
'socials',
'events',
'config',
# 'academia_nuts',
# 'leg_info',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
},
'default2': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db2.sqlite3',
}
}
CORS_ALLOWED_ORIGINS = [
'http://localhost:5173',
'https://digisnaxx.com',
'https://www.digisnaxx.com',
'https://www.canincarlos.com',
'https://canincarlos.com',
'https://dreamfreely.org',
'https://www.dreamfreely.org'
]
from config.django.core import *
from config.settings.restframework import *

58
config/django/core.py Normal file
View File

@@ -0,0 +1,58 @@
import os
from config.env import BASE_DIR, env
env.read_env(os.path.join(BASE_DIR, '.env'))
WSGI_APPLICATION = 'config.wsgi.application'
ROOT_URLCONF = 'config.urls'
# https://docs.djangoproject.com/en/4.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_TZ = True
# https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# Password validation
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

19
config/django/local.py Normal file
View File

@@ -0,0 +1,19 @@
from .base import *
from config.env import env
SECRET_KEY = env('SECRET_KEY')
DEBUG = env.bool('DEBUG', default=True)
# ALLOWED_HOSTS = env.list('ALLOWED_HOSTS')
ALLOWED_HOSTS=['localhost',]
CORS_ALLOW_ALL_ORIGINS = env.bool('CORS_ALLOW_ALL_ORIGINS')
# CORS_ALLOWED_ORIGINS=env.list('CORS_ALLOWED_ORIGINS')
CORS_ALLOWED_ORIGINS = [
'http://localhost:5173',
'https://digisnaxx.com',
'https://www.digisnaxx.com',
'https://www.canincarlos.com',
'https://canincarlos.com',
'https://dreamfreely.org',
'https://www.dreamfreely.org'
]

18
config/django/prod.py Normal file
View File

@@ -0,0 +1,18 @@
from .base import *
from config.env import env
SECRET_KEY = env('SECRET_KEY')
DEBUG = env.bool('DEBUG', default=False)
ALLOWED_HOSTS = env.list('ALLOWED_HOSTS')
CORS_ALLOW_ALL_ORIGINS = env.bool('CORS_ALLOW_ALL_ORIGINS')
CORS_ALLOWED_ORIGINS = [
'http://localhost:5173',
'https://digisnaxx.com',
'https://www.digisnaxx.com',
'https://www.canincarlos.com',
'https://canincarlos.com',
'https://dreamfreely.org',
'https://www.dreamfreely.org'
]

2
config/django/test.py Normal file
View File

@@ -0,0 +1,2 @@
from .base import *
from config.env import env

6
config/env.py Normal file
View File

@@ -0,0 +1,6 @@
from pathlib import Path
import environ
env = environ.Env()
BASE_DIR = Path(__file__).resolve().parent.parent

View File

@@ -11,29 +11,25 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
""" """
from pathlib import Path from pathlib import Path
import os.path import environ
import sys import os
env = environ.Env(
# set casting, default value
DEBUG=(bool, False),
)
PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__)) PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__))
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
environ.Env.read_env(os.path.join(BASE_DIR, '.env'))
# Quick-start development settings - unsuitable for production SECRET_KEY = env('SECRET_KEY')
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/ DEBUG = env('DEBUG')
ALLOWED_HOSTS = env.list('ALLOWED_HOSTS')
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-9v6qy1=ydv)zpry!$(cf$ve)s17009^0)d755my0g2qjugap2^'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = [
"localhost",
"api.digisnaxx.com",
]
CORS_ALLOW_ALL_ORIGINS = env.bool('CORS_ALLOW_ALL_ORIGINS')
CORS_ALLOWED_ORIGINS=env.list('CORS_ALLOWED_ORIGINS')
# Application definition # Application definition
@@ -45,17 +41,20 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'django_filters', 'django_filters',
'corsheaders',
'rest_framework', 'rest_framework',
'rest_framework.authtoken', # 'rest_framework.authtoken',
"rest_framework_api_key",
'socials', 'socials',
'events', 'events',
'academia_nuts', # 'academia_nuts',
# 'leg_info', # 'leg_info',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
@@ -63,8 +62,6 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
] ]
ROOT_URLCONF = 'ds_events.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
@@ -82,10 +79,7 @@ TEMPLATES = [
] ]
WSGI_APPLICATION = 'ds_events.wsgi.application' WSGI_APPLICATION = 'ds_events.wsgi.application'
ROOT_URLCONF = 'ds_events.urls'
# Database
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': {
@@ -137,36 +131,12 @@ REST_FRAMEWORK = {
# }, # },
} }
# from datetime import timedelta
# from rest_framework.settings import api_settings
# REST_DURIN = {
# "DEFAULT_TOKEN_TTL": timedelta(days=1),
# "TOKEN_CHARACTER_LENGTH": 64,
# "USER_SERIALIZER": None,
# "AUTH_HEADER_PREFIX": "Token",
# "EXPIRY_DATETIME_FORMAT": api_settings.DATETIME_FORMAT,
# "TOKEN_CACHE_TIMEOUT": 60,
# "REFRESH_TOKEN_ON_LOGIN": False,
# "AUTHTOKEN_SELECT_RELATED_LIST": ["user"],
# "API_ACCESS_CLIENT_NAME": "User",
# "API_ACCESS_EXCLUDE_FROM_SESSIONS": False,
# "API_ACCESS_RESPONSE_INCLUDE_TOKEN": False,
# }
# Internationalization
# https://docs.djangoproject.com/en/4.1/topics/i18n/ # https://docs.djangoproject.com/en/4.1/topics/i18n/
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC' TIME_ZONE = 'UTC'
USE_I18N = True USE_I18N = True
USE_TZ = True USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/ # https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/' STATIC_URL = '/static/'
@@ -174,7 +144,8 @@ STATIC_URL = '/static/'
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

View File

@@ -0,0 +1,19 @@
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
'DEFAULT_AUTHENTICATION_CLASSES': (
# 'durin.auth.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
# 'rest_framework.permissions.IsAuthenticated',
),
# "DEFAULT_THROTTLE_CLASSES": ["durin.throttling.UserClientRateThrottle"],
# 'DEFAULT_THROTTLE_RATES': {
# 'anon': '50/day',
# 'platinum': '5000/day',
# 'gold': '1000/day',
# 'silver': '250/day',
# 'free': '50/day',
# },
}

View File

@@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ds_events.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.django.local')
application = get_wsgi_application() application = get_wsgi_application()

Binary file not shown.

View File

@@ -1,10 +1,14 @@
from django.contrib import admin from django.contrib import admin
from .models import * from .models import *
class CalendarAdmin(admin.ModelAdmin):
# prepopulated_fields = {"slug": ("shortname",)}
list_display = ("name", "shortcode", "published")
class ScraperAdmin(admin.ModelAdmin): class ScraperAdmin(admin.ModelAdmin):
# prepopulated_fields = {"slug": ("shortname",)} # prepopulated_fields = {"slug": ("shortname",)}
list_display = ("name", "items", "new_items", "last_ran") list_display = ("name", "items", "new_items", "last_ran", "calendar")
class OrganizationAdmin(admin.ModelAdmin): class OrganizationAdmin(admin.ModelAdmin):
# prepopulated_fields = {"slug": ("shortname",)} # prepopulated_fields = {"slug": ("shortname",)}
@@ -13,18 +17,21 @@ class OrganizationAdmin(admin.ModelAdmin):
class EventAdmin(admin.ModelAdmin): class EventAdmin(admin.ModelAdmin):
# prepopulated_fields = {"slug": ("shortname",)} # prepopulated_fields = {"slug": ("shortname",)}
list_display = ( "show_title", "event_type", "show_date",) list_display = ( "show_title", "event_type", "show_date", "scraper")
list_filter = ("venue", "event_type") list_filter = ("calendar", "event_type", "scraper",)
class PromoAdmin(admin.ModelAdmin): class PromoAdmin(admin.ModelAdmin):
# prepopulated_fields = {"slug": ("shortname",)} # prepopulated_fields = {"slug": ("shortname",)}
list_display = ("title", "organization", "promo_type", "published") list_display = ("title", "organization", "get_calendars", "published")
list_filter = ("promo_type",) list_filter = ("calendar__shortcode", "promo_type")
def get_calendars(self, obj):
return "\n".join([p.shortcode for p in obj.calendar.all()])
# Register your models here. # Register your models here.
admin.site.register(Scraper, ScraperAdmin)
admin.site.register(Event, EventAdmin)
admin.site.register(Organization, OrganizationAdmin)
admin.site.register(Promo, PromoAdmin) admin.site.register(Promo, PromoAdmin)
admin.site.register(Calendar) admin.site.register(Event, EventAdmin)
admin.site.register(Scraper, ScraperAdmin)
admin.site.register(Calendar, CalendarAdmin)
admin.site.register(Organization, OrganizationAdmin)

View File

@@ -1,5 +1,5 @@
import os, sys import os, sys
from datetime import datetime from datetime import datetime, timedelta
from dateutil import relativedelta from dateutil import relativedelta
from time import sleep from time import sleep
import pytz import pytz
@@ -7,26 +7,25 @@ from lxml import html
from pprint import pprint as ppr from pprint import pprint as ppr
import django import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from xvfbwrapper import Xvfb from xvfbwrapper import Xvfb
from selenium import webdriver as wd from selenium import webdriver as wd
from events.models import Event as DSEvent, Organization, Promo, Scraper, Calendar from events.models import Event as DSEvent, Organization, Promo, Scraper, Calendar
tz = pytz.timezone("US/Central") # tz = pytz.timezone("US/Central")
td = relativedelta.relativedelta(months=1) plus_one_month = relativedelta.relativedelta(months=1)
odt = datetime.now() + td odt_next_month = datetime.now() + plus_one_month
def getScraper(venue): # Get Scraper name, item count and online_calendar (virtcal)
def getScraper(venue, website, cal):
virtcal = Calendar.objects.get(shortcode='000')
try: try:
scraper, created = Scraper.objects.get_or_create( scraper, created = Scraper.objects.get_or_create(
name=venue.name, name=venue.name,
website=venue.website, website=website,
calendar = Calendar.objects.get(id=1), calendar = Calendar.objects.get(shortcode=cal),
items = 0, items = 0,
new_items = 0, new_items = 0,
last_ran = datetime.now(), last_ran = datetime.now(),
@@ -38,9 +37,9 @@ def getScraper(venue):
scraper.items = len(num_of_events) scraper.items = len(num_of_events)
scraper.save() scraper.save()
print("Scraper: ", scraper) print("Scraper: ", scraper)
pass return scraper, scraper.items, virtcal
return scraper, scraper.items
# Update item_count of the Scraper at the end of the scrape
def updateScraper(scraper, item_count_start): def updateScraper(scraper, item_count_start):
num_of_events = DSEvent.objects.filter(scraper=scraper) num_of_events = DSEvent.objects.filter(scraper=scraper)
scraper.items = len(num_of_events) scraper.items = len(num_of_events)
@@ -49,19 +48,18 @@ def updateScraper(scraper, item_count_start):
scraper.save() scraper.save()
return return
# Get site HTML content for XPATH travel
def getSource(browser, link): def getSource(browser, link):
browser.get(link) browser.get(link)
sleep(5) sleep(5)
ps = html.fromstring(browser.page_source) ps = html.fromstring(browser.page_source)
return ps return ps
# Get Selenium Web Drive, with params for Chrome or Firefox
# Or in production to run headless
def getBrowser(run_env): def getBrowser(run_env):
if run_env == 'dev': if run_env == 'dev':
print("Chrome is a go!") print("Chrome is a go!")
# chromeOptions = wd.ChromeOptions()
# chromeOptions.binary_location = "/Application/Google\ Chrome.app"
# chromeDriver = "/opt/homebrew/bin/chromedriver"
# br = wd.Chrome(chromeDriver, options=chromeOptions)
br = wd.Chrome() br = wd.Chrome()
return br return br
elif run_env == "def": elif run_env == "def":
@@ -80,19 +78,28 @@ def getBrowser(run_env):
print("Failed", sys.argv, arg1) print("Failed", sys.argv, arg1)
quit() quit()
# Create Dated URL with zero-padded numbers
def createBasicURL(site_url): def createBasicURL(site_url):
month = datetime.now().month month = datetime.now().month
next_month = odt.month next_month = odt_next_month.month
year = datetime.now().year year = datetime.now().year
if next_month == 1:
next_year = year+1
links = [
site_url + str(month) + "/" + str(year),
site_url + str(next_month) + "/" + str(next_year)
]
else:
links = [ links = [
site_url + str(month) + "/" + str(year), site_url + str(month) + "/" + str(year),
site_url + str(next_month) + "/" + str(year) site_url + str(next_month) + "/" + str(year)
] ]
return links return links
# Create Dated URL without zero-padded numbers
def createURLNoZero(site_url): def createURLNoZero(site_url):
month = datetime.now().month month = datetime.now().month
next_month = odt.month next_month = odt_next_month.month
year = datetime.now().year year = datetime.now().year
links = [ links = [
site_url + str(year) + "/" + str(month), site_url + str(year) + "/" + str(month),
@@ -103,13 +110,14 @@ def createURLNoZero(site_url):
links.append(site_url + str(year) + "/" + str(next_month)) links.append(site_url + str(year) + "/" + str(next_month))
return links return links
# Create Dated URL Link with zero-padding
def createURL(site_url): def createURL(site_url):
month = datetime.now().month month = datetime.now().month
if month < 10: if month < 10:
month = "0" + str(month) month = "0" + str(month)
else: else:
month = str(month) month = str(month)
next_month = odt.month next_month = odt_next_month.month
if next_month < 10: if next_month < 10:
next_month = "0" + str(next_month) next_month = "0" + str(next_month)
else: else:
@@ -124,6 +132,7 @@ def createURL(site_url):
links.append(site_url + str(year) + "/" + next_month) links.append(site_url + str(year) + "/" + next_month)
return links return links
# Create Dated URL with dashes
def createDashURL(site_url): def createDashURL(site_url):
month = datetime.now().month month = datetime.now().month
if month < 10: if month < 10:
@@ -143,6 +152,26 @@ def createDashURL(site_url):
print(links) print(links)
return links return links
# Add Calendar to Event Object (maybe extraneous)
def add_calendar(event, calendar):
if type(event) is tuple:
event = event[0]
cal = Calendar.objects.get(shortcode=calendar)
event.calendar.add(cal)
event.save()
return event
# Add Calendars to Event Object ??
def add_calendars(event, data):
if type(data['calendars']) is not list:
event.calendar.add(data['calendars'])
else:
for cal in data['calendars']:
event.calendar.add(cal)
event.save()
return event
# Create Basic DigiSnaxx Event
def createBasicEvent(event, event_type, venue): def createBasicEvent(event, event_type, venue):
new_event, created = DSEvent.objects.update_or_create( new_event, created = DSEvent.objects.update_or_create(
event_type = event_type, event_type = event_type,
@@ -150,58 +179,65 @@ def createBasicEvent(event, event_type, venue):
show_link = event['link'], show_link = event['link'],
show_date = event['dateStamp'], show_date = event['dateStamp'],
show_day = event['dateStamp'], show_day = event['dateStamp'],
calendar = event['calendar'],
scraper = event['scraper'], scraper = event['scraper'],
venue = venue venue = venue
) )
new_event = add_calendars(new_event, event)
# print("\n+new event+")
return new_event, created return new_event, created
# Create iCal Event
def createBasiciCalEvent(event, event_type, venue): def createBasiciCalEvent(event, event_type, venue):
print("starting create")
ppr(event)
new_event, created = DSEvent.objects.update_or_create( new_event, created = DSEvent.objects.update_or_create(
event_type = event_type, event_type = event_type,
show_title = event['title'][0], show_title = event['title'][0],
show_link = event['link'], show_link = event['link'],
show_date = datetime.strptime(str(event['dateStamp'][0]), '%Y-%m-%d %H:%M:%S'), show_date = datetime.strptime(str(event['dateStamp'][0]), '%Y-%m-%d %H:%M:%S'),
show_day = datetime.strptime(str(event['dateStamp'][0]), '%Y-%m-%d %H:%M:%S'), show_day = datetime.strptime(str(event['dateStamp'][0]), '%Y-%m-%d %H:%M:%S'),
calendar = event['calendar'],
scraper = event['scraper'], scraper = event['scraper'],
venue = venue venue = venue
) )
print("created") new_event = add_calendars(new_event, event)
print("Success")
return new_event, created return new_event, created
# Create Detailed Event with Details & Guests
# Details in JSON Format
def createDetailedEvent(event, event_type, venue, scraper): def createDetailedEvent(event, event_type, venue, scraper):
new_event, created = DSEvent.objects.update_or_create( new_event, created = DSEvent.objects.update_or_create(
event_type = event_type, event_type = event_type,
show_title = event["show_title"], show_title = event["show_title"],
show_link = event["link"], show_link = event["link"],
show_date = event["dateStamp"], show_date = event["dateStamp"],
show_day = event["dateStamp"], show_day = event['dateStamp'],
guests = " ".join(event["guests"]), guests = " ".join(event["guests"]),
more_details = event["details"], more_details = event["details"],
calendar = event['calendar'],
scraper = event['scraper'], scraper = event['scraper'],
venue = venue venue = venue
) )
new_event = add_calendars(new_event, event)
print("Success")
return new_event, created return new_event, created
def createBasicArticle(article, event_type, organization): # Create iCal event from DF_Online & Medellin
new_article, created = Promo.objects.update_or_create( def createCleanIcalEvent(event, scraper, venue, event_type):
promo_type = 'Ja', new_date = event['dateStart']
title = article['title'], new_event = {}
target_link = article['link'], new_event['scraper'] = scraper
published = True, new_event['calendars'] = scraper.calendar
organization = organization new_event['title'] = event['strSummary'],
) new_event['date'] = str(new_date),
return new_article, created new_event['dateStamp'] = str(new_date),
new_event['link'] = venue.website
createBasiciCalEvent(new_event, event_type, venue)
def getiCalEvents(gcal, scraper): # Get events from iCal
def getiCalEvents(gcal, scraper, venue, event_type):
events = []
for component in gcal.walk(): for component in gcal.walk():
event = {} event = {}
event['scraper'] = scraper event['scraper'] = scraper
event['calendar'] = scraper.calendar event['calendars'] = [scraper.calendar]
event['strSummary'] = f"{(component.get('SUMMARY'))}" event['strSummary'] = f"{(component.get('SUMMARY'))}"
event['strDesc'] = component.get('DESCRIPTION') event['strDesc'] = component.get('DESCRIPTION')
event['strLocation'] = component.get('LOCATION') event['strLocation'] = component.get('LOCATION')
@@ -213,46 +249,121 @@ def getiCalEvents(gcal, scraper):
try: try:
event['dateStart'] = event['dateStart'].dt event['dateStart'] = event['dateStart'].dt
except Exception as e: except Exception as e:
event['dateStart'] = event['dateStart'].dt print("what? ", e)
event['dateEnd'] = (component.get('DTEND'))
if event['dateEnd'] is not None:
event['dateEnd'] = event['dateEnd'].dt
else:
event['dateEnd'] = event['dateStart']
if event['strSummary'] != 'None': if event['strSummary'] != 'None':
event['details'] = { event['details'] = {
"description" : event['strDesc'], "description" : event['strDesc'],
"Location" : event['strLocation'], "Location" : event['strLocation'],
} }
now_now = datetime.today().date() events.append(event)
return events
# Build iCal Events and Send to Create
def buildiCalEvents(events, event_type, scraper, venue):
for event in events:
e = {}
e['calendars'] = event['calendars']
try: try:
print("1Event: ", event['dateStart']) e['dateStamp'] = event['dateStart'][0]
if event['dateStart'] > now_now: except:
new_date = event['dateStart']-td e['dateStamp'] = event['dateStart']
new_event = {} e['title'] = event['strSummary']
new_event['scraper'] = scraper e['scraper'] = scraper
new_event['calendar'] = scraper.calendar e['link'] = venue.website
new_event['title'] = event['strSummary'],
new_event['date'] = str(new_date),
new_event['dateStamp'] = str(new_date),
new_event['link'] = venue.website
createBasiciCalEvent(new_event, "Mu", venue)
except Exception as e:
try: try:
event['dateStart'] = event['dateStart'].date() createBasicEvent(e, event_type, venue)
print("1Event: ", event['dateStart']) scraper.items+=1
if event['dateStart'] > now_now:
new_date = event['dateStart']-td
print("The new Date: ", new_date, type(new_date))
new_event = {}
new_event['scraper'] = scraper
new_event['calendar'] = scraper.calendar
new_event['title'] = event['strSummary'],
new_event['date'] = new_date,
new_event['dateStamp'] = new_date,
new_event['link'] = venue.website
createBasiciCalEvent(new_event, "Mu", venue)
except Exception as e: except Exception as e:
print("The Error: ", e) print("Error: ", e)
scraper.save()
return
def getMDEVenue(venue):
if venue.name == "DANCEFREE":
venue.website = "https://www.instagram.com/dancefreeco"
if venue.name == "Vintrash":
venue.website = "https://www.instagram.com/vintrashbar"
if venue.name == "The Wandering Paisa":
venue.website = "https://wanderingpaisahostel.com"
if venue.name == "Dulce Posion":
venue.website = "https://www.instagram.com/dulceposionr"
if venue.name == "Blood Dance Company":
venue.website = "https://www.instagram.com/blooddancecompany"
if venue.name == "OLSA Certified Spanish School":
venue.website = "https://www.olsafoundation.org/"
if event['strSummary'] == "Merli Rooftop Language Exchange":
venue.website = "https://calendar.google.com/calendar/embed?src=46ae0446724b1b3ee83cbd7dbc0db6a235bf97509ad860ca91eada3c267b5e41%40group.calendar.google.com&ctz=America%2FBogota"
if "Concious Warrior" in event['strSummary']:
venue.website = "https://www.consciouscolombia.com/"
venue.save()
return
# Get iCal events for Medellin & OnlineEvents
def getiCalRepeateEvents(gcal, scraper, venue, event_type, cal):
for component in gcal.walk():
event = {}
event['scraper'] = scraper
event['calendars'] = [scraper.calendar]
event['strSummary'] = f"{(component.get('SUMMARY'))}"
event['strDesc'] = component.get('DESCRIPTION')
event['strLocation'] = str(component.get('LOCATION'))
event['dateStart'] = component.get('DTSTART')
event['dateStamp'] = component.get('DTSTAMP')
if event['strSummary'] != 'None':
event['details'] = {
"description" : event['strDesc'],
"Location" : event['strLocation'],
}
if event['dateStamp'] != None:
event['dateStart'] = event['dateStart'].dt
event['dateStart'] = datetime.strptime(str(event['dateStart'])[:-6], '%Y-%m-%d %H:%M:%S')
rules = component.get('RRule')
try:
if rules['FREQ'][0] == 'WEEKLY':
if datetime.today().weekday() != 0:
event = splitLocation(event, city="Medellin")
date = datetime.today().date() - timedelta(days=datetime.today().weekday())
date = datetime.combine(date, event['dateStart'].time())
days = ["SU", "MO", "TU", "WE", "TH", "FR", "SA"]
for day in rules['BYDAY']:
day = days.index(day)
if cal == 'mde':
getVenue(event['venue'])
iCalEventRepeatFilter(day, date, event, scraper, event['venue'], "Ed")
except Exception as e:
print("Error: ", event, e, "\n\n\n\n")
pass pass
def iCalEventRepeatFilter(day, date, event, scraper, venue, event_type):
days = [day-1, day+6, day+13]
for day in days:
event['dateStamp'] = date + timedelta(days=day)
event['dateStart'] = event['dateStamp']
createCleanIcalEvent(event, scraper, venue, event_type)
return
def splitLocation(event, **kwargs):
loc_split = event['strLocation'].split(',')
ppr(loc_split)
venue_name = loc_split[0]
venue, created = Organization.objects.get_or_create(
name=venue_name,
)
event['venue'] = venue
# if kwargs['city']:
# venue.city = kwargs['city']
# venue.save()
return event
# ARCHIVED Methods
def createBasicArticle(article, event_type, organization):
new_article, created = Promo.objects.update_or_create(
promo_type = 'Ja',
title = article['title'],
target_link = article['link'],
published = True,
organization = organization
)
return new_article, created

View File

@@ -0,0 +1,38 @@
[
{
"model": "events.calendar",
"pk": 1,
"fields": {
"name": "Virtual",
"shortcode": "000",
"desc": "Virtual Events"
}
},
{
"model": "events.calendar",
"pk": 2,
"fields": {
"name": "Mpls-StP",
"shortcode": "msp",
"desc": "none"
}
},
{
"model": "events.calendar",
"pk": 3,
"fields": {
"name": "Medellin",
"shortcode": "mde",
"desc": "none"
}
},
{
"model": "events.calendar",
"pk": 4,
"fields": {
"name": "Bakata",
"shortcode": "bog",
"desc": "Bogota, Colombia"
}
}
]

File diff suppressed because it is too large Load Diff

994
events/fixtures/orgs.json Normal file
View File

@@ -0,0 +1,994 @@
[
{
"model": "events.organization",
"pk": 1,
"fields": {
"name": "DreamFreely",
"website": "https://www.dreamfreely.org",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": null,
"state": null,
"zip_code": null,
"phone_number": "6124054535",
"business_email": "canin@dreamfreely.org",
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": "Canin Carlos",
"contact_email": "canin@dreamfreely.org",
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 2,
"fields": {
"name": "Acme Comedy Club",
"website": "https://acmecomedycompany.com/the-club/calendar/",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 3,
"fields": {
"name": "Amsterdam Bar & Hall",
"website": "https://www.amsterdambarandhall.com/events-new/",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "St. Paul",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 4,
"fields": {
"name": "Cedar Cultural Center",
"website": "https://www.thecedar.org",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 5,
"fields": {
"name": "Club 331",
"website": "https://331club.com",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 6,
"fields": {
"name": "First Avenue",
"website": "https://first-avenue.com",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 7,
"fields": {
"name": "Palace Theatre",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 8,
"fields": {
"name": "7th St Entry",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 9,
"fields": {
"name": "The Fitzgerald Theater",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "St. Paul",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 10,
"fields": {
"name": "Turf Club",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "St. Paul",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 11,
"fields": {
"name": "Fine Line",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 12,
"fields": {
"name": "icehouse MPLS",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 13,
"fields": {
"name": "Ginkgo Coffee",
"website": "https://ginkgocoffee.com/events/",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Saint Paul",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 14,
"fields": {
"name": "Green Room",
"website": "https://www.greenroommn.com/events",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 15,
"fields": {
"name": "Hook & Ladder",
"website": "https://thehookmpls.com",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 16,
"fields": {
"name": "Magers & Quinn",
"website": "https://www.magersandquinn.com/events",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 17,
"fields": {
"name": "Parkway Theater",
"website": "https://theparkwaytheater.com",
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 18,
"fields": {
"name": "Ordway Concert Hall",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "St. Paul",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 19,
"fields": {
"name": "Wooddale Church",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Eden Prairie",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": 0,
"longitude": 0,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 20,
"fields": {
"name": "Basilica of Saint Mary",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 21,
"fields": {
"name": "The Cedar Cultural Center",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 22,
"fields": {
"name": "The Depot Tavern",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Minneapolis",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": true,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 23,
"fields": {
"name": "DANCEFREE",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 24,
"fields": {
"name": "Blood Dance Company - Sede Laureles",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 25,
"fields": {
"name": "Dulce Posion",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 26,
"fields": {
"name": "Vintrash",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 27,
"fields": {
"name": "The Wandering Paisa",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 28,
"fields": {
"name": "El Poblado",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 29,
"fields": {
"name": "OLSA Certified Spanish School",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 30,
"fields": {
"name": "BaseLang Medellín Spanish School",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 31,
"fields": {
"name": "Terraza El Poblado",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": "Medellin",
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
},
{
"model": "events.organization",
"pk": 32,
"fields": {
"name": "None",
"website": null,
"membership": "0",
"org_type": "3",
"short_desc": null,
"long_desc": null,
"address_numbers": null,
"address_type": null,
"address_complete": null,
"barrio": null,
"city": null,
"state": null,
"zip_code": null,
"phone_number": null,
"business_email": null,
"is_listed": false,
"is_501c": false,
"is_venue": false,
"latitude": null,
"longitude": null,
"contact_name": null,
"contact_email": null,
"stripe_email": null,
"ein": null,
"tags": []
}
}
]

View File

@@ -1,452 +0,0 @@
[
{
"model": "events.promo",
"pk": 1,
"fields": {
"title": "DreamFreely",
"organization": 1,
"promo_type": "Jo",
"overlay_image": "promo/SOL_Sign.png",
"short_text": "And intro to the operation.",
"long_text": "<p>Alright, I guess this is it. This is the game, these are the plays.</p>\r\n\r\n<p>Lots of work, for sure; but it's a blessing to help people. Now to continue to expand the support and stability.</p>",
"target_link": "https://www.dreamfreely.org",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 2,
"fields": {
"title": "Comuna Andina",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/pa_cover.jpg",
"short_text": "Authentic products from the Andes Mountains and surrounding regions, mochilas, cafe y panella.",
"long_text": "<p>These are all products from my travels.</p>\r\n<p>From hand-woven mochilas, to organic mountain farmed coffee and panela and more.</p>\r\n<p>All of these products are direct from the producer, while nearly all proceeds are also returned to the producer.</p>",
"target_link": "https://www.comunandina.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 3,
"fields": {
"title": "idioke",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 4,
"fields": {
"title": "Manifesting Empathy",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/manifestingempathy.png",
"short_text": "Help humans find their roots.",
"long_text": "Help humans find their roots.",
"target_link": "https://www.manifestingempathy.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 5,
"fields": {
"title": "DigiSnaxx LIVE!",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/cover.png",
"short_text": "@ the Acadia. Every Monday. 4pm.",
"long_text": "This is a brave space to converse, relax, listen to music and begin to navigate a path forward.<br/><br/>This is going to be a process.",
"target_link": "https://canin.dreamfreely.org/digisnaxx/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 6,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 7,
"fields": {
"title": "idioke",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 8,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 9,
"fields": {
"title": "Comuna Andina",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/pa_cover.jpg",
"short_text": "Authentic products from the Andes Mountains and surrounding regions, mochilas, cafe y panella.",
"long_text": "<p>These are all products from my travels.</p>\r\n<p>From hand-woven mochilas, to organic mountain farmed coffee and panela and more.</p>\r\n<p>All of these products are direct from the producer, while nearly all proceeds are also returned to the producer.</p>",
"target_link": "https://www.comunandina.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 10,
"fields": {
"title": "DreamFreely",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/SOL_Sign.png",
"short_text": "And intro to the operation.",
"long_text": "<p>Alright, I guess this is it. This is the game, these are the plays.</p>\r\n\r\n<p>Lots of work, for sure; but it's a blessing to help people. Now to continue to expand the support and stability.</p>",
"target_link": "https://www.dreamfreely.org",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 11,
"fields": {
"title": "Manifesting Empathy",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/manifestingempathy.png",
"short_text": "Help humans find their roots.",
"long_text": "Help humans find their roots.",
"target_link": "https://www.manifestingempathy.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 12,
"fields": {
"title": "DigiSnaxx & the DBC",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/cover.png",
"short_text": "More info about the project DigiSnaxx.",
"long_text": "<p>After seeing the City Pages fall down the drain, followed by the dissolution of the MetroIBA.</p>\r\n<p>Anywho, it's time for something different, and that's what DigiSnaxx and DreamFreely is all about.</p>\r\n<p>DigiSnaxx is not trying to replace either of the aforementioned entities; we are rather looking to be an evolution, of sorts.</p>\r\n</p>We're not trying to be everything either ...</p>\r\n<p>We're trying to be an accessible, community-centered, directory.</p>",
"target_link": "https://canin.dreamfreely.org/digisnaxx/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 13,
"fields": {
"title": "Complimentary Street Harrassment",
"organization": 1,
"promo_type": "An",
"overlay_image": "",
"short_text": "It's cultural right?",
"long_text": "I learn about the creation of gender in public space through the lens of a PhD student studying pidopo's, in Colombia.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/4V3V9lAS4FRz7apdfj1qsV?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/Complimentary-Street-Harassment-et9h5d",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 14,
"fields": {
"title": "DigiSnaxx & the DBC",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/cover.png",
"short_text": "More info about the project DigiSnaxx.",
"long_text": "<p>After seeing the City Pages fall down the drain, followed by the dissolution of the MetroIBA.</p>\r\n<p>Anywho, it's time for something different, and that's what DigiSnaxx and DreamFreely is all about.</p>\r\n<p>DigiSnaxx is not trying to replace either of the aforementioned entities; we are rather looking to be an evolution, of sorts.</p>\r\n</p>We're not trying to be everything either ...</p>\r\n<p>We're trying to be an accessible, community-centered, directory.</p>",
"target_link": "https://canin.dreamfreely.org/digisnaxx/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 15,
"fields": {
"title": "DreamFreely Library",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "It's like having an open notebook ...",
"long_text": "It's a work in progress, but you get the idea; and there's still some useful information.",
"target_link": "https://library.dreamfreely.org",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 16,
"fields": {
"title": "Talkin' w/ DiViNCi",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/soltoken.png",
"short_text": "Canin converses with DiViNCi.",
"long_text": "We met a great many number of years ago; before the hills were hills and the trees mere saplings. Haha ... I dunno, but it was definitely a fun conversation.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/2gdzy6TjXd3QEj8WRSeZSD?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/DiViNCi-egm90v",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 17,
"fields": {
"title": "Mpls Stp Mag Calendar",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "",
"short_text": "They got a great list of events.",
"long_text": "They've got a great collection of events; we just don't have the time/resources to parse them all at present; and so pass the link directly on to you.",
"target_link": "https://calendar.mspmag.com/calendars/all-events",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 19,
"fields": {
"title": "Academia Nuts",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/SOL_Sign.png",
"short_text": "Abstacts coming soon; gotta catch 'em all.",
"long_text": "I've always wanted to make academia more accessible, so here's my go at that!\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shr3SATN1OTsY47it' frameborder='0' onmousewheel='' width='100%' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "https://www.academianuts.net",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 20,
"fields": {
"title": "Talkin' w/ DiViNCi",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/soltoken.png",
"short_text": "Canin converses with DiViNCi.",
"long_text": "We met a great many number of years ago; before the hills were hills and the trees mere saplings. Haha ... I dunno, but it was definitely a fun conversation.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/2gdzy6TjXd3QEj8WRSeZSD?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/DiViNCi-egm90v",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 21,
"fields": {
"title": "Rebel Coding",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Enough knowledge to be dangerous.",
"long_text": "<p>Just covering the basics, we'll be hosting webinars.</p>\r\n<p>HTML, CSS, JavaScript & Python.</p>",
"target_link": "https://www.rebelcoding.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 22,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 23,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 24,
"fields": {
"title": "Academia Nuts",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/SOL_Sign.png",
"short_text": "Abstacts coming soon; gotta catch 'em all.",
"long_text": "I've always wanted to make academia more accessible, so here's my go at that!\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shr3SATN1OTsY47it' frameborder='0' onmousewheel='' width='100%' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "https://www.academianuts.net",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 25,
"fields": {
"title": "Rebel Coding",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Enough knowledge to be dangerous.",
"long_text": "<p>Just covering the basics, we'll be hosting webinars.</p>\r\n<p>HTML, CSS, JavaScript & Python.</p>",
"target_link": "https://www.rebelcoding.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 26,
"fields": {
"title": "Comuna Andina",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/pa_cover.jpg",
"short_text": "Authentic products from the Andes Mountains and surrounding regions, mochilas, cafe y panella.",
"long_text": "<p>These are all products from my travels.</p>\r\n<p>From hand-woven mochilas, to organic mountain farmed coffee and panela and more.</p>\r\n<p>All of these products are direct from the producer, while nearly all proceeds are also returned to the producer.</p>",
"target_link": "https://www.comunandina.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 27,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 28,
"fields": {
"title": "Complimentary Street Harrassment",
"organization": 1,
"promo_type": "An",
"overlay_image": "",
"short_text": "It's cultural right?",
"long_text": "I learn about the creation of gender in public space through the lens of a PhD student studying pidopo's, in Colombia.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/4V3V9lAS4FRz7apdfj1qsV?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/Complimentary-Street-Harassment-et9h5d",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 29,
"fields": {
"title": "Saint Wich Burgers",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/soltoken.png",
"short_text": "Serving handcrafted gourmet burgers made with love.",
"long_text": "Welcome to Saint Wich Burgers, located on Selby Avenue in Saint Paul, Minnesota, where our love for food and dedication to quality come together in every burger we serve. We dont believe in shortcuts. Our burgers are made from scratch with premium ingredients, served fresh, and customized to suit your unique tastes.\r\n<br/><br/>\r\nFrom our hand-crafted patties to our delicious signature sauces, everything is designed to make each bite something special. Whether you like your burger simple or stacked with all the toppings, we offer a variety of options to satisfy every craving.\r\n<br/><br/>\r\nCome see what makes us different. At Saint Wich Burgers, it's all about great burgers, good times, and lasting memories.\r\n<br/><br/>\r\nWhether you're in the mood for a simple, classic burger or a sandwich with sides, weve got you covered. Enjoy the perfect meal in our inviting space, where you can savor your burger and enjoy time with family and friends.\r\n<br/><br/>\r\nOur atmosphere is laid-back, our service is friendly, and our burgers are unforgettable. Stop by today and taste what makes us different!",
"target_link": "https://www.stwichburgers.com/",
"notes": "",
"published": false
}
},
{
"model": "events.promo",
"pk": 30,
"fields": {
"title": "Arepas, Las de Queso",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/SOL_Sign.png",
"short_text": "If you're lookin' for the tastiest arepa in Medellin.",
"long_text": "For those who may travel, check out my friends :)",
"target_link": "https://www.dreamfreely.org",
"notes": "",
"published": false
}
},
{
"model": "events.promo",
"pk": 31,
"fields": {
"title": "Vigs Guitars",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/VigGuitarsLogo.sm.jpg",
"short_text": "A luthier-owned music shop.",
"long_text": "<b>“The Players Store”</b>\r\n<br/><br/>\r\nWe are an independent, full service, luthier-owned shop serving the working musicians in the Minneapolis/St. Paul metro area since September 2014. Ted Vigs expert repair is the cornerstone of our business. We specialize in repair and customization, and carry a variety of guitars, basses, mandolins, ukuleles, and accessories.\r\n<br/><br/>\r\nWith EXPERT repair, a large stock of parts and interesting, unique and fun instruments, both new and used, you wont be afraid to come in here, and its a big part of the reason that weve been coined as “The Players Store.”\r\n<br/><br/>\r\nTed Vig has been working full time and building his audience through music stores since 1988. He has a long list of devoted repair clients…this just doesnt happen overnight! His Custom Vig Handwound Pickups are flying out the door! *SATURDAYS ARE THE BEST DAYS TO COME IN AND TALK TO TED ABOUT THE PICKUPS*\r\n<br/><br/>\r\nThis store is Indigenous Female Owned and run by local musicians who SUPPORT local musicians! We have ample street parking in front of the shop and a big parking lot.\r\n<br/><br/>\r\nWinner of “Star Tribunes Readers Choice Best of”\r\nBest Music Instrument Shop\r\n<br/><br/>\r\n2021 SILVER! 2023 SILVER!\r\n<br/>\r\n2022 GOLD 2024 GOLD!!!!",
"target_link": "https://vigguitarshop.com/",
"notes": "",
"published": false
}
}
]

View File

@@ -3,50 +3,43 @@
"model": "events.promo", "model": "events.promo",
"pk": 1, "pk": 1,
"fields": { "fields": {
"title": "DreamFreely", "title": "Santa Elena",
"organization": 1, "organization": 1,
"promo_type": "Jo", "promo_type": "Ev",
"overlay_image": "promo/SOL_Sign.png", "overlay_image": "promo/pa_cover.jpg",
"short_text": "And intro to the operation.", "short_text": "The perfect weekend getaway.",
"long_text": "<p>Alright, I guess this is it. This is the game, these are the plays.</p>\r\n\r\n<p>Lots of work, for sure; but it's a blessing to help people. Now to continue to expand the support and stability.</p>", "long_text": "<p>Welcome to Santa Elena.</p>",
"target_link": "https://www.dreamfreely.org", "target_link": "https://www.dreamfreely.org",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
2
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 2, "pk": 2,
"fields": { "fields": {
"title": "Comuna Andina", "title": "Medellin Run Club",
"organization": 1, "organization": 1,
"promo_type": "Fo", "promo_type": "Fo",
"overlay_image": "promo/pa_cover.jpg", "overlay_image": "promo/pa_cover.jpg",
"short_text": "Authentic products from the Andes Mountains and surrounding regions, mochilas, cafe y panella.", "short_text": "Every Sunday: 8am",
"long_text": "<p>These are all products from my travels.</p>\r\n<p>From hand-woven mochilas, to organic mountain farmed coffee and panela and more.</p>\r\n<p>All of these products are direct from the producer, while nearly all proceeds are also returned to the producer.</p>", "long_text": "<p>Get your exercise on!</p>",
"target_link": "https://www.comunandina.com", "target_link": "https://www.instagram.com",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
2
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 3, "pk": 3,
"fields": {
"title": "idioke",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 4,
"fields": { "fields": {
"title": "Manifesting Empathy", "title": "Manifesting Empathy",
"organization": 1, "organization": 1,
@@ -56,87 +49,18 @@
"long_text": "Help humans find their roots.", "long_text": "Help humans find their roots.",
"target_link": "https://www.manifestingempathy.com", "target_link": "https://www.manifestingempathy.com",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1,
2,
3
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 5, "pk": 4,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 6,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 7,
"fields": {
"title": "idioke",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 8,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 9,
"fields": {
"title": "Comuna Andina",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/pa_cover.jpg",
"short_text": "Authentic products from the Andes Mountains and surrounding regions, mochilas, cafe y panella.",
"long_text": "<p>These are all products from my travels.</p>\r\n<p>From hand-woven mochilas, to organic mountain farmed coffee and panela and more.</p>\r\n<p>All of these products are direct from the producer, while nearly all proceeds are also returned to the producer.</p>",
"target_link": "https://www.comunandina.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 10,
"fields": { "fields": {
"title": "DreamFreely", "title": "DreamFreely",
"organization": 1, "organization": 1,
@@ -146,12 +70,18 @@
"long_text": "<p>Alright, I guess this is it. This is the game, these are the plays.</p>\r\n\r\n<p>Lots of work, for sure; but it's a blessing to help people. Now to continue to expand the support and stability.</p>", "long_text": "<p>Alright, I guess this is it. This is the game, these are the plays.</p>\r\n\r\n<p>Lots of work, for sure; but it's a blessing to help people. Now to continue to expand the support and stability.</p>",
"target_link": "https://www.dreamfreely.org", "target_link": "https://www.dreamfreely.org",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1,
2,
3
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 11, "pk": 5,
"fields": { "fields": {
"title": "Manifesting Empathy", "title": "Manifesting Empathy",
"organization": 1, "organization": 1,
@@ -161,12 +91,18 @@
"long_text": "Help humans find their roots.", "long_text": "Help humans find their roots.",
"target_link": "https://www.manifestingempathy.com", "target_link": "https://www.manifestingempathy.com",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1,
2,
3
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 12, "pk": 6,
"fields": { "fields": {
"title": "DigiSnaxx & the DBC", "title": "DigiSnaxx & the DBC",
"organization": 1, "organization": 1,
@@ -176,27 +112,17 @@
"long_text": "<p>After seeing the City Pages fall down the drain, followed by the dissolution of the MetroIBA.</p>\r\n<p>Anywho, it's time for something different, and that's what DigiSnaxx and DreamFreely is all about.</p>\r\n<p>DigiSnaxx is not trying to replace either of the aforementioned entities; we are rather looking to be an evolution, of sorts.</p>\r\n</p>We're not trying to be everything either ...</p>\r\n<p>We're trying to be an accessible, community-centered, directory.</p>", "long_text": "<p>After seeing the City Pages fall down the drain, followed by the dissolution of the MetroIBA.</p>\r\n<p>Anywho, it's time for something different, and that's what DigiSnaxx and DreamFreely is all about.</p>\r\n<p>DigiSnaxx is not trying to replace either of the aforementioned entities; we are rather looking to be an evolution, of sorts.</p>\r\n</p>We're not trying to be everything either ...</p>\r\n<p>We're trying to be an accessible, community-centered, directory.</p>",
"target_link": "https://canin.dreamfreely.org/digisnaxx/", "target_link": "https://canin.dreamfreely.org/digisnaxx/",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1,
3
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 13, "pk": 7,
"fields": {
"title": "Complimentary Street Harrassment",
"organization": 1,
"promo_type": "An",
"overlay_image": "",
"short_text": "It's cultural right?",
"long_text": "I learn about the creation of gender in public space through the lens of a PhD student studying pidopo's, in Colombia.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/4V3V9lAS4FRz7apdfj1qsV?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/Complimentary-Street-Harassment-et9h5d",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 14,
"fields": { "fields": {
"title": "DigiSnaxx & the DBC", "title": "DigiSnaxx & the DBC",
"organization": 1, "organization": 1,
@@ -206,42 +132,17 @@
"long_text": "<p>After seeing the City Pages fall down the drain, followed by the dissolution of the MetroIBA.</p>\r\n<p>Anywho, it's time for something different, and that's what DigiSnaxx and DreamFreely is all about.</p>\r\n<p>DigiSnaxx is not trying to replace either of the aforementioned entities; we are rather looking to be an evolution, of sorts.</p>\r\n</p>We're not trying to be everything either ...</p>\r\n<p>We're trying to be an accessible, community-centered, directory.</p>", "long_text": "<p>After seeing the City Pages fall down the drain, followed by the dissolution of the MetroIBA.</p>\r\n<p>Anywho, it's time for something different, and that's what DigiSnaxx and DreamFreely is all about.</p>\r\n<p>DigiSnaxx is not trying to replace either of the aforementioned entities; we are rather looking to be an evolution, of sorts.</p>\r\n</p>We're not trying to be everything either ...</p>\r\n<p>We're trying to be an accessible, community-centered, directory.</p>",
"target_link": "https://canin.dreamfreely.org/digisnaxx/", "target_link": "https://canin.dreamfreely.org/digisnaxx/",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1,
3
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 15, "pk": 8,
"fields": {
"title": "DreamFreely Library",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "It's like having an open notebook ...",
"long_text": "It's a work in progress, but you get the idea; and there's still some useful information.",
"target_link": "https://library.dreamfreely.org",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 16,
"fields": {
"title": "Talkin' w/ DiViNCi",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/soltoken.png",
"short_text": "Canin converses with DiViNCi.",
"long_text": "We met a great many number of years ago; before the hills were hills and the trees mere saplings. Haha ... I dunno, but it was definitely a fun conversation.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/2gdzy6TjXd3QEj8WRSeZSD?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/DiViNCi-egm90v",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 17,
"fields": { "fields": {
"title": "Mpls Stp Mag Calendar", "title": "Mpls Stp Mag Calendar",
"organization": 1, "organization": 1,
@@ -251,27 +152,56 @@
"long_text": "They've got a great collection of events; we just don't have the time/resources to parse them all at present; and so pass the link directly on to you.", "long_text": "They've got a great collection of events; we just don't have the time/resources to parse them all at present; and so pass the link directly on to you.",
"target_link": "https://calendar.mspmag.com/calendars/all-events", "target_link": "https://calendar.mspmag.com/calendars/all-events",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 19, "pk": 9,
"fields": { "fields": {
"title": "Academia Nuts", "title": "DreamFreely",
"organization": 1, "organization": 1,
"promo_type": "Re", "promo_type": "Jo",
"overlay_image": "promo/SOL_Sign.png", "overlay_image": "promo/SOL_Sign.png",
"short_text": "Abstacts coming soon; gotta catch 'em all.", "short_text": "And intro to the operation.",
"long_text": "I've always wanted to make academia more accessible, so here's my go at that!\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shr3SATN1OTsY47it' frameborder='0' onmousewheel='' width='100%' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>", "long_text": "<p>Alright, I guess this is it. This is the game, these are the plays.</p>\r\n\r\n<p>Lots of work, for sure; but it's a blessing to help people. Now to continue to expand the support and stability.</p>",
"target_link": "https://www.academianuts.net", "target_link": "https://www.dreamfreely.org",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1,
2,
3
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 20, "pk": 10,
"fields": {
"title": "idioki",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true,
"calendar": [
2
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 11,
"fields": { "fields": {
"title": "Talkin' w/ DiViNCi", "title": "Talkin' w/ DiViNCi",
"organization": 1, "organization": 1,
@@ -281,162 +211,18 @@
"long_text": "We met a great many number of years ago; before the hills were hills and the trees mere saplings. Haha ... I dunno, but it was definitely a fun conversation.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/2gdzy6TjXd3QEj8WRSeZSD?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>", "long_text": "We met a great many number of years ago; before the hills were hills and the trees mere saplings. Haha ... I dunno, but it was definitely a fun conversation.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/2gdzy6TjXd3QEj8WRSeZSD?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/DiViNCi-egm90v", "target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/DiViNCi-egm90v",
"notes": "", "notes": "",
"published": true "published": true,
"calendar": [
1,
2,
3
],
"tags": []
} }
}, },
{ {
"model": "events.promo", "model": "events.promo",
"pk": 21, "pk": 12,
"fields": {
"title": "Rebel Coding",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Enough knowledge to be dangerous.",
"long_text": "<p>Just covering the basics, we'll be hosting webinars.</p>\r\n<p>HTML, CSS, JavaScript & Python.</p>",
"target_link": "https://www.rebelcoding.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 22,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 23,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 24,
"fields": {
"title": "Academia Nuts",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/SOL_Sign.png",
"short_text": "Abstacts coming soon; gotta catch 'em all.",
"long_text": "I've always wanted to make academia more accessible, so here's my go at that!\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shr3SATN1OTsY47it' frameborder='0' onmousewheel='' width='100%' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "https://www.academianuts.net",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 25,
"fields": {
"title": "Rebel Coding",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Enough knowledge to be dangerous.",
"long_text": "<p>Just covering the basics, we'll be hosting webinars.</p>\r\n<p>HTML, CSS, JavaScript & Python.</p>",
"target_link": "https://www.rebelcoding.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 26,
"fields": {
"title": "Comuna Andina",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/pa_cover.jpg",
"short_text": "Authentic products from the Andes Mountains and surrounding regions, mochilas, cafe y panella.",
"long_text": "<p>These are all products from my travels.</p>\r\n<p>From hand-woven mochilas, to organic mountain farmed coffee and panela and more.</p>\r\n<p>All of these products are direct from the producer, while nearly all proceeds are also returned to the producer.</p>",
"target_link": "https://www.comunandina.com",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 27,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": "",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 28,
"fields": {
"title": "Complimentary Street Harrassment",
"organization": 1,
"promo_type": "An",
"overlay_image": "",
"short_text": "It's cultural right?",
"long_text": "I learn about the creation of gender in public space through the lens of a PhD student studying pidopo's, in Colombia.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/4V3V9lAS4FRz7apdfj1qsV?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/Complimentary-Street-Harassment-et9h5d",
"notes": "",
"published": true
}
},
{
"model": "events.promo",
"pk": 29,
"fields": {
"title": "Saint Wich Burgers",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/soltoken.png",
"short_text": "Serving handcrafted gourmet burgers made with love.",
"long_text": "Welcome to Saint Wich Burgers, located on Selby Avenue in Saint Paul, Minnesota, where our love for food and dedication to quality come together in every burger we serve. We dont believe in shortcuts. Our burgers are made from scratch with premium ingredients, served fresh, and customized to suit your unique tastes.\r\n<br/><br/>\r\nFrom our hand-crafted patties to our delicious signature sauces, everything is designed to make each bite something special. Whether you like your burger simple or stacked with all the toppings, we offer a variety of options to satisfy every craving.\r\n<br/><br/>\r\nCome see what makes us different. At Saint Wich Burgers, it's all about great burgers, good times, and lasting memories.\r\n<br/><br/>\r\nWhether you're in the mood for a simple, classic burger or a sandwich with sides, weve got you covered. Enjoy the perfect meal in our inviting space, where you can savor your burger and enjoy time with family and friends.\r\n<br/><br/>\r\nOur atmosphere is laid-back, our service is friendly, and our burgers are unforgettable. Stop by today and taste what makes us different!",
"target_link": "https://www.stwichburgers.com/",
"notes": "",
"published": false
}
},
{
"model": "events.promo",
"pk": 30,
"fields": {
"title": "Arepas, Las de Queso",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/SOL_Sign.png",
"short_text": "If you're lookin' for the tastiest arepa in Medellin.",
"long_text": "For those who may travel, check out my friends :)",
"target_link": "https://www.dreamfreely.org",
"notes": "",
"published": false
}
},
{
"model": "events.promo",
"pk": 31,
"fields": { "fields": {
"title": "Vigs Guitars", "title": "Vigs Guitars",
"organization": 1, "organization": 1,
@@ -446,7 +232,380 @@
"long_text": "<b>“The Players Store”</b>\r\n<br/><br/>\r\nWe are an independent, full service, luthier-owned shop serving the working musicians in the Minneapolis/St. Paul metro area since September 2014. Ted Vigs expert repair is the cornerstone of our business. We specialize in repair and customization, and carry a variety of guitars, basses, mandolins, ukuleles, and accessories.\r\n<br/><br/>\r\nWith EXPERT repair, a large stock of parts and interesting, unique and fun instruments, both new and used, you wont be afraid to come in here, and its a big part of the reason that weve been coined as “The Players Store.”\r\n<br/><br/>\r\nTed Vig has been working full time and building his audience through music stores since 1988. He has a long list of devoted repair clients…this just doesnt happen overnight! His Custom Vig Handwound Pickups are flying out the door! *SATURDAYS ARE THE BEST DAYS TO COME IN AND TALK TO TED ABOUT THE PICKUPS*\r\n<br/><br/>\r\nThis store is Indigenous Female Owned and run by local musicians who SUPPORT local musicians! We have ample street parking in front of the shop and a big parking lot.\r\n<br/><br/>\r\nWinner of “Star Tribunes Readers Choice Best of”\r\nBest Music Instrument Shop\r\n<br/><br/>\r\n2021 SILVER! 2023 SILVER!\r\n<br/>\r\n2022 GOLD 2024 GOLD!!!!", "long_text": "<b>“The Players Store”</b>\r\n<br/><br/>\r\nWe are an independent, full service, luthier-owned shop serving the working musicians in the Minneapolis/St. Paul metro area since September 2014. Ted Vigs expert repair is the cornerstone of our business. We specialize in repair and customization, and carry a variety of guitars, basses, mandolins, ukuleles, and accessories.\r\n<br/><br/>\r\nWith EXPERT repair, a large stock of parts and interesting, unique and fun instruments, both new and used, you wont be afraid to come in here, and its a big part of the reason that weve been coined as “The Players Store.”\r\n<br/><br/>\r\nTed Vig has been working full time and building his audience through music stores since 1988. He has a long list of devoted repair clients…this just doesnt happen overnight! His Custom Vig Handwound Pickups are flying out the door! *SATURDAYS ARE THE BEST DAYS TO COME IN AND TALK TO TED ABOUT THE PICKUPS*\r\n<br/><br/>\r\nThis store is Indigenous Female Owned and run by local musicians who SUPPORT local musicians! We have ample street parking in front of the shop and a big parking lot.\r\n<br/><br/>\r\nWinner of “Star Tribunes Readers Choice Best of”\r\nBest Music Instrument Shop\r\n<br/><br/>\r\n2021 SILVER! 2023 SILVER!\r\n<br/>\r\n2022 GOLD 2024 GOLD!!!!",
"target_link": "https://vigguitarshop.com/", "target_link": "https://vigguitarshop.com/",
"notes": "", "notes": "",
"published": false "published": false,
"calendar": [
1
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 13,
"fields": {
"title": "Add an Event",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got an event for us?",
"long_text": "Let's take a look.\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": null,
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 14,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "Let's take a look.\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": null,
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 15,
"fields": {
"title": "idioki",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true,
"calendar": [
2
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 16,
"fields": {
"title": "Rebel Coding",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Enough knowledge to be dangerous.",
"long_text": "<p>Just covering the basics, we'll be hosting webinars.</p>\r\n<p>HTML, CSS, JavaScript & Python.</p>",
"target_link": "https://www.rebelcoding.com",
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 17,
"fields": {
"title": "idioki",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true,
"calendar": [
2
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 18,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "Let's take a look.\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": null,
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 19,
"fields": {
"title": "Complimentary Street Harrassment",
"organization": 1,
"promo_type": "An",
"overlay_image": "",
"short_text": "It's cultural right?",
"long_text": "I learn about the creation of gender in public space through the lens of a PhD student studying pidopo's, in Colombia.\r\n\r\n<iframe style='border-radius:12px' src='https://open.spotify.com/embed/episode/4V3V9lAS4FRz7apdfj1qsV?utm_source=generator' width='100%' height='352' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>",
"target_link": "https://creators.spotify.com/pod/show/digisnaxx/episodes/Complimentary-Street-Harassment-et9h5d",
"notes": "",
"published": true,
"calendar": [
1,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 20,
"fields": {
"title": "Saint Wich Burgers",
"organization": 1,
"promo_type": "Fo",
"overlay_image": "promo/soltoken.png",
"short_text": "Serving handcrafted gourmet burgers made with love.",
"long_text": "Welcome to Saint Wich Burgers, located on Selby Avenue in Saint Paul, Minnesota, where our love for food and dedication to quality come together in every burger we serve. We dont believe in shortcuts. Our burgers are made from scratch with premium ingredients, served fresh, and customized to suit your unique tastes.\r\n<br/><br/>\r\nFrom our hand-crafted patties to our delicious signature sauces, everything is designed to make each bite something special. Whether you like your burger simple or stacked with all the toppings, we offer a variety of options to satisfy every craving.\r\n<br/><br/>\r\nCome see what makes us different. At Saint Wich Burgers, it's all about great burgers, good times, and lasting memories.\r\n<br/><br/>\r\nWhether you're in the mood for a simple, classic burger or a sandwich with sides, weve got you covered. Enjoy the perfect meal in our inviting space, where you can savor your burger and enjoy time with family and friends.\r\n<br/><br/>\r\nOur atmosphere is laid-back, our service is friendly, and our burgers are unforgettable. Stop by today and taste what makes us different!",
"target_link": "https://www.stwichburgers.com/",
"notes": "",
"published": false,
"calendar": [
1
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 21,
"fields": {
"title": "idioki",
"organization": 1,
"promo_type": "Ev",
"overlay_image": "promo/soltoken.png",
"short_text": "We're starting with English, but soon you will be able to practice Spanish as well.",
"long_text": "We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.We're starting with English, but soon you will be able to practice Spanish as well.",
"target_link": "https://www.idioke.com",
"notes": "",
"published": true,
"calendar": [
2
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 22,
"fields": {
"title": "Rebel Coding",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Enough knowledge to be dangerous.",
"long_text": "<p>Just covering the basics, we'll be hosting webinars.</p>\r\n<p>HTML, CSS, JavaScript & Python.</p>",
"target_link": "https://www.rebelcoding.com",
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 23,
"fields": {
"title": "Add an Event",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got an event for us?",
"long_text": "Let's take a look.\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": null,
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 24,
"fields": {
"title": "Add a Calendar",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got a calendar for us?",
"long_text": "Let's take a look.\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": null,
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 25,
"fields": {
"title": "Add an Event",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "Got an event for us?",
"long_text": "Let's take a look.\r\n\r\n<iframe class='airtable-embed' src='https://airtable.com/embed/appzQxsifc8AnD1zA/shrfUvOiFdaHI8xoz' frameborder='0' onmousewheel='' width='100%'' height='533' style='background: transparent; border: 1px solid #ccc;'></iframe>",
"target_link": null,
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 26,
"fields": {
"title": "DreamFreely Library",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "It's like having an open notebook ...",
"long_text": "It's a work in progress, but you get the idea; and there's still some useful information.",
"target_link": "https://library.dreamfreely.org",
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 27,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 28,
"fields": {
"title": "DreamFreely Library",
"organization": 1,
"promo_type": "Re",
"overlay_image": "",
"short_text": "It's like having an open notebook ...",
"long_text": "It's a work in progress, but you get the idea; and there's still some useful information.",
"target_link": "https://library.dreamfreely.org",
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 29,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
}
},
{
"model": "events.promo",
"pk": 30,
"fields": {
"title": "AI & the Last Question",
"organization": 1,
"promo_type": "Re",
"overlay_image": "promo/cover.png",
"short_text": "A short story by Isaac Asimov",
"long_text": "A short story by Isaac AsimovA short story by Isaac AsimovA short story by Isaac Asimov",
"target_link": "https://canin.dreamfreely.org/the-last-question/",
"notes": "",
"published": true,
"calendar": [
1,
2,
3
],
"tags": []
} }
} }
] ]

View File

@@ -1 +0,0 @@
[{"model": "events.venue", "pk": 1, "fields": {"name": "Acme Comedy Club", "website": "https://acmecomedycompany.com/the-club/calendar/", "phone_number": null, "address": null, "city": "Minneapolis", "state": "Minnesota", "zip_code": null}}, {"model": "events.venue", "pk": 2, "fields": {"name": "Amsterdam Bar & Hall", "website": "https://www.amsterdambarandhall.com/events-new/", "phone_number": null, "address": null, "city": "St. Paul", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 3, "fields": {"name": "Birchbark Books", "website": "https://birchbarkbooks.com/pages/events", "phone_number": null, "address": null, "city": "Minneapolis", "state": "Minnesota", "zip_code": null}}, {"model": "events.venue", "pk": 4, "fields": {"name": "Cedar Cultural Center", "website": "https://www.thecedar.org/listing", "phone_number": null, "address": null, "city": "Minneapolis", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 5, "fields": {"name": "331 Club", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 6, "fields": {"name": "Comedy Corner", "website": "https://comedycornerunderground.com/calendar", "phone_number": null, "address": null, "city": "Minneapolis", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 7, "fields": {"name": "Eastside Freedom Library", "website": "https://eastsidefreedomlibrary.org/events/", "phone_number": null, "address": null, "city": "Minneapolis", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 30, "fields": {"name": "7th St Entry", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 34, "fields": {"name": "Fine Line", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 35, "fields": {"name": "The Fitzgerald Theater", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 36, "fields": {"name": "Turf Club", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 37, "fields": {"name": "Palace Theatre", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 38, "fields": {"name": "First Avenue", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 39, "fields": {"name": "The Cedar Cultural Center", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 40, "fields": {"name": "Pantages Theatre", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 41, "fields": {"name": "Xcel Energy Center", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 42, "fields": {"name": "State Theatre", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 43, "fields": {"name": "Hook & Ladder", "website": null, "phone_number": null, "address": null, "city": null, "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 44, "fields": {"name": "Magers & Quinn", "website": "https://www.magersandquinn.com/events", "phone_number": null, "address": null, "city": "Minneapolis", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 45, "fields": {"name": "Uptown VFW", "website": null, "phone_number": null, "address": null, "city": "Minneapolis", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 46, "fields": {"name": "Palmer's Bar", "website": "https://palmers-bar.com", "phone_number": null, "address": null, "city": "Minneapolis", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 47, "fields": {"name": "Parkway Theater", "website": "https://theparkwaytheater.com", "phone_number": null, "address": null, "city": "Minneapolis", "state": null, "zip_code": null}}, {"model": "events.venue", "pk": 48, "fields": {"name": "White Squirrel", "website": "https://whitesquirrelbar.com", "phone_number": null, "address": null, "city": "St. Paul", "state": null, "zip_code": null}}]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.1.1 on 2025-10-11 16:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0027_scraper_new_items'),
]
operations = [
migrations.AddField(
model_name='event',
name='live',
field=models.CharField(choices=[('live', 'Live & Direct'), ('virt', 'Virtually Served'), ('both', 'How you prefer.')], default='live', max_length=4),
),
migrations.AlterField(
model_name='event',
name='event_type',
field=models.CharField(choices=[('Ot', 'Other'), ('Mu', 'Music'), ('Va', 'Visual Art'), ('Gv', 'Government'), ('Ce', 'Civic Engagement'), ('Ed', 'Educational'), ('Ma', 'Mutual Aid'), ('Th', 'Theater'), ('Co', 'Comedy')], default='Mu', max_length=15),
),
]

View File

@@ -0,0 +1,54 @@
# Generated by Django 5.1.1 on 2025-10-12 17:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0028_event_live_alter_event_event_type'),
]
operations = [
migrations.RemoveField(
model_name='event',
name='show_day',
),
migrations.AddField(
model_name='organization',
name='business_email',
field=models.CharField(blank=True, max_length=63, null=True),
),
migrations.AddField(
model_name='organization',
name='latitude',
field=models.FloatField(default=0),
preserve_default=False,
),
migrations.AddField(
model_name='organization',
name='longitude',
field=models.FloatField(default=0),
preserve_default=False,
),
migrations.AlterField(
model_name='event',
name='img_link',
field=models.URLField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='event',
name='tags',
field=models.ManyToManyField(blank=True, to='events.tags'),
),
migrations.AlterField(
model_name='organization',
name='tags',
field=models.ManyToManyField(blank=True, to='events.tags'),
),
migrations.AlterField(
model_name='promo',
name='tags',
field=models.ManyToManyField(blank=True, to='events.tags'),
),
]

View File

@@ -0,0 +1,33 @@
# Generated by Django 5.1.1 on 2025-10-17 21:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0029_remove_event_show_day_organization_business_email_and_more'),
]
operations = [
migrations.RenameField(
model_name='organization',
old_name='address',
new_name='address_complete',
),
migrations.AddField(
model_name='organization',
name='address_numbers',
field=models.CharField(blank=True, max_length=63, null=True),
),
migrations.AddField(
model_name='organization',
name='address_type',
field=models.CharField(blank=True, max_length=31, null=True),
),
migrations.AddField(
model_name='organization',
name='barrio',
field=models.CharField(blank=True, max_length=127, null=True),
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.1.1 on 2025-10-17 23:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0030_rename_address_organization_address_complete_and_more'),
]
operations = [
migrations.AlterField(
model_name='organization',
name='latitude',
field=models.FloatField(blank=True, null=True),
),
migrations.AlterField(
model_name='organization',
name='longitude',
field=models.FloatField(blank=True, null=True),
),
]

View File

@@ -0,0 +1,31 @@
# Generated by Django 5.1.1 on 2025-11-11 03:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0031_alter_organization_latitude_and_more'),
]
operations = [
migrations.RemoveField(
model_name='promo',
name='classified_image',
),
migrations.RemoveField(
model_name='promo',
name='embed_link',
),
migrations.AlterField(
model_name='promo',
name='promo_type',
field=models.CharField(choices=[('Ar', 'Art'), ('Fo', 'Food'), ('Ev', 'Event'), ('Re', 'Retail'), ('Ma', 'Mutual Aid'), ('Ca', 'Classifieds'), ('Jo', 'Job Opening'), ('Sp', 'Startup Pitch'), ('An', 'Academia Nuts'), ('Su', 'Survey Questions')], default='0', max_length=15),
),
migrations.AlterField(
model_name='promo',
name='short_text',
field=models.CharField(blank=True, max_length=255, null=True),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2025-11-12 12:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0032_remove_promo_classified_image_and_more'),
]
operations = [
migrations.AlterField(
model_name='event',
name='show_date',
field=models.DateField(),
),
]

View File

@@ -0,0 +1,25 @@
# Generated by Django 5.1.1 on 2025-11-12 12:56
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0033_alter_event_show_date'),
]
operations = [
migrations.AddField(
model_name='event',
name='show_day',
field=models.DateField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AlterField(
model_name='event',
name='show_date',
field=models.DateTimeField(),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2025-11-12 14:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0034_event_show_day_alter_event_show_date'),
]
operations = [
migrations.AddField(
model_name='organization',
name='is_listed',
field=models.BooleanField(default=False),
),
]

View File

@@ -0,0 +1,24 @@
# Generated by Django 5.1.1 on 2025-11-15 02:51
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0035_organization_is_listed'),
]
operations = [
migrations.AddField(
model_name='promo',
name='calendar',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.calendar'),
),
migrations.AlterField(
model_name='promo',
name='promo_type',
field=models.CharField(choices=[('Ar', 'Art'), ('Fo', 'Food'), ('Ev', 'Event'), ('Re', 'Retail'), ('Ma', 'Mutual Aid'), ('Ca', 'Classifieds'), ('Jo', 'Job Opening'), ('Ja', 'Journal Article'), ('Sp', 'Startup Pitch'), ('An', 'Academia Nuts'), ('Su', 'Survey Questions')], default='0', max_length=15),
),
]

View File

@@ -0,0 +1,22 @@
# Generated by Django 5.1.1 on 2025-11-15 02:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0036_promo_calendar_alter_promo_promo_type'),
]
operations = [
migrations.RemoveField(
model_name='promo',
name='calendar',
),
migrations.AddField(
model_name='promo',
name='calendar',
field=models.ManyToManyField(blank=True, null=True, to='events.calendar'),
),
]

View File

@@ -0,0 +1,22 @@
# Generated by Django 5.1.1 on 2025-11-15 07:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0037_remove_promo_calendar_promo_calendar'),
]
operations = [
migrations.RemoveField(
model_name='event',
name='calendar',
),
migrations.AddField(
model_name='event',
name='calendar',
field=models.ManyToManyField(blank=True, null=True, to='events.calendar'),
),
]

View File

@@ -0,0 +1,44 @@
# Generated by Django 5.1.1 on 2026-01-12 23:30
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0038_remove_event_calendar_event_calendar'),
]
operations = [
migrations.AlterModelOptions(
name='calendar',
options={'ordering': ['name'], 'verbose_name_plural': 'Calendars'},
),
migrations.AddField(
model_name='calendar',
name='published',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='organization',
name='cal',
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='events.calendar'),
preserve_default=False,
),
migrations.AlterField(
model_name='organization',
name='membership',
field=models.CharField(choices=[('Nm', 'Non-Member'), ('Ds', 'DigiSnaxx'), ('Dsp', 'DigiSnaxx +')], default='0', max_length=31),
),
migrations.AlterField(
model_name='organization',
name='org_type',
field=models.CharField(choices=[('Fb', 'Food & Beverage'), ('Re', 'Retail'), ('Se', 'Service'), ('Vn', 'Venue'), ('Ud', 'Undefined')], default='3', max_length=31),
),
migrations.AlterField(
model_name='promo',
name='promo_type',
field=models.CharField(choices=[('Ar', 'Art'), ('Fo', 'Food'), ('Ev', 'Event'), ('Re', 'Retail'), ('Sv', 'Service'), ('Ma', 'Mutual Aid'), ('Ca', 'Classified'), ('Jo', 'Job Opening'), ('Ja', 'Journal Article'), ('Sp', 'Startup Pitch'), ('An', 'Academia Nut'), ('Su', 'Survey Question')], default='0', max_length=15),
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.1.1 on 2026-01-12 23:49
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0039_alter_calendar_options_calendar_published_and_more'),
]
operations = [
migrations.AlterModelOptions(
name='calendar',
options={'ordering': ['-published', 'id'], 'verbose_name_plural': 'Calendars'},
),
migrations.AlterField(
model_name='organization',
name='cal',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cal_events', to='events.calendar'),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2026-01-13 00:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0040_alter_calendar_options_alter_organization_cal'),
]
operations = [
migrations.AlterField(
model_name='event',
name='calendar',
field=models.ManyToManyField(blank=True, null=True, related_name='events', to='events.calendar'),
),
]

View File

@@ -9,6 +9,12 @@ class Calendar(models.Model):
name = models.CharField(max_length=31, unique=True) name = models.CharField(max_length=31, unique=True)
shortcode = models.CharField(max_length=3, unique=True) shortcode = models.CharField(max_length=3, unique=True)
desc = models.TextField(blank=True, null=True) desc = models.TextField(blank=True, null=True)
published = models.BooleanField(default=False)
class Meta:
verbose_name_plural = "Calendars"
ordering = ['-published', 'id',]
def __unicode__(self): def __unicode__(self):
return "%s" % self.shortcode return "%s" % self.shortcode
@@ -25,6 +31,7 @@ class Scraper(models.Model):
new_items = models.IntegerField(blank=True, null=True) new_items = models.IntegerField(blank=True, null=True)
last_ran = models.DateTimeField(blank=True, null=True) last_ran = models.DateTimeField(blank=True, null=True)
class Meta: class Meta:
verbose_name_plural = "Scrapers" verbose_name_plural = "Scrapers"
ordering = ['name',] ordering = ['name',]
@@ -50,41 +57,50 @@ class Tags(models.Model):
class Organization(models.Model): class Organization(models.Model):
MEMBER_TYPE = ( MEMBER_TYPE = (
('Nm', 'Non-Member'), ('Nm', 'Non-Member'),
('Na', 'Nano Member'), ('Ds', 'DigiSnaxx'),
('Mm', 'Micro Member'), ('Dsp', 'DigiSnaxx +')
('Sm', 'Small Business Member'),
('Lb', 'Local Business Member'),
('Rb', 'Regional Business Member'),
) )
ORG_TYPE = ( ORG_TYPE = (
('Fo', 'Food'), ('Fb', 'Food & Beverage'),
('Re', 'Retail'), ('Re', 'Retail'),
('Se', 'Service'), ('Se', 'Service'),
('Vn', 'Venue'),
('Ud', 'Undefined'), ('Ud', 'Undefined'),
) )
name = models.CharField(max_length=63) name = models.CharField(max_length=63)
website = models.CharField(max_length=126, blank=True, null=True) website = models.CharField(max_length=126, blank=True, null=True)
membership = models.CharField(max_length=31, choices=MEMBER_TYPE, default='0') membership = models.CharField(max_length=31, choices=MEMBER_TYPE, default='0')
org_type = models.CharField(max_length=31, choices=ORG_TYPE, default='3') org_type = models.CharField(max_length=31, choices=ORG_TYPE, default='3')
stripe_email = models.CharField(max_length=63, blank=True, null=True)
ein = models.CharField(max_length=15, blank=True, null=True)
is_venue= models.BooleanField(default=False)
is_501c = models.BooleanField(default=False)
short_desc = models.CharField(max_length=63, blank=True, null=True) short_desc = models.CharField(max_length=63, blank=True, null=True)
long_desc = models.TextField(blank=True, null=True) long_desc = models.TextField(blank=True, null=True)
tags = models.ManyToManyField(Tags, blank=True)
contact_name = models.CharField(max_length=63, blank=True, null=True) address_numbers = models.CharField(max_length=63, blank=True, null=True)
contact_email = models.CharField(max_length=63, blank=True, null=True) address_type = models.CharField(max_length=31, blank=True, null=True)
address_complete = models.CharField(max_length=63, blank=True, null=True)
phone_number = models.CharField(max_length=255, blank=True, null=True) cal = models.ForeignKey(Calendar, on_delete=models.CASCADE, related_name="cal_events")
address = models.CharField(max_length=63, blank=True, null=True) barrio = models.CharField(max_length=127, blank=True, null=True)
city = models.CharField(max_length=31, blank=True, null=True) city = models.CharField(max_length=31, blank=True, null=True)
state = models.CharField(max_length=15, blank=True, null=True) state = models.CharField(max_length=15, blank=True, null=True)
zip_code = models.CharField(max_length=15, blank=True, null=True) zip_code = models.CharField(max_length=15, blank=True, null=True)
tags = models.ManyToManyField(Tags, blank=True, null=True) phone_number = models.CharField(max_length=255, blank=True, null=True)
business_email = models.CharField(max_length=63, blank=True, null=True)
is_listed= models.BooleanField(default=False)
is_501c = models.BooleanField(default=False)
is_venue= models.BooleanField(default=False)
latitude = models.FloatField(blank=True, null=True)
longitude = models.FloatField(blank=True, null=True)
contact_name = models.CharField(max_length=63, blank=True, null=True)
contact_email = models.CharField(max_length=63, blank=True, null=True)
stripe_email = models.CharField(max_length=63, blank=True, null=True)
ein = models.CharField(max_length=15, blank=True, null=True)
class Meta: class Meta:
unique_together = ("name", "is_venue") unique_together = ("name", "is_venue")
@@ -100,30 +116,40 @@ class Organization(models.Model):
class Event(models.Model): class Event(models.Model):
EVENT_TYPE = ( EVENT_TYPE = (
('Ot', 'Other'), ('Ot', '🤔'),
('Mu', 'Music'), ('Mu', '🎶'),
('Va', 'Visual Art'), ('Va', 'Visual Art'),
('Gv', 'Government'), ('Gv', '🛠️'),
('Ce', 'Civic Engagement'), ('Ce', 'Civic Engagement'),
('Ed', 'Educational'), ('Ed', '🍎'),
('Ma', 'Mutual Aid'), ('Ma', 'Mutual Aid'),
('Th', 'Theater'), ('Th', '🎭'),
('Co', 'Comedy'), ('Co', '🍿'),
) )
calendar = models.ForeignKey(Calendar, on_delete=models.CASCADE, blank=True, null=True) EVENT_STATE = (
scraper = models.ForeignKey(Scraper, on_delete=models.CASCADE, null=True) ('live', 'Live & Direct'),
venue = models.ForeignKey(Organization, on_delete=models.CASCADE) ('virt', 'Virtually Served'),
event_type = models.CharField(max_length=15, choices=EVENT_TYPE, default='0') ('both', 'How you prefer.')
)
show_title = models.CharField(max_length=127, blank=True, null=True) show_title = models.CharField(max_length=127, blank=True, null=True)
show_link = models.URLField(blank=True, null=True) show_link = models.URLField(blank=True, null=True)
guests = models.CharField(max_length=255, blank=True, null=True)
show_date = models.DateTimeField() show_date = models.DateTimeField()
show_day = models.DateField(blank=True, null=True) show_day = models.DateField()
img_link = models.CharField(max_length=255, blank=True, null=True)
flyer_img = models.ImageField(upload_to=fs, blank=True, null=True)
more_details = models.JSONField(blank=True, null=True)
tags = models.ManyToManyField(Tags, blank=True, null=True) calendar = models.ManyToManyField(Calendar, blank=True, null=True, related_name="events")
scraper = models.ForeignKey(Scraper, on_delete=models.CASCADE, null=True)
venue = models.ForeignKey(Organization, on_delete=models.CASCADE)
live = models.CharField(max_length=4, choices=EVENT_STATE, default='live')
event_type = models.CharField(max_length=15, choices=EVENT_TYPE, default='Mu')
img_link = models.URLField(max_length=255, blank=True, null=True)
flyer_img = models.ImageField(upload_to=fs, blank=True, null=True)
guests = models.CharField(max_length=255, blank=True, null=True)
more_details = models.JSONField(blank=True, null=True)
tags = models.ManyToManyField(Tags, blank=True)
class Meta: class Meta:
verbose_name_plural = "Events" verbose_name_plural = "Events"
@@ -143,27 +169,27 @@ class Promo(models.Model):
('Fo', 'Food'), ('Fo', 'Food'),
('Ev', 'Event'), ('Ev', 'Event'),
('Re', 'Retail'), ('Re', 'Retail'),
('Sv', 'Service'),
('Ma', 'Mutual Aid'), ('Ma', 'Mutual Aid'),
('Ca', 'Classifieds'), ('Ca', 'Classified'),
('Jo', 'Job Opening'), ('Jo', 'Job Opening'),
('Sp', 'Startup Pitch'),
('An', 'Academia Nuts'),
('Ja', 'Journal Article'), ('Ja', 'Journal Article'),
('Su', 'Survey Questions') ('Sp', 'Startup Pitch'),
('An', 'Academia Nut'),
('Su', 'Survey Question')
) )
title = models.CharField(max_length=63) title = models.CharField(max_length=63)
organization = models.ForeignKey(Organization, on_delete=models.CASCADE) organization = models.ForeignKey(Organization, on_delete=models.CASCADE)
calendar = models.ManyToManyField(Calendar, blank=True, null=True)
promo_type = models.CharField(max_length=15, choices=PROMO_TYPE, default='0') promo_type = models.CharField(max_length=15, choices=PROMO_TYPE, default='0')
overlay_image = models.ImageField(upload_to="overlays", blank=True) overlay_image = models.ImageField(upload_to="overlays", blank=True)
classified_image = models.ImageField(upload_to="classifieds", blank=True) short_text = models.CharField(max_length=255,blank=True, null=True)
embed_link = models.CharField(max_length=126, blank=True, null=True)
short_text = models.TextField(blank=True, null=True)
long_text = models.TextField(blank=True, null=True) long_text = models.TextField(blank=True, null=True)
target_link = models.URLField(blank=True, null=True) target_link = models.URLField(blank=True, null=True)
notes = models.TextField(blank=True, null=True) notes = models.TextField(blank=True, null=True)
published = models.BooleanField(default=False) published = models.BooleanField(default=False)
tags = models.ManyToManyField(Tags, blank=True)
tags = models.ManyToManyField(Tags, blank=True, null=True)
class Meta: class Meta:
verbose_name_plural = "Promo" verbose_name_plural = "Promo"

View File

@@ -1,90 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
from events.digitools import getBrowser, createURL, createBasicEvent, getSource
count = 0
venue, created = Organization.objects.get_or_create(
name="Venue Name",
city="Minneapolis",
website="Event Website",
)
try:
scraper, created = Scraper.objects.get_or_create(
name=venue.name,
website=venue.website,
items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
print("Scraper: ", scraper)
event_type = ""
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/li[@class="event"]')
for c in contents:
try:
event = {}
day = c.xpath('.//*/span[@class="day"]/text()')[0]
month = c.xpath('.//*/span[@class="mth"]/text()')[0]
year = datetime.now().year
if month == "Jan":
year = int(year) + 1
event['calendar'] = venue.calendar
event['title'] = c.xpath('.//*/span[@class="event_title"]/a/text()')[0]
event['date'] = [month, day, str(year), c.xpath('.//*/span[@class="event_time"]/text()')[0].strip()]
event['date'] = " ".join(event['date'])
event['dateStamp'] = datetime.strptime(event['date'], DATETIME_FORMAT)
event['link'] = c.xpath('.//*/span[@class="event_title"]/a/@href')[0]
print("Event Dict Created")
createBasicEvent(event, event_type, venue)
scraper.items+=1
except Exception as e:
print(e)
ppr(event)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
ps = getSource(br, venue.website)
get_events(ps, "Ed")
sleep(3)
scraper.save()
# Get Event Page Link(s)
# links = createURL("https://acmecomedycompany.com/the-club/calendar/")
# for link in links:
# ps = getSource(br, link)
# get_events(ps, "Ed")
# sleep(3)
br.close()

View File

@@ -1,67 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization
from events.digitools import getBrowser, createURL, createBasicEvent, getSource
venue, created = Organization.objects.get_or_create(
name="Venue Name",
city="Minneapolis",
website="Event Website",
)
event_type = ""
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/li[@class="event"]')
for c in contents:
try:
event = {}
day = c.xpath('.//*/span[@class="day"]/text()')[0]
month = c.xpath('.//*/span[@class="mth"]/text()')[0]
year = datetime.now().year
if month == "Jan":
year = int(year) + 1
event['title'] = c.xpath('.//*/span[@class="event_title"]/a/text()')[0]
event['date'] = [month, day, str(year), c.xpath('.//*/span[@class="event_time"]/text()')[0].strip()]
event['date'] = " ".join(event['date'])
event['dateStamp'] = datetime.strptime(event['date'], DATETIME_FORMAT)
event['link'] = c.xpath('.//*/span[@class="event_title"]/a/@href')[0]
print("Event Dict Created")
createBasicEvent(event, event_type, venue)
except Exception as e:
print(e)
ppr(event)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
# Get Event Page Link(s)
links = createURL("https://acmecomedycompany.com/the-club/calendar/")
for link in links:
ps = getSource(br, link)
get_events(ps, "Ed")
sleep(3)
br.close()

View File

@@ -1,84 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization
venue, created = Organization.objects.get_or_create(
name="location",
city="Minneapolis",
website="",
)
event_type = ""
calendar_url = [
'https://calendar.google.com/calendar/ical/js94epu90r2et31aopons1ifm8%40group.calendar.google.com/public/basic.ics',
'https://calendar.google.com/calendar/ical/6rpooudjg01vc8bjek1snu2ro0%40group.calendar.google.com/public/basic.ics',
'https://calendar.google.com/calendar/ical/teflgutelllvla7r6vfcmjdjjo%40group.calendar.google.com/public/basic.ics'
]
objIcalData = requests.get(calendar_url[1])
gcal = iCalendar.from_ical(objIcalData.text)
cfpa_events = []
tz = pytz.timezone("US/Central")
for component in gcal.walk():
event = {}
event['strSummary'] = f"{(component.get('SUMMARY'))}"
event['strDesc'] = component.get('DESCRIPTION')
event['strLocation'] = component.get('LOCATION')
event['dateStart'] = component.get('DTSTART')
event['dateStamp'] = component.get('DTSTAMP')
if event['dateStamp'] is not None:
event['dateStamp'] = event['dateStamp'].dt
if event['dateStart'] is not None:
try:
event['dateStart'] = event['dateStart'].dt.astimezone(pytz.utc)
except Exception as e:
event['dateStart'] = event['dateStart'].dt
event['dateEnd'] = (component.get('DTEND'))
if event['dateEnd'] is not None:
event['dateEnd'] = event['dateEnd'].dt
else:
event['dateEnd'] = event['dateStart']
if event['strSummary'] != 'None':
event['details'] = {
"description" : event['strDesc'],
"DateTime" : event['dateStart'],
"Location" : event['strLocation'],
}
cfpa_events.append(event)
new_event = DSEvent.objects.update_or_create(
event_type = event_type,
show_title = event['strSummary'],
show_link = event['link'],
show_date = event['dateStart'],
show_day = event['dateStart'].date(),
more_details = event["details"],
venue = venue
)
# {'dateEnd': datetime.datetime(2022, 10, 22, 18, 30, tzinfo=<UTC>),
# 'dateStamp': datetime.datetime(2023, 3, 23, 1, 57, 45, tzinfo=<UTC>),
# 'dateStart': datetime.datetime(2022, 10, 22, 17, 30, tzinfo=<UTC>),
# 'details': {'DateTime': datetime.datetime(2022, 10, 22, 17, 30, tzinfo=<UTC>),
# 'Location': vText('b'''),
# 'description': None},
# 'strDesc': None,
# 'strLocation': vText('b'''),
# 'strSummary': 'Nia Class with Beth Giles'}

View File

@@ -1,84 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization
venue, created = Organization.objects.get_or_create(
name="location",
city="Minneapolis",
website="",
)
event_type = ""
calendar_url = [
'https://calendar.google.com/calendar/ical/js94epu90r2et31aopons1ifm8%40group.calendar.google.com/public/basic.ics',
'https://calendar.google.com/calendar/ical/6rpooudjg01vc8bjek1snu2ro0%40group.calendar.google.com/public/basic.ics',
'https://calendar.google.com/calendar/ical/teflgutelllvla7r6vfcmjdjjo%40group.calendar.google.com/public/basic.ics'
]
objIcalData = requests.get(calendar_url[1])
gcal = iCalendar.from_ical(objIcalData.text)
cfpa_events = []
tz = pytz.timezone("US/Central")
for component in gcal.walk():
event = {}
event['strSummary'] = f"{(component.get('SUMMARY'))}"
event['strDesc'] = component.get('DESCRIPTION')
event['strLocation'] = component.get('LOCATION')
event['dateStart'] = component.get('DTSTART')
event['dateStamp'] = component.get('DTSTAMP')
if event['dateStamp'] is not None:
event['dateStamp'] = event['dateStamp'].dt
if event['dateStart'] is not None:
try:
event['dateStart'] = event['dateStart'].dt.astimezone(pytz.utc)
except Exception as e:
event['dateStart'] = event['dateStart'].dt
event['dateEnd'] = (component.get('DTEND'))
if event['dateEnd'] is not None:
event['dateEnd'] = event['dateEnd'].dt
else:
event['dateEnd'] = event['dateStart']
if event['strSummary'] != 'None':
event['details'] = {
"description" : event['strDesc'],
"DateTime" : event['dateStart'],
"Location" : event['strLocation'],
}
cfpa_events.append(event)
new_event = DSEvent.objects.update_or_create(
event_type = event_type,
show_title = event['strSummary'],
show_link = event['link'],
show_date = event['dateStart'],
show_day = event['dateStart'].date(),
more_details = event["details"],
venue = venue
)
# {'dateEnd': datetime.datetime(2022, 10, 22, 18, 30, tzinfo=<UTC>),
# 'dateStamp': datetime.datetime(2023, 3, 23, 1, 57, 45, tzinfo=<UTC>),
# 'dateStart': datetime.datetime(2022, 10, 22, 17, 30, tzinfo=<UTC>),
# 'details': {'DateTime': datetime.datetime(2022, 10, 22, 17, 30, tzinfo=<UTC>),
# 'Location': vText('b'''),
# 'description': None},
# 'strDesc': None,
# 'strLocation': vText('b'''),
# 'strSummary': 'Nia Class with Beth Giles'}

View File

@@ -1,102 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization
from events.digitools import getBrowser, createURL, createBasicEvent, getSource
venue, created = Organization.objects.get_or_create(
name="Mpls Stp Mag",
city="Minneapolis",
website="https://calendar.mspmag.com/calendars/all-events/",
)
event_type = ""
# Time Signatures
tz = pytz.timezone("US/Central")
td = relativedelta.relativedelta(days=1)
fortnight = relativedelta.relativedelta(days=14)
odt = datetime.now() + fortnight
# DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT = '%A, %B %d %Y %I:%M%p'
DATETIME_FORMAT_ALT = '%A, %B %d %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/div[@class="css-card js-card day-card type-smad expandable"]')
for c in contents:
try:
event = {}
event['calendar'] = venue.calendar
event_block = c.xpath('.//*/li[@class="card-listings-item event-element"]')
date = c.xpath('.//div[@class="day-card__header day-card__header--daily"]/text()')[0].replace("\n", "").strip()
if date == "Today":
date = datetime.today()
elif date == "Tomorrow":
date = datetime.today() + td
# month = c.xpath('.//*/span[@class="mth"]/text()')[0]
year = datetime.now().year
# if month == "Jan":
# year = int(year) + 1
dateTime = datetime.strptime(date + " " + str(year), DATETIME_FORMAT_ALT)
if dateTime > odt:
print("DATE TIME ", dateTime)
break
for ev in event_block:
time = ev.xpath('.//*/span[@class="card-listing-item-time"]/text()')[0].replace("@", "").strip()
if time == "All day":
time = "12:00pm"
event['title'] = ev.xpath('.//*/div[@class="card-listing-item-title"]/text()')[0] + " (Check link for times.)"
elif "-" in time:
time = time.split("-")[0]
event['title'] = ev.xpath('.//*/div[@class="card-listing-item-title"]/text()')[0]
else:
event['title'] = ev.xpath('.//*/div[@class="card-listing-item-title"]/text()')[0]
event['location'] = ev.xpath('.//*/span[@class="card-listing-item-location"]/text()')[0]
if event['location'] == '7th St. Entry':
event['location'] = '7th St Entry'
elif event['location'] == '7th Street Entry':
event['location'] = '7th St Entry'
elif event['location'] == 'Amsterdam Bar and Hall':
event['location'] = 'Amsterdam Bar & Hall'
new_venue, created = Organization.objects.get_or_create(name=event['location'])
print("V: ", new_venue, created)
event['dateTime'] = date + " " + str(year) + " " + time
event['link'] = venue.website + c.xpath('.//@data-event')[0]
event['dateStamp'] = datetime.strptime(event['dateTime'], DATETIME_FORMAT)
createBasicEvent(event, event_type, new_venue)
except Exception as e:
print(e)
ppr(event)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
# Get Event Page Link(s)
# links = createURL("https://acmecomedycompany.com/the-club/calendar/")
ps = getSource(br, venue.website)
get_events(ps, "Ed")
sleep(3)
br.close()

View File

@@ -1,105 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
from events.digitools import getBrowser, createURL, createBasicEvent, getSource
count = 0
venue, created = Organization.objects.get_or_create(
name="Minnestar",
city="Minneapolis",
website="https://minnestar.org/community/calendar",
)
try:
scraper, created = Scraper.objects.get_or_create(
name=venue.name,
website=venue.website,
items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
print("Scraper: ", scraper)
event_type = ""
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%B %d, %Y %I:%M %p'
DATETIME_FORMAT_2 = '%B %d %Y'
def get_events(ps, event_type):
links = ps.xpath('.//*/div[@id="community-calendar-list-view-container"]/a/@href')
ppr(links)
for l in links:
pse = getSource(br, l)
sleep(1)
event = {}
event['calendar'] = venue.calendar
event['link'] = l
try:
starttime = pse.xpath('.//*/time/text()')[0]
endtime = pse.xpath('.//*/time/@datetime')[1]
event['dateStamp'] = datetime.strptime(starttime, DATETIME_FORMAT)
event['title'] = pse.xpath('.//*/h1[@class="heading-2"]/text()')[0]
# event['detail-headers'] = pse.xpath('.//*/ul[@class="eo-event-meta"]/li/strong/text()')
# event['details'] = pse.xpath('.//*/ul[@class="eo-event-meta"]/li/text()')
except:
try:
event['title'] = pse.xpath('.//*/h1[@class="heading-2"]/text()')[0]
starttime = pse.xpath('.//*/time/text()')[0]
event['dateStamp'] = datetime.strptime(starttime, DATETIME_FORMAT)
except Exception as e:
try:
print(e)
print('failed event: ', event)
starttime = pse.xpath('.//*/time/text()')[0]
event['dateStamp'] = datetime.strptime(starttime + ' 2025', DATETIME_FORMAT_2)
except Exception as e:
print(e)
print("failed event: ", event)
ppr(event)
try:
createBasicEvent(event, "Ot", venue)
scraper.items+=1
except Exception as e:
print(e)
print('failed to create: ', event)
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
ps = getSource(br, venue.website)
get_events(ps, "Ot")
sleep(3)
scraper.save()
# Get Event Page Link(s)
# links = createURL("https://acmecomedycompany.com/the-club/calendar/")
# for link in links:
# ps = getSource(br, link)
# get_events(ps, "Ed")
# sleep(3)
br.close()

View File

@@ -1,147 +0,0 @@
# Install Chromedriver and Quarantine
# xattr -d com.apple.quarantine <name-of-executable>
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from xvfbwrapper import Xvfb
from lxml import html
import pytz
from events.models import Event, Organization, Scraper
from events.digitools import getBrowser, createURL, createBasicEvent, getSource
try:
scraper, created = Scraper.objects.get_or_create(
name="MN Legislature",
website="https://www.leg.mn.gov/cal?type=all",
items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name="MN Legislature")
print("Scraper: ", scraper)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%A, %B %d, %Y %I:%M %p'
# Set initial variables for City, etc
calendar_url = 'https://www.leg.mn.gov/cal?type=all'
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
br.get(calendar_url)
sleep(60)
ps = html.fromstring(br.page_source)
commEvents = ps.xpath('.//*/div[@class="card border-dark comm_item cal_item ml-lg-3"]')
senateEvents = ps.xpath('.//*/div[@class="card border-dark senate_item cal_item ml-lg-3"]')
houseEvents = ps.xpath('.//*/div[@class="card border-dark house_item cal_item ml-lg-3"]')
meetings = []
for hE in houseEvents:
details = {}
dateTime = hE.xpath('.//*/b/text()')[0]
try:
title = hE.xpath('.//*/h3/a/text()')[0]
except:
title = hE.xpath('.//*/h3/text()')[0]
try:
link = "https://www.leg.mn.gov/" + hE.xpath('.//*/div[@class="float-right text-center mr-2 d-print-none"]/a/@href')[0]
except:
link = hE.xpath('.//*/h3/a/@href')[0]
details['location'] = hE.xpath('.//*/div[@class=""]/text()')[0]
# print(dateTime, title, link, details['location'])
venue, created = Organization.objects.get_or_create(name="MN House", city="St. Paul")
new_event, created = Event.objects.update_or_create(
calendar = 'msp'
event_type = 'Gv',
show_title = title,
show_link = link,
show_date = datetime.strptime(dateTime, DATETIME_FORMAT),
show_day = datetime.strptime(dateTime, DATETIME_FORMAT).date(),
more_details = details['location'],
venue = venue
)
scraper.items+=1
for sE in senateEvents:
details = {}
dateTime = sE.xpath('.//*/b/text()')[0]
try:
title = sE.xpath('.//*/h3/a/text()')[0]
except:
title = sE.xpath('.//*/h3/text()')[0]
try:
link = "https://www.leg.mn.gov/" + sE.xpath('.//*/div[@class="float-right text-center mr-2"]/a/@href')[0]
except:
link = sE.xpath('.//*/h3/a/@href')[0]
location_list = sE.xpath('.//*/text()')
if 'Location: ' in location_list:
iN = location_list.index("Location: ")
details['location'] = location_list[iN + 1]
elif 'Senate Floor Session' in location_list:
details['location'] = 'Senate Floor Session'
venue, created = Organization.objects.get_or_create(name="MN Senate", city="St. Paul")
new_event = Event.objects.update_or_create(
event_type = 'Gv',
show_title = title,
show_link = link,
show_date = datetime.strptime(dateTime, DATETIME_FORMAT),
show_day = datetime.strptime(dateTime, DATETIME_FORMAT).date(),
more_details = details['location'],
venue = venue
)
scraper.items+=1
for cE in commEvents:
details = {}
dateTime = cE.xpath('.//*/b/text()')[0]
try:
title = cE.xpath('.//*/h3/a/text()')[0]
except:
title = cE.xpath('.//*/h3/text()')[0]
try:
link = "https://www.leg.mn.gov/" + cE.xpath('.//*/div[@class="float-right text-center mr-2"]/a/@href')[0]
except:
link = cE.xpath('.//*/h3/a/@href')[0]
location_list = cE.xpath('.//*/text()')
if 'Room: ' in location_list:
iN = location_list.index("Room: ")
details['location'] = location_list[iN + 1]
# print(dateTime, title, link, details['location'])
venue, created = Organization.objects.get_or_create(name="MN Legislature", city="St. Paul")
new_event = Event.objects.update_or_create(
event_type = 'Gv',
show_title = title,
show_link = link,
show_date = datetime.strptime(dateTime, DATETIME_FORMAT),
show_day = datetime.strptime(dateTime, DATETIME_FORMAT).date(),
more_details = details['location'],
venue = venue
)
scraper.items+=1
br.close()
scraper.save()
# br.find_element_by_class_name('fc-btn_allCalendars-button').click()

View File

@@ -1,99 +0,0 @@
import re, os, sys
from datetime import datetime
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event, Organization, Scraper
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from xvfbwrapper import Xvfb
from lxml import html
import pytz
from events.digitools import getBrowser, createURL, createBasicEvent, getSource
try:
scraper, created = Scraper.objects.get_or_create(
name="Mpls City Council",
website="https://lims.minneapolismn.gov/Calendar/citycouncil/upcoming",
items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name="Mpls City Council")
print("Scraper: ", scraper)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%A, %b %d, %Y %I:%M %p'
calendar_url = 'https://lims.minneapolismn.gov/Calendar/citycouncil/upcoming'
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
br.get(calendar_url)
sleep(25)
# br.find_element(By.XPATH, '//*/li[@class="tab-header-small"]/a').click()
# sleep(15)
# all_entries = Select(br.find_element(By.XPATH, '//*/select'))
# all_entries.select_by_value('50')
# sleep(15)
ps = html.fromstring(br.page_source)
dayBlocks = ps.xpath('.//*/div[@class="ng-scope"]')
meetings = []
for dB in dayBlocks:
date = dB.xpath('.//div[@class="row"]/div/span[@class="ng-binding"]/text()')[0]
events = dB.xpath('.//div[@class="upcoming ng-scope"]/div')
for event in events:
time = event.xpath('.//div/text()')[0]
title = event.xpath('.//div/a/text()')[0].strip()
if not len(title) > 0:
title = event.xpath('.//div/span/a/text()')[0].strip()
link = event.xpath('.//div/a/@href')[0]
if link.startswith("/Download/"):
link = calendar_url
else:
link = "https://lims.minneapolismn.gov" + link
location = title.split(',')[-1].strip()
mtg_title = title.split(',')[:-1]
if len(mtg_title) > 1:
mtg_title = (' -').join(mtg_title).strip()
else:
mtg_title = mtg_title[0].strip()
dateTime = datetime.strptime(date + " " + time, DATETIME_FORMAT)
if location == "City Hall":
location = "Mpls City Hall"
print(dateTime, location, mtg_title, link)
print('\n\n++++\n\n')
venue, created = Organization.objects.get_or_create(name=location, city="Minneapolis")
new_event = Event.objects.update_or_create(
calendar = 'msp'
event_type = 'Gv',
show_title = mtg_title,
show_link = link,
show_date = dateTime,
show_day = dateTime,
venue = venue
)
scraper.items+=1
br.close()
scraper.save()
# br.find_element_by_class_name('fc-btn_allCalendars-button').click()

View File

@@ -1,73 +0,0 @@
import re, os, sys
from datetime import datetime
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event, Organization, Scraper
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from selenium.webdriver.common.by import By
from xvfbwrapper import Xvfb
from lxml import html
import pytz
from events.digitools import getBrowser, createURL, createBasicEvent, getSource
scraper, created = Scraper.objects.get_or_create(
name="St Paul City Council",
website="https://www.stpaul.gov/calendar",
last_ran = datetime.now(),
)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%B %d, %Y at %I:%M %p'
calendar_url = 'https://www.stpaul.gov/calendar'
city_site = "https://www.stpaul.gov"
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
br.get(calendar_url)
sleep(3)
def getEvents(br):
ps = html.fromstring(br.page_source)
eventBlocks = ps.xpath('.//*/div[@class="calendar__item views-row"]')
for eB in eventBlocks:
title = eB.xpath('.//div/h3[@class="field-content calendar__title"]/text()')[0]
link = city_site + eB.xpath('.//div/span[@class="field-content calendar__link"]/a/@href')[0]
dateTime = eB.xpath('.//div[@class="views-field views-field-field-calendar-date-value"]/span/text()')[0]
print(dateTime, title, link)
print('\n\n++++\n\n')
venue, created = Organization.objects.get_or_create(name="Somewhere in St Paul", city="St. Paul")
new_event = Event.objects.update_or_create(
calendar = 'msp'
event_type = 'Gv',
show_title = title,
show_link = link,
show_date = datetime.strptime(dateTime, DATETIME_FORMAT),
show_day = datetime.strptime(dateTime, DATETIME_FORMAT),
venue = venue
)
getEvents(br)
sleep(5)
br.get("https://www.stpaul.gov/calendar?page=1")
getEvents(br)
br.close()
# br.find_element_by_class_name('fc-btn_allCalendars-button').click()

View File

@@ -1,116 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from datetime import datetime
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper
td = relativedelta.relativedelta(hours=5)
odt = datetime.now() + td
venue, created = Organization.objects.get_or_create(
name="MN Launch",
city="Minneapolis",
website="https://mn.gov/launchmn/calendar",
)
try:
scraper, created = Scraper.objects.get_or_create(
name=venue.name,
website=venue.website,
items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
print("Scraper: ", scraper)
event_type = "Ed"
cal_url = "https://timelyapp.time.ly/api/calendars/54705514/export?format=ics&target=copy&start_date=2024-12-13"
calendar_url = 'https://calendar.google.com/calendar/ical/uvkshlggh1h4ck08emab22btkum9hl94%40import.calendar.google.com/public/basic.ics'
objIcalData = requests.get(cal_url)
gcal = iCalendar.from_ical(objIcalData.text)
cfpa_events = []
tz = pytz.timezone("US/Central")
for component in gcal.walk():
event = {}
event['strSummary'] = f"{(component.get('SUMMARY'))}"
event['strDesc'] = component.get('DESCRIPTION')
event['strLocation'] = component.get('LOCATION')
event['dateStart'] = component.get('DTSTART')
event['dateStamp'] = component.get('DTSTAMP')
if event['dateStamp'] is not None:
event['dateStamp'] = event['dateStart'].dt
if event['dateStart'] is not None:
try:
event['dateStart'] = event['dateStart'].dt
except Exception as e:
event['dateStart'] = event['dateStart'].dt
event['dateEnd'] = (component.get('DTEND'))
if event['dateEnd'] is not None:
event['dateEnd'] = event['dateEnd'].dt
else:
event['dateEnd'] = event['dateStart']
if event['strSummary'] != 'None':
event['details'] = {
"description" : event['strDesc'],
"Location" : event['strLocation'],
}
cfpa_events.append(event)
now_now = datetime.now().astimezone(tz)
try:
if event['dateStart'] > now_now:
print(event['strSummary'])
new_event, created = DSEvent.objects.update_or_create(
calendar = 'msp'
event_type = event_type,
show_title = event['strSummary'],
show_link = venue.website,
show_date = event['dateStart']-td,
show_day = event['dateStart']-td,
more_details = event["details"],
venue = venue
)
scraper.items+=1
if event['strLocation'] != None and event['strLocation'] != 'MN' and event['strLocation'] != 'Online':
loc = event['strLocation'].split('@')
new_venue_name = loc[0]
if len(loc) > 1:
address = loc[1].split(",")
city = address[1].strip()
new_venue, created = Organization.objects.get_or_create(
name=new_venue_name,
city=city,
website="https://mn.gov/launchmn/calendar",
)
new_event.venue = new_venue
new_event.save()
else:
new_event.venue = venue
new_event.save()
except Exception as e:
print(e)
print("Event: ", event['dateStart'], event['strSummary'])
print("Clock: ", now_now)
else:
print("Failed: ", component.get('DESCRIPTION'))
scraper.save()

View File

@@ -1,50 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from datetime import datetime
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper, Calendar
import events.digitools as digitools
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
venue, created = Organization.objects.get_or_create(
name="Chicago Ave Fire Arts Center",
city="Minneapolis",
website="https://www.cafac.org/classes",
)
event_type = "Ed"
try:
scraper, created = Scraper.objects.get_or_create(
name="Chicago Ave Fire Arts Center",
website="https://calendar.google.com/calendar/ical/9qj2426rukra3jv933nslsf3r8%40group.calendar.google.com/public/basic.ics",
calendar = Calendar.objects.get(id=1),
items = 0,
new_items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
item_count_start = scraper.items
event_type = "Ed"
objIcalData = requests.get(scraper.website)
gcal = iCalendar.from_ical(objIcalData.text)
tz = pytz.timezone("US/Central")
digitools.getiCalEvents(gcal, scraper)
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,44 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from datetime import datetime
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper, Calendar
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
venue, created = Organization.objects.get_or_create(
name="KJ's Hideaway",
city="Minneapolis",
website="",
)
try:
scraper, created = Scraper.objects.get_or_create(
name="KJ's Hideaway",
website="https://calendar.google.com/calendar/ical/sgmok5t13vspeoruhruh33dhj0hgc50q%40import.calendar.google.com/public/basic.ics",
calendar = Calendar.objects.get(id=1),
items = 0,
new_items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
item_count_start = scraper.items
event_type = "Mu"
objIcalData = requests.get(scraper.website)
gcal = iCalendar.from_ical(objIcalData.text)
tz = pytz.timezone("US/Central")
digitools.getiCalEvents(gcal, scraper)
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,48 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from datetime import datetime
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper, Calendar
import events.digitools as digitools
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
venue, created = Organization.objects.get_or_create(
name="Sociable Ciderwerks",
city="Minneapolis",
website="https://sociablecider.com/events",
)
event_type = "Mu"
try:
scraper, created = Scraper.objects.get_or_create(
name="Sociable Ciderwerks",
website="https://calendar.google.com/calendar/ical/c_oa7uitvkn871o1ojl5e1os4ve8%40group.calendar.google.com/public/basic.ics",
calendar = Calendar.objects.get(id=1),
items = 0,
new_items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
item_count_start = scraper.items
objIcalData = requests.get(scraper.website)
gcal = iCalendar.from_ical(objIcalData.text)
tz = pytz.timezone("US/Central")
digitools.getiCalEvents(gcal, scraper)
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,48 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper, Calendar
import events.digitools as digitools
from datetime import datetime
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
venue, created = Organization.objects.get_or_create(
name="Bunkers",
city="Minneapolis",
website="https://bunkersmusic.com/calendar/",
is_venue = True
)
try:
scraper, created = Scraper.objects.get_or_create(
name="Bunkers",
website="https://calendar.google.com/calendar/ical/js94epu90r2et31aopons1ifm8%40group.calendar.google.com/public/basic.ics",
calendar = Calendar.objects.get(id=1),
items = 0,
new_items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
item_count_start = scraper.items
event_type = "Mu"
objIcalData = requests.get(scraper.website)
gcal = iCalendar.from_ical(objIcalData.text)
tz = pytz.timezone("US/Central")
digitools.getiCalEvents(gcal, scraper)
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,48 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from datetime import datetime
from dateutil import relativedelta
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper, Calendar
import events.digitools as digitools
td = relativedelta.relativedelta(hours=5)
venue, created = Organization.objects.get_or_create(
name="Center for Performing Arts",
city="Minneapolis",
website="https://www.cfpampls.com/events",
)
try:
scraper, created = Scraper.objects.get_or_create(
name="Center for Performing Arts",
website="https://calendar.google.com/calendar/ical/6rpooudjg01vc8bjek1snu2ro0%40group.calendar.google.com/public/basic.ics",
calendar = Calendar.objects.get(id=1),
items = 0,
new_items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
item_count_start = scraper.items
event_type = "Ed"
objIcalData = requests.get(scraper.website)
gcal = iCalendar.from_ical(objIcalData.text)
tz = pytz.timezone("US/Central")
digitools.getiCalEvents(gcal, scraper)
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,46 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from datetime import datetime
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper, Calendar
import events.digitools as digitools
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
venue, created = Organization.objects.get_or_create(
name="Eagles #34",
city="Minneapolis",
website="https://www.minneapoliseagles34.org/events-entertainment.html",
)
try:
scraper, created = Scraper.objects.get_or_create(
name="Eagles #34",
website="https://calendar.google.com/calendar/ical/teflgutelllvla7r6vfcmjdjjo%40group.calendar.google.com/public/basic.ics",
calendar = Calendar.objects.get(id=1),
items = 0,
new_items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
item_count_start = scraper.items
event_type = "Mu"
objIcalData = requests.get(scraper.website)
gcal = iCalendar.from_ical(objIcalData.text)
tz = pytz.timezone("US/Central")
digitools.getiCalEvents(gcal, scraper)
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,50 +0,0 @@
import requests, os, sys
from icalendar import Calendar as iCalendar, Event
from datetime import datetime
from dateutil import relativedelta
td = relativedelta.relativedelta(hours=5)
from pprint import pprint as ppr
import pytz
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event as DSEvent, Organization, Scraper, Calendar
import events.digitools as digitools
td = relativedelta.relativedelta(hours=5)
odt = datetime.now() + td
venue, created = Organization.objects.get_or_create(
name="Terminal Bar",
city="Minneapolis",
website="https://terminalbarmn.com",
)
event_type = "Mu"
try:
scraper, created = Scraper.objects.get_or_create(
name="Terminal Bar",
website="https://calendar.google.com/calendar/ical/terminalbar32%40gmail.com/public/basic.ics",
calendar = Calendar.objects.get(id=1),
items = 0,
new_items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=venue.name)
item_count_start = scraper.items
event_type = "Mu"
objIcalData = requests.get(scraper.website)
gcal = iCalendar.from_ical(objIcalData.text)
tz = pytz.timezone("US/Central")
digitools.getiCalEvents(gcal, scraper)
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,78 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
from events.digitools import getBrowser, createURL, createBasicArticle, getSource
org, created = Organization.objects.get_or_create(
name="MinnPost",
city="Minneapolis",
website="https://www.minnpost.com/",
is_venue=False,
)
try:
scraper, created = Scraper.objects.get_or_create(
name=org.name,
website=org.website,
items = 0,
last_ran = datetime.now(),
)
except Exception as e:
print(e)
scraper = Scraper.objects.get(name=org.name)
print("Scraper: ", scraper)
event_type = "Ja"
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/article')
count = 0
ppr(contents)
for c in contents:
try:
if count > 10:
br.close()
quit()
article = {}
article['title'] = c.xpath('.//*/h2[@class="entry-title"]/a/text()')[0]
article['link'] = c.xpath('.//*/h2[@class="entry-title"]/a/@href')[0]
createBasicArticle(article, event_type, org)
ppr(article)
print("Success")
count+=1
except Exception as e:
print(e)
ppr(article)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
ps = getSource(br, org.website)
get_events(ps, "Ed")
sleep(3)
br.close()
scraper.save()

View File

@@ -1,68 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
from events.digitools import getBrowser, createURL, createBasicArticle, getSource
scraper, created = Scraper.objects.get_or_create(
name="Racket MN",
website="https://racketmn.com",
last_ran = datetime.now(),
)
org, created = Organization.objects.get_or_create(
name="Racket MN",
city="Minneapolis",
website="https://racketmn.com",
is_venue=False,
)
event_type = "Ja"
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
count = 0
contents = ps.xpath('.//*/div[@class="PostCard_stackedWrapper__S21Fy"]') + ps.xpath('.//*/div[@class="PostCard_wrapper__uteO3"]')
for c in contents:
if count > 10:
br.close()
quit()
try:
article = {}
article['title'] = c.xpath('.//div/a/h3/text()')[0]
article['link'] = org.website + c.xpath('.//div/a/@href')[1]
createBasicArticle(article, event_type, org)
count+=1
except Exception as e:
print(e)
ppr(article)
print("\n+++\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
ps = getSource(br, org.website)
get_events(ps, "Ed")
sleep(3)
br.close()
scraper.save()

View File

@@ -1,68 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
from events.digitools import getBrowser, createURL, createBasicArticle, getSource
scraper, created = Scraper.objects.get_or_create(
name="Sahan Journal",
website="https://sahanjournal.com/",
last_ran = datetime.now(),
)
org, created = Organization.objects.get_or_create(
name="Sahan Journal",
city="Minneapolis",
website="https://sahanjournal.com/",
is_venue=False,
)
event_type = "Ja"
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/article')
count = 0
for c in contents:
try:
if count > 10:
br.close()
quit()
article = {}
article['title'] = c.xpath('.//*/h2[@class="entry-title"]/a/text()')[0]
article['link'] = c.xpath('.//*/h2[@class="entry-title"]/a/@href')[0]
createBasicArticle(article, event_type, org)
count+=1
except Exception as e:
print(e)
ppr(article)
print("\n+++\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
ps = getSource(br, org.website)
get_events(ps, "Ed")
sleep(3)
br.close()
scraper.save()

View File

@@ -1,63 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
from events.digitools import getBrowser, createURL, createBasicArticle, getSource
scraper, created = Scraper.objects.get_or_create(
name="Uniocorn Riot",
website="https://unicornriot.ninja/",
last_ran = datetime.now(),
)
org, created = Organization.objects.get_or_create(
name="Uniocorn Riot",
city="Minneapolis",
website="https://unicornriot.ninja/",
is_venue=False,
)
event_type = "Ja"
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/article')
for c in contents[:10]:
try:
article = {}
article['title'] = c.xpath('.//*/h3[@class="title entry-title is-3"]/a/text()')[0]
article['link'] = c.xpath('.//*/h3[@class="title entry-title is-3"]/a/@href')[0]
createBasicArticle(article, event_type, org)
except Exception as e:
print(e)
ppr(article)
print("\n+++\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
ps = getSource(br, org.website)
get_events(ps, "Ed")
sleep(3)
br.close()
scraper.save()

View File

@@ -1,132 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
from atproto import Client
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from socials.models import SocialLink, SocialPost
# from digitools import getBrowser, createURL, createBasicEvent, getSource
tz = pytz.timezone("US/Central")
USERNAME = "dreamfreely.org"
PASSWORD = "Futbol21!@"
client = Client()
client.login(USERNAME, PASSWORD)
feed = client.get_author_feed(USERNAME, limit = 100)
def createSocialLink(post):
new_post, created = SocialLink.objects.update_or_create(
uri = post['uri'],
text = post['text'],
link = post['link'],
handle = post['handle'],
likes = post['likes'],
reposts = post['reposts'],
quotes = post['quotes'],
replies = post['replies'],
created_at = post['created_at'],
platform = 'bluesky',
rt_uri = post['rt_uri'],
rt_text = post['rt_text'],
rt_link = post['rt_link'],
rt_handle = post['rt_handle'],
)
# print(created, new_post)
print("completed write")
tweets = []
print(len(feed.feed))
for post in feed.feed:
post = post.post
print("\n\nNEW POST\n\n")
# try:
# ppr(post.embed.record.record.author.handle)
# ppr(post.embed.record.record.value.text.split("\n")[:2])
# ppr(post.embed.record.record.value.embed.external.uri.split("?")[0])
# ppr(post.embed.record.record.uri.split("feed.post/")[1])
# except:
# pass
if hasattr(post.record.embed, 'external'):
p = {}
try:
p['link'] = post.record.embed.external.uri.split("?")[0]
except:
pass
p['text'] = " ".join(post.record.text.split("\n")[:2])
p['handle'] = post.author.handle
p['uri'] = post.uri.split("feed.post/")[1]
p['likes'] = post.like_count
p['quotes'] = post.quote_count
p['replies'] = post.reply_count
p['reposts'] = post.repost_count
p['created_at'] = post.record.created_at
p['rt_handle'] = "blank"
p['rt_text'] = "blank"
p['rt_uri'] = "blank"
p['rt_link'] = "blank"
elif hasattr(post.embed, 'record'):
p = {}
p['text'] = " ".join(post.record.text.split("\n")[:2])
p['handle'] = post.author.handle
p['uri'] = post.uri.split("feed.post/")[1]
p['likes'] = post.like_count
p['quotes'] = post.quote_count
p['replies'] = post.reply_count
p['reposts'] = post.repost_count
p['created_at'] = post.record.created_at
p['link'] = "blank"
try:
p['rt_handle'] = post.embed.record.record.author.handle
p['rt_text'] = " ".join(post.embed.record.record.value.text.split("\n")[:2])
p['rt_uri'] = post.embed.record.record.uri.split("feed.post/")[1]
p['rt_link'] = post.embed.record.record.value.embed.external.uri.split("?")[0]
except:
p['rt_handle'] = "blank"
p['rt_text'] = "blank"
p['rt_uri'] = "blank"
p['rt_link'] = "blank"
else:
p = {}
p['text'] = " ".join(post.record.text.split("\n")[:2])
p['handle'] = post.author.handle
p['uri'] = post.uri.split("feed.post/")[1]
p['likes'] = post.like_count
p['quotes'] = post.quote_count
p['replies'] = post.reply_count
p['reposts'] = post.repost_count
p['created_at'] = post.record.created_at
p['rt_handle'] = "blank"
p['rt_text'] = "blank"
p['rt_uri'] = "blank"
p['rt_link'] = "blank"
p['link'] = "blank"
# ppr(p)
# tweets.append(p)
try:
print('writing file')
createSocialLink(p)
except Exception as e:
ppr(post.record.embed)
print(e, "\nthis\n\n")

View File

@@ -1,72 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
from atproto import Client
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from socials.models import SocialImg
# from digitools import getBrowser, createURL, createBasicEvent, getSource
tz = pytz.timezone("US/Central")
USERNAME = "dreamfreely.org"
PASSWORD = "Futbol21!@"
client = Client()
client.login(USERNAME, PASSWORD)
feed = client.get_author_feed(USERNAME, limit = 100)
def createSocialImg(post):
new_post, created = SocialImg.objects.update_or_create(
uri = post['uri'],
text = post['text'],
img_link = post['img_link'],
handle = post['handle'],
created_at = post['created_at'],
platform = 'bluesky',
)
print(created, new_post)
tweets = []
print(len(feed.feed))
for post in feed.feed:
post = post.post
# print(post, "\n\n")
# try:
# ppr(post.embed.images[0].fullsize)
# # ppr(post.embed.record.record.value.text.split("\n")[:2])
# # ppr(post.embed.record.record.value.embed.external.uri.split("?")[0])
# # ppr(post.embed.record.record.uri.split("feed.post/")[1])
# except Exception as e:
# print("failed:", e)
if hasattr(post.embed, 'images'):
p = {}
p['img_link'] = post.embed.images[0].fullsize
p['text'] = " ".join(post.record.text.split("\n")[:2])
p['handle'] = post.author.handle
p['uri'] = post.uri.split("feed.post/")[1]
p['created_at'] = post.record.created_at
# ppr(p)
tweets.append(p)
try:
print('writing file')
createSocialImg(p)
except Exception as e:
ppr(post.embed)
print(e, "\nthis\n\n")

View File

@@ -1,72 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
import praw
from socials.models import SocialLink, SocialPost
# from digitools import getBrowser, createURL, createBasicEvent, getSource
tz = pytz.timezone("US/Central")
# timestamp = 1729322547223
# dt_object = datetime.datetime.fromtimestamp(timestamp)
# print(dt_object)
reddit = praw.Reddit(
client_id="rxW3Ywqke6FZDP7pIhYYuw",
client_secret="cg1VNl0I-RTuYUwgz16ryKh2wWKEcA",
password="7CTu4sGFi9E0",
user_agent="CultureClap",
username="cultureclap",
)
def createSocialLink(post):
new_post, created = SocialLink.objects.update_or_create(
text = post['text'],
link = post['link'],
handle = post['handle'],
likes = post['likes'],
replies = post['replies'],
platform = post['platform'],
created_at = post['created_at'],
rt_uri = 'blank',
rt_text = 'blank',
rt_link = 'blank',
rt_handle = 'blank',
)
print(created, new_post)
count = 0
for item in reddit.user.me().upvoted():
rdt = {}
rdt['text'] = item.title + " | " + item.selftext
rdt['handle'] = item.author.name
rdt['link'] = item.url
rdt['likes'] = item.ups
rdt['replies'] = len(item.comments.list())
rdt['created_at'] = datetime.fromtimestamp(item.created_utc)
rdt['platform'] = 'reddit'
try:
print('writing file')
createSocialLink(rdt)
count +=1
if count > 50:
quit()
except Exception as e:
ppr(item)
print(e, "\nthis\n\n")
# ppr(item)

View File

@@ -1,71 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
import events.digitools as digitools
from events.models import Organization, Scraper, Calendar, Event
venue, created = Organization.objects.get_or_create(
name="Acme Comedy Club",
city="Minneapolis",
website="https://acmecomedycompany.com/the-club/calendar/",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/li[@class="event"]')
for c in contents:
try:
event = {}
day = c.xpath('.//*/span[@class="day"]/text()')[0]
month = c.xpath('.//*/span[@class="mth"]/text()')[0]
year = datetime.now().year
if month == "Jan":
year = int(year) + 1
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/span[@class="event_title"]/a/text()')[0]
event['date'] = [month, day, str(year), c.xpath('.//*/span[@class="event_time"]/text()')[0].strip()]
event['date'] = " ".join(event['date'])
event['dateStamp'] = datetime.strptime(event['date'], DATETIME_FORMAT)
event['link'] = c.xpath('.//*/span[@class="event_title"]/a/@href')[0]
digitools.createBasicEvent(event, "Co", venue)
scraper.items+=1
except Exception as e:
print(e)
ppr(event)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
br.close()
quit()
links = digitools.createURL("https://acmecomedycompany.com/the-club/calendar/")
for link in links:
ps = digitools.getSource(br, link)
get_events(ps, "Co")
digitools.updateScraper(scraper, item_count_start)
br.close()

View File

@@ -1,67 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper, Calendar
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="Amsterdam Bar & Hall",
city="St. Paul",
website="https://www.amsterdambarandhall.com/events-new/",
is_venue=True
)
scraper,item_count_start = digitools.getScraper(venue)
DATETIME_FORMAT = '%B %d %Y %I:%M%p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps):
contents = ps.xpath('.//*/ul[@class="events-list"]/li')
for c in contents:
try:
event = {}
day = c.xpath('.//*/div[@class="date-day"]/text()')[0]
month = c.xpath('.//*/div[@class="date-month"]/text()')[0]
year = datetime.now().year
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//div/h4/a/text()')[0]
event['date'] = [month, day, str(year), c.xpath('.//div[@class="event-info"]/p/text()')[0].split(" ")[0]]
event['date'] = " ".join(event['date'])
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT)
event['link'] = c.xpath('.//div[@class="event-info"]/h4/a/@href')[0]
if " presents" in event['title']:
event['title'] = event['title'].split("presents")[1][1:].strip()
if event['title'].startswith('.'):
print("BLAHH\n")
event['title'] = event['title'][1:].strip()
digitools.createBasicEvent(event, "Mu", venue)
scraper.items+=1
except Exception as e:
print(e)
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
ps = digitools.getSource(br, venue.website)
get_events(ps)
sleep(3)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,70 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
current_year = str(datetime.now().year)
venue, created = Organization.objects.get_or_create(
name="Eastside Freedom Library",
city="Minneapolis",
website="https://eastsidefreedomlibrary.org/events/",
is_venue=True
)
scraper,item_count_start = digitools.getScraper(venue)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%B %d @ %I:%M %p %Y'
def get_events(ps):
contents = ps.xpath('.//*/article')
# ppr("contents:", contents)
for c in contents:
try:
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/h3[@class="tribe-events-calendar-list__event-title tribe-common-h6 tribe-common-h4--min-medium"]/a/text()')[0].strip()
event['link'] = c.xpath('.//*/h3[@class="tribe-events-calendar-list__event-title tribe-common-h6 tribe-common-h4--min-medium"]/a/@href')[0]
event['date'] = c.xpath('.//*/span[@class="tribe-event-date-start"]/text()')[0].strip() + " " + current_year
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT)
try:
new_event = digitools.createBasicEvent(event, "Ed", venue)
scraper.items+=1
except Exception as e:
print(e)
ppr(event)
print("\n+++\n")
except Exception as e:
print(e)
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
calendar_url = 'https://eastsidefreedomlibrary.org/events/'
ps = digitools.getSource(br, calendar_url)
get_events(ps)
# ppr(events)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,178 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
from lxml import html
import pytz
from events.models import Organization, Scraper, Event
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="First Avenue",
city="Minneapolis",
website="https://first-avenue.com",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %Y %I%p'
DATETIME_FORMAT_2 = '%b %d %Y %I:%M%p'
DATETIME_FORMAT_3 = '%b %d %Y'
# Set initial variables for City, etc
month = int(datetime.now().month)
day = int(datetime.now().day)
if month == 12:
next_month = "01"
else:
next_month = month + 1
if next_month < 10:
next_month = "0" + str(next_month)
if month < 10:
month = "0" + str(month)
year = int(datetime.now().year)
calendar_url = 'https://first-avenue.com/shows/?start_date=' + str(year) + str(month) + str(day)
next_month_string = str(next_month) + "01"
if next_month == 1:
calendar_url_2 = 'https://first-avenue.com/shows/?start_date=' + str(year + 1) + next_month_string
else:
if int(next_month) == 1:
calendar_url_2 = 'https://first-avenue.com/shows/?start_date=' + str(year + 1) + next_month_string
else:
calendar_url_2 = 'https://first-avenue.com/shows/?start_date=' + str(year) + next_month_string
print("\n\n", calendar_url, calendar_url_2, "\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
if datetime.now().day < 8:
ps = digitools.getSource(br, calendar_url)
shows = ps.xpath('.//*/div[@class="show_name content flex-fill"]/div/div/h4/a/@href')[:63]
elif 7 < datetime.now().day < 15:
ps = digitools.getSource(br, calendar_url)
shows = ps.xpath('.//*/div[@class="show_name content flex-fill"]/div/div/h4/a/@href')
elif 14 < datetime.now().day < 21:
ps = digitools.getSource(br, calendar_url)
shows = ps.xpath('.//*/div[@class="show_name content flex-fill"]/div/div/h4/a/@href')[:95]
ps = digitools.getSource(br, calendar_url_2)
shows = shows + ps.xpath('.//*/div[@class="show_name content flex-fill"]/div/div/h4/a/@href')[:31]
else:
ps = digitools.getSource(br, calendar_url)
shows = ps.xpath('.//*/div[@class="show_name content flex-fill"]/div/div/h4/a/@href')
ps = digitools.getSource(br, calendar_url_2)
shows = shows + ps.xpath('.//*/div[@class="show_name content flex-fill"]/div/div/h4/a/@href')[:63]
events = []
def get_info(pse):
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event["venue"] = pse.xpath('.//*/div[@class="content"]/div/div[@class="venue_name"]/text()')[0].replace('\t', '').replace('\n', '').strip()
event["show_title"] = pse.xpath('.//*/span[@class="show_title"]/text()')[0].replace('\t', '').replace('\n', '')
if event["show_title"] == "":
event["show_title"] = pse.xpath('.//*/span[@class="show_title"]/text()')[2].replace('\t', '').replace('\n', '')
event["guests"] = pse.xpath('.//*/div[@class="feature_details_main d-flex align-items-center"]/div/h4/text()')
event["flyer"] = pse.xpath('.//*/img[@class="gig_poster lazy loaded"]/@src')
try:
event = get_date(pse, event)
except Exception as e:
print("date issue: ", e)
try:
event = get_details(pse, event)
except Exception as e:
print("details issue: ", e)
try:
event["date_time"] = datetime.strptime(" ".join(event["date"]) + " " + event["details"]["Doors Open"], DATETIME_FORMAT)
except Exception as e:
print("Using alt date format 2: ", e)
try:
event["date_time"] = datetime.strptime(" ".join(event["date"]) + " " + event["details"]["Doors Open"], DATETIME_FORMAT_2)
ppr(event)
except Exception as e:
print("Using alt date format 3: ", e)
print(event['date'])
event["date_time"] = datetime.strptime(" ".join(event["date"]), DATETIME_FORMAT_3)
return event
def get_date(pse, event):
month = pse.xpath('.//*/div[@class="date_container"]/div/div[@class="month"]/text()')[0].replace('\t', '').replace('\n', '')
day = pse.xpath('.//*/div[@class="date_container"]/div/div[@class="day"]/text()')[0].replace('\t', '').replace('\n', '')
year = pse.xpath('.//*/div[@class="date_container"]/div/div[@class="year"]/text()')[0].replace('\t', '').replace('\n', '')
event["date"] = [month, day, year]
return event
def get_details(pse, event):
try:
details = pse.xpath('.//*/div[@class="show_details text-center"]/div/div/h6/text()')
info = pse.xpath('.//*/div[@class="show_details text-center"]/div/div/h2/text()')
di = zip(details, info)
details = {}
for d,i in di:
details[d] = i
event["details"] = details
return event
except Exception as e:
print("details issue: ", e)
for show in shows:
br.get(show)
sleep(2)
try:
pse = html.fromstring(br.page_source)
except Exception as e:
print(show)
pass
try:
event = get_info(pse)
except Exception as e:
print("get_info error: ", e)
try:
event["link"] = show
if event["venue"] in ["Palace Theater", "Turf Club", "The Fitzgerald Theater", "Amsterdam Bar & Hall"]:
venue, created = Organization.objects.get_or_create(name=event["venue"], is_venue=True, city="St. Paul")
else:
venue, created = Organization.objects.get_or_create(name=event["venue"], is_venue=True, city="Minneapolis")
except Exception as e:
print("Venue creation error: ", e, "\n", event, "\n", event["venue"])
try:
event['dateStamp'] = event['date_time']
event['scraper'] = scraper
new_event, created = digitools.createDetailedEvent(event, "Mu", venue)
scraper.items+=1
except Exception as e:
print("event creation error: ", e, "\n\n", event, "\n\n", created)
quit()
ppr(events)
br.close()
digitools.updateScraper(scraper, item_count_start)
# br.find_element_by_class_name('fc-btn_allCalendars-button').click()

View File

@@ -1,68 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="Ginkgo Coffee",
city="Saint Paul",
website="https://ginkgocoffee.com/events/",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
event_type = ""
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT_2 = '%b %d %Y %I:%M %p'
DATETIME_FORMAT = '%B %d @ %I:%M %p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/article')
for c in contents:
try:
event = {}
dateTime = c.xpath('.//*/span[@class="tribe-event-date-start"]/text()')[0]
month = c.xpath('.//*/span[@class="tribe-event-date-start"]/text()')[0].split(' ')[0]
year = datetime.now().year
if month == "January":
year = int(year) + 1
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/h3/a/text()')[0].replace("\n", "").replace("\t", "")
event['date'] = " ".join([ dateTime, str(year)])
event['dateStamp'] = datetime.strptime(event['date'], DATETIME_FORMAT)
event['link'] = c.xpath('.//*/h3/a/@href')[0]
digitools.createBasicEvent(event, event_type, venue)
except Exception as e:
print(e)
ppr(event)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
ps = digitools.getSource(br, venue.website)
get_events(ps, "Mu")
sleep(3)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,71 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="Green Room",
city="Minneapolis",
website="https://www.greenroommn.com/events",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
event_type = "Mu"
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a %b %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/div[@class="vp-event-card vp-venue-greenroom vp-col"]')
for c in contents:
try:
event = {}
time = c.xpath('.//*/span[@class="vp-time"]/text()')[0].strip()
date = c.xpath('.//*/span[@class="vp-date"]/text()')[0].strip()
month = date.split(" ")[1]
year = datetime.now().year
# if month == "Jan":
# year = int(year) + 1
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/div[@class="vp-event-name"]/text()')[0]
event['datetime'] = date + " " + str(year) + " " + time
event['dateStamp'] = datetime.strptime(event['datetime'], DATETIME_FORMAT)
event['link'] = venue.website + c.xpath('.//a[@class="vp-event-link"]/@href')[0]
digitools.createBasicEvent(event, event_type, venue)
scraper.items+=1
except Exception as e:
print(e)
ppr(event)
print("\n+++\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
ps = digitools.getSource(br, venue.website)
get_events(ps, event_type)
sleep(3)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,96 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper, Event
import events.digitools as digitools
from lxml import html
count = 0
venue, created = Organization.objects.get_or_create(
name="Hook & Ladder",
city="Minneapolis",
website="https://thehookmpls.com",
is_venue=True,
)
scraper,item_count_start = digitools.getScraper(venue)
ppr(scraper)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a, %b %d, %Y @ %I:%M %p'
# Set initial variables for City, etc
calendar_url = [
"https://thehookmpls.com/events/list/page/1",
"https://thehookmpls.com/events/list/page/2",
"https://thehookmpls.com/events/list/page/3"
]
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
def get_listings(pse, events):
nevents = pse.xpath('.//*/article')
for event in nevents:
e = {}
e['datetime'] = event.xpath('.//*/span[@class="tribe-event-date-start"]/text()')[0]
e['show_title'] = event.xpath('.//*/header/h2/a/@title')[0]
e['link'] = event.xpath('.//*/header/h2/a/@href')[0]
try:
e['subtitle'] = event.xpath('.//*/header/div[@class="eventSubHead"]/text()')[0]
except:
continue
try:
e['price'] = event.xpath('.//*/span[@class="tribe-events-c-small-cta__price"]/strong/text()')[0].replace("Tickets ", "")
except:
e['price'] = "See Link"
e['image'] = event.xpath('.//*/img/@data-src')[0]
e["date_time"] = datetime.strptime(e['datetime'], DATETIME_FORMAT)
e['scraper'] = scraper
e['calendar'] = scraper.calendar
events.append(e)
events = []
for cal in calendar_url:
br.get(cal)
sleep(3)
pse = html.fromstring(br.page_source)
get_listings(pse, events)
for event in events:
try:
new_event = Event.objects.update_or_create(
calendar = event['calendar'],
scraper = event['scraper'],
event_type = 'Mu',
show_title = event["show_title"],
show_link = event["link"],
show_date = event["date_time"],
show_day = event["date_time"],
guests = " ".join(event["subtitle"]),
venue = venue
)
except Exception as e:
print("oops ", e, "\n\n", "Scraper:", scraper)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,70 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="Magers & Quinn",
city="Minneapolis",
website="https://www.magersandquinn.com/events",
is_venue=False
)
scraper,item_count_start = digitools.getScraper(venue)
DATETIME_FORMAT = '%A, %B %d , %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
contents = ps.xpath('.//*/div[@class="day has-event"]')
for c in contents:
try:
event = {}
day = c.xpath('.//*/div[@class="dd"]/text()')[0]
month = c.xpath('.//*/div[@class="month"]/text()')[0]
year = c.xpath('.//*/div[@class="year"]/text()')[0]
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/h3/text()')[0]
event['date'] = [month, day, year, c.xpath('.//*/p[@class="time"]/text()')[0]]
event['date'] = " ".join(event['date'])
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT)
event['link'] = "https://www.magersandquinn.com" + c.xpath('.//a[@class="event in-store"]/@href')[0]
digitools.createBasicEvent(event, "Ed", venue)
scraper.items+=1
except Exception as e:
event['link'] = "https://www.magersandquinn.com" + c.xpath('.//a[@class="event off-site"]/@href')[0]
print(e)
ppr(event)
digitools.createBasicEvent(event, "Ed", venue)
print("\n\n+++\n\n")
links = digitools.createBasicURL("https://www.magersandquinn.com/events/")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
for link in links:
ps = digitools.getSource(br, link)
get_events(ps, "Ed")
sleep(3)
# ppr(events)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,80 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper, Event
import events.digitools as digitools
from selenium.webdriver.common.by import By
from lxml import html
venue, created = Organization.objects.get_or_create(
name="Uptown VFW",
city="Minneapolis",
website="https://noboolpresents.com/venues/uptown-vfw/",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a %B %d @ %I:%M %p %Y'
DATETIME_FORMAT_2 = '%b %d %I:%M%p %Y'
DATETIME_FORMAT_3 = '%b %d %Y'
# Set initial variables for City, etc
calendar_url = 'https://noboolpresents.com/venues/uptown-vfw/'
current_year = str(datetime.now().year)
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
br.get(calendar_url)
sleep(30)
def getEvents(br):
ps = html.fromstring(br.page_source)
events = ps.xpath('.//*/article')
for event in events:
deets = {}
dateTime = event.xpath('.//*/span[@class="tribe-event-date-start"]/text()')[0].replace("", "").strip() + " " + current_year
title = event.xpath('.//*/h2[@class="alt-font"]/a/text()')[0].replace("\n", "").replace("\t", "")
link = event.xpath('.//*/h2[@class="alt-font"]/a/@href')[0]
deets["tickets"] = event.xpath('.//*/span[@class="tribe-events-c-small-cta__price"]/strong/text()')[0]
try:
new_event = Event.objects.update_or_create(
calendar = scraper.calendar,
scraper = scraper,
event_type = 'Mu',
show_title = title,
show_link = link,
show_date = datetime.strptime(dateTime, DATETIME_FORMAT),
show_day = datetime.strptime(dateTime, DATETIME_FORMAT).date(),
more_details = deets["tickets"],
venue = venue
)
scraper.items+=1
except Exception as e:
print("oops", e)
getEvents(br)
br.find_element(By.XPATH, './/*/li[@class="tribe-events-c-nav__list-item tribe-events-c-nav__list-item--next"]/a').click()
sleep(5)
getEvents(br)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,106 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper, Event as DSEvent
import events.digitools as digitools
try:
venue, created = Organization.objects.get_or_create(
name="Parkway Theater",
city="Minneapolis",
website="https://theparkwaytheater.com",
is_venue = True
)
except Exception as e:
venue = Organization.objects.get(name="Parkway Theater")
scraper,item_count_start = digitools.getScraper(venue)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d, %Y %I:%M %p'
def get_events(ps, event_type):
contents = ps.xpath('.//*/div[@class="summary-content sqs-gallery-meta-container"]')
img_etc = ps.xpath('.//*/div[@class="summary-thumbnail-outer-container"]/a/div/img/@src')
ps.xpath('.//*/span[@class="event-time-12hr"]/text()')
for c,i in zip(contents,img_etc):
try:
event = {}
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/a[@class="summary-title-link"]/text()')[0]
event['link'] = "https://theparkwaytheater.com" + c.xpath('.//*/a[@class="summary-title-link"]/@href')[0]
event['date'] = c.xpath('.//div/div/time/text()')[0] + " " + c.xpath('.//*/span[@class="event-time-12hr"]/text()')[0].split("")[0].strip()
event['dateStamp'] = datetime.strptime(event['date'], DATETIME_FORMAT)
event['desc'] = c.xpath('.//*/p/text()')[0]
event['img_link'] = i
event['details'] = {
'description': event['desc'],
'img_link': event['img_link'],
}
try:
new_event = DSEvent.objects.update_or_create(
calendar = scraper.calendar,
scraper = scraper,
event_type = event_type,
show_title = event['title'],
show_link = event['link'],
show_date = datetime.strptime(event['date'], DATETIME_FORMAT),
show_day = datetime.strptime(event['date'], DATETIME_FORMAT),
more_details = event["details"],
venue = venue
)
scraper.items+=1
except Exception as e:
try:
event['date'] = c.xpath('.//div/div/time/text()')[0].split("")[0] + " " + c.xpath('.//*/span[@class="event-time-12hr"]/text()')[0].split("")[0].strip()
event['dateStamp'] = datetime.strptime(event['date'], DATETIME_FORMAT)
new_event = DSEvent.objects.update_or_create(
calendar = scraper.calendar,
scraper = scraper,
event_type = event_type,
show_title = event['title'],
show_link = event['link'],
show_date = datetime.strptime(event['date'], DATETIME_FORMAT),
show_day = datetime.strptime(event['date'], DATETIME_FORMAT),
more_details = event["details"],
venue = venue
)
scraper.items+=1
except Exception as e:
print(e)
print("\n\n+++\n\n")
except Exception as e:
continue
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
calendar_url = 'https://theparkwaytheater.com/live-events'
ps = digitools.getSource(br, calendar_url)
get_events(ps, "Mu")
calendar_url = "https://theparkwaytheater.com/movies"
ps = digitools.getSource(br, calendar_url)
get_events(ps, "Th")
# ppr(events)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,98 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="St Paul Chamber Orchestra",
city="St Paul",
website="https://thespco.org",
is_venue = False
)
scraper,item_count_start = digitools.getScraper(venue)
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%A, %B %d, %Y %I:%M %p'
def get_events(ps, event_type):
contents = ps.xpath('.//*/div[@class="event-title"]/a/@href')
for c in set(contents):
try:
link = 'https://content.thespco.org' + c
ps = digitools.getSource(br, link)
ntitle = ps.xpath('.//*/article/h1/text()')
subtitle = ps.xpath('.//*/article/h1/em/text()')
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
if len(subtitle) == 1:
if len(ntitle) == 2:
title = ntitle[0] + subtitle[0] + ntitle[1]
elif ntitle[0].startswith(" "):
title = subtitle[0] + ntitle[0]
else:
title = ntitle[0] + subtitle[0]
else:
title = ntitle[0]
events = ps.xpath('.//*/div[@class="day"]')
for e in events:
new_venue = e.xpath('.//*/strong[@class="venue"]/text()')[0].strip()
location = e.xpath('.//*/span[@class="location"]/text()')[0].strip()
if 'Minneapolis' in location:
location = 'Minneapolis'
elif 'St. Paul' in location:
location = 'St. Paul'
else:
location = location
venue, created = Organization.objects.get_or_create(
name=new_venue,
city=location,
is_venue = True
)
dateTime = e.xpath('.//*/h3[@class="date"]/text()')[0].replace("\n", "").replace("\t", "").strip()
event['dateStamp'] = datetime.strptime(dateTime, DATETIME_FORMAT)
event['venue'] = venue
event['location'] = location
event['title'] = "SPCO: " + title
event['link'] = link
event_type = "Mu"
digitools.createBasicEvent(event, event_type, venue)
scraper.items+=1
except Exception as e:
print("ERROR: ", e)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
# Get Event Page Link(s)
links = digitools.createURLNoZero("https://content.thespco.org/events/calendar/")
for link in links:
ps = digitools.getSource(br, link)
get_events(ps, "Mu")
sleep(3)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,71 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%Y-%m-%d %I:%M %p'
venue, created = Organization.objects.get_or_create(
name="White Squirrel",
city="St. Paul",
website="https://whitesquirrelbar.com",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
# Set initial variables for City, etc
calendar_url = [
'https://whitesquirrelbar.com/calendar/list/page/1/',
'https://whitesquirrelbar.com/calendar/list/page/2/',
'https://whitesquirrelbar.com/calendar/list/page/3/'
]
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
def get_listings(pse, events):
listings = pse.xpath('.//*/div[@class="tribe-common-g-row tribe-events-calendar-list__event-row"]')
for l in listings:
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
try:
event["image"] = l.xpath('.//*/img/@src')[0]
except:
event["image"] = "none"
event["date"] = l.xpath('.//time/@datetime')[0]
event["time"] = l.xpath('.//*/span[@class="tribe-event-date-start"]/text()')[0].split("@")[1]
event["title"] = l.xpath('.//*/h3/a/text()')[0].replace("\t", "").replace("\n", "")
event["link"] = l.xpath('.//*/h3/a/@href')[0]
event['datetime'] = event['date'] + " " + event['time']
event["dateStamp"] = datetime.strptime(event['datetime'] , DATETIME_FORMAT)
events.append(event)
digitools.createBasicEvent(event, "Mu", venue)
scraper.items+=1
events = []
for cal in calendar_url:
ps = digitools.getSource(br, cal)
get_listings(ps, events)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,74 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="Cedar Cultural Center",
city="Minneapolis",
website="https://www.thecedar.org",
is_venue=True
)
scraper,item_count_start = digitools.getScraper(venue)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%A, %B %d, %Y %I:%M %p'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
DATETIME_FORMAT_3 = '%A, %B %d at %I:%M%p %Y'
DATETIME_FORMAT_4 = '%A, %B %d at %I%p %Y'
DATETIME_FORMAT_5 = '%A, %B %d @%I%p %Y'
def get_events(ps):
links = ps.xpath('.//*/div[@class="summary-title"]/a/@href')
for l in links:
if "cedar-news-blog" in l:
continue
pse = digitools.getSource(br, "https://www.thecedar.org" + l)
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['link'] = "https://www.thecedar.org" + l
try:
time = pse.xpath('.//*/time[@class="event-time-localized-start"]/text()')[0]
date = pse.xpath('.//*/time[@class="event-date"]/text()')[0]
event['title'] = pse.xpath('.//*/h1[@class="eventitem-title"]/text()')[0]
except:
try:
time = pse.xpath('.//*/time[@class="event-time-localized"]/text()')[0]
date = pse.xpath('.//*/time[@class="event-date"]/text()')[0]
event['title'] = pse.xpath('.//*/h1[@class="eventitem-title"]/text()')[0]
except Exception as e:
print(e)
print("failed event: ", event)
dateStamp = date + " " + time
event['dateStamp'] = datetime.strptime(dateStamp, DATETIME_FORMAT)
digitools.createBasicEvent(event, "Mu", venue)
scraper.items+=1
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
calendar_url = 'https://www.thecedar.org/listing'
ps = digitools.getSource(br, calendar_url)
get_events(ps)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,105 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from selenium.webdriver.common.by import By
from lxml import html
from events.models import Organization, Scraper, Event
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="Club 331",
city="Minneapolis",
website="https://331club.com",
is_venue=True,
)
scraper,item_count_start = digitools.getScraper(venue)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %I%p %Y'
DATETIME_FORMAT_2 = '%b %d %I:%M%p %Y'
DATETIME_FORMAT_3 = '%b %d %Y'
# Set initial variables for City, etc
calendar_url = 'https://331club.com/#calendar'
current_year = str(datetime.now().year)
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
br.get(calendar_url)
sleep(3)
br.find_element(By.CLASS_NAME, 'more_events').click()
sleep(2)
ps = html.fromstring(br.page_source)
sleep(3)
dates = ps.xpath('.//*/div[@class="event"]')
dates = dates + ps.xpath('.//*/div[@class="event hidden"]')
def process_times(times):
# print("Times: ", times)
time = []
for t in times:
t = t.replace("\n", "").replace("TBA", "")
if len(t) > 0 and t.endswith("pm"):
if "-" in t:
t = t.split("-")[0] + "pm"
time.append(t)
return time
events = []
for d in dates:
event_date = d.xpath('.//div[@class="event-date"]/span/text()')[:2]
cols = d.xpath('.//div[@class="column"]')
for c in cols:
bands = c.xpath('.//p/a/text()')
links = c.xpath('.//p/a/@href')
time = process_times(c.xpath('.//p/text()'))
event = {}
event["datetime"] = event_date + time + [current_year]
try:
event["date_time"] = datetime.strptime(" ".join(event["datetime"]), DATETIME_FORMAT)
except:
try:
event["date_time"] = datetime.strptime(" ".join(event["datetime"]), DATETIME_FORMAT_2)
except:
try:
event["date_time"] = datetime.strptime(" ".join(event["datetime"]), DATETIME_FORMAT_3)
except:
event["date_time"] = "Invalid"
event["bands"] = (", ").join(bands)
if len(bands) > 0:
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = event["bands"]
event['date'] = event["date_time"]
event['dateStamp'] = event["date_time"]
event['link'] = "https://331club.com/#calendar"
try:
digitools.createBasicEvent(event, "Mu", venue)
except Exception as e:
print('oops', e)
events.append(event)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,64 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
from events.models import Event as DSEvent, Organization
from digitools import getBrowser, createDashURL, createBasicEvent, getSource
venue, created = Organization.objects.get_or_create(
name="Comedy Corner",
city="Minneapolis",
website="https://comedycornerunderground.com/calendar",
)
calendar_url = "https://comedycornerunderground.com/calendar"
DATETIME_FORMAT = '%m %d %I%p %Y'
def get_events(ps, link):
contents = ps.xpath('.//*/td')
for c in contents:
try:
day_num = c.xpath('.//*/div[@class="marker-daynum"]/text()')[0]
events = c.xpath('.//*/li')
# print(events)
for e in events:
event = {}
print(link)
month = link.split("month=")[1].split("-")[0]
year = link.split("month=")[1].split("-")[1]
event['title'] = e.xpath('.//*/span[@class="item-title"]/text()')[0]
event['time'] = e.xpath('.//*/span[@class="item-time item-time--12hr"]/text()')[0].replace("\xa0", "")
event['link'] = "https://comedycornerunderground.com" + e.xpath('.//a/@href')[0]
event['date'] = str(day_num) + ' ' + event['time'] + 'm'
dateStamp = month + ' ' + event['date'] + ' ' + year
event['dateStamp'] = datetime.strptime(dateStamp, DATETIME_FORMAT)
createBasicEvent(event, 'Co')
print('\n\n++\n\n')
except Exception as e:
continue
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
links = createDashURL("https://comedycornerunderground.com/calendar?view=calendar&month=")
for link in links:
ps = getSource(br, link)
get_events(ps, link)
sleep(5)
# ppr(events)
br.close()

View File

@@ -1,74 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
venue, created = Organization.objects.get_or_create(
name="Cabooze",
city="Minneapolis",
website="https://www.cabooze.com/#/events",
is_venue=True
)
scraper,item_count_start = digitools.getScraper(venue)
event_type = ""
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b %d %I:%M %p %Y'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
def get_events(ps, event_type):
print("Getting events ...")
contents = ps.xpath('.//*/div[@class="vp-event-row vp-widget-reset vp-venue-thecabooze"]')
ppr(contents)
for c in contents:
try:
event = {}
date = c.xpath('.//*/span[@class="vp-month-n-day"]/text()')[0]
print(date)
month = date.split(" ")[0]
time = c.xpath('.//*/span[@class="vp-time"]/text()')[0]
year = datetime.now().year
if month == "Jan":
year = int(year) + 1
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/div[@class="vp-event-name"]/text()')[0]
event['date'] = [date, time, str(year)]
event['date'] = " ".join(event['date'])
event['dateStamp'] = datetime.strptime(event['date'], DATETIME_FORMAT)
event['link'] = "https://www.cabooze.com/" + c.xpath('.//a[@class="vp-event-link"]/@href')[0]
print("Event Dict Created")
ppr(event)
digitools.createBasicEvent(event, event_type, venue)
scraper.items+=1
except Exception as e:
print(e)
ppr(event)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
ps = digitools.getSource(br, venue.website)
get_events(ps, "Mu")
sleep(3)
digitools.updateScraper(scraper, item_count_start)
br.close()

View File

@@ -1,82 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
count = 0
venue, created = Organization.objects.get_or_create(
name="Dakota",
city="Minneapolis",
website="https://www.dakotacooks.com/events/",
is_venue=True
)
scraper,item_count_start = digitools.getScraper(venue)
event_type = ""
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a %b %d, %Y • %I:%M%p'
DATETIME_FORMAT_2 = '%a %b %d, %Y • %I%p'
def get_events(ps, event_type):
links = ps.xpath('.//*/div[@class="wicked-event-title tooltipstered"]/a/@href')
links = set(links)
for l in links:
pse = getSource(br, l)
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['link'] = l
try:
event['time'] = pse.xpath('.//*/span[@class="text-uppercase"]/text()')[0].strip()
event['dateStamp'] = datetime.strptime(event['time'], DATETIME_FORMAT)
event['title'] = pse.xpath('.//*/div[@class="sidebar-group"]/h1/text()')[0]
# event['detail-headers'] = pse.xpath('.//*/ul[@class="eo-event-meta"]/li/strong/text()')
# event['details'] = pse.xpath('.//*/ul[@class="eo-event-meta"]/li/text()')
except:
try:
event['title'] = pse.xpath('.//*/div[@class="sidebar-group"]/h1/text()')[0]
event['dateStamp'] = datetime.strptime(event['time'], DATETIME_FORMAT_2)
event['time'] = pse.xpath('.//*/span[@class="text-uppercase"]/text()')[0]
except Exception as e:
print(e)
print("failed event: ", event)
ppr(event)
try:
digitools.createBasicEvent(event, "Mu", venue)
scraper.items+=1
except Exception as e:
print(e)
print('failed to create: ', event)
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
ps = digitools.getSource(br, venue.website + '?wicked_month=04&wicked_year=2025&wicked_view=month')
get_events(ps, "Mu")
sleep(1)
digitools.updateScraper(scraper, item_count_start)
br.close()

View File

@@ -1,78 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
count = 0
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a, %b %d %Y %I:%M %p SHOW'
DATETIME_FORMAT_2 = '%a, %b %d %Y %I:%M %p SHOW'
venue, created = Organization.objects.get_or_create(
name="Icehouse",
city="Minneapolis",
website = "https://icehouse.turntabletickets.com",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
def get_events(ps, event_type):
contents = ps.xpath('.//*/div[@class="performances whitespace-pre-line w-full md:w-3/4"]')
for c in contents:
try:
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['title'] = c.xpath('.//*/h3[@class="text-3xl font-semibold font-heading mr-auto"]/text()')[0]
event['link'] = venue.website + c.xpath('.//*/a[@class="show-link"]/@href')[0]
event['date'] = c.xpath('.//*/h4[@class="day-of-week"]/text()')[0]
year = datetime.now().year
if "Brunch" in event['title']:
event['time'] = "11:00 AM SHOW"
else:
event['time'] = c.xpath('.//*/div[@class="performance-btn"]/button/text()')[0]
event['datetime'] = event['date'] + " " + str(year) + " " + event['time']
try:
event['dateStamp'] =datetime.strptime(event['datetime'], DATETIME_FORMAT)
except:
event['datetime'] = event['date'] + " " + str(year) + " " + "07:00 PM SHOW"
event['dateStamp'] =datetime.strptime(event['datetime'], DATETIME_FORMAT)
event['title'] = event['title'] + " (Time Estimated)"
try:
digitools.createBasicEvent(event, event_type, venue)
scraper.items+=1
except Exception as e:
print(e)
quit()
except Exception as e:
ppr(event)
print(e)
quit()
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
ps = digitools.getSource(br, venue.website)
get_events(ps, "Mu")
# ppr(events)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,86 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from events.models import Organization, Scraper
import events.digitools as digitools
current_year = str(datetime.now().year)
venue, created = Organization.objects.get_or_create(
name="Piller Forum",
city="Minneapolis",
website="https://www.pilllar.com/pages/events",
is_venue = True
)
scraper,item_count_start = digitools.getScraper(venue)
event_type = "Mu"
# Time Signatures
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%b. %d %Y %I:%M %p'
DATETIME_FORMAT_night = '%b. %d %Y %I:%M %p'
DATETIME_FORMAT_2 = '%b. %d %Y %I:%Mam'
def get_events(ps, event_type):
contents = ps.xpath('.//*/div[@class="sse-column sse-half sse-center"]')
for c in contents:
try:
event = {}
event['scraper'] = scraper
event['calendar'] = scraper.calendar
event['link'] = venue.website
# time = c.xpath('.//*/span[@class="vp-time"]/text()')[0].strip()
date = c.xpath('.//h1[@class="sse-size-64"]/text()')[0]
if len(date) > 1:
print(date)
year = datetime.now().year
event_date = date + " " + str(year)
event['title'] = c.xpath('.//p/span/b/text()')[0]
details = c.xpath('.//p/text()')
if 'Music' in details[-1]:
event_time = c.xpath('.//p/text()')[-1].split("Music")[1].strip()
event_type = "Mu"
event_dt = event_date + " " + event_time + " PM"
event['dateStamp'] = datetime.strptime(event_dt, DATETIME_FORMAT_night)
elif len(details) == 1:
try:
event_time = details[0].split("-")[0].strip()
event_dt = event_date + " " + event_time + ' PM'
event['dateStamp'] = datetime.strptime(event_dt, DATETIME_FORMAT_night)
event_type = "Ot"
except Exception as e:
event_time = details[0].split("-")[0].strip()
event_dt = event_date + " " + event_time
event['dateStamp'] = datetime.strptime(event_dt, DATETIME_FORMAT_2)
event_type = "Ot"
digitools.createBasicEvent(event, event_type, venue)
except Exception as e:
print(e)
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = digitools.getBrowser(arg1)
else:
print("No run_env")
quit()
ps = digitools.getSource(br, venue.website)
get_events(ps, event_type)
sleep(3)
br.close()
digitools.updateScraper(scraper, item_count_start)

View File

@@ -1,30 +0,0 @@
import re, os, sys
from datetime import datetime, timedelta
from django.db.models import Count
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event, Organization
new_time = datetime.now() - timedelta(days=1)
right_bound_time = datetime.now() + timedelta(days=45)
events = Event.objects.filter(show_date__lte=new_time)
events1 = Event.objects.filter(show_date__gte=right_bound_time)
for e in events:
e.delete()
for e in events1:
e.delete()
org_sin_events = Organization.objects.annotate(num_events = Count('event')).filter(num_events__lt=1).filter(is_501c=False)
for org in org_sin_events:
print(org)
org.delete()
print("completed and cleaned scrapes")

View File

@@ -1,16 +0,0 @@
#!/bin/bash
BASEDIR=/home/canin/Downloads/DigiSnaxxEvents
DJANGODIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events
EVENTDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers
GOVTDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers/Working/govt
cd $GOVTDIR
for file in *
do
python "$file" $1
echo "SCRIPT COMPLETE"
done
cd $EVENTDIR
python clean_up.py

View File

@@ -1,16 +0,0 @@
#!/bin/bash
BASEDIR=/home/canin/Downloads/DigiSnaxxEvents
DJANGODIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events
EVENTDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers
ICALDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers/Working/iCal
cd $ICALDIR
for file in *
do
python "$file"
echo "SCRIPT COMPLETE"
done
cd $EVENTDIR
python clean_up.py

View File

@@ -1,21 +0,0 @@
#!/bin/bash
# BASEDIR=/var/www/digisnaxx.com/
# DJANGODIR=/var/www/digisnaxx.com/ds_events
# EVENTDIR=/var/www/digisnaxx.com/ds_events/event_scrapers
ENVDIR=/home/canin/Downloads/DigiSnaxxEvents
DJANGODIR=/home/canin/Documents/repos/digisnaxx/ds_events
WORKMEDIADIR=/home/canin/Documents/repos/digisnaxx/ds_events/event_scrapers/Working/smedia
cd $ENVDIR
pwd
source venv/bin/activate
cd $WORKMEDIADIR
python bluesky.py
python bluesky_media.py
python redsky.py
deactivate

View File

@@ -1,16 +0,0 @@
#!/bin/bash
BASEDIR=/home/canin/Downloads/DigiSnaxxEvents
DJANGODIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events
EVENTDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers
NEWSDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers/Working/news
cd $NEWSDIR
for file in *
do
python "$file" $1
echo "SCRIPT COMPLETE"
done
cd $EVENTDIR
python clean_up.py

View File

@@ -1,50 +0,0 @@
#!/bin/bash
# BASEDIR=/var/www/digisnaxx.com/
# DJANGODIR=/var/www/digisnaxx.com/ds_events
# EVENTDIR=/var/www/digisnaxx.com/ds_events/event_scrapers
BASEDIR=/home/canin/Downloads/DigiSnaxxEvents
DJANGODIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events
EVENTDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers
VENUESDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers/Working/venues
ICALDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers/Working/iCal
GOVTDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers/Working/govt
export DJANGO_SUPERUSER_EMAIL=canin@dreamfreely.org
export DJANGO_SUPERUSER_USERNAME=canin
export DJANGO_SUPERUSER_PASSWORD='hello123'
cd $BASEDIR
pwd
source venv/bin/activate
cd $DJANGODIR
pwd
mv db.sqlite3 db.sqlite3.bak
# rm ../db.sqlite3
touch db.sqlite3
python manage.py migrate
python manage.py createsuperuser --noinput
python manage.py loaddata events/fixtures/organizations.json
python manage.py loaddata events/fixtures/promo.json
cd $EVENTDIR
python start_up.py
bash run_venues.sh $1
bash run_ical.sh
bash run_govt.sh $1
bash run_news.sh $1
python Working/bluesky.py
python Working/redsky.py
cd $EVENTDIR
python clean_up.py
deactivate
bash run_media_update.sh
rm -rf ../*/__pycache__
rm -rf ../*/*/__pycache__

View File

@@ -1,16 +0,0 @@
#!/bin/bash
BASEDIR=/home/canin/Downloads/DigiSnaxxEvents
DJANGODIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events
EVENTDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers
VENUESDIR=/home/canin/Downloads/DigiSnaxxEvents/ds_events/event_scrapers/Working/venues
cd $VENUESDIR
for file in *
do
python "$file" $1
echo "SCRIPT COMPLETE"
done
cd $EVENTDIR
python clean_up.py

View File

@@ -1,23 +0,0 @@
import re, os, sys
from datetime import datetime, timedelta
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Organization, Promo, Calendar
venue, created = Organization.objects.get_or_create(name="DreamFreely",
website="https://www.dreamfreely.org",
city="St Paul",
contact_name="Canin Carlos",
contact_email="canin@dreamfreely.org",
phone_number="6124054535")
print("Created DreamFreely:", created, venue)
calendar, created = Calendar.objects.get_or_create(name='Mpls-StP', shortcode='msp', desc='none')
calendar, created = Calendar.objects.get_or_create(name='Medellin', shortcode='mde', desc='none')
calendar, created = Calendar.objects.get_or_create(name='Global', shortcode='000', desc='none')
calendar, created = Calendar.objects.get_or_create(name='Online', shortcode='111', desc='none')

View File

@@ -1,30 +0,0 @@
for sE in senateEvents[:5]:
bills = sE.xpath('.//*/div[@class="mb-1"]/a/text()')
bill_link = sE.xpath('.//*/div[@class="mb-1"]/a/@href')
bill_items = zip(bills, bill_link)
print(bills)
for b,i in bill_items:
if b.startswith("S.F."):
print(b, i, "\n\n")
import os
from twilio.rest import Client
# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ['ACb416a0b2ed0a1be44c107b8bc1f683c5']
auth_token = os.environ['33cae777f215a003deea6d4a0d5027c2']
client = Client(account_sid, auth_token)
message = client.messages \
.create(
body="Join Earth's mightiest heroes. Like Kevin Bacon.",
from_='+15017122661',
to='+15558675310'
)
print(message.sid)

View File

@@ -1,63 +0,0 @@
import re, os, sys
from datetime import datetime
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event, Organization
from pprint import pprint as ppr
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from selenium.webdriver.common.by import By
from xvfbwrapper import Xvfb
from lxml import html
import pytz
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a, %b %d %Y'
calendar_url = "https://www.facebook.com/mortimersmpls/events/"
current_year = str(datetime.now().year)
# Initiate and start the Browser
br = wd.Firefox()
br.get(calendar_url)
sleep(10)
br.find_element(By.XPATH, '//*/div[@class="x1i10hfl xjbqb8w x6umtig x1b1mbwd xaqea5y xav7gou x1ypdohk xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1o1ewxj x3x9cwd x1e5q0jg x13rtm0m x87ps6o x1lku1pv x1a2a7pz x9f619 x3nfvp2 xdt5ytf xl56j7k x1n2onr6 xh8yej3"]').click()
print("Input Login Info")
sleep(30)
ps = html.fromstring(br.page_source)
listings = ps.xpath('.//*/div[@class="x9f619 x1n2onr6 x1ja2u2z x78zum5 x2lah0s x1qughib x6s0dn4 xozqiw3 x1q0g3np x1pi30zi x1swvt13 xsag5q8 xz9dl7a x1n0m28w xp7jhwk x1wsgfga x9otpla"]')
for l in listings:
gT = l.xpath('.//*/span/text()')
dateTime = gT[0]
show_title = gT[1]
link = l.xpath('.//*/a/@href')[0].split("?")[0] + " " + current_year
print(show_title, dateTime, link)
venue, created = Organization.objects.get_or_create(name="Mortimer's")
try:
new_event = Event.objects.update_or_create(
event_type = 'Mu',
show_title = show_title,
show_link = link,
show_date = datetime.strptime(dateTime.split(" AT")[0].strip(), DATETIME_FORMAT),
venue = venue
)
except Exception as e:
print(e, "\n\n++++\n\n")
continue
br.close()

View File

@@ -1,69 +0,0 @@
import re, os, sys
from datetime import datetime
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event, Organization
from pprint import pprint as ppr
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from xvfbwrapper import Xvfb
import requests
from lxml import html
import pytz
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a, %b %d %Y'
# Set initial variables for City, etc
calendar_url = "https://www.facebook.com/mortimersmpls/events/"
current_year = str(datetime.now().year)
# Initiate and start the Browser
br = wd.Firefox()
br.get(calendar_url)
sleep(10)
br.find_element(By.XPATH, '//*/div[@class="x1i10hfl xjbqb8w x6umtig x1b1mbwd xaqea5y xav7gou x1ypdohk xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1o1ewxj x3x9cwd x1e5q0jg x13rtm0m x87ps6o x1lku1pv x1a2a7pz x9f619 x3nfvp2 xdt5ytf xl56j7k x1n2onr6 xh8yej3"]').click()
print("Input Login Info")
sleep(30)
ps = html.fromstring(br.page_source)
listings = ps.xpath('.//*/div[@class="x9f619 x1n2onr6 x1ja2u2z x78zum5 x2lah0s x1qughib x6s0dn4 xozqiw3 x1q0g3np x1pi30zi x1swvt13 xsag5q8 xz9dl7a x1n0m28w xp7jhwk x1wsgfga x9otpla"]')
for l in listings:
gT = l.xpath('.//*/span/text()')
dateTime = gT[0]
show_title = gT[1]
link = l.xpath('.//*/a/@href')[0].split("?")[0] + " " + current_year
print(show_title, dateTime, link)
venue, created = Organization.objects.get_or_create(name="Mortimer's")
try:
new_event = Event.objects.update_or_create(
event_type = 'Mu',
show_title = show_title,
show_link = link,
show_date = datetime.strptime(dateTime.split(" AT")[0].strip(), DATETIME_FORMAT),
venue = venue
)
except Exception as e:
print(e, "\n\n++++\n\n")
continue
br.close()

View File

@@ -1,85 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from selenium.webdriver.common.by import By
from xvfbwrapper import Xvfb
from lxml import html
import pytz
from events.models import Event as DSEvent, Organization
from digitools import getBrowser, createURL, createBasicEvent, getSource
exit()
current_year = str(datetime.now().year)
venue, created = Organization.objects.get_or_create(
name="Piller Forum",
city="Minneapolis",
website="https://www.pilllar.com/pages/events",
)
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%B %d %I:%M%p %Y'
DATETIME_FORMAT = '%B %A %d %I:%M-%I:%M%p'
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
br.get(venue.website)
else:
print("No run_env")
quit()
try:
br.find_element(By.XPATH, '//*[@class="privy-dismiss-content"]').click()
except Exception as e:
print(e)
pass
months = br.find_elements(By.XPATH, '//*[@class="sse-display"]')
for month in months:
month_name = month.find_element(By.XPATH, './/*[@class="sse-size-28"]/u').text.capitalize()
events = month.find_elements(By.XPATH, './/p')
for event in events:
e = {}
eventTitle = event.text
try:
e['title'] = " ".join(eventTitle.split("-")[1].split(" ")[1:-2])
if 'Music' in eventTitle:
e['event_type'] = "Mu"
elif 'The Growth Arc' in eventTitle:
e['event_type'] = "Ot"
e['dateTime'] = " ".join([month_name, date, "7:00pm", current_year])
e['dateStamp'] = datetime.strptime(e['dateTime'], DATETIME_FORMAT)
e['title'] = "The Growth Arc - Relationship Support Space"
e['link'] = venue.website
elif 'Event' in eventTitle:
e['event_type'] = "Mu"
else:
e['event_type'] = "Ot"
date = eventTitle.split(":")[0].split(" ")[1].replace("th", "").replace("nd", "").replace("rd", "").replace("st", "")
time = eventTitle.split("-")[1].split(" ")[-2:][0]
e['dateTime'] = " ".join([month_name, date, time, current_year])
e['dateStamp'] = datetime.strptime(e['dateTime'], DATETIME_FORMAT)
e['link'] = venue.website
createBasicEvent(e, venue)
except Exception as e:
print("error ", eventTitle)
print(e)
sleep(3)
# ppr(events)
br.close()

View File

@@ -1,61 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
from atproto import Client
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
import pytz
from socials.models import SocialLink
# from digitools import getBrowser, createURL, createBasicEvent, getSource
tz = pytz.timezone("US/Central")
USERNAME = "dreamfreely.org"
PASSWORD = "Futbol21!@"
client = Client()
client.login(USERNAME, PASSWORD)
feed = client.get_author_feed(USERNAME, limit = 100)
def createSocialLink(post):
new_post, created = SocialLink.objects.update_or_create(
cid = post['link_id'],
uri = post['uri'],
text = post['text'],
link = post['link'],
handle = post['handle'],
likes = post['likes'],
reposts = post['reposts'],
quotes = post['quotes'],
replies = post['replies'],
created_at = post['created_at']
)
print(created, new_post)
for post in feed.feed:
post = post.post
if hasattr(post.record.embed, 'external'):
p = {}
p['link'] = post.record.embed.external.uri.split("?")[0]
p['text'] = " ".join(post.record.text.split("\n")[:2])
p['handle'] = post.author.handle
p['link_id'] = post.uri.split("feed.post/")[-1]
p['uri'] = post.uri
p['likes'] = post.like_count
p['quotes'] = post.quote_count
p['replies'] = post.reply_count
p['reposts'] = post.repost_count
p['created_at'] = post.record.created_at
try:
createSocialLink(p)
except Exception as e:
print(e)

View File

@@ -1,82 +0,0 @@
import os, sys
from datetime import datetime
from dateutil import relativedelta
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from time import sleep
from pprint import pprint as ppr
from events.models import Event as DSEvent, Organization
from digitools import getBrowser, createURL, createBasicEvent, getSource
current_year = str(datetime.now().year)
venue, created = Organization.objects.get_or_create(
name="Birchbark Books",
city="Minneapolis",
website="https://birchbarkbooks.com/pages/events",
)
DATETIME_FORMAT = '%A, %B %d @ %I:%M%p %Y'
DATETIME_FORMAT_2 = '%A, %B %d @ %I%p %Y'
DATETIME_FORMAT_3 = '%A, %B %d at %I:%M%p %Y'
DATETIME_FORMAT_4 = '%A, %B %d at %I%p %Y'
DATETIME_FORMAT_5 = '%A, %B %d @%I%p %Y'
def get_events(ps):
contents = ps.xpath('.//*/div[@class="feature-row"]')
# ppr("contents:", contents)
for c in contents:
try:
event = {}
event['title'] = c.xpath('.//*/p[@class="h3"]/text()')[0].strip()
event['link'] = "https://birchbarkbooks.com/pages/events"
event['date'] = c.xpath('.//*/p[@class="accent-subtitle"]/text()')[0].replace("Central", "") + " " + current_year
event['date_num'] = event['date'].split(" ")[2].replace("th", "").replace("st", "").replace("rd", "").replace("nd", "")
event['date'] = event['date'].split(" ")
event['date'][2] = event['date_num']
event['date'] = " ".join(event['date'])
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT)
createBasicEvent(event, "Ed", venue)
except Exception as e:
try:
print(e)
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT_2)
createBasicEvent(event, "Ed", venue)
print("\n\n+++\n\n")
except Exception as e:
try:
print(e)
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT_3)
createBasicEvent(event, "Ed", venue)
print("\n\n+++\n\n")
except Exception as e:
try:
print(e)
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT_4)
createBasicEvent(event, "Ed", venue)
print("\n\n+++\n\n")
except Exception as e:
print(e)
event['dateStamp'] =datetime.strptime(event['date'], DATETIME_FORMAT_5)
createBasicEvent(event, "Ed", venue)
print("\n\n+++\n\n")
if len(sys.argv) >= 2:
arg1 = sys.argv[1]
br = getBrowser(arg1)
else:
print("No run_env")
quit()
calendar_url = 'https://birchbarkbooks.com/pages/events'
ps = getSource(br, calendar_url)
get_events(ps)
# ppr(events)
br.close()

View File

@@ -1,30 +0,0 @@
for sE in senateEvents[:5]:
bills = sE.xpath('.//*/div[@class="mb-1"]/a/text()')
bill_link = sE.xpath('.//*/div[@class="mb-1"]/a/@href')
bill_items = zip(bills, bill_link)
print(bills)
for b,i in bill_items:
if b.startswith("S.F."):
print(b, i, "\n\n")
import os
from twilio.rest import Client
# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ['ACb416a0b2ed0a1be44c107b8bc1f683c5']
auth_token = os.environ['33cae777f215a003deea6d4a0d5027c2']
client = Client(account_sid, auth_token)
message = client.messages \
.create(
body="Join Earth's mightiest heroes. Like Kevin Bacon.",
from_='+15017122661',
to='+15558675310'
)
print(message.sid)

View File

@@ -1,63 +0,0 @@
import re, os, sys
from datetime import datetime
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event, Organization
from pprint import pprint as ppr
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from selenium.webdriver.common.by import By
from xvfbwrapper import Xvfb
from lxml import html
import pytz
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a, %b %d %Y'
calendar_url = "https://www.facebook.com/mortimersmpls/events/"
current_year = str(datetime.now().year)
# Initiate and start the Browser
br = wd.Firefox()
br.get(calendar_url)
sleep(10)
br.find_element(By.XPATH, '//*/div[@class="x1i10hfl xjbqb8w x6umtig x1b1mbwd xaqea5y xav7gou x1ypdohk xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1o1ewxj x3x9cwd x1e5q0jg x13rtm0m x87ps6o x1lku1pv x1a2a7pz x9f619 x3nfvp2 xdt5ytf xl56j7k x1n2onr6 xh8yej3"]').click()
print("Input Login Info")
sleep(30)
ps = html.fromstring(br.page_source)
listings = ps.xpath('.//*/div[@class="x9f619 x1n2onr6 x1ja2u2z x78zum5 x2lah0s x1qughib x6s0dn4 xozqiw3 x1q0g3np x1pi30zi x1swvt13 xsag5q8 xz9dl7a x1n0m28w xp7jhwk x1wsgfga x9otpla"]')
for l in listings:
gT = l.xpath('.//*/span/text()')
dateTime = gT[0]
show_title = gT[1]
link = l.xpath('.//*/a/@href')[0].split("?")[0] + " " + current_year
print(show_title, dateTime, link)
venue, created = Organization.objects.get_or_create(name="Mortimer's")
try:
new_event = Event.objects.update_or_create(
event_type = 'Mu',
show_title = show_title,
show_link = link,
show_date = datetime.strptime(dateTime.split(" AT")[0].strip(), DATETIME_FORMAT),
venue = venue
)
except Exception as e:
print(e, "\n\n++++\n\n")
continue
br.close()

View File

@@ -1,69 +0,0 @@
import re, os, sys
from datetime import datetime
import django
sys.path.append('../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'ds_events.settings'
django.setup()
from events.models import Event, Organization
from pprint import pprint as ppr
from time import sleep
from pprint import pprint as ppr
from selenium import webdriver as wd
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from xvfbwrapper import Xvfb
import requests
from lxml import html
import pytz
tz = pytz.timezone("US/Central")
DATETIME_FORMAT = '%a, %b %d %Y'
# Set initial variables for City, etc
calendar_url = "https://www.facebook.com/mortimersmpls/events/"
current_year = str(datetime.now().year)
# Initiate and start the Browser
br = wd.Firefox()
br.get(calendar_url)
sleep(10)
br.find_element(By.XPATH, '//*/div[@class="x1i10hfl xjbqb8w x6umtig x1b1mbwd xaqea5y xav7gou x1ypdohk xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1o1ewxj x3x9cwd x1e5q0jg x13rtm0m x87ps6o x1lku1pv x1a2a7pz x9f619 x3nfvp2 xdt5ytf xl56j7k x1n2onr6 xh8yej3"]').click()
print("Input Login Info")
sleep(30)
ps = html.fromstring(br.page_source)
listings = ps.xpath('.//*/div[@class="x9f619 x1n2onr6 x1ja2u2z x78zum5 x2lah0s x1qughib x6s0dn4 xozqiw3 x1q0g3np x1pi30zi x1swvt13 xsag5q8 xz9dl7a x1n0m28w xp7jhwk x1wsgfga x9otpla"]')
for l in listings:
gT = l.xpath('.//*/span/text()')
dateTime = gT[0]
show_title = gT[1]
link = l.xpath('.//*/a/@href')[0].split("?")[0] + " " + current_year
print(show_title, dateTime, link)
venue, created = Organization.objects.get_or_create(name="Mortimer's")
try:
new_event = Event.objects.update_or_create(
event_type = 'Mu',
show_title = show_title,
show_link = link,
show_date = datetime.strptime(dateTime.split(" AT")[0].strip(), DATETIME_FORMAT),
venue = venue
)
except Exception as e:
print(e, "\n\n++++\n\n")
continue
br.close()

Some files were not shown because too many files have changed in this diff Show More