Editorial Workflows

get_DailyArt_url

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: Get a oil painting website("https://www.getdailyart.com")'s information for reference.

The very first step is copy the painting information page address(which you can get it from the DailyArt app share button, eg. "https://www.getdailyart.com/22464/cecilio-pia-y-gallardo/yachtwoman"), then run the workflow script, and you would get txt file with the page information in your Editorial Document.

Shared by: kerolivia

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
# coding: utf-8
import workflow
import urllib2
from bs4 import BeautifulSoup
import clipboard

def get_dailyart(url):
	que = urllib2.Request(url)
	content = urllib2.urlopen(que)
	soup = BeautifulSoup(content, "html5lib")
	title = soup.select('[class="share_title_name"]')
	ti = []
	for t in title:
		ti.append(t.get_text())
		title = ti
		d = []
	details = soup.find_all('span')
	for detail in details:
		d.append(detail.get_text())
		detail = d
	sharetext = soup.select('[class="share_text"]')
	def pain(text):
		for s in sharetext:
			return (s.get_text())
	sharetext = pain(sharetext).strip()
	word1 = ('Title: ' + title[0])
	word2 = ('Author: ' + detail[0] + '\n' + 'Date: ' + detail[1] + '\n' + 'Place: ' + detail[2])
	word3 = (sharetext)
	output=(word1 + '\n' + '\n'+word2 + '\n' + '\n'+word3+'\n'+'\n'+url)
	return output
	
clipboard.set(get_dailyart(clipboard.get()))
Generate Text ?
Text
Clipboard
Set Variable ?
Variable Name
detail
Value
Input
Filter Lines ?
Output Lines That
  • Contain
  • Don't Contain
  • Match Regular Expression:
Title
Output Format
  • Only Lines
  • Lines and Ranges
Find / Replace ?
Find
Title:
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Create Document ?
Filename
Input.txt
Content
detail
Open in Editor
ON