All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login

All New Login

All gists matching topic cron

Recently created
Least recently created
Recently updated
Least recently updated

tre / rsstofedi.py

0 likes
0 forks
1 files
Last active 2 weeks ago
cron
1 import feedparser,re,time,requests
2 from mastodon import Mastodon
3
4 posts = []
5
6 with open(LOGFILE,"r") as log:
7 last = log.read()
8 rss = feedparser.parse(RSS)
9 guids = []
10 for entry in rss.entries:

tre / xmltohtml.py

0 likes
0 forks
1 files
Last active 2 weeks ago
cron
1 from saxonche import *
2
3 def makehtml(infile,thexsl,outfile):
4 with PySaxonProcessor(license=False) as proc:
5 xsltproc = proc.new_xslt30_processor()
6 with open(infile,"r") as thefile:
7 document = proc.parse_xml(xml_text=thefile.read())
8 theexecutable = xsltproc.compile_stylesheet(stylesheet_file=thexsl)
9 theoutput = theexecutable.transform_to_string(xdm_node=document)
10 with open(outfile,"w") as thehtml:
Newer Older

Powered by Opengist ⋅ Load: 40ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文