Skip to content

Instantly share code, notes, and snippets.

Open Source Learning beyondliu

Block or report user

Report or block beyondliu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View add_snippet.py
# coding: utf-8
import os
import urllib
import requests
import appex
import console
import keychain
import photos
View bookmarklet_of_adding_notebook_scrap
javascript:(function(){var a=window,b=document,c=encodeURIComponent;var txt = '';if (window.getSelection){txt=window.getSelection();}else if (document.getSelection){txt=document.getSelection();}else if (document.selection){txt=document.selection.createRange().text;}d=a.open('http://3exps.org/user/scrapbook/scraps/addScrap/?url='+c(b.location)+'&title='+c(b.title)+'&desc='+c(txt),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=500px,width=600px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();
View bookmarklet_of_adding_notebook_bookmark
javascript:(function(){var a=window,b=document,c=encodeURIComponent;var txt = '';if (window.getSelection){txt=window.getSelection();}else if (document.getSelection){txt=document.getSelection();}else if (document.selection){txt=document.selection.createRange().text;}d=a.open('http://3exps.org/user/scrapbook/scraps/addScrap/?url='+c(b.location)+'&title='+c(b.title)+'&desc='+c(txt),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=500px,width=600px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();
View add_scrap.py
import appex
import webbrowser
import urllib
from bs4 import BeautifulSoup
def main():
if not appex.is_running_extension():
print('Running in Pythonista app, using test data...\n')
url = 'http://example.com'
else:
View add_bookmark.py
import appex
import webbrowser
import console
import urllib
from bs4 import BeautifulSoup
def main():
if not appex.is_running_extension():
print('Running in Pythonista app, using test data...\n')
url = 'http://example.com'
You can’t perform that action at this time.