├── Downer ├── downer │ ├── __init__.py │ ├── Constants.py │ └── labels.py ├── alp │ ├── core_dependencies │ │ └── __init__.py │ └── __init__.py ├── icons │ ├── Red.png │ ├── Blue.png │ ├── Gray.png │ ├── Green.png │ ├── None.png │ ├── Orange.png │ ├── Purple.png │ └── Yellow.png ├── Downer.alfredworkflow ├── tag_act.py ├── label_act.py └── label_feedback.py ├── .gitignore ├── Secure Copy ├── libpexpect │ └── __init__.py ├── SecureCopy.alfredworkflow ├── PyAl │ ├── __init__.py │ └── Settings.py └── getFinder.applescript ├── alp └── alp │ ├── core_dependencies │ └── __init__.py │ ├── request │ ├── __init__.py │ ├── requests │ │ ├── packages │ │ │ ├── urllib3 │ │ │ │ ├── contrib │ │ │ │ │ └── __init__.py │ │ │ │ └── packages │ │ │ │ │ └── __init__.py │ │ │ ├── __init__.py │ │ │ └── charade │ │ │ │ ├── compat.py │ │ │ │ ├── __init__.py │ │ │ │ ├── constants.py │ │ │ │ ├── euctwprober.py │ │ │ │ ├── euckrprober.py │ │ │ │ └── gb2312prober.py │ │ ├── certs.py │ │ ├── hooks.py │ │ └── exceptions.py │ ├── requests_cache │ │ ├── backends │ │ │ ├── storage │ │ │ │ └── __init__.py │ │ │ ├── redis.py │ │ │ ├── mongo.py │ │ │ ├── __init__.py │ │ │ └── sqlite.py │ │ └── __init__.py │ └── request.py │ ├── __init__.py │ ├── settings.py │ ├── notification.py │ └── mail.py ├── Alleyoop 3 ├── alp │ ├── core_dependencies │ │ └── __init__.py │ ├── request │ │ ├── __init__.py │ │ ├── requests │ │ │ ├── packages │ │ │ │ ├── urllib3 │ │ │ │ │ ├── contrib │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── packages │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── __init__.py │ │ │ │ └── charade │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ └── euctwprober.py │ │ │ ├── certs.py │ │ │ ├── hooks.py │ │ │ └── exceptions.py │ │ ├── requests_cache │ │ │ ├── backends │ │ │ │ ├── storage │ │ │ │ │ └── __init__.py │ │ │ │ ├── redis.py │ │ │ │ ├── mongo.py │ │ │ │ ├── __init__.py │ │ │ │ └── sqlite.py │ │ │ └── __init__.py │ │ └── request.py │ ├── __init__.py │ └── notification.py └── Alleyoop.alfredworkflow ├── Kindle Bookstore ├── alp │ ├── request │ │ ├── requests │ │ │ ├── async.py │ │ │ ├── packages │ │ │ │ ├── oauthlib │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── oauth1 │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── oauth2 │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── draft25 │ │ │ │ │ │ └── utils.py │ │ │ │ ├── urllib3 │ │ │ │ │ ├── contrib │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── packages │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── __init__.py │ │ │ │ ├── chardet2 │ │ │ │ │ ├── test.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── constants.py │ │ │ │ └── chardet │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ ├── euckrprober.py │ │ │ │ │ ├── euctwprober.py │ │ │ │ │ ├── gb2312prober.py │ │ │ │ │ └── big5prober.py │ │ │ ├── certs.py │ │ │ ├── _oauth.py │ │ │ ├── hooks.py │ │ │ ├── exceptions.py │ │ │ ├── safe_mode.py │ │ │ ├── __init__.py │ │ │ └── defaults.py │ │ ├── __init__.py │ │ ├── request.py │ │ └── requests_cache │ │ │ ├── backends │ │ │ ├── __init__.py │ │ │ ├── mongo.py │ │ │ └── sqlite.py │ │ │ └── __init__.py │ └── __init__.py └── KindleBookstore.alfredworkflow ├── Yourls Stats ├── alp │ ├── core_dependencies │ │ └── __init__.py │ ├── request │ │ ├── __init__.py │ │ ├── requests_cache │ │ │ ├── backends │ │ │ │ ├── storage │ │ │ │ │ └── __init__.py │ │ │ │ ├── redis.py │ │ │ │ ├── mongo.py │ │ │ │ ├── __init__.py │ │ │ │ └── sqlite.py │ │ │ └── __init__.py │ │ ├── requests │ │ │ ├── packages │ │ │ │ ├── urllib3 │ │ │ │ │ ├── contrib │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── packages │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── __init__.py │ │ │ │ └── charade │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ └── euctwprober.py │ │ │ ├── certs.py │ │ │ ├── hooks.py │ │ │ └── exceptions.py │ │ └── request.py │ ├── __init__.py │ └── settings.py ├── YourlsStats.alfredworkflow └── act.py ├── Create New File ├── alp │ ├── core_dependencies │ │ └── __init__.py │ ├── __init__.py │ └── settings.py ├── CreateNewFile.alfredworkflow └── getFinder.applescript ├── Kindle Bookstore UK ├── PyAl │ ├── Request │ │ ├── requests │ │ │ ├── async.py │ │ │ ├── packages │ │ │ │ ├── oauthlib │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── oauth1 │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── oauth2 │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── draft25 │ │ │ │ │ │ └── utils.py │ │ │ │ ├── urllib3 │ │ │ │ │ ├── contrib │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── packages │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── __init__.py │ │ │ │ ├── chardet2 │ │ │ │ │ ├── test.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── constants.py │ │ │ │ └── chardet │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ ├── euckrprober.py │ │ │ │ │ ├── euctwprober.py │ │ │ │ │ ├── gb2312prober.py │ │ │ │ │ └── big5prober.py │ │ │ ├── certs.py │ │ │ ├── _oauth.py │ │ │ ├── hooks.py │ │ │ ├── exceptions.py │ │ │ ├── safe_mode.py │ │ │ ├── __init__.py │ │ │ └── defaults.py │ │ ├── __init__.py │ │ ├── Request.py │ │ └── requests_cache │ │ │ ├── backends │ │ │ ├── __init__.py │ │ │ ├── mongo.py │ │ │ └── sqlite.py │ │ │ └── __init__.py │ ├── __init__.py │ └── Settings.py └── KindleBookstoreUK.alfredworkflow ├── iTunes Store ├── alp │ ├── request │ │ ├── __init__.py │ │ ├── requests_cache │ │ │ ├── backends │ │ │ │ ├── storage │ │ │ │ │ └── __init__.py │ │ │ │ ├── redis.py │ │ │ │ ├── mongo.py │ │ │ │ ├── __init__.py │ │ │ │ └── sqlite.py │ │ │ └── __init__.py │ │ ├── requests │ │ │ ├── packages │ │ │ │ ├── urllib3 │ │ │ │ │ ├── contrib │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── packages │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── __init__.py │ │ │ │ └── charade │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── constants.py │ │ │ ├── certs.py │ │ │ ├── hooks.py │ │ │ └── exceptions.py │ │ └── request.py │ ├── __init__.py │ └── settings.py └── iTunesStore.alfredworkflow ├── Alfred.framework ├── Alfred │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Alfred-Prefix.pch │ ├── implementation │ │ ├── Alfred.m │ │ ├── AWPreferences.m │ │ ├── NSString+XMLEscaping.m │ │ └── NSFileManager+AWFindOrCreate.m │ ├── headers │ │ ├── Alfred.h │ │ ├── NSString+XMLEscaping.h │ │ ├── AWArgs.h │ │ ├── AWPreferences.h │ │ ├── NSFileManager+AWFindOrCreate.h │ │ ├── AWFeedbackItem.h │ │ ├── NSArray+FuzzySearching.h │ │ └── AWWorkflow.h │ └── Alfred-Info.plist ├── Alfred.xcodeproj │ ├── xcuserdata │ │ └── danielsh.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints.xcbkptlist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── danielsh.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── LICENSE.mdown ├── Things ├── images │ ├── area.png │ ├── next.png │ ├── Logbook.png │ ├── Trash.png │ ├── check.png │ ├── inbox.png │ ├── project.png │ ├── someday.png │ ├── today.png │ ├── Projects.png │ └── scheduled.png ├── Things.alfredworkflow ├── alp │ └── __init__.py └── act.py ├── Thoughts ├── Thoughts.alfredworkflow ├── alp │ └── __init__.py ├── think.py └── act.py ├── DEVONthink Note ├── Alfred.framework │ ├── Alfred │ ├── Versions │ │ ├── A │ │ │ ├── Alfred │ │ │ ├── Resources │ │ │ │ ├── en.lproj │ │ │ │ │ └── InfoPlist.strings │ │ │ │ ├── LICENSE.mdown │ │ │ │ └── Info.plist │ │ │ ├── Headers │ │ │ │ └── Alfred.h │ │ │ └── PrivateHeaders │ │ │ │ ├── AWFeedbackItem.h │ │ │ │ └── AWWorkflow.h │ │ └── Current │ │ │ ├── Alfred │ │ │ ├── Resources │ │ │ ├── en.lproj │ │ │ │ └── InfoPlist.strings │ │ │ ├── LICENSE.mdown │ │ │ └── Info.plist │ │ │ ├── Headers │ │ │ └── Alfred.h │ │ │ └── PrivateHeaders │ │ │ ├── AWFeedbackItem.h │ │ │ └── AWWorkflow.h │ ├── Resources │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── LICENSE.mdown │ │ └── Info.plist │ ├── Headers │ │ └── Alfred.h │ └── PrivateHeaders │ │ ├── AWFeedbackItem.h │ │ └── AWWorkflow.h ├── DEVONthinkNote.alfredworkflow ├── DtWorkflow.xcodeproj │ ├── xcuserdata │ │ └── danielsh.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints.xcbkptlist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── danielsh.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── DtWorkflow │ ├── DtWorkflow-Prefix.pch │ └── DTDatabaseWorker.h ├── OpenMeta Tags ├── OpenMetaTags.alfredworkflow ├── TagsWorkflow.xcodeproj │ ├── xcuserdata │ │ └── danielsh.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints.xcbkptlist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── danielsh.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── TagsWorkflow │ ├── TagsWorkflow-Prefix.pch │ ├── TWMetadataSearcher.h │ ├── TWFlagger.h │ └── TWMetadataTagger.h ├── Scratch Files ├── ScratchFiles.alfredworkflow └── PyAl │ └── __init__.py ├── Open in Sublime ├── OpenInSublime.alfredworkflow └── alp │ └── __init__.py ├── Background Command └── BackgroundCommand.alfredworkflow └── README.md /Downer/downer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | -------------------------------------------------------------------------------- /Secure Copy/libpexpect/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alp/alp/core_dependencies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Downer/alp/core_dependencies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/core_dependencies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/async.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Yourls Stats/alp/core_dependencies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Create New File/alp/core_dependencies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/async.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alp/alp/request/__init__.py: -------------------------------------------------------------------------------- 1 | from .request import * 2 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/__init__.py: -------------------------------------------------------------------------------- 1 | from .request import * 2 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/__init__.py: -------------------------------------------------------------------------------- 1 | from .request import * 2 | -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /alp/alp/request/requests_cache/backends/storage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/__init__.py: -------------------------------------------------------------------------------- 1 | from .request import * 2 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests_cache/backends/storage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/__init__.py: -------------------------------------------------------------------------------- 1 | from .request import * 2 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/oauthlib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests_cache/backends/storage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests_cache/backends/storage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/__init__.py: -------------------------------------------------------------------------------- 1 | from .Request import * 2 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/oauthlib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Downer/icons/Red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/Red.png -------------------------------------------------------------------------------- /Alfred.framework/Alfred/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Downer/icons/Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/Blue.png -------------------------------------------------------------------------------- /Downer/icons/Gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/Gray.png -------------------------------------------------------------------------------- /Downer/icons/Green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/Green.png -------------------------------------------------------------------------------- /Downer/icons/None.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/None.png -------------------------------------------------------------------------------- /Things/images/area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/area.png -------------------------------------------------------------------------------- /Things/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/next.png -------------------------------------------------------------------------------- /Downer/icons/Orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/Orange.png -------------------------------------------------------------------------------- /Downer/icons/Purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/Purple.png -------------------------------------------------------------------------------- /Downer/icons/Yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/icons/Yellow.png -------------------------------------------------------------------------------- /Things/images/Logbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/Logbook.png -------------------------------------------------------------------------------- /Things/images/Trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/Trash.png -------------------------------------------------------------------------------- /Things/images/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/check.png -------------------------------------------------------------------------------- /Things/images/inbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/inbox.png -------------------------------------------------------------------------------- /Things/images/project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/project.png -------------------------------------------------------------------------------- /Things/images/someday.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/someday.png -------------------------------------------------------------------------------- /Things/images/today.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/today.png -------------------------------------------------------------------------------- /Things/images/Projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/Projects.png -------------------------------------------------------------------------------- /Things/images/scheduled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/images/scheduled.png -------------------------------------------------------------------------------- /Downer/Downer.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Downer/Downer.alfredworkflow -------------------------------------------------------------------------------- /Things/Things.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Things/Things.alfredworkflow -------------------------------------------------------------------------------- /Thoughts/Thoughts.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Thoughts/Thoughts.alfredworkflow -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /Alleyoop 3/Alleyoop.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Alleyoop 3/Alleyoop.alfredworkflow -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /Secure Copy/SecureCopy.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Secure Copy/SecureCopy.alfredworkflow -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Alfred: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/Alfred.framework/Alfred -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import urllib3 4 | -------------------------------------------------------------------------------- /Yourls Stats/YourlsStats.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Yourls Stats/YourlsStats.alfredworkflow -------------------------------------------------------------------------------- /iTunes Store/iTunesStore.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/iTunes Store/iTunesStore.alfredworkflow -------------------------------------------------------------------------------- /OpenMeta Tags/OpenMetaTags.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/OpenMeta Tags/OpenMetaTags.alfredworkflow -------------------------------------------------------------------------------- /Scratch Files/ScratchFiles.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Scratch Files/ScratchFiles.alfredworkflow -------------------------------------------------------------------------------- /Create New File/CreateNewFile.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Create New File/CreateNewFile.alfredworkflow -------------------------------------------------------------------------------- /DEVONthink Note/DEVONthinkNote.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/DEVONthinkNote.alfredworkflow -------------------------------------------------------------------------------- /Open in Sublime/OpenInSublime.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Open in Sublime/OpenInSublime.alfredworkflow -------------------------------------------------------------------------------- /Kindle Bookstore/KindleBookstore.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Kindle Bookstore/KindleBookstore.alfredworkflow -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/A/Alfred: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/Alfred.framework/Versions/A/Alfred -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /Background Command/BackgroundCommand.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Background Command/BackgroundCommand.alfredworkflow -------------------------------------------------------------------------------- /Kindle Bookstore UK/KindleBookstoreUK.alfredworkflow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Kindle Bookstore UK/KindleBookstoreUK.alfredworkflow -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/Current/Alfred: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/Alfred.framework/Versions/Current/Alfred -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | -------------------------------------------------------------------------------- /Scratch Files/PyAl/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | from .Keychain import * 3 | try: 4 | from PyAl.Request.Request import * 5 | except ImportError: 6 | pass 7 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/Alfred.framework/Resources/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Alfred.framework/Alfred.xcodeproj/xcuserdata/danielsh.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/Alfred-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Alfred' target in the 'Alfred' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /DEVONthink Note/DtWorkflow.xcodeproj/xcuserdata/danielsh.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow.xcodeproj/xcuserdata/danielsh.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/A/Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/Alfred.framework/Versions/A/Resources/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Secure Copy/PyAl/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | from .Keychain import * 3 | from .Feedback import * 4 | from .Settings import * 5 | try: 6 | from PyAl.Request.Request import * 7 | except ImportError: 8 | pass 9 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/Current/Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/Alfred.framework/Versions/Current/Resources/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | from .Keychain import * 3 | from .Feedback import * 4 | from .Settings import * 5 | try: 6 | from PyAl.Request.Request import * 7 | except ImportError: 8 | pass 9 | -------------------------------------------------------------------------------- /DEVONthink Note/DtWorkflow/DtWorkflow-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'DtWorkflow' target in the 'DtWorkflow' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow/TagsWorkflow-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TagsWorkflow' target in the 'TagsWorkflow' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DEVONthink Note/DtWorkflow.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred.xcodeproj/project.xcworkspace/xcuserdata/danielsh.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/Alfred.framework/Alfred.xcodeproj/project.xcworkspace/xcuserdata/danielsh.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Alfred.framework/Alfred/implementation/Alfred.m: -------------------------------------------------------------------------------- 1 | // 2 | // Alfred.m 3 | // Alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import "Alfred.h" 10 | 11 | @implementation Alfred 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DEVONthink Note/DtWorkflow.xcodeproj/project.xcworkspace/xcuserdata/danielsh.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/DEVONthink Note/DtWorkflow.xcodeproj/project.xcworkspace/xcuserdata/danielsh.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow.xcodeproj/project.xcworkspace/xcuserdata/danielsh.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phyllisstein/Workflows/HEAD/OpenMeta Tags/TagsWorkflow.xcodeproj/project.xcworkspace/xcuserdata/danielsh.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Create New File/getFinder.applescript: -------------------------------------------------------------------------------- 1 | tell application "Finder" 2 | try 3 | set pathList to POSIX path of (folder of the front window as alias) 4 | on error 5 | set pathList to POSIX path of (path to desktop folder as alias) 6 | end try 7 | 8 | return pathList 9 | end tell 10 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/oauthlib/oauth1/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import 3 | 4 | """ 5 | oauthlib.oauth1 6 | ~~~~~~~~~~~~~~ 7 | 8 | This module is a wrapper for the most recent implementation of OAuth 1.0 Client 9 | and Server classes. 10 | """ 11 | 12 | from .rfc5849 import Client, Server 13 | 14 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/oauthlib/oauth2/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import 3 | 4 | """ 5 | oauthlib.oauth2 6 | ~~~~~~~~~~~~~~ 7 | 8 | This module is a wrapper for the most recent implementation of OAuth 2.0 Client 9 | and Server classes. 10 | """ 11 | 12 | from .draft25 import Client, Server 13 | 14 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/Alfred.h: -------------------------------------------------------------------------------- 1 | // 2 | // Alfred.h 3 | // Alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface Alfred : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/oauthlib/oauth1/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import 3 | 4 | """ 5 | oauthlib.oauth1 6 | ~~~~~~~~~~~~~~ 7 | 8 | This module is a wrapper for the most recent implementation of OAuth 1.0 Client 9 | and Server classes. 10 | """ 11 | 12 | from .rfc5849 import Client, Server 13 | 14 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/oauthlib/oauth2/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import 3 | 4 | """ 5 | oauthlib.oauth2 6 | ~~~~~~~~~~~~~~ 7 | 8 | This module is a wrapper for the most recent implementation of OAuth 2.0 Client 9 | and Server classes. 10 | """ 11 | 12 | from .draft25 import Client, Server 13 | 14 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/NSString+XMLEscaping.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+XMLEscaping.h 3 | // AlfredWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (XMLEscaping) 12 | 13 | - (NSString *)escapedString; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Headers/Alfred.h: -------------------------------------------------------------------------------- 1 | // 2 | // Alfred.h 3 | // Alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface Alfred : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/A/Headers/Alfred.h: -------------------------------------------------------------------------------- 1 | // 2 | // Alfred.h 3 | // Alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface Alfred : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/Current/Headers/Alfred.h: -------------------------------------------------------------------------------- 1 | // 2 | // Alfred.h 3 | // Alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface Alfred : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/AWArgs.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWArgs.h 3 | // Alfred 4 | // 5 | // Created by Daniel Shannon on 5/26/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWArgs : NSObject 12 | 13 | - (id)initWithArgs:(const char *[])argv andKeys:(NSArray *)keys count:(int)argc; 14 | - (NSDictionary *)parse; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Downer/tag_act.py: -------------------------------------------------------------------------------- 1 | import os.path 2 | import alp 3 | from downer.tags import * 4 | 5 | 6 | def do_feedback(): 7 | args = alp.args() 8 | path = args[0] 9 | tags = args[1:] 10 | set_tags(tags, path) 11 | 12 | _, name = os.path.split(path) 13 | tag_string = ", ".join(tags) 14 | name = name.encode("utf-8") 15 | print "Tagged {0} \"{1}\".".format(name, tag_string) 16 | 17 | if __name__ == "__main__": 18 | do_feedback() 19 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/AWPreferences.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWPreferences.h 3 | // alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWPreferences : NSObject 12 | 13 | - (void)setPreference:(id)v forKey:(NSString *)k; 14 | - (id)preferenceForKey:(NSString *)k; 15 | 16 | @property (readonly) NSCache *c; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Downer/label_act.py: -------------------------------------------------------------------------------- 1 | import os.path 2 | from downer.Constants import * 3 | import alp 4 | from downer.labels import * 5 | 6 | 7 | def do_feedback(): 8 | args = alp.args() 9 | path = args[0] 10 | color = int(args[1]) 11 | 12 | set_finder_label(path, color) 13 | _, name = os.path.split(path) 14 | name = name.encode("utf-8") 15 | print "{0} labeled {1}.".format(name, COLORS[color]) 16 | 17 | if __name__ == "__main__": 18 | do_feedback() 19 | -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow.xcodeproj/project.xcworkspace/xcuserdata/danielsh.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Downer/downer/Constants.py: -------------------------------------------------------------------------------- 1 | COLORS = { 2 | 0: 'None', 3 | 1: 'Gray', 4 | 2: 'Green', 5 | 3: 'Purple', 6 | 4: 'Blue', 7 | 5: 'Yellow', 8 | 6: 'Red', 9 | 7: 'Orange' 10 | } 11 | ATTR = "com.apple.FinderInfo" 12 | TAG_KEYS = [ 13 | "org.openmetainfo:kOMUserTags", 14 | "org.openmetainfo:kMDItemOMUserTags", 15 | "com.apple.metadata:kOMUserTags", 16 | "com.apple.metadata:kMDItemOMUserTags" 17 | ] 18 | kMaxDataSize = 4096 19 | XATTR_NOFOLLOW = 0x0001 20 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/implementation/AWPreferences.m: -------------------------------------------------------------------------------- 1 | // 2 | // AWPreferences.m 3 | // alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import "AWPreferences.h" 10 | 11 | @interface AWPreferences () 12 | 13 | @property (readwrite) NSCache *c_; 14 | 15 | @end 16 | 17 | 18 | 19 | @implementation AWPreferences 20 | 21 | - (void)setPreference:(id)v forKey:(NSString *)k 22 | { 23 | 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Secure Copy/getFinder.applescript: -------------------------------------------------------------------------------- 1 | tell application "Finder" 2 | set theSelection to (get selection) 3 | if length of theSelection is greater than 0 then 4 | set pathList to {} 5 | repeat with anItem in theSelection 6 | set itemPath to quoted form of POSIX path of (anItem as text) 7 | set pathList to pathList & " " & itemPath 8 | end repeat 9 | else 10 | set pathList to (quoted form of POSIX path of (folder of the front window as alias)) 11 | end if 12 | 13 | return pathList 14 | end tell -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow/TWMetadataSearcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // TWMetadataSearcher.h 3 | // TagsWorkflow 4 | // 5 | // Created by Daniel Shannon on 3/27/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TWMetadataSearcher : NSObject { 12 | NSMetadataQuery *tagSearcher; 13 | NSDictionary *COLOR_DICT; 14 | } 15 | 16 | - (void)getSystemTagsMatching:(NSString *)query; 17 | 18 | @property NSString *query; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/NSFileManager+AWFindOrCreate.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager+AWFindOrCreate.h 3 | // alfred 4 | // 5 | 6 | #import 7 | 8 | @interface NSFileManager (AWFindOrCreate) 9 | 10 | - (NSString *)findDirectory:(NSSearchPathDirectory)searchPathDirectory inDomain:(NSSearchPathDomainMask)domainMask appendingPathComponent:(NSString *)append; 11 | - (void)createIfNonexistent:(NSString *)dir; 12 | - (NSString *)applicationSupportDirectory; 13 | - (NSString *)cacheDirectory; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow/TWFlagger.h: -------------------------------------------------------------------------------- 1 | // 2 | // TWFlagger.h 3 | // TagsWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "TWMetadataTagger.h" 12 | 13 | @interface TWFlagger : NSObject { 14 | NSArray *COLORS; 15 | NSString *KEY; 16 | } 17 | 18 | - (void)printColorList; 19 | - (void)setFinderColor:(NSUInteger)c; 20 | - (NSData *)getFinderColorAtPath:(NSString *)p; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | ceritfi.py 6 | ~~~~~~~~~~ 7 | 8 | This module returns the installation location of cacert.pem. 9 | """ 10 | 11 | import os 12 | try: 13 | import certifi 14 | except ImportError: 15 | certifi = None 16 | 17 | 18 | def where(): 19 | 20 | if certifi: 21 | return certifi.where() 22 | else: 23 | f = os.path.split(__file__)[0] 24 | return os.path.join(f, 'cacert.pem') 25 | 26 | if __name__ == '__main__': 27 | print(where()) 28 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | ceritfi.py 6 | ~~~~~~~~~~ 7 | 8 | This module returns the installation location of cacert.pem. 9 | """ 10 | 11 | import os 12 | try: 13 | import certifi 14 | except ImportError: 15 | certifi = None 16 | 17 | 18 | def where(): 19 | 20 | if certifi: 21 | return certifi.where() 22 | else: 23 | f = os.path.split(__file__)[0] 24 | return os.path.join(f, 'cacert.pem') 25 | 26 | if __name__ == '__main__': 27 | print(where()) 28 | -------------------------------------------------------------------------------- /Downer/label_feedback.py: -------------------------------------------------------------------------------- 1 | import os.path 2 | from downer.Constants import * 3 | import alp 4 | from alp.item import Item as I 5 | 6 | 7 | def do_feedback(): 8 | args = alp.args() 9 | path = args[0] 10 | feedback = [] 11 | for n, color in COLORS.items(): 12 | icon = os.path.join(alp.local(), "icons", "{0}.png".format(color)) 13 | feedback.append(I(title=color, subtitle=u"Set Finder label to {0}".format(color), 14 | icon=icon, valid=True, arg=u"\"{0}\" \"{1}\"".format(path, n))) 15 | alp.feedback(feedback) 16 | 17 | if __name__ == "__main__": 18 | do_feedback() 19 | -------------------------------------------------------------------------------- /Downer/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow/TWMetadataTagger.h: -------------------------------------------------------------------------------- 1 | // 2 | // TWMetadataTagger.h 3 | // TagsWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Finder.h" 11 | 12 | @interface TWMetadataTagger : NSObject { 13 | NSArray *TAG_KEYS; 14 | } 15 | 16 | + (NSArray *)getFinderSelection; 17 | 18 | - (void)dieWithErrno:(int)e; 19 | - (NSArray *)getCurrentTags; 20 | - (void)tagFinderSelectionWith:(NSString *)tags; 21 | - (void)clearTagsFromFinderSelection; 22 | - (int)clearTagsFromPath:(NSString *)p; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Things/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /alp/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Alfred Workflows 2 | These workflows and workflow utilities are no longer maintained or updated. Under each folder, you'll find the source code for the workflow, without the icon or `Info.plist` files, and a zipped `.alfredworkflow` file that can be imported into Alfred. 3 | 4 | Note that if you wish to import these workflows, it is recommended that you remove any lingering `update.json` files in the workflow's folder, as the server that they instruct Alleyoop to query is no longer active. 5 | 6 | 7 | ## Contributors 8 | 9 | * Many thanks to [Alexander](https://github.com/alexex) for serious repairs to the "Open in Sublime" workflow. 10 | -------------------------------------------------------------------------------- /Thoughts/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /Yourls Stats/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /iTunes Store/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /Create New File/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /Open in Sublime/alp/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | 3 | try: 4 | from .item import * 5 | except ImportError: 6 | pass 7 | 8 | try: 9 | from .keychain import * 10 | except ImportError: 11 | pass 12 | 13 | try: 14 | from .settings import * 15 | except ImportError: 16 | pass 17 | 18 | try: 19 | from .mail import * 20 | except ImportError: 21 | pass 22 | 23 | try: 24 | from .fuzzy import * 25 | except ImportError: 26 | pass 27 | 28 | try: 29 | from alp.request.request import * 30 | except ImportError: 31 | pass 32 | 33 | try: 34 | from .notification import * 35 | except ImportError: 36 | pass 37 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred.xcodeproj/xcuserdata/danielsh.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Alfred.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D959535C1751755800AE14BF 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DEVONthink Note/DtWorkflow.xcodeproj/xcuserdata/danielsh.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DtWorkflow.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D9F82DBD1752163500A0042B 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /alp/alp/request/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certs.py 6 | ~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | 15 | import os.path 16 | 17 | 18 | def where(): 19 | """Return the preferred certificate bundle.""" 20 | # vendored bundle inside Requests 21 | return os.path.join(os.path.dirname(__file__), 'cacert.pem') 22 | 23 | if __name__ == '__main__': 24 | print(where()) 25 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certs.py 6 | ~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | 15 | import os.path 16 | 17 | 18 | def where(): 19 | """Return the preferred certificate bundle.""" 20 | # vendored bundle inside Requests 21 | return os.path.join(os.path.dirname(__file__), 'cacert.pem') 22 | 23 | if __name__ == '__main__': 24 | print(where()) 25 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certs.py 6 | ~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | 15 | import os.path 16 | 17 | 18 | def where(): 19 | """Return the preferred certificate bundle.""" 20 | # vendored bundle inside Requests 21 | return os.path.join(os.path.dirname(__file__), 'cacert.pem') 22 | 23 | if __name__ == '__main__': 24 | print(where()) 25 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certs.py 6 | ~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | 15 | import os.path 16 | 17 | 18 | def where(): 19 | """Return the preferred certificate bundle.""" 20 | # vendored bundle inside Requests 21 | return os.path.join(os.path.dirname(__file__), 'cacert.pem') 22 | 23 | if __name__ == '__main__': 24 | print(where()) 25 | -------------------------------------------------------------------------------- /Alfred.framework/LICENSE.mdown: -------------------------------------------------------------------------------- 1 | Framework code by Daniel Shannon ([d@daniel.sh](d@daniel.sh)), 2013. This license may not be removed or altered. Alfred.framework is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) license. This means that you may share and redistribute the package, but only for non-commercial purposes, only so long as you credit the original author---_moi_---and only if your derivative work is similarly licensed. 2 | 3 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. 4 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet2/test.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | import sys, glob 3 | sys.path.insert(0, '..') 4 | from chardet.universaldetector import UniversalDetector 5 | 6 | count = 0 7 | u = UniversalDetector() 8 | for f in glob.glob(sys.argv[1]): 9 | print(f.ljust(60), end=' ') 10 | u.reset() 11 | for line in open(f, 'rb'): 12 | u.feed(line) 13 | if u.done: break 14 | u.close() 15 | result = u.result 16 | if result['encoding']: 17 | print(result['encoding'], 'with confidence', result['confidence']) 18 | else: 19 | print('******** no result') 20 | count += 1 21 | print(count, 'tests') 22 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet2/test.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | import sys, glob 3 | sys.path.insert(0, '..') 4 | from chardet.universaldetector import UniversalDetector 5 | 6 | count = 0 7 | u = UniversalDetector() 8 | for f in glob.glob(sys.argv[1]): 9 | print(f.ljust(60), end=' ') 10 | u.reset() 11 | for line in open(f, 'rb'): 12 | u.feed(line) 13 | if u.done: break 14 | u.close() 15 | result = u.result 16 | if result['encoding']: 17 | print(result['encoding'], 'with confidence', result['confidence']) 18 | else: 19 | print('******** no result') 20 | count += 1 21 | print(count, 'tests') 22 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Resources/LICENSE.mdown: -------------------------------------------------------------------------------- 1 | Framework code by Daniel Shannon ([d@daniel.sh](d@daniel.sh)), 2013. This license may not be removed or altered. Alfred.framework is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) license. This means that you may share and redistribute the package, but only for non-commercial purposes, only so long as you credit the original author---_moi_---and only if your derivative work is similarly licensed. 2 | 3 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. 4 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/A/Resources/LICENSE.mdown: -------------------------------------------------------------------------------- 1 | Framework code by Daniel Shannon ([d@daniel.sh](d@daniel.sh)), 2013. This license may not be removed or altered. Alfred.framework is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) license. This means that you may share and redistribute the package, but only for non-commercial purposes, only so long as you credit the original author---_moi_---and only if your derivative work is similarly licensed. 2 | 3 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. 4 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/Current/Resources/LICENSE.mdown: -------------------------------------------------------------------------------- 1 | Framework code by Daniel Shannon ([d@daniel.sh](d@daniel.sh)), 2013. This license may not be removed or altered. Alfred.framework is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) license. This means that you may share and redistribute the package, but only for non-commercial purposes, only so long as you credit the original author---_moi_---and only if your derivative work is similarly licensed. 2 | 3 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. 4 | -------------------------------------------------------------------------------- /DEVONthink Note/DtWorkflow/DTDatabaseWorker.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTDatabaseWorker.h 3 | // DtWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/26/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "DEVONthink.h" 11 | 12 | @interface DTDatabaseWorker : NSObject 13 | 14 | - (id)initWithDB:(DEVONthinkDatabase *)myDB andQuery:(NSString *)q; 15 | - (DEVONthinkRecord *)findGroupByName:(NSString *)name; 16 | - (NSArray *)workingGroupChildren; 17 | - (NSArray *)rootChildren; 18 | - (NSString *)pathWithoutQuery; 19 | 20 | @property NSArray *path; 21 | @property DEVONthinkRecord *workingGroup; 22 | @property NSString *query; 23 | @property DEVONthinkDatabase *db; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/Request.py: -------------------------------------------------------------------------------- 1 | from PyAl.core import * 2 | from bs4 import BeautifulSoup 3 | import requests 4 | import requests_cache 5 | 6 | 7 | class Request: 8 | def __init__(self, url, payload=None, post=False): 9 | bundleID = bundle() 10 | cacheName = volatile(bundleID + "_requests_cache") 11 | requests_cache.configure(cacheName) 12 | if payload: 13 | self.request = requests.get(url, params=payload) if not post else requests.post(url, data=payload) 14 | else: 15 | self.request = requests.get(url) 16 | 17 | def souper(self): 18 | if self.request.status_code == requests.codes.ok: 19 | return BeautifulSoup(self.request.text) 20 | else: 21 | self.request.raise_for_status() 22 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/_oauth.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests._oauth 5 | ~~~~~~~~~~~~~~~ 6 | 7 | This module contains the path hack necessary for oauthlib to be vendored into 8 | requests while allowing upstream changes. 9 | """ 10 | 11 | import os 12 | import sys 13 | 14 | try: 15 | from oauthlib.oauth1 import rfc5849 16 | from oauthlib.common import extract_params 17 | from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER) 18 | except ImportError: 19 | from .packages import oauthlib 20 | sys.modules['oauthlib'] = oauthlib 21 | from oauthlib.oauth1 import rfc5849 22 | from oauthlib.common import extract_params 23 | from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER) 24 | -------------------------------------------------------------------------------- /OpenMeta Tags/TagsWorkflow.xcodeproj/xcuserdata/danielsh.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TagsWorkflow Search.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | TagsWorkflow.xcscheme 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | D94BC42D1702898100FEA0B8 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/_oauth.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests._oauth 5 | ~~~~~~~~~~~~~~~ 6 | 7 | This module contains the path hack necessary for oauthlib to be vendored into 8 | requests while allowing upstream changes. 9 | """ 10 | 11 | import os 12 | import sys 13 | 14 | try: 15 | from oauthlib.oauth1 import rfc5849 16 | from oauthlib.common import extract_params 17 | from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER) 18 | except ImportError: 19 | from .packages import oauthlib 20 | sys.modules['oauthlib'] = oauthlib 21 | from oauthlib.oauth1 import rfc5849 22 | from oauthlib.common import extract_params 23 | from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER) 24 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/request.py: -------------------------------------------------------------------------------- 1 | import alp.core as core 2 | from bs4 import BeautifulSoup 3 | import requests 4 | import requests_cache 5 | 6 | 7 | class Request(object): 8 | def __init__(self, url, payload=None, post=False): 9 | bundleID = core.bundle() 10 | cacheName = core.cache(bundleID + "_requests_cache") 11 | requests_cache.configure(cacheName) 12 | if payload: 13 | self.request = requests.get(url, params=payload) if not post else requests.post(url, data=payload) 14 | else: 15 | self.request = requests.get(url) 16 | 17 | def souper(self): 18 | if self.request.status_code == requests.codes.ok: 19 | return BeautifulSoup(self.request.text) 20 | else: 21 | self.request.raise_for_status() 22 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests_cache/backends/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends 5 | ~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | Classes and functions for cache persistence 8 | """ 9 | 10 | 11 | from alp.request.requests_cache.backends.base import BaseCache 12 | 13 | registry = { 14 | 'memory': BaseCache, 15 | } 16 | 17 | try: 18 | # Heroku doesn't allow the SQLite3 module to be installed 19 | from alp.request.requests_cache.backends.sqlite import DbCache 20 | registry['sqlite'] = DbCache 21 | except ImportError: 22 | DbCache = None 23 | 24 | try: 25 | from alp.request.requests_cache.mongo import MongoCache 26 | registry['mongo'] = registry['mongodb'] = MongoCache 27 | except ImportError: 28 | MongoCache = None 29 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests_cache/backends/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends 5 | ~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | Classes and functions for cache persistence 8 | """ 9 | 10 | 11 | from PyAl.Request.requests_cache.backends.base import BaseCache 12 | 13 | registry = { 14 | 'memory': BaseCache, 15 | } 16 | 17 | try: 18 | # Heroku doesn't allow the SQLite3 module to be installed 19 | from PyAl.Request.requests_cache.backends.sqlite import DbCache 20 | registry['sqlite'] = DbCache 21 | except ImportError: 22 | DbCache = None 23 | 24 | try: 25 | from PyAl.Request.requests_cache.mongo import MongoCache 26 | registry['mongo'] = registry['mongodb'] = MongoCache 27 | except ImportError: 28 | MongoCache = None 29 | -------------------------------------------------------------------------------- /alp/alp/request/requests_cache/backends/redis.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.redis 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``redis`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.redisdict import RedisDict 11 | 12 | 13 | class RedisCache(BaseCache): 14 | """ ``redis`` cache backend. 15 | """ 16 | def __init__(self, namespace='requests-cache', **options): 17 | """ 18 | :param namespace: redis namespace (default: ``'requests-cache'``) 19 | :param connection: (optional) ``redis.StrictRedis`` 20 | """ 21 | super(RedisCache, self).__init__() 22 | self.responses = RedisDict(namespace, 'responses', 23 | options.get('connection')) 24 | self.keys_map = RedisDict(namespace, 'urls', self.responses.connection) 25 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests_cache/backends/redis.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.redis 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``redis`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.redisdict import RedisDict 11 | 12 | 13 | class RedisCache(BaseCache): 14 | """ ``redis`` cache backend. 15 | """ 16 | def __init__(self, namespace='requests-cache', **options): 17 | """ 18 | :param namespace: redis namespace (default: ``'requests-cache'``) 19 | :param connection: (optional) ``redis.StrictRedis`` 20 | """ 21 | super(RedisCache, self).__init__() 22 | self.responses = RedisDict(namespace, 'responses', 23 | options.get('connection')) 24 | self.keys_map = RedisDict(namespace, 'urls', self.responses.connection) 25 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests_cache/backends/redis.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.redis 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``redis`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.redisdict import RedisDict 11 | 12 | 13 | class RedisCache(BaseCache): 14 | """ ``redis`` cache backend. 15 | """ 16 | def __init__(self, namespace='requests-cache', **options): 17 | """ 18 | :param namespace: redis namespace (default: ``'requests-cache'``) 19 | :param connection: (optional) ``redis.StrictRedis`` 20 | """ 21 | super(RedisCache, self).__init__() 22 | self.responses = RedisDict(namespace, 'responses', 23 | options.get('connection')) 24 | self.keys_map = RedisDict(namespace, 'urls', self.responses.connection) 25 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests_cache/backends/redis.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.redis 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``redis`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.redisdict import RedisDict 11 | 12 | 13 | class RedisCache(BaseCache): 14 | """ ``redis`` cache backend. 15 | """ 16 | def __init__(self, namespace='requests-cache', **options): 17 | """ 18 | :param namespace: redis namespace (default: ``'requests-cache'``) 19 | :param connection: (optional) ``redis.StrictRedis`` 20 | """ 21 | super(RedisCache, self).__init__() 22 | self.responses = RedisDict(namespace, 'responses', 23 | options.get('connection')) 24 | self.keys_map = RedisDict(namespace, 'urls', self.responses.connection) 25 | -------------------------------------------------------------------------------- /alp/alp/request/requests_cache/backends/mongo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.mongo 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``mongo`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.mongodict import MongoDict, MongoPickleDict 11 | 12 | 13 | class MongoCache(BaseCache): 14 | """ ``mongo`` cache backend. 15 | """ 16 | def __init__(self, db_name='requests-cache', **options): 17 | """ 18 | :param db_name: database name (default: ``'requests-cache'``) 19 | :param connection: (optional) ``pymongo.Connection`` 20 | """ 21 | super(MongoCache, self).__init__() 22 | self.responses = MongoPickleDict(db_name, 'responses', 23 | options.get('connection')) 24 | self.keys_map = MongoDict(db_name, 'urls', self.responses.connection) 25 | 26 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests_cache/backends/mongo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.mongo 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``mongo`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .mongodict import MongoDict, MongoPickleDict 11 | 12 | 13 | class MongoCache(BaseCache): 14 | """ ``mongo`` cache backend. 15 | """ 16 | def __init__(self, db_name='requests-cache', **options): 17 | """ 18 | :param db_name: database name (default: ``'requests-cache'``) 19 | :param connection: (optional) ``pymongo.Connection`` 20 | """ 21 | super(MongoCache, self).__init__() 22 | self.responses = MongoPickleDict(db_name, 'responses', 23 | options.get('connection')) 24 | self.url_map = MongoDict(db_name, 'urls', self.responses.connection) 25 | 26 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests_cache/backends/mongo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.mongo 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``mongo`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.mongodict import MongoDict, MongoPickleDict 11 | 12 | 13 | class MongoCache(BaseCache): 14 | """ ``mongo`` cache backend. 15 | """ 16 | def __init__(self, db_name='requests-cache', **options): 17 | """ 18 | :param db_name: database name (default: ``'requests-cache'``) 19 | :param connection: (optional) ``pymongo.Connection`` 20 | """ 21 | super(MongoCache, self).__init__() 22 | self.responses = MongoPickleDict(db_name, 'responses', 23 | options.get('connection')) 24 | self.keys_map = MongoDict(db_name, 'urls', self.responses.connection) 25 | 26 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests_cache/backends/mongo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.mongo 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``mongo`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .mongodict import MongoDict, MongoPickleDict 11 | 12 | 13 | class MongoCache(BaseCache): 14 | """ ``mongo`` cache backend. 15 | """ 16 | def __init__(self, db_name='requests-cache', **options): 17 | """ 18 | :param db_name: database name (default: ``'requests-cache'``) 19 | :param connection: (optional) ``pymongo.Connection`` 20 | """ 21 | super(MongoCache, self).__init__() 22 | self.responses = MongoPickleDict(db_name, 'responses', 23 | options.get('connection')) 24 | self.url_map = MongoDict(db_name, 'urls', self.responses.connection) 25 | 26 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests_cache/backends/mongo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.mongo 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``mongo`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.mongodict import MongoDict, MongoPickleDict 11 | 12 | 13 | class MongoCache(BaseCache): 14 | """ ``mongo`` cache backend. 15 | """ 16 | def __init__(self, db_name='requests-cache', **options): 17 | """ 18 | :param db_name: database name (default: ``'requests-cache'``) 19 | :param connection: (optional) ``pymongo.Connection`` 20 | """ 21 | super(MongoCache, self).__init__() 22 | self.responses = MongoPickleDict(db_name, 'responses', 23 | options.get('connection')) 24 | self.keys_map = MongoDict(db_name, 'urls', self.responses.connection) 25 | 26 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests_cache/backends/mongo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.mongo 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``mongo`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.mongodict import MongoDict, MongoPickleDict 11 | 12 | 13 | class MongoCache(BaseCache): 14 | """ ``mongo`` cache backend. 15 | """ 16 | def __init__(self, db_name='requests-cache', **options): 17 | """ 18 | :param db_name: database name (default: ``'requests-cache'``) 19 | :param connection: (optional) ``pymongo.Connection`` 20 | """ 21 | super(MongoCache, self).__init__() 22 | self.responses = MongoPickleDict(db_name, 'responses', 23 | options.get('connection')) 24 | self.keys_map = MongoDict(db_name, 'urls', self.responses.connection) 25 | 26 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests_cache/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache 5 | ~~~~~~~~~~~~~~ 6 | 7 | Transparent cache for ``requests`` library with persistence and async support 8 | 9 | Just write:: 10 | 11 | import requests_cache 12 | requests_cache.configure() 13 | 14 | And requests to resources will be cached for faster repeated access:: 15 | 16 | import requests 17 | for i in range(10): 18 | r = requests.get('http://httpbin.org/delay/5') 19 | # will took approximately 5 seconds instead 50 20 | 21 | 22 | :copyright: (c) 2012 by Roman Haritonov. 23 | :license: BSD, see LICENSE for more details. 24 | """ 25 | __docformat__ = 'restructuredtext' 26 | __version__ = '0.2.1' 27 | 28 | from .core import( 29 | configure, enabled, disabled, has_url, get_cache, 30 | delete_url,clear, redo_patch, undo_patch, 31 | ) -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests_cache/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache 5 | ~~~~~~~~~~~~~~ 6 | 7 | Transparent cache for ``requests`` library with persistence and async support 8 | 9 | Just write:: 10 | 11 | import requests_cache 12 | requests_cache.configure() 13 | 14 | And requests to resources will be cached for faster repeated access:: 15 | 16 | import requests 17 | for i in range(10): 18 | r = requests.get('http://httpbin.org/delay/5') 19 | # will took approximately 5 seconds instead 50 20 | 21 | 22 | :copyright: (c) 2012 by Roman Haritonov. 23 | :license: BSD, see LICENSE for more details. 24 | """ 25 | __docformat__ = 'restructuredtext' 26 | __version__ = '0.2.1' 27 | 28 | from .core import( 29 | configure, enabled, disabled, has_url, get_cache, 30 | delete_url,clear, redo_patch, undo_patch, 31 | ) -------------------------------------------------------------------------------- /alp/alp/request/requests_cache/backends/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends 5 | ~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | Classes and functions for cache persistence 8 | """ 9 | 10 | 11 | from .base import BaseCache 12 | 13 | registry = { 14 | 'memory': BaseCache, 15 | } 16 | 17 | try: 18 | # Heroku doesn't allow the SQLite3 module to be installed 19 | from alp.request.requests_cache.backends.sqlite import DbCache 20 | registry['sqlite'] = DbCache 21 | except ImportError: 22 | DbCache = None 23 | 24 | try: 25 | from alp.request.requests_cache.backends.mongo import MongoCache 26 | registry['mongo'] = registry['mongodb'] = MongoCache 27 | except ImportError: 28 | MongoCache = None 29 | 30 | try: 31 | from alp.request.requests_cache.backends.redis import RedisCache 32 | registry['redis'] = RedisCache 33 | except ImportError: 34 | RedisCache = None 35 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests_cache/backends/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends 5 | ~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | Classes and functions for cache persistence 8 | """ 9 | 10 | 11 | from .base import BaseCache 12 | 13 | registry = { 14 | 'memory': BaseCache, 15 | } 16 | 17 | try: 18 | # Heroku doesn't allow the SQLite3 module to be installed 19 | from alp.request.requests_cache.backends.sqlite import DbCache 20 | registry['sqlite'] = DbCache 21 | except ImportError: 22 | DbCache = None 23 | 24 | try: 25 | from alp.request.requests_cache.backends.mongo import MongoCache 26 | registry['mongo'] = registry['mongodb'] = MongoCache 27 | except ImportError: 28 | MongoCache = None 29 | 30 | try: 31 | from alp.request.requests_cache.backends.redis import RedisCache 32 | registry['redis'] = RedisCache 33 | except ImportError: 34 | RedisCache = None 35 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests_cache/backends/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends 5 | ~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | Classes and functions for cache persistence 8 | """ 9 | 10 | 11 | from .base import BaseCache 12 | 13 | registry = { 14 | 'memory': BaseCache, 15 | } 16 | 17 | try: 18 | # Heroku doesn't allow the SQLite3 module to be installed 19 | from alp.request.requests_cache.backends.sqlite import DbCache 20 | registry['sqlite'] = DbCache 21 | except ImportError: 22 | DbCache = None 23 | 24 | try: 25 | from alp.request.requests_cache.backends.mongo import MongoCache 26 | registry['mongo'] = registry['mongodb'] = MongoCache 27 | except ImportError: 28 | MongoCache = None 29 | 30 | try: 31 | from alp.request.requests_cache.backends.redis import RedisCache 32 | registry['redis'] = RedisCache 33 | except ImportError: 34 | RedisCache = None 35 | -------------------------------------------------------------------------------- /alp/alp/request/requests_cache/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache 5 | ~~~~~~~~~~~~~~ 6 | 7 | Transparent cache for ``requests`` library with persistence and async support 8 | 9 | Just write:: 10 | 11 | import requests_cache 12 | requests_cache.install_cache() 13 | 14 | And requests to resources will be cached for faster repeated access:: 15 | 16 | import requests 17 | for i in range(10): 18 | r = requests.get('http://httpbin.org/delay/5') 19 | # will took approximately 5 seconds instead 50 20 | 21 | 22 | :copyright: (c) 2012 by Roman Haritonov. 23 | :license: BSD, see LICENSE for more details. 24 | """ 25 | __docformat__ = 'restructuredtext' 26 | __version__ = '0.3.0' 27 | 28 | from alp.request.requests_cache.core import( 29 | CachedSession, install_cache, uninstall_cache, 30 | disabled, get_cache, clear, configure 31 | ) 32 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests_cache/backends/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends 5 | ~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | Classes and functions for cache persistence 8 | """ 9 | 10 | 11 | from .base import BaseCache 12 | 13 | registry = { 14 | 'memory': BaseCache, 15 | } 16 | 17 | try: 18 | # Heroku doesn't allow the SQLite3 module to be installed 19 | from alp.request.requests_cache.backends.sqlite import DbCache 20 | registry['sqlite'] = DbCache 21 | except ImportError: 22 | DbCache = None 23 | 24 | try: 25 | from alp.request.requests_cache.backends.mongo import MongoCache 26 | registry['mongo'] = registry['mongodb'] = MongoCache 27 | except ImportError: 28 | MongoCache = None 29 | 30 | try: 31 | from alp.request.requests_cache.backends.redis import RedisCache 32 | registry['redis'] = RedisCache 33 | except ImportError: 34 | RedisCache = None 35 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests_cache/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache 5 | ~~~~~~~~~~~~~~ 6 | 7 | Transparent cache for ``requests`` library with persistence and async support 8 | 9 | Just write:: 10 | 11 | import requests_cache 12 | requests_cache.install_cache() 13 | 14 | And requests to resources will be cached for faster repeated access:: 15 | 16 | import requests 17 | for i in range(10): 18 | r = requests.get('http://httpbin.org/delay/5') 19 | # will took approximately 5 seconds instead 50 20 | 21 | 22 | :copyright: (c) 2012 by Roman Haritonov. 23 | :license: BSD, see LICENSE for more details. 24 | """ 25 | __docformat__ = 'restructuredtext' 26 | __version__ = '0.3.0' 27 | 28 | from alp.request.requests_cache.core import( 29 | CachedSession, install_cache, uninstall_cache, 30 | disabled, get_cache, clear, configure 31 | ) 32 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests_cache/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache 5 | ~~~~~~~~~~~~~~ 6 | 7 | Transparent cache for ``requests`` library with persistence and async support 8 | 9 | Just write:: 10 | 11 | import requests_cache 12 | requests_cache.install_cache() 13 | 14 | And requests to resources will be cached for faster repeated access:: 15 | 16 | import requests 17 | for i in range(10): 18 | r = requests.get('http://httpbin.org/delay/5') 19 | # will took approximately 5 seconds instead 50 20 | 21 | 22 | :copyright: (c) 2012 by Roman Haritonov. 23 | :license: BSD, see LICENSE for more details. 24 | """ 25 | __docformat__ = 'restructuredtext' 26 | __version__ = '0.3.0' 27 | 28 | from alp.request.requests_cache.core import( 29 | CachedSession, install_cache, uninstall_cache, 30 | disabled, get_cache, clear, configure 31 | ) 32 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests_cache/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache 5 | ~~~~~~~~~~~~~~ 6 | 7 | Transparent cache for ``requests`` library with persistence and async support 8 | 9 | Just write:: 10 | 11 | import requests_cache 12 | requests_cache.install_cache() 13 | 14 | And requests to resources will be cached for faster repeated access:: 15 | 16 | import requests 17 | for i in range(10): 18 | r = requests.get('http://httpbin.org/delay/5') 19 | # will took approximately 5 seconds instead 50 20 | 21 | 22 | :copyright: (c) 2012 by Roman Haritonov. 23 | :license: BSD, see LICENSE for more details. 24 | """ 25 | __docformat__ = 'restructuredtext' 26 | __version__ = '0.3.0' 27 | 28 | from alp.request.requests_cache.core import( 29 | CachedSession, install_cache, uninstall_cache, 30 | disabled, get_cache, clear, configure 31 | ) 32 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/PrivateHeaders/AWFeedbackItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWFeedbackItem.h 3 | // AlfredWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWFeedbackItem : NSObject { 12 | @private 13 | NSArray *tags_; 14 | NSDictionary *attrib_; 15 | } 16 | 17 | + (id)itemWithObjectsAndKeys:(id)o, ... NS_REQUIRES_NIL_TERMINATION; 18 | - (id)initWithObjects:(NSArray *)obj forKeys:(NSArray *)key; 19 | 20 | - (NSString *)xml; 21 | 22 | 23 | @property NSString *title; 24 | @property NSString *subtitle; 25 | @property NSString *uid; 26 | @property NSNumber *valid; 27 | @property NSString *autocomplete; 28 | @property NSString *icon; 29 | @property NSNumber *fileicon; 30 | @property NSNumber *filetype; 31 | @property NSString *arg; 32 | @property NSString *type; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/A/PrivateHeaders/AWFeedbackItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWFeedbackItem.h 3 | // AlfredWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWFeedbackItem : NSObject { 12 | @private 13 | NSArray *tags_; 14 | NSDictionary *attrib_; 15 | } 16 | 17 | + (id)itemWithObjectsAndKeys:(id)o, ... NS_REQUIRES_NIL_TERMINATION; 18 | - (id)initWithObjects:(NSArray *)obj forKeys:(NSArray *)key; 19 | 20 | - (NSString *)xml; 21 | 22 | 23 | @property NSString *title; 24 | @property NSString *subtitle; 25 | @property NSString *uid; 26 | @property NSNumber *valid; 27 | @property NSString *autocomplete; 28 | @property NSString *icon; 29 | @property NSNumber *fileicon; 30 | @property NSNumber *filetype; 31 | @property NSString *arg; 32 | @property NSString *type; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/Current/PrivateHeaders/AWFeedbackItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWFeedbackItem.h 3 | // AlfredWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWFeedbackItem : NSObject { 12 | @private 13 | NSArray *tags_; 14 | NSDictionary *attrib_; 15 | } 16 | 17 | + (id)itemWithObjectsAndKeys:(id)o, ... NS_REQUIRES_NIL_TERMINATION; 18 | - (id)initWithObjects:(NSArray *)obj forKeys:(NSArray *)key; 19 | 20 | - (NSString *)xml; 21 | 22 | 23 | @property NSString *title; 24 | @property NSString *subtitle; 25 | @property NSString *uid; 26 | @property NSNumber *valid; 27 | @property NSString *autocomplete; 28 | @property NSString *icon; 29 | @property NSNumber *fileicon; 30 | @property NSNumber *filetype; 31 | @property NSString *arg; 32 | @property NSString *type; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/request.py: -------------------------------------------------------------------------------- 1 | import alp.core as core 2 | from bs4 import BeautifulSoup 3 | import requests 4 | import requests_cache 5 | 6 | 7 | class Request(object): 8 | def __init__(self, url, payload=None, post=False, cache_for=None): 9 | cacheName = core.cache("requests_cache") 10 | if cache_for != None and cache_for < 0: 11 | exp = None 12 | else: 13 | exp = cache_for or 24 * (60^3) 14 | requests_cache.install_cache(cacheName, expire_after=exp) 15 | if payload: 16 | self.request = requests.get(url, params=payload) if not post else requests.post(url, data=payload) 17 | else: 18 | self.request = requests.get(url) 19 | 20 | def souper(self): 21 | if self.request.status_code == requests.codes.ok: 22 | return BeautifulSoup(self.request.text) 23 | else: 24 | self.request.raise_for_status() 25 | 26 | def clear_cache(self): 27 | requests_cache.clear() 28 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/AWFeedbackItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWFeedbackItem.h 3 | // AlfredWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWFeedbackItem : NSObject { 12 | @private 13 | NSArray *tags_; 14 | NSDictionary *attrib_; 15 | } 16 | 17 | + (id)itemWithObjectsAndKeys:(id)o, ... NS_REQUIRES_NIL_TERMINATION; 18 | - (id)initWithObjects:(NSArray *)obj forKeys:(NSArray *)key; 19 | 20 | - (NSString *)xml; 21 | 22 | 23 | @property (copy) NSString *title; 24 | @property (copy) NSString *subtitle; 25 | @property (copy) NSString *uid; 26 | @property (copy) NSNumber *valid; 27 | @property (copy) NSString *autocomplete; 28 | @property (copy) NSString *icon; 29 | @property (copy) NSNumber *fileicon; 30 | @property (copy) NSNumber *filetype; 31 | @property (copy) NSString *arg; 32 | @property (copy) NSString *type; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/NSArray+FuzzySearching.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+FuzzySearching.h 3 | // alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol AWFuzzySearchingDelegate; 12 | 13 | @interface NSArray (FuzzySearching) 14 | 15 | - (NSArray *)orderElementsOfArray:(NSArray *)x decreasing:(BOOL)decreasing; 16 | - (NSArray *)rankElementsOfArray:(NSArray *)x decreasing:(BOOL)dec; 17 | - (NSArray *)rankMatchesForQuery:(NSString *)query inStrings:(NSArray *)strings; 18 | - (NSArray *)fuzzySearchFor:(NSString *)query withKeyBlock:(NSString *(^)(id))key; 19 | 20 | - (void)setFuzzy_delegate:(id)fd; 21 | - (id)fuzzy_delegate; 22 | 23 | 24 | @end 25 | 26 | 27 | 28 | 29 | 30 | # pragma mark - 31 | # pragma mark Delegate protocol 32 | 33 | @protocol AWFuzzySearchingDelegate 34 | 35 | - (void)threwError:(NSString *)e; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /alp/alp/request/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | 14 | """ 15 | 16 | 17 | HOOKS = ['response'] 18 | 19 | 20 | def default_hooks(): 21 | hooks = {} 22 | for event in HOOKS: 23 | hooks[event] = [] 24 | return hooks 25 | 26 | # TODO: response is the only one 27 | 28 | 29 | def dispatch_hook(key, hooks, hook_data, **kwargs): 30 | """Dispatches a hook dictionary on a given piece of data.""" 31 | 32 | hooks = hooks or dict() 33 | 34 | if key in hooks: 35 | hooks = hooks.get(key) 36 | 37 | if hasattr(hooks, '__call__'): 38 | hooks = [hooks] 39 | 40 | for hook in hooks: 41 | _hook_data = hook(hook_data, **kwargs) 42 | if _hook_data is not None: 43 | hook_data = _hook_data 44 | 45 | return hook_data 46 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | 14 | """ 15 | 16 | 17 | HOOKS = ['response'] 18 | 19 | 20 | def default_hooks(): 21 | hooks = {} 22 | for event in HOOKS: 23 | hooks[event] = [] 24 | return hooks 25 | 26 | # TODO: response is the only one 27 | 28 | 29 | def dispatch_hook(key, hooks, hook_data, **kwargs): 30 | """Dispatches a hook dictionary on a given piece of data.""" 31 | 32 | hooks = hooks or dict() 33 | 34 | if key in hooks: 35 | hooks = hooks.get(key) 36 | 37 | if hasattr(hooks, '__call__'): 38 | hooks = [hooks] 39 | 40 | for hook in hooks: 41 | _hook_data = hook(hook_data, **kwargs) 42 | if _hook_data is not None: 43 | hook_data = _hook_data 44 | 45 | return hook_data 46 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | 14 | """ 15 | 16 | 17 | HOOKS = ['response'] 18 | 19 | 20 | def default_hooks(): 21 | hooks = {} 22 | for event in HOOKS: 23 | hooks[event] = [] 24 | return hooks 25 | 26 | # TODO: response is the only one 27 | 28 | 29 | def dispatch_hook(key, hooks, hook_data, **kwargs): 30 | """Dispatches a hook dictionary on a given piece of data.""" 31 | 32 | hooks = hooks or dict() 33 | 34 | if key in hooks: 35 | hooks = hooks.get(key) 36 | 37 | if hasattr(hooks, '__call__'): 38 | hooks = [hooks] 39 | 40 | for hook in hooks: 41 | _hook_data = hook(hook_data, **kwargs) 42 | if _hook_data is not None: 43 | hook_data = _hook_data 44 | 45 | return hook_data 46 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | 14 | """ 15 | 16 | 17 | HOOKS = ['response'] 18 | 19 | 20 | def default_hooks(): 21 | hooks = {} 22 | for event in HOOKS: 23 | hooks[event] = [] 24 | return hooks 25 | 26 | # TODO: response is the only one 27 | 28 | 29 | def dispatch_hook(key, hooks, hook_data, **kwargs): 30 | """Dispatches a hook dictionary on a given piece of data.""" 31 | 32 | hooks = hooks or dict() 33 | 34 | if key in hooks: 35 | hooks = hooks.get(key) 36 | 37 | if hasattr(hooks, '__call__'): 38 | hooks = [hooks] 39 | 40 | for hook in hooks: 41 | _hook_data = hook(hook_data, **kwargs) 42 | if _hook_data is not None: 43 | hook_data = _hook_data 44 | 45 | return hook_data 46 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/oauthlib/oauth2/draft25/utils.py: -------------------------------------------------------------------------------- 1 | """ 2 | oauthlib.utils 3 | ~~~~~~~~~~~~~~ 4 | 5 | This module contains utility methods used by various parts of the OAuth 2 spec. 6 | """ 7 | 8 | import urllib 9 | import urlparse 10 | 11 | 12 | def host_from_uri(uri): 13 | """Extract hostname and port from URI. 14 | 15 | Will use default port for HTTP and HTTPS if none is present in the URI. 16 | """ 17 | default_ports = { 18 | u'HTTP': u'80', 19 | u'HTTPS': u'443', 20 | } 21 | 22 | sch, netloc, path, par, query, fra = urlparse.urlparse(uri) 23 | if u':' in netloc: 24 | netloc, port = netloc.split(u':', 1) 25 | else: 26 | port = default_ports.get(sch.upper()) 27 | 28 | return netloc, port 29 | 30 | 31 | def escape(u): 32 | """Escape a string in an OAuth-compatible fashion. 33 | 34 | TODO: verify whether this can in fact be used for OAuth 2 35 | 36 | """ 37 | if not isinstance(u, unicode): 38 | raise ValueError('Only unicode objects are escapable.') 39 | return urllib.quote(u.encode('utf-8'), safe='~') 40 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/oauthlib/oauth2/draft25/utils.py: -------------------------------------------------------------------------------- 1 | """ 2 | oauthlib.utils 3 | ~~~~~~~~~~~~~~ 4 | 5 | This module contains utility methods used by various parts of the OAuth 2 spec. 6 | """ 7 | 8 | import urllib 9 | import urlparse 10 | 11 | 12 | def host_from_uri(uri): 13 | """Extract hostname and port from URI. 14 | 15 | Will use default port for HTTP and HTTPS if none is present in the URI. 16 | """ 17 | default_ports = { 18 | u'HTTP': u'80', 19 | u'HTTPS': u'443', 20 | } 21 | 22 | sch, netloc, path, par, query, fra = urlparse.urlparse(uri) 23 | if u':' in netloc: 24 | netloc, port = netloc.split(u':', 1) 25 | else: 26 | port = default_ports.get(sch.upper()) 27 | 28 | return netloc, port 29 | 30 | 31 | def escape(u): 32 | """Escape a string in an OAuth-compatible fashion. 33 | 34 | TODO: verify whether this can in fact be used for OAuth 2 35 | 36 | """ 37 | if not isinstance(u, unicode): 38 | raise ValueError('Only unicode objects are escapable.') 39 | return urllib.quote(u.encode('utf-8'), safe='~') 40 | -------------------------------------------------------------------------------- /Yourls Stats/act.py: -------------------------------------------------------------------------------- 1 | from subprocess import call 2 | import alp 3 | 4 | 5 | def act(): 6 | args = alp.args() 7 | if args[0] == "configure": 8 | url = args[1] 9 | sig = args[2] 10 | 11 | s = alp.Settings() 12 | s_dict = {"url": url} 13 | s.set(**s_dict) 14 | 15 | kc = alp.Keychain("yourls_stats") 16 | if not kc.retrievePassword("signature"): 17 | kc.storePassword("signature", sig) 18 | else: 19 | kc.modifyPassword("signature", sig) 20 | 21 | info = alp.readPlist(alp.local("info.plist")) 22 | objs = info['objects'] 23 | kw = None 24 | for o in objs: 25 | if o['type'] == "alfred.workflow.input.scriptfilter": 26 | kw = o['config']['keyword'] 27 | break 28 | 29 | if kw: 30 | scpt = "tell application \"Alfred 2\" to search \"{0}\"".format(kw) 31 | call(["osascript", "-e", scpt]) 32 | 33 | print "Yourls Configured" 34 | 35 | elif args[0] == "copy": 36 | print args[1] 37 | 38 | if __name__ == "__main__": 39 | act() 40 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/Alfred-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.danielsh.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 0.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 0.2 25 | NSHumanReadableCopyright 26 | Licensed from Daniel Shannon (d@daniel.sh) under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Thoughts/think.py: -------------------------------------------------------------------------------- 1 | import uuid 2 | import sys 3 | import alp 4 | from alp.item import Item as I 5 | 6 | 7 | def main(): 8 | q = sys.argv[1] 9 | # args = q.split(" ", maxsplit=1) 10 | 11 | thoughts = alp.jsonLoad("thoughts.json", default=[]) 12 | 13 | feedback = [] 14 | uid = str(uuid.uuid4()) 15 | addItem = I(title="Add a Thought", subtitle=q, 16 | arg=u"save \"{0}\" \"{1}\"".format(uid, q), valid=True) 17 | 18 | if len(thoughts) == 0: 19 | feedback.append(addItem) 20 | elif len(thoughts) and len(q): 21 | feedback.append(addItem) 22 | t = alp.fuzzy_search(q, thoughts, key=lambda x: x["thought"]) 23 | for r in t: 24 | feedback.append(I(title=r["thought"], subtitle="Copy to clipboard.", 25 | arg=u"copy \"{0}\"".format(r["uuid"]), valid=True)) 26 | elif len(thoughts): 27 | for r in thoughts: 28 | feedback.append(I(title=r["thought"], subtitle="Copy to clipboard.", 29 | arg=u"copy \"{0}\"".format(r["uuid"]), valid=True)) 30 | 31 | alp.feedback(feedback) 32 | 33 | if __name__ == "__main__": 34 | main() 35 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "1.0.1" 19 | 20 | def detect(aBuf): 21 | import universaldetector 22 | u = universaldetector.UniversalDetector() 23 | u.reset() 24 | u.feed(aBuf) 25 | u.close() 26 | return u.result 27 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "1.0.1" 19 | 20 | def detect(aBuf): 21 | import universaldetector 22 | u = universaldetector.UniversalDetector() 23 | u.reset() 24 | u.feed(aBuf) 25 | u.close() 26 | return u.result 27 | -------------------------------------------------------------------------------- /alp/alp/request/requests_cache/backends/sqlite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.sqlite 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``sqlite3`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.dbdict import DbDict, DbPickleDict 11 | 12 | 13 | class DbCache(BaseCache): 14 | """ sqlite cache backend. 15 | 16 | Reading is fast, saving is a bit slower. It can store big amount of data 17 | with low memory usage. 18 | """ 19 | def __init__(self, location='cache', 20 | fast_save=False, extension='.sqlite', **options): 21 | """ 22 | :param location: database filename prefix (default: ``'cache'``) 23 | :param fast_save: Speedup cache saving up to 50 times but with possibility of data loss. 24 | See :ref:`backends.DbDict ` for more info 25 | :param extension: extension for filename (default: ``'.sqlite'``) 26 | """ 27 | super(DbCache, self).__init__() 28 | self.responses = DbPickleDict(location + extension, 'responses', fast_save=fast_save) 29 | self.keys_map = DbDict(location + extension, 'urls') 30 | 31 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests_cache/backends/sqlite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.sqlite 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``sqlite3`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.dbdict import DbDict, DbPickleDict 11 | 12 | 13 | class DbCache(BaseCache): 14 | """ sqlite cache backend. 15 | 16 | Reading is fast, saving is a bit slower. It can store big amount of data 17 | with low memory usage. 18 | """ 19 | def __init__(self, location='cache', 20 | fast_save=False, extension='.sqlite', **options): 21 | """ 22 | :param location: database filename prefix (default: ``'cache'``) 23 | :param fast_save: Speedup cache saving up to 50 times but with possibility of data loss. 24 | See :ref:`backends.DbDict ` for more info 25 | :param extension: extension for filename (default: ``'.sqlite'``) 26 | """ 27 | super(DbCache, self).__init__() 28 | self.responses = DbPickleDict(location + extension, 'responses', fast_save=fast_save) 29 | self.keys_map = DbDict(location + extension, 'urls') 30 | 31 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests_cache/backends/sqlite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.sqlite 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``sqlite3`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .dbdict import DbDict, DbPickleDict 11 | 12 | 13 | class DbCache(BaseCache): 14 | """ sqlite cache backend. 15 | 16 | Reading is fast, saving is a bit slower. It can store big amount of data 17 | with low memory usage. 18 | """ 19 | def __init__(self, location='cache', 20 | fast_save=False, extension='.sqlite', **options): 21 | """ 22 | :param location: database filename prefix (default: ``'cache'``) 23 | :param fast_save: Speedup cache saving up to 50 times but with possibility of data loss. 24 | See :ref:`backends.DbDict ` for more info 25 | :param extension: extension for filename (default: ``'.sqlite'``) 26 | """ 27 | super(DbCache, self).__init__() 28 | self.responses = DbPickleDict(location + extension, 'responses', fast_save=fast_save) 29 | self.url_map = DbDict(location + extension, 'urls') 30 | 31 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests_cache/backends/sqlite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.sqlite 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``sqlite3`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .dbdict import DbDict, DbPickleDict 11 | 12 | 13 | class DbCache(BaseCache): 14 | """ sqlite cache backend. 15 | 16 | Reading is fast, saving is a bit slower. It can store big amount of data 17 | with low memory usage. 18 | """ 19 | def __init__(self, location='cache', 20 | fast_save=False, extension='.sqlite', **options): 21 | """ 22 | :param location: database filename prefix (default: ``'cache'``) 23 | :param fast_save: Speedup cache saving up to 50 times but with possibility of data loss. 24 | See :ref:`backends.DbDict ` for more info 25 | :param extension: extension for filename (default: ``'.sqlite'``) 26 | """ 27 | super(DbCache, self).__init__() 28 | self.responses = DbPickleDict(location + extension, 'responses', fast_save=fast_save) 29 | self.url_map = DbDict(location + extension, 'urls') 30 | 31 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests_cache/backends/sqlite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.sqlite 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``sqlite3`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.dbdict import DbDict, DbPickleDict 11 | 12 | 13 | class DbCache(BaseCache): 14 | """ sqlite cache backend. 15 | 16 | Reading is fast, saving is a bit slower. It can store big amount of data 17 | with low memory usage. 18 | """ 19 | def __init__(self, location='cache', 20 | fast_save=False, extension='.sqlite', **options): 21 | """ 22 | :param location: database filename prefix (default: ``'cache'``) 23 | :param fast_save: Speedup cache saving up to 50 times but with possibility of data loss. 24 | See :ref:`backends.DbDict ` for more info 25 | :param extension: extension for filename (default: ``'.sqlite'``) 26 | """ 27 | super(DbCache, self).__init__() 28 | self.responses = DbPickleDict(location + extension, 'responses', fast_save=fast_save) 29 | self.keys_map = DbDict(location + extension, 'urls') 30 | 31 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests_cache/backends/sqlite.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | requests_cache.backends.sqlite 5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | 7 | ``sqlite3`` cache backend 8 | """ 9 | from .base import BaseCache 10 | from .storage.dbdict import DbDict, DbPickleDict 11 | 12 | 13 | class DbCache(BaseCache): 14 | """ sqlite cache backend. 15 | 16 | Reading is fast, saving is a bit slower. It can store big amount of data 17 | with low memory usage. 18 | """ 19 | def __init__(self, location='cache', 20 | fast_save=False, extension='.sqlite', **options): 21 | """ 22 | :param location: database filename prefix (default: ``'cache'``) 23 | :param fast_save: Speedup cache saving up to 50 times but with possibility of data loss. 24 | See :ref:`backends.DbDict ` for more info 25 | :param extension: extension for filename (default: ``'.sqlite'``) 26 | """ 27 | super(DbCache, self).__init__() 28 | self.responses = DbPickleDict(location + extension, 'responses', fast_save=fast_save) 29 | self.keys_map = DbDict(location + extension, 'urls') 30 | 31 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``args``: 12 | A dictionary of the arguments being sent to Request(). 13 | 14 | ``pre_request``: 15 | The Request object, directly after being created. 16 | 17 | ``pre_send``: 18 | The Request object, directly before being sent. 19 | 20 | ``post_request``: 21 | The Request object, directly after being sent. 22 | 23 | ``response``: 24 | The response generated from a Request. 25 | 26 | """ 27 | 28 | 29 | HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response') 30 | 31 | 32 | def dispatch_hook(key, hooks, hook_data): 33 | """Dispatches a hook dictionary on a given piece of data.""" 34 | 35 | hooks = hooks or dict() 36 | 37 | if key in hooks: 38 | hooks = hooks.get(key) 39 | 40 | if hasattr(hooks, '__call__'): 41 | hooks = [hooks] 42 | 43 | for hook in hooks: 44 | _hook_data = hook(hook_data) 45 | if _hook_data is not None: 46 | hook_data = _hook_data 47 | 48 | return hook_data 49 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``args``: 12 | A dictionary of the arguments being sent to Request(). 13 | 14 | ``pre_request``: 15 | The Request object, directly after being created. 16 | 17 | ``pre_send``: 18 | The Request object, directly before being sent. 19 | 20 | ``post_request``: 21 | The Request object, directly after being sent. 22 | 23 | ``response``: 24 | The response generated from a Request. 25 | 26 | """ 27 | 28 | 29 | HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response') 30 | 31 | 32 | def dispatch_hook(key, hooks, hook_data): 33 | """Dispatches a hook dictionary on a given piece of data.""" 34 | 35 | hooks = hooks or dict() 36 | 37 | if key in hooks: 38 | hooks = hooks.get(key) 39 | 40 | if hasattr(hooks, '__call__'): 41 | hooks = [hooks] 42 | 43 | for hook in hooks: 44 | _hook_data = hook(hook_data) 45 | if _hook_data is not None: 46 | hook_data = _hook_data 47 | 48 | return hook_data 49 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet2/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "2.0.1" 19 | 20 | def detect(aBuf): 21 | from . import universaldetector 22 | u = universaldetector.UniversalDetector() 23 | u.reset() 24 | u.feed(aBuf) 25 | u.close() 26 | return u.result 27 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet2/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "2.0.1" 19 | 20 | def detect(aBuf): 21 | from . import universaldetector 22 | u = universaldetector.UniversalDetector() 23 | u.reset() 24 | u.feed(aBuf) 25 | u.close() 26 | return u.result 27 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/implementation/NSString+XMLEscaping.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+XMLEscaping.m 3 | // AlfredWorkflow 4 | // 5 | // Created by Daniel Shannon on 5/24/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import "NSString+XMLEscaping.h" 10 | 11 | @implementation NSString (XMLEscaping) 12 | 13 | - (NSString *)escapedString 14 | { 15 | NSMutableString *esc = [[NSMutableString alloc] initWithString:self]; 16 | NSRange whole = NSMakeRange(0, [self length]); 17 | 18 | [esc replaceOccurrencesOfString:@"&" withString:@"&" options:NSLiteralSearch range:whole]; 19 | whole = NSMakeRange(0, [esc length]); 20 | [esc replaceOccurrencesOfString:@"\"" withString:@""" options:NSLiteralSearch range:whole]; 21 | whole = NSMakeRange(0, [esc length]); 22 | [esc replaceOccurrencesOfString:@"'" withString:@"'" options:NSLiteralSearch range:whole]; 23 | whole = NSMakeRange(0, [esc length]); 24 | [esc replaceOccurrencesOfString:@"<" withString:@"<" options:NSLiteralSearch range:whole]; 25 | whole = NSMakeRange(0, [esc length]); 26 | [esc replaceOccurrencesOfString:@">" withString:@">" options:NSLiteralSearch range:whole]; 27 | 28 | return esc; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/headers/AWWorkflow.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWWorkflow.h 3 | // alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWWorkflow : NSObject 12 | 13 | # pragma mark - 14 | # pragma mark Class methods 15 | 16 | + (id)workflow; 17 | 18 | 19 | 20 | 21 | 22 | #pragma mark - 23 | #pragma mark Instance methods 24 | 25 | - (NSString *)bundleID; 26 | - (NSString *)local; 27 | - (NSString *)local:(NSString *)filename; 28 | - (NSString *)cache; 29 | - (NSString *)cache:(NSString *)filename; 30 | - (NSString *)storage; 31 | - (NSString *)storage:(NSString *)filename; 32 | 33 | - (void)log:(NSString *)s, ...; 34 | 35 | - (void)flush:(BOOL)f feedbackItems:(id)fbi, ... NS_REQUIRES_NIL_TERMINATION; 36 | - (void)flush:(BOOL)f feedbackArray:(NSArray *)fba; 37 | 38 | - (NSArray *)fuzzySearchFor:(NSString *)query in:(NSArray *)array withKeyBlock:(NSString *(^)(id))key; 39 | 40 | - (NSDictionary *)parseArguments:(const char *[])argv withKeys:(NSArray *)keys count:(int)argc; 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | #pragma mark - 49 | #pragma mark Properties 50 | 51 | @property (readonly) NSString *bid; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/PrivateHeaders/AWWorkflow.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWWorkflow.h 3 | // alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWWorkflow : NSObject 12 | 13 | # pragma mark - 14 | # pragma mark Class methods 15 | 16 | + (id)workflow; 17 | 18 | 19 | 20 | 21 | 22 | #pragma mark - 23 | #pragma mark Instance methods 24 | 25 | - (NSString *)bundleID; 26 | - (NSString *)local; 27 | - (NSString *)local:(NSString *)filename; 28 | - (NSString *)cache; 29 | - (NSString *)cache:(NSString *)filename; 30 | - (NSString *)storage; 31 | - (NSString *)storage:(NSString *)filename; 32 | 33 | - (void)log:(NSString *)s, ...; 34 | 35 | - (void)flush:(BOOL)f feedbackItems:(id)fbi, ... NS_REQUIRES_NIL_TERMINATION; 36 | - (void)flush:(BOOL)f feedbackArray:(NSArray *)fba; 37 | 38 | - (NSArray *)fuzzySearchFor:(NSString *)query in:(NSArray *)array withKeyBlock:(NSString *(^)(id))key; 39 | 40 | - (NSDictionary *)parseArguments:(const char *[])argv withKeys:(NSArray *)keys count:(int)argc; 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | #pragma mark - 49 | #pragma mark Properties 50 | 51 | @property (readonly) NSString *bid; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/A/PrivateHeaders/AWWorkflow.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWWorkflow.h 3 | // alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWWorkflow : NSObject 12 | 13 | # pragma mark - 14 | # pragma mark Class methods 15 | 16 | + (id)workflow; 17 | 18 | 19 | 20 | 21 | 22 | #pragma mark - 23 | #pragma mark Instance methods 24 | 25 | - (NSString *)bundleID; 26 | - (NSString *)local; 27 | - (NSString *)local:(NSString *)filename; 28 | - (NSString *)cache; 29 | - (NSString *)cache:(NSString *)filename; 30 | - (NSString *)storage; 31 | - (NSString *)storage:(NSString *)filename; 32 | 33 | - (void)log:(NSString *)s, ...; 34 | 35 | - (void)flush:(BOOL)f feedbackItems:(id)fbi, ... NS_REQUIRES_NIL_TERMINATION; 36 | - (void)flush:(BOOL)f feedbackArray:(NSArray *)fba; 37 | 38 | - (NSArray *)fuzzySearchFor:(NSString *)query in:(NSArray *)array withKeyBlock:(NSString *(^)(id))key; 39 | 40 | - (NSDictionary *)parseArguments:(const char *[])argv withKeys:(NSArray *)keys count:(int)argc; 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | #pragma mark - 49 | #pragma mark Properties 50 | 51 | @property (readonly) NSString *bid; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/Current/PrivateHeaders/AWWorkflow.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWWorkflow.h 3 | // alfred 4 | // 5 | // Created by Daniel Shannon on 5/25/13. 6 | // Copyright (c) 2013 Daniel Shannon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AWWorkflow : NSObject 12 | 13 | # pragma mark - 14 | # pragma mark Class methods 15 | 16 | + (id)workflow; 17 | 18 | 19 | 20 | 21 | 22 | #pragma mark - 23 | #pragma mark Instance methods 24 | 25 | - (NSString *)bundleID; 26 | - (NSString *)local; 27 | - (NSString *)local:(NSString *)filename; 28 | - (NSString *)cache; 29 | - (NSString *)cache:(NSString *)filename; 30 | - (NSString *)storage; 31 | - (NSString *)storage:(NSString *)filename; 32 | 33 | - (void)log:(NSString *)s, ...; 34 | 35 | - (void)flush:(BOOL)f feedbackItems:(id)fbi, ... NS_REQUIRES_NIL_TERMINATION; 36 | - (void)flush:(BOOL)f feedbackArray:(NSArray *)fba; 37 | 38 | - (NSArray *)fuzzySearchFor:(NSString *)query in:(NSArray *)array withKeyBlock:(NSString *(^)(id))key; 39 | 40 | - (NSDictionary *)parseArguments:(const char *[])argv withKeys:(NSArray *)keys count:(int)argc; 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | #pragma mark - 49 | #pragma mark Properties 50 | 51 | @property (readonly) NSString *bid; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.exceptions 5 | ~~~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Requests' exceptions. 8 | 9 | """ 10 | 11 | 12 | class RequestException(RuntimeError): 13 | """There was an ambiguous exception that occurred while handling your 14 | request.""" 15 | 16 | 17 | class HTTPError(RequestException): 18 | """An HTTP error occurred.""" 19 | response = None 20 | 21 | 22 | class ConnectionError(RequestException): 23 | """A Connection error occurred.""" 24 | 25 | 26 | class SSLError(ConnectionError): 27 | """An SSL error occurred.""" 28 | 29 | 30 | class Timeout(RequestException): 31 | """The request timed out.""" 32 | 33 | 34 | class URLRequired(RequestException): 35 | """A valid URL is required to make a request.""" 36 | 37 | 38 | class TooManyRedirects(RequestException): 39 | """Too many redirects.""" 40 | 41 | 42 | class MissingSchema(RequestException, ValueError): 43 | """The URL schema (e.g. http or https) is missing.""" 44 | 45 | 46 | class InvalidSchema(RequestException, ValueError): 47 | """See defaults.py for valid schemas.""" 48 | 49 | 50 | class InvalidURL(RequestException, ValueError): 51 | """ The URL provided was somehow invalid. """ 52 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.exceptions 5 | ~~~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Requests' exceptions. 8 | 9 | """ 10 | 11 | 12 | class RequestException(RuntimeError): 13 | """There was an ambiguous exception that occurred while handling your 14 | request.""" 15 | 16 | 17 | class HTTPError(RequestException): 18 | """An HTTP error occurred.""" 19 | response = None 20 | 21 | 22 | class ConnectionError(RequestException): 23 | """A Connection error occurred.""" 24 | 25 | 26 | class SSLError(ConnectionError): 27 | """An SSL error occurred.""" 28 | 29 | 30 | class Timeout(RequestException): 31 | """The request timed out.""" 32 | 33 | 34 | class URLRequired(RequestException): 35 | """A valid URL is required to make a request.""" 36 | 37 | 38 | class TooManyRedirects(RequestException): 39 | """Too many redirects.""" 40 | 41 | 42 | class MissingSchema(RequestException, ValueError): 43 | """The URL schema (e.g. http or https) is missing.""" 44 | 45 | 46 | class InvalidSchema(RequestException, ValueError): 47 | """See defaults.py for valid schemas.""" 48 | 49 | 50 | class InvalidURL(RequestException, ValueError): 51 | """ The URL provided was somehow invalid. """ 52 | -------------------------------------------------------------------------------- /Alfred.framework/Alfred/implementation/NSFileManager+AWFindOrCreate.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager+AWFindOrCreate.m 3 | // alfred 4 | // 5 | 6 | #import "NSFileManager+AWFindOrCreate.h" 7 | 8 | @implementation NSFileManager (AWFindOrCreate) 9 | 10 | - (NSString *)findDirectory:(NSSearchPathDirectory)searchPathDirectory inDomain:(NSSearchPathDomainMask)domainMask appendingPathComponent:(NSString *)append 11 | { 12 | NSArray *paths = NSSearchPathForDirectoriesInDomains(searchPathDirectory, domainMask, YES); 13 | if ([paths count] == 0) { 14 | return nil; 15 | } 16 | 17 | NSString *path = [paths objectAtIndex:0]; 18 | if (append) { 19 | path = [path stringByAppendingPathComponent:append]; 20 | } 21 | 22 | return path; 23 | } 24 | 25 | - (void)createIfNonexistent:(NSString *)dir 26 | { 27 | NSError *creationError; 28 | [self createDirectoryAtPath:dir withIntermediateDirectories:YES attributes:nil error:&creationError]; 29 | } 30 | 31 | - (NSString *)applicationSupportDirectory 32 | { 33 | 34 | return [self findDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appendingPathComponent:nil]; 35 | } 36 | 37 | - (NSString *)cacheDirectory 38 | { 39 | return [self findDirectory:NSCachesDirectory inDomain:NSUserDomainMask appendingPathComponent:nil]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Things/act.py: -------------------------------------------------------------------------------- 1 | import alp 2 | import subprocess 3 | 4 | 5 | def scpt(innards): 6 | return u''' 7 | tell application "Things" 8 | activate 9 | {0} 10 | end tell'''.format(innards.decode("utf-8")) 11 | 12 | 13 | def scpt_act(innards): 14 | return u''' 15 | tell application "Things" 16 | activate 17 | set index of window "Things" to 1 18 | {0} 19 | end tell'''.format(innards.decode("utf-8")) 20 | 21 | def wake_up(): 22 | return u''' 23 | tell application "Things" 24 | launch 25 | end tell''' 26 | 27 | def process(): 28 | args = alp.args() 29 | 30 | o = subprocess.call(["osascript", "-e", wake_up()]) 31 | 32 | if args[0] == "parse": 33 | inp = args[1] 34 | if "\"" in inp: 35 | inp = inp.replace("\"", "\\\"") 36 | o = subprocess.call(["osascript", "-e", scpt("parse quicksilver input \"{0}\"".format(inp.encode("utf-8")))]) 37 | # print "Task added." 38 | elif args[0] == "show": 39 | thing = args[1] 40 | inp = args[2] 41 | if "\"" in inp: 42 | inp = inp.replace("\"", "\\\"") 43 | o = subprocess.call(["osascript", "-e", scpt_act("show ({0} named \"{1}\")".format(thing.encode("utf-8"), inp.encode("utf-8")))]) 44 | # print "Showing..." 45 | 46 | 47 | if __name__ == "__main__": 48 | process() 49 | -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/charade/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Ian Cordasco - port to Python 4 | # 5 | # This library is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | # 02110-1301 USA 19 | ######################### END LICENSE BLOCK ######################### 20 | 21 | import sys 22 | 23 | 24 | if sys.version_info < (3, 0): 25 | base_str = (str, unicode) 26 | else: 27 | base_str = (bytes, str) 28 | 29 | 30 | def wrap_ord(a): 31 | if sys.version_info < (3, 0) and isinstance(a, base_str): 32 | return ord(a) 33 | else: 34 | return a 35 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/packages/charade/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Ian Cordasco - port to Python 4 | # 5 | # This library is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | # 02110-1301 USA 19 | ######################### END LICENSE BLOCK ######################### 20 | 21 | import sys 22 | 23 | 24 | if sys.version_info < (3, 0): 25 | base_str = (str, unicode) 26 | else: 27 | base_str = (bytes, str) 28 | 29 | 30 | def wrap_ord(a): 31 | if sys.version_info < (3, 0) and isinstance(a, base_str): 32 | return ord(a) 33 | else: 34 | return a 35 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/packages/charade/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Ian Cordasco - port to Python 4 | # 5 | # This library is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | # 02110-1301 USA 19 | ######################### END LICENSE BLOCK ######################### 20 | 21 | import sys 22 | 23 | 24 | if sys.version_info < (3, 0): 25 | base_str = (str, unicode) 26 | else: 27 | base_str = (bytes, str) 28 | 29 | 30 | def wrap_ord(a): 31 | if sys.version_info < (3, 0) and isinstance(a, base_str): 32 | return ord(a) 33 | else: 34 | return a 35 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/packages/charade/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Ian Cordasco - port to Python 4 | # 5 | # This library is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | # 02110-1301 USA 19 | ######################### END LICENSE BLOCK ######################### 20 | 21 | import sys 22 | 23 | 24 | if sys.version_info < (3, 0): 25 | base_str = (str, unicode) 26 | else: 27 | base_str = (bytes, str) 28 | 29 | 30 | def wrap_ord(a): 31 | if sys.version_info < (3, 0) and isinstance(a, base_str): 32 | return ord(a) 33 | else: 34 | return a 35 | -------------------------------------------------------------------------------- /alp/alp/settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import json 4 | import os 5 | import alp.core as core 6 | import codecs 7 | 8 | 9 | class Settings(object): 10 | def __init__(self): 11 | self._settingsPath = core.storage("settings.json") 12 | if not os.path.exists(self._settingsPath): 13 | blank = {} 14 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 15 | json.dump(blank, f) 16 | self._loadedSettings = blank 17 | else: 18 | with codecs.open(self._settingsPath, "r", "utf-8") as f: 19 | payload = json.load(f) 20 | self._loadedSettings = payload 21 | 22 | def set(self, **kwargs): 23 | for (k, v) in kwargs.iteritems(): 24 | self._loadedSettings[k] = v 25 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 26 | json.dump(self._loadedSettings, f) 27 | 28 | def get(self, k, default=None): 29 | try: 30 | return self._loadedSettings[k] 31 | except KeyError: 32 | return default 33 | 34 | def delete(self, k): 35 | if k in self._loadedSettings.keys(): 36 | self._loadedSettings.pop(k) 37 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 38 | json.dump(self._loadedSettings, f) 39 | -------------------------------------------------------------------------------- /Yourls Stats/alp/settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import json 4 | import os 5 | import alp.core as core 6 | import codecs 7 | 8 | 9 | class Settings(object): 10 | def __init__(self): 11 | self._settingsPath = core.storage("settings.json") 12 | if not os.path.exists(self._settingsPath): 13 | blank = {} 14 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 15 | json.dump(blank, f) 16 | self._loadedSettings = blank 17 | else: 18 | with codecs.open(self._settingsPath, "r", "utf-8") as f: 19 | payload = json.load(f) 20 | self._loadedSettings = payload 21 | 22 | def set(self, **kwargs): 23 | for (k, v) in kwargs.iteritems(): 24 | self._loadedSettings[k] = v 25 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 26 | json.dump(self._loadedSettings, f) 27 | 28 | def get(self, k, default=None): 29 | try: 30 | return self._loadedSettings[k] 31 | except KeyError: 32 | return default 33 | 34 | def delete(self, k): 35 | if k in self._loadedSettings.keys(): 36 | self._loadedSettings.pop(k) 37 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 38 | json.dump(self._loadedSettings, f) 39 | -------------------------------------------------------------------------------- /iTunes Store/alp/settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import json 4 | import os 5 | import alp.core as core 6 | import codecs 7 | 8 | 9 | class Settings(object): 10 | def __init__(self): 11 | self._settingsPath = core.storage("settings.json") 12 | if not os.path.exists(self._settingsPath): 13 | blank = {} 14 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 15 | json.dump(blank, f) 16 | self._loadedSettings = blank 17 | else: 18 | with codecs.open(self._settingsPath, "r", "utf-8") as f: 19 | payload = json.load(f) 20 | self._loadedSettings = payload 21 | 22 | def set(self, **kwargs): 23 | for (k, v) in kwargs.iteritems(): 24 | self._loadedSettings[k] = v 25 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 26 | json.dump(self._loadedSettings, f) 27 | 28 | def get(self, k, default=None): 29 | try: 30 | return self._loadedSettings[k] 31 | except KeyError: 32 | return default 33 | 34 | def delete(self, k): 35 | if k in self._loadedSettings.keys(): 36 | self._loadedSettings.pop(k) 37 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 38 | json.dump(self._loadedSettings, f) 39 | -------------------------------------------------------------------------------- /Create New File/alp/settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import json 4 | import os 5 | import alp.core as core 6 | import codecs 7 | 8 | 9 | class Settings(object): 10 | def __init__(self): 11 | self._settingsPath = core.storage("settings.json") 12 | if not os.path.exists(self._settingsPath): 13 | blank = {} 14 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 15 | json.dump(blank, f) 16 | self._loadedSettings = blank 17 | else: 18 | with codecs.open(self._settingsPath, "r", "utf-8") as f: 19 | payload = json.load(f) 20 | self._loadedSettings = payload 21 | 22 | def set(self, **kwargs): 23 | for (k, v) in kwargs.iteritems(): 24 | self._loadedSettings[k] = v 25 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 26 | json.dump(self._loadedSettings, f) 27 | 28 | def get(self, k, default=None): 29 | try: 30 | return self._loadedSettings[k] 31 | except KeyError: 32 | return default 33 | 34 | def delete(self, k): 35 | if k in self._loadedSettings.keys(): 36 | self._loadedSettings.pop(k) 37 | with codecs.open(self._settingsPath, "w", "utf-8") as f: 38 | json.dump(self._loadedSettings, f) 39 | -------------------------------------------------------------------------------- /Secure Copy/PyAl/Settings.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | from .core import * 4 | 5 | 6 | class Settings: 7 | def __init__(self): 8 | bundleID = bundle() 9 | self._settingsPath = nonvolatile(bundleID + ".settings.json") 10 | if not os.path.exists(self._settingsPath): 11 | blank = {} 12 | with open(self._settingsPath, "w") as f: 13 | json.dump(blank, f) 14 | self._loadedSettings = blank 15 | else: 16 | with open(self._settingsPath, "r") as f: 17 | payload = json.load(f) 18 | self._loadedSettings = payload 19 | 20 | def set(self, **kwargs): 21 | for (k, v) in kwargs.iteritems(): 22 | self._loadedSettings[k] = v 23 | with open(self._settingsPath, "w") as f: 24 | json.dump(self._loadedSettings, f) 25 | 26 | def get(self, k, default=None): 27 | try: 28 | return self._loadedSettings[k] 29 | except KeyError: 30 | return default 31 | 32 | def delete(self, k): 33 | try: 34 | if k in self._loadedSettings.keys(): 35 | self._loadedSettings.pop(k) 36 | with open(self._settingsPath, "w") as f: 37 | json.dump(self._loadedSettings, f) 38 | except Exception: 39 | pass 40 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Settings.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | from .core import * 4 | 5 | 6 | class Settings: 7 | def __init__(self): 8 | bundleID = bundle() 9 | self._settingsPath = nonvolatile(bundleID + ".settings.json") 10 | if not os.path.exists(self._settingsPath): 11 | blank = {} 12 | with open(self._settingsPath, "w") as f: 13 | json.dump(blank, f) 14 | self._loadedSettings = blank 15 | else: 16 | with open(self._settingsPath, "r") as f: 17 | payload = json.load(f) 18 | self._loadedSettings = payload 19 | 20 | def set(self, **kwargs): 21 | for (k, v) in kwargs.iteritems(): 22 | self._loadedSettings[k] = v 23 | with open(self._settingsPath, "w") as f: 24 | json.dump(self._loadedSettings, f) 25 | 26 | def get(self, k, default=None): 27 | try: 28 | return self._loadedSettings[k] 29 | except KeyError: 30 | return default 31 | 32 | def delete(self, k): 33 | try: 34 | if k in self._loadedSettings.keys(): 35 | self._loadedSettings.pop(k) 36 | with open(self._settingsPath, "w") as f: 37 | json.dump(self._loadedSettings, f) 38 | except Exception: 39 | pass 40 | -------------------------------------------------------------------------------- /alp/alp/notification.py: -------------------------------------------------------------------------------- 1 | import threading 2 | import objc 3 | from Foundation import * 4 | from AppKit import * 5 | from PyObjCTools import AppHelper 6 | import platform 7 | import alp.core as core 8 | 9 | 10 | NSUserNotificationActivationTypeNone = 0 11 | NSUserNotificationActivationTypeContentsClicked = 1 12 | NSUserNotificationActivationTypeActionButtonClicked = 2 13 | 14 | 15 | class Notification(object): 16 | def notify(self, title, subtitle, text, info=None): 17 | v, _, _ = platform.mac_ver() 18 | v = float('.'.join(v.split('.')[:2])) 19 | if v < 10.8: 20 | core.log("Notification failed: OS version %s < 10.8." % v) 21 | return 22 | 23 | app = NSApplication.sharedApplication() 24 | 25 | NSUserNotification = objc.lookUpClass("NSUserNotification") 26 | NSUserNotificationCenter = objc.lookUpClass("NSUserNotificationCenter") 27 | notification = NSUserNotification.alloc().init() 28 | 29 | notification.setTitle_(title) 30 | notification.setSubtitle_(subtitle) 31 | notification.setInformativeText_(text) 32 | notification.setSoundName_("NSUserNotificationDefaultSoundName") 33 | notification.setUserInfo_(info) 34 | 35 | app.setDelegate_(self) 36 | NSUserNotificationCenter.defaultUserNotificationCenter().setDelegate_(self) 37 | NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification) 38 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/notification.py: -------------------------------------------------------------------------------- 1 | import threading 2 | import objc 3 | from Foundation import * 4 | from AppKit import * 5 | from PyObjCTools import AppHelper 6 | import platform 7 | import alp.core as core 8 | 9 | 10 | NSUserNotificationActivationTypeNone = 0 11 | NSUserNotificationActivationTypeContentsClicked = 1 12 | NSUserNotificationActivationTypeActionButtonClicked = 2 13 | 14 | 15 | class Notification(object): 16 | def notify(self, title, subtitle, text, info=None): 17 | v, _, _ = platform.mac_ver() 18 | v = float('.'.join(v.split('.')[:2])) 19 | if v < 10.8: 20 | core.log("Notification failed: OS version %s < 10.8." % v) 21 | return 22 | 23 | app = NSApplication.sharedApplication() 24 | 25 | NSUserNotification = objc.lookUpClass("NSUserNotification") 26 | NSUserNotificationCenter = objc.lookUpClass("NSUserNotificationCenter") 27 | notification = NSUserNotification.alloc().init() 28 | 29 | notification.setTitle_(title) 30 | notification.setSubtitle_(subtitle) 31 | notification.setInformativeText_(text) 32 | notification.setSoundName_("NSUserNotificationDefaultSoundName") 33 | notification.setUserInfo_(info) 34 | 35 | app.setDelegate_(self) 36 | NSUserNotificationCenter.defaultUserNotificationCenter().setDelegate_(self) 37 | NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification) 38 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 12D78 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | Alfred 11 | CFBundleIdentifier 12 | com.danielsh.Alfred 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Alfred 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 0.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 0.2 25 | DTCompiler 26 | 27 | DTPlatformBuild 28 | 4H1003 29 | DTPlatformVersion 30 | GM 31 | DTSDKBuild 32 | 12D75 33 | DTSDKName 34 | macosx10.8 35 | DTXcode 36 | 0462 37 | DTXcodeBuild 38 | 4H1003 39 | NSHumanReadableCopyright 40 | Licensed from Daniel Shannon (d@daniel.sh) under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 41 | 42 | 43 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 12D78 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | Alfred 11 | CFBundleIdentifier 12 | com.danielsh.Alfred 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Alfred 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 0.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 0.2 25 | DTCompiler 26 | 27 | DTPlatformBuild 28 | 4H1003 29 | DTPlatformVersion 30 | GM 31 | DTSDKBuild 32 | 12D75 33 | DTSDKName 34 | macosx10.8 35 | DTXcode 36 | 0462 37 | DTXcodeBuild 38 | 4H1003 39 | NSHumanReadableCopyright 40 | Licensed from Daniel Shannon (d@daniel.sh) under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 41 | 42 | 43 | -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/charade/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "1.0.3" 19 | from sys import version_info 20 | 21 | 22 | def detect(aBuf): 23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or 24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))): 25 | raise ValueError('Expected a bytes object, not a unicode object') 26 | 27 | from . import universaldetector 28 | u = universaldetector.UniversalDetector() 29 | u.reset() 30 | u.feed(aBuf) 31 | u.close() 32 | return u.result 33 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/packages/charade/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "1.0.3" 19 | from sys import version_info 20 | 21 | 22 | def detect(aBuf): 23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or 24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))): 25 | raise ValueError('Expected a bytes object, not a unicode object') 26 | 27 | from . import universaldetector 28 | u = universaldetector.UniversalDetector() 29 | u.reset() 30 | u.feed(aBuf) 31 | u.close() 32 | return u.result 33 | -------------------------------------------------------------------------------- /DEVONthink Note/Alfred.framework/Versions/Current/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 12D78 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | Alfred 11 | CFBundleIdentifier 12 | com.danielsh.Alfred 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Alfred 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 0.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 0.2 25 | DTCompiler 26 | 27 | DTPlatformBuild 28 | 4H1003 29 | DTPlatformVersion 30 | GM 31 | DTSDKBuild 32 | 12D75 33 | DTSDKName 34 | macosx10.8 35 | DTXcode 36 | 0462 37 | DTXcodeBuild 38 | 4H1003 39 | NSHumanReadableCopyright 40 | Licensed from Daniel Shannon (d@daniel.sh) under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 41 | 42 | 43 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/packages/charade/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "1.0.3" 19 | from sys import version_info 20 | 21 | 22 | def detect(aBuf): 23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or 24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))): 25 | raise ValueError('Expected a bytes object, not a unicode object') 26 | 27 | from . import universaldetector 28 | u = universaldetector.UniversalDetector() 29 | u.reset() 30 | u.feed(aBuf) 31 | u.close() 32 | return u.result 33 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/packages/charade/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "1.0.3" 19 | from sys import version_info 20 | 21 | 22 | def detect(aBuf): 23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or 24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))): 25 | raise ValueError('Expected a bytes object, not a unicode object') 26 | 27 | from . import universaldetector 28 | u = universaldetector.UniversalDetector() 29 | u.reset() 30 | u.feed(aBuf) 31 | u.close() 32 | return u.result 33 | -------------------------------------------------------------------------------- /alp/alp/request/requests/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.exceptions 5 | ~~~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Requests' exceptions. 8 | 9 | """ 10 | 11 | 12 | class RequestException(RuntimeError): 13 | """There was an ambiguous exception that occurred while handling your 14 | request.""" 15 | 16 | 17 | class HTTPError(RequestException): 18 | """An HTTP error occurred.""" 19 | 20 | def __init__(self, *args, **kwargs): 21 | """ Initializes HTTPError with optional `response` object. """ 22 | self.response = kwargs.pop('response', None) 23 | super(HTTPError, self).__init__(*args, **kwargs) 24 | 25 | 26 | class ConnectionError(RequestException): 27 | """A Connection error occurred.""" 28 | 29 | 30 | class SSLError(ConnectionError): 31 | """An SSL error occurred.""" 32 | 33 | 34 | class Timeout(RequestException): 35 | """The request timed out.""" 36 | 37 | 38 | class URLRequired(RequestException): 39 | """A valid URL is required to make a request.""" 40 | 41 | 42 | class TooManyRedirects(RequestException): 43 | """Too many redirects.""" 44 | 45 | 46 | class MissingSchema(RequestException, ValueError): 47 | """The URL schema (e.g. http or https) is missing.""" 48 | 49 | 50 | class InvalidSchema(RequestException, ValueError): 51 | """See defaults.py for valid schemas.""" 52 | 53 | 54 | class InvalidURL(RequestException, ValueError): 55 | """ The URL provided was somehow invalid. """ 56 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.exceptions 5 | ~~~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Requests' exceptions. 8 | 9 | """ 10 | 11 | 12 | class RequestException(RuntimeError): 13 | """There was an ambiguous exception that occurred while handling your 14 | request.""" 15 | 16 | 17 | class HTTPError(RequestException): 18 | """An HTTP error occurred.""" 19 | 20 | def __init__(self, *args, **kwargs): 21 | """ Initializes HTTPError with optional `response` object. """ 22 | self.response = kwargs.pop('response', None) 23 | super(HTTPError, self).__init__(*args, **kwargs) 24 | 25 | 26 | class ConnectionError(RequestException): 27 | """A Connection error occurred.""" 28 | 29 | 30 | class SSLError(ConnectionError): 31 | """An SSL error occurred.""" 32 | 33 | 34 | class Timeout(RequestException): 35 | """The request timed out.""" 36 | 37 | 38 | class URLRequired(RequestException): 39 | """A valid URL is required to make a request.""" 40 | 41 | 42 | class TooManyRedirects(RequestException): 43 | """Too many redirects.""" 44 | 45 | 46 | class MissingSchema(RequestException, ValueError): 47 | """The URL schema (e.g. http or https) is missing.""" 48 | 49 | 50 | class InvalidSchema(RequestException, ValueError): 51 | """See defaults.py for valid schemas.""" 52 | 53 | 54 | class InvalidURL(RequestException, ValueError): 55 | """ The URL provided was somehow invalid. """ 56 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.exceptions 5 | ~~~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Requests' exceptions. 8 | 9 | """ 10 | 11 | 12 | class RequestException(RuntimeError): 13 | """There was an ambiguous exception that occurred while handling your 14 | request.""" 15 | 16 | 17 | class HTTPError(RequestException): 18 | """An HTTP error occurred.""" 19 | 20 | def __init__(self, *args, **kwargs): 21 | """ Initializes HTTPError with optional `response` object. """ 22 | self.response = kwargs.pop('response', None) 23 | super(HTTPError, self).__init__(*args, **kwargs) 24 | 25 | 26 | class ConnectionError(RequestException): 27 | """A Connection error occurred.""" 28 | 29 | 30 | class SSLError(ConnectionError): 31 | """An SSL error occurred.""" 32 | 33 | 34 | class Timeout(RequestException): 35 | """The request timed out.""" 36 | 37 | 38 | class URLRequired(RequestException): 39 | """A valid URL is required to make a request.""" 40 | 41 | 42 | class TooManyRedirects(RequestException): 43 | """Too many redirects.""" 44 | 45 | 46 | class MissingSchema(RequestException, ValueError): 47 | """The URL schema (e.g. http or https) is missing.""" 48 | 49 | 50 | class InvalidSchema(RequestException, ValueError): 51 | """See defaults.py for valid schemas.""" 52 | 53 | 54 | class InvalidURL(RequestException, ValueError): 55 | """ The URL provided was somehow invalid. """ 56 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/exceptions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.exceptions 5 | ~~~~~~~~~~~~~~~~~~~ 6 | 7 | This module contains the set of Requests' exceptions. 8 | 9 | """ 10 | 11 | 12 | class RequestException(RuntimeError): 13 | """There was an ambiguous exception that occurred while handling your 14 | request.""" 15 | 16 | 17 | class HTTPError(RequestException): 18 | """An HTTP error occurred.""" 19 | 20 | def __init__(self, *args, **kwargs): 21 | """ Initializes HTTPError with optional `response` object. """ 22 | self.response = kwargs.pop('response', None) 23 | super(HTTPError, self).__init__(*args, **kwargs) 24 | 25 | 26 | class ConnectionError(RequestException): 27 | """A Connection error occurred.""" 28 | 29 | 30 | class SSLError(ConnectionError): 31 | """An SSL error occurred.""" 32 | 33 | 34 | class Timeout(RequestException): 35 | """The request timed out.""" 36 | 37 | 38 | class URLRequired(RequestException): 39 | """A valid URL is required to make a request.""" 40 | 41 | 42 | class TooManyRedirects(RequestException): 43 | """Too many redirects.""" 44 | 45 | 46 | class MissingSchema(RequestException, ValueError): 47 | """The URL schema (e.g. http or https) is missing.""" 48 | 49 | 50 | class InvalidSchema(RequestException, ValueError): 51 | """See defaults.py for valid schemas.""" 52 | 53 | 54 | class InvalidURL(RequestException, ValueError): 55 | """ The URL provided was somehow invalid. """ 56 | -------------------------------------------------------------------------------- /Downer/downer/labels.py: -------------------------------------------------------------------------------- 1 | import struct 2 | from Constants import * 3 | from ctypes import * 4 | libc = cdll.LoadLibrary("libc.dylib") 5 | 6 | 7 | def get_flags(path): 8 | path = path.encode("utf-8") 9 | data = create_string_buffer(kMaxDataSize) 10 | name = ATTR.encode("utf-8") 11 | 12 | datasize = libc.getxattr(path, name, data, kMaxDataSize, 0, XATTR_NOFOLLOW) 13 | if datasize < 0: 14 | return None 15 | else: 16 | data_bytes = string_at(addressof(data), datasize) 17 | flags = struct.unpack(32*'B', data_bytes) 18 | return flags 19 | 20 | def get_finder_label(path): 21 | flags = get_flags(path) 22 | if flags: 23 | color = flags[9] >> 1 & 7 24 | else: 25 | color = 0 26 | return COLORS[color] 27 | 28 | def set_finder_label(path, color): 29 | s_color = color << 1 30 | 31 | flags = get_flags(path) 32 | if flags: 33 | flags = list(flags) 34 | flags[9] = s_color 35 | flags = tuple(flags) 36 | else: 37 | flags = [] 38 | for i in range(32): 39 | flags.append(0) 40 | flags[9] = s_color 41 | flags = tuple(flags) 42 | 43 | path = path.encode("utf-8") 44 | data = create_string_buffer(32) 45 | data.raw = struct.pack(32*'B', *flags) 46 | name = ATTR.encode("utf-8") 47 | 48 | err = libc.setxattr(path, name, data, sizeof(data), 0, XATTR_NOFOLLOW) 49 | if err < 0: 50 | raise Exception("Failed to set label color for {0}".format(path.decode("utf-8"))) 51 | -------------------------------------------------------------------------------- /alp/alp/request/request.py: -------------------------------------------------------------------------------- 1 | import alp.core as core 2 | from bs4 import BeautifulSoup 3 | import requests 4 | import requests_cache 5 | 6 | 7 | class Request(object): 8 | def __init__(self, url, payload=None, post=False, cache=True, cache_for=None): 9 | self.url = url 10 | self.payload = payload 11 | self.post = post 12 | self.cache_for = cache_for 13 | self.ok = False 14 | self.cache = cache 15 | self.cache_name = None 16 | 17 | def download(self): 18 | self.cache_name = core.cache("requests_cache") 19 | if self.cache_for != None and self.cache_for < 0: 20 | exp = None 21 | else: 22 | exp = self.cache_for or 24 * (60^2) 23 | if self.cache: 24 | requests_cache.install_cache(self.cache_name, expire_after=exp, allowable_methods=('GET','POST')) 25 | if self.payload: 26 | self.request = requests.get(self.url, params=self.payload) if not self.post else requests.post(self.url, data=self.payload) 27 | else: 28 | self.request = requests.get(self.url) 29 | 30 | self.ok = self.request.status_code == requests.codes.ok 31 | 32 | def souper(self): 33 | if self.request.status_code == requests.codes.ok: 34 | return BeautifulSoup(self.request.text) 35 | else: 36 | self.request.raise_for_status() 37 | 38 | def clear_cache(self): 39 | if self.cache_name: 40 | requests_cache.clear() 41 | self.download() 42 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/request.py: -------------------------------------------------------------------------------- 1 | import alp.core as core 2 | from bs4 import BeautifulSoup 3 | import requests 4 | import requests_cache 5 | 6 | 7 | class Request(object): 8 | def __init__(self, url, payload=None, post=False, cache=True, cache_for=None): 9 | self.url = url 10 | self.payload = payload 11 | self.post = post 12 | self.cache_for = cache_for 13 | self.ok = False 14 | self.cache = cache 15 | self.cache_name = None 16 | 17 | def download(self): 18 | self.cache_name = core.cache("requests_cache") 19 | if self.cache_for != None and self.cache_for < 0: 20 | exp = None 21 | else: 22 | exp = self.cache_for or 24 * (60^2) 23 | if self.cache: 24 | requests_cache.install_cache(self.cache_name, expire_after=exp, allowable_methods=('GET','POST')) 25 | if self.payload: 26 | self.request = requests.get(self.url, params=self.payload) if not self.post else requests.post(self.url, data=self.payload) 27 | else: 28 | self.request = requests.get(self.url) 29 | 30 | self.ok = self.request.status_code == requests.codes.ok 31 | 32 | def souper(self): 33 | if self.request.status_code == requests.codes.ok: 34 | return BeautifulSoup(self.request.text) 35 | else: 36 | self.request.raise_for_status() 37 | 38 | def clear_cache(self): 39 | if self.cache_name: 40 | requests_cache.clear() 41 | self.download() 42 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/request.py: -------------------------------------------------------------------------------- 1 | import alp.core as core 2 | from bs4 import BeautifulSoup 3 | import requests 4 | import requests_cache 5 | 6 | 7 | class Request(object): 8 | def __init__(self, url, payload=None, post=False, cache=True, cache_for=None): 9 | self.url = url 10 | self.payload = payload 11 | self.post = post 12 | self.cache_for = cache_for 13 | self.ok = False 14 | self.cache = cache 15 | self.cache_name = None 16 | 17 | def download(self): 18 | self.cache_name = core.cache("requests_cache") 19 | if self.cache_for != None and self.cache_for < 0: 20 | exp = None 21 | else: 22 | exp = self.cache_for or 24 * (60^2) 23 | if self.cache: 24 | requests_cache.install_cache(self.cache_name, expire_after=exp, allowable_methods=('GET','POST')) 25 | if self.payload: 26 | self.request = requests.get(self.url, params=self.payload) if not self.post else requests.post(self.url, data=self.payload) 27 | else: 28 | self.request = requests.get(self.url) 29 | 30 | self.ok = self.request.status_code == requests.codes.ok 31 | 32 | def souper(self): 33 | if self.request.status_code == requests.codes.ok: 34 | return BeautifulSoup(self.request.text) 35 | else: 36 | self.request.raise_for_status() 37 | 38 | def clear_cache(self): 39 | if self.cache_name: 40 | requests_cache.clear() 41 | self.download() 42 | -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/charade/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/packages/charade/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/packages/charade/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /iTunes Store/alp/request/requests/packages/charade/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet2/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet2/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/safe_mode.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.safe_mode 5 | ~~~~~~~~~~~~ 6 | 7 | This module contains a decorator that implements safe_mode. 8 | 9 | :copyright: (c) 2012 by Kenneth Reitz. 10 | :license: ISC, see LICENSE for more details. 11 | 12 | """ 13 | 14 | from .models import Response 15 | from .packages.urllib3.response import HTTPResponse 16 | from .exceptions import RequestException, ConnectionError, HTTPError 17 | import socket 18 | 19 | 20 | def catch_exceptions_if_in_safe_mode(function): 21 | """New implementation of safe_mode. We catch all exceptions at the API level 22 | and then return a blank Response object with the error field filled. This decorator 23 | wraps request() in api.py. 24 | """ 25 | 26 | def wrapped(method, url, **kwargs): 27 | # if save_mode, we catch exceptions and fill error field 28 | if (kwargs.get('config') and kwargs.get('config').get('safe_mode')) or (kwargs.get('session') 29 | and kwargs.get('session').config.get('safe_mode')): 30 | try: 31 | return function(method, url, **kwargs) 32 | except (RequestException, ConnectionError, HTTPError, 33 | socket.timeout, socket.gaierror) as e: 34 | r = Response() 35 | r.error = e 36 | r.raw = HTTPResponse() # otherwise, tests fail 37 | r.status_code = 0 # with this status_code, content returns None 38 | return r 39 | return function(method, url, **kwargs) 40 | return wrapped 41 | -------------------------------------------------------------------------------- /Thoughts/act.py: -------------------------------------------------------------------------------- 1 | import time 2 | import sys 3 | import subprocess 4 | import alp 5 | 6 | 7 | def main(): 8 | verb = sys.argv[1] 9 | 10 | thoughts = alp.jsonLoad("thoughts.json") 11 | 12 | if verb == "copy": 13 | uuid = sys.argv[2] 14 | thought = None 15 | for thought in thoughts: 16 | if thought["uuid"] == uuid: 17 | thought = thought["thought"] 18 | break 19 | if not thought: 20 | print "Unknown error." 21 | else: 22 | cmd = u"echo \"{0}\" | pbcopy".format(thought) 23 | subprocess.call(cmd, shell=True) 24 | print "Recalled \"{0}\"".format(thought) 25 | 26 | elif verb == "save": 27 | uuid = sys.argv[2] 28 | thought = sys.argv[3] 29 | thoughts.append(dict(uuid=uuid, thought=thought)) 30 | alp.jsonDump(thoughts, "thoughts.json") 31 | 32 | print "Remembered %s" % thought 33 | 34 | elif verb == "delete" and sys.argv[2] != "save": 35 | uuid = sys.argv[3] 36 | for thought in thoughts: 37 | if thought["uuid"] == uuid: 38 | forgotten = thought["thought"] 39 | thoughts.remove(thought) 40 | break 41 | 42 | alp.jsonDump(thoughts, "thoughts.json") 43 | 44 | print "Forgot %s" % forgotten 45 | 46 | elif verb == "delete" and sys.argv[2] == "save": 47 | thought = sys.argv[4] 48 | print "Never remembered {0}".format(thought) 49 | 50 | else: 51 | print "Unknown error in act.py" 52 | 53 | 54 | if __name__ == "__main__": 55 | main() 56 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/safe_mode.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.safe_mode 5 | ~~~~~~~~~~~~ 6 | 7 | This module contains a decorator that implements safe_mode. 8 | 9 | :copyright: (c) 2012 by Kenneth Reitz. 10 | :license: ISC, see LICENSE for more details. 11 | 12 | """ 13 | 14 | from .models import Response 15 | from .packages.urllib3.response import HTTPResponse 16 | from .exceptions import RequestException, ConnectionError, HTTPError 17 | import socket 18 | 19 | 20 | def catch_exceptions_if_in_safe_mode(function): 21 | """New implementation of safe_mode. We catch all exceptions at the API level 22 | and then return a blank Response object with the error field filled. This decorator 23 | wraps request() in api.py. 24 | """ 25 | 26 | def wrapped(method, url, **kwargs): 27 | # if save_mode, we catch exceptions and fill error field 28 | if (kwargs.get('config') and kwargs.get('config').get('safe_mode')) or (kwargs.get('session') 29 | and kwargs.get('session').config.get('safe_mode')): 30 | try: 31 | return function(method, url, **kwargs) 32 | except (RequestException, ConnectionError, HTTPError, 33 | socket.timeout, socket.gaierror) as e: 34 | r = Response() 35 | r.error = e 36 | r.raw = HTTPResponse() # otherwise, tests fail 37 | r.status_code = 0 # with this status_code, content returns None 38 | return r 39 | return function(method, url, **kwargs) 40 | return wrapped 41 | -------------------------------------------------------------------------------- /alp/alp/mail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import smtplib 4 | from email.mime.text import MIMEText 5 | 6 | 7 | class Mail(object): 8 | def __init__(self, host, port, SSL, user, pw, sender, to, mimetype, subject, body): 9 | self.host = host 10 | self.port = port 11 | self.SSL = SSL 12 | self.user = user 13 | self.pw = pw 14 | self.sender = sender 15 | self.to = to 16 | self.mimetype = mimetype if mimetype else "plain" 17 | self.subject = subject 18 | self.body = body 19 | 20 | def _mime(self, to, subject, body): 21 | text = MIMEText(body.encode("utf-8"), self.mimetype, "utf-8") 22 | text["From"] = self.sender.encode("utf-8") 23 | text["Subject"] = subject.encode("utf-8") 24 | text["To"] = to.encode("utf-8") 25 | 26 | return text.as_string().encode("utf-8") 27 | 28 | def notify(self): 29 | server = smtplib.SMTP_SSL(self.host, self.port) if self.SSL else smtplib.SMTP(self.host, self.port) 30 | if not self.user == None and not self.pw == None: 31 | server.login(self.user, self.pw) 32 | if 'gmail' in self.host: 33 | server.ehlo() 34 | server.starttls() 35 | 36 | def sendMessage(to): 37 | body = self.body 38 | subject = self.subject 39 | message = self._mime(to, subject, body) 40 | server.sendmail(self.sender, to, message) 41 | 42 | if isinstance(self.to, list): 43 | for to in self.to: 44 | sendMessage(to) 45 | else: 46 | sendMessage(self.to) 47 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # __ 4 | # /__) _ _ _ _ _/ _ 5 | # / ( (- (/ (/ (- _) / _) 6 | # / 7 | 8 | """ 9 | requests HTTP library 10 | ~~~~~~~~~~~~~~~~~~~~~ 11 | 12 | Requests is an HTTP library, written in Python, for human beings. Basic GET 13 | usage: 14 | 15 | >>> import requests 16 | >>> r = requests.get('http://python.org') 17 | >>> r.status_code 18 | 200 19 | >>> 'Python is a programming language' in r.content 20 | True 21 | 22 | ... or POST: 23 | 24 | >>> payload = dict(key1='value1', key2='value2') 25 | >>> r = requests.post("http://httpbin.org/post", data=payload) 26 | >>> print r.text 27 | { 28 | ... 29 | "form": { 30 | "key2": "value2", 31 | "key1": "value1" 32 | }, 33 | ... 34 | } 35 | 36 | The other HTTP methods are supported - see `requests.api`. Full documentation 37 | is at . 38 | 39 | :copyright: (c) 2012 by Kenneth Reitz. 40 | :license: ISC, see LICENSE for more details. 41 | 42 | """ 43 | 44 | __title__ = 'requests' 45 | __version__ = '0.14.2' 46 | __build__ = 0x001402 47 | __author__ = 'Kenneth Reitz' 48 | __license__ = 'ISC' 49 | __copyright__ = 'Copyright 2012 Kenneth Reitz' 50 | 51 | 52 | from . import utils 53 | from .models import Request, Response 54 | from .api import request, get, head, post, patch, put, delete, options 55 | from .sessions import session, Session 56 | from .status_codes import codes 57 | from .exceptions import ( 58 | RequestException, Timeout, URLRequired, 59 | TooManyRedirects, HTTPError, ConnectionError 60 | ) 61 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # __ 4 | # /__) _ _ _ _ _/ _ 5 | # / ( (- (/ (/ (- _) / _) 6 | # / 7 | 8 | """ 9 | requests HTTP library 10 | ~~~~~~~~~~~~~~~~~~~~~ 11 | 12 | Requests is an HTTP library, written in Python, for human beings. Basic GET 13 | usage: 14 | 15 | >>> import requests 16 | >>> r = requests.get('http://python.org') 17 | >>> r.status_code 18 | 200 19 | >>> 'Python is a programming language' in r.content 20 | True 21 | 22 | ... or POST: 23 | 24 | >>> payload = dict(key1='value1', key2='value2') 25 | >>> r = requests.post("http://httpbin.org/post", data=payload) 26 | >>> print r.text 27 | { 28 | ... 29 | "form": { 30 | "key2": "value2", 31 | "key1": "value1" 32 | }, 33 | ... 34 | } 35 | 36 | The other HTTP methods are supported - see `requests.api`. Full documentation 37 | is at . 38 | 39 | :copyright: (c) 2012 by Kenneth Reitz. 40 | :license: ISC, see LICENSE for more details. 41 | 42 | """ 43 | 44 | __title__ = 'requests' 45 | __version__ = '0.14.2' 46 | __build__ = 0x001402 47 | __author__ = 'Kenneth Reitz' 48 | __license__ = 'ISC' 49 | __copyright__ = 'Copyright 2012 Kenneth Reitz' 50 | 51 | 52 | from . import utils 53 | from .models import Request, Response 54 | from .api import request, get, head, post, patch, put, delete, options 55 | from .sessions import session, Session 56 | from .status_codes import codes 57 | from .exceptions import ( 58 | RequestException, Timeout, URLRequired, 59 | TooManyRedirects, HTTPError, ConnectionError 60 | ) 61 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | 41 | import __builtin__ 42 | if not hasattr(__builtin__, 'False'): 43 | False = 0 44 | True = 1 45 | else: 46 | False = __builtin__.False 47 | True = __builtin__.True 48 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | 41 | import __builtin__ 42 | if not hasattr(__builtin__, 'False'): 43 | False = 0 44 | True = 1 45 | else: 46 | False = __builtin__.False 47 | True = __builtin__.True 48 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/defaults.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.defaults 5 | ~~~~~~~~~~~~~~~~~ 6 | 7 | This module provides the Requests configuration defaults. 8 | 9 | Configurations: 10 | 11 | :base_headers: Default HTTP headers. 12 | :verbose: Stream to write request logging to. 13 | :max_redirects: Maximum number of redirects allowed within a request.s 14 | :keep_alive: Reuse HTTP Connections? 15 | :max_retries: The number of times a request should be retried in the event of a connection failure. 16 | :danger_mode: If true, Requests will raise errors immediately. 17 | :safe_mode: If true, Requests will catch all errors. 18 | :strict_mode: If true, Requests will do its best to follow RFCs (e.g. POST redirects). 19 | :pool_maxsize: The maximium size of an HTTP connection pool. 20 | :pool_connections: The number of active HTTP connection pools to use. 21 | :encode_uri: If true, URIs will automatically be percent-encoded. 22 | :trust_env: If true, the surrouding environment will be trusted (environ, netrc). 23 | :store_cookies: If false, the received cookies as part of the HTTP response would be ignored. 24 | 25 | """ 26 | 27 | SCHEMAS = ['http', 'https'] 28 | 29 | from .utils import default_user_agent 30 | 31 | defaults = dict() 32 | 33 | defaults['base_headers'] = { 34 | 'User-Agent': default_user_agent(), 35 | 'Accept-Encoding': ', '.join(('gzip', 'deflate', 'compress')), 36 | 'Accept': '*/*' 37 | } 38 | 39 | defaults['verbose'] = None 40 | defaults['max_redirects'] = 30 41 | defaults['pool_connections'] = 10 42 | defaults['pool_maxsize'] = 10 43 | defaults['max_retries'] = 0 44 | defaults['danger_mode'] = False 45 | defaults['safe_mode'] = False 46 | defaults['strict_mode'] = False 47 | defaults['keep_alive'] = True 48 | defaults['encode_uri'] = True 49 | defaults['trust_env'] = True 50 | defaults['store_cookies'] = True 51 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/defaults.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.defaults 5 | ~~~~~~~~~~~~~~~~~ 6 | 7 | This module provides the Requests configuration defaults. 8 | 9 | Configurations: 10 | 11 | :base_headers: Default HTTP headers. 12 | :verbose: Stream to write request logging to. 13 | :max_redirects: Maximum number of redirects allowed within a request.s 14 | :keep_alive: Reuse HTTP Connections? 15 | :max_retries: The number of times a request should be retried in the event of a connection failure. 16 | :danger_mode: If true, Requests will raise errors immediately. 17 | :safe_mode: If true, Requests will catch all errors. 18 | :strict_mode: If true, Requests will do its best to follow RFCs (e.g. POST redirects). 19 | :pool_maxsize: The maximium size of an HTTP connection pool. 20 | :pool_connections: The number of active HTTP connection pools to use. 21 | :encode_uri: If true, URIs will automatically be percent-encoded. 22 | :trust_env: If true, the surrouding environment will be trusted (environ, netrc). 23 | :store_cookies: If false, the received cookies as part of the HTTP response would be ignored. 24 | 25 | """ 26 | 27 | SCHEMAS = ['http', 'https'] 28 | 29 | from .utils import default_user_agent 30 | 31 | defaults = dict() 32 | 33 | defaults['base_headers'] = { 34 | 'User-Agent': default_user_agent(), 35 | 'Accept-Encoding': ', '.join(('gzip', 'deflate', 'compress')), 36 | 'Accept': '*/*' 37 | } 38 | 39 | defaults['verbose'] = None 40 | defaults['max_redirects'] = 30 41 | defaults['pool_connections'] = 10 42 | defaults['pool_maxsize'] = 10 43 | defaults['max_retries'] = 0 44 | defaults['danger_mode'] = False 45 | defaults['safe_mode'] = False 46 | defaults['strict_mode'] = False 47 | defaults['keep_alive'] = True 48 | defaults['encode_uri'] = True 49 | defaults['trust_env'] = True 50 | defaults['store_cookies'] = True 51 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import EUCKRDistributionAnalysis 31 | from mbcssm import EUCKRSMModel 32 | 33 | class EUCKRProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCKRSMModel) 37 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-KR" 42 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import EUCTWDistributionAnalysis 31 | from mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import EUCKRDistributionAnalysis 31 | from mbcssm import EUCKRSMModel 32 | 33 | class EUCKRProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCKRSMModel) 37 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-KR" 42 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import EUCTWDistributionAnalysis 31 | from mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import GB2312DistributionAnalysis 31 | from mbcssm import GB2312SMModel 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(GB2312SMModel) 37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "GB2312" 42 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import GB2312DistributionAnalysis 31 | from mbcssm import GB2312SMModel 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(GB2312SMModel) 37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "GB2312" 42 | -------------------------------------------------------------------------------- /Kindle Bookstore/alp/request/requests/packages/chardet/big5prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Communicator client code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import Big5DistributionAnalysis 31 | from mbcssm import Big5SMModel 32 | 33 | class Big5Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(Big5SMModel) 37 | self._mDistributionAnalyzer = Big5DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "Big5" 42 | -------------------------------------------------------------------------------- /Kindle Bookstore UK/PyAl/Request/requests/packages/chardet/big5prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Communicator client code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from mbcharsetprober import MultiByteCharSetProber 29 | from codingstatemachine import CodingStateMachine 30 | from chardistribution import Big5DistributionAnalysis 31 | from mbcssm import Big5SMModel 32 | 33 | class Big5Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(Big5SMModel) 37 | self._mDistributionAnalyzer = Big5DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "Big5" 42 | -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/charade/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /Alleyoop 3/alp/request/requests/packages/charade/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /Yourls Stats/alp/request/requests/packages/charade/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/charade/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import EUCKRSMModel 32 | 33 | 34 | class EUCKRProber(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(EUCKRSMModel) 38 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 39 | self.reset() 40 | 41 | def get_charset_name(self): 42 | return "EUC-KR" 43 | -------------------------------------------------------------------------------- /alp/alp/request/requests/packages/charade/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import GB2312DistributionAnalysis 31 | from .mbcssm import GB2312SMModel 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(GB2312SMModel) 37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "GB2312" 42 | --------------------------------------------------------------------------------