@@ -48,6 +48,23 @@ modules:
4848[pipenvinstall]: https://pipenv.pypa.io/en/latest/install/#installing-pipenv
4949
5050
51+ ### Running Scripts that Require Client Credentials
52+
53+ To successfully run scripts that require client credentials, you will need to follow these steps:
54+ 1. Copy the contents of the `env.example` file in the script's directory to `.env`:
55+ ```
56+ cp env.example .env
57+ ```
58+ 2. Uncomment the variables in the `.env` file and assign values as needed. See [`sources.md`](sources.md) on how to get credentials:
59+ ```
60+ GOOGLE_API_KEYS=your_api_key
61+ PSE_KEY=your_pse_key
62+ ```
63+ 3. Save the changes to the `.env` file.
64+
65+ 4. You should now be able to run scripts that require client credentials without any issues.
66+
67+
5168### Tooling
5269
5370- **[Python Guidelines — Creative Commons Open Source][ccospyguide]**
@@ -64,124 +81,7 @@ modules:
6481
6582## Data Sources
6683
67-
68- ### CC Legal Tools
69-
70- - [`legal-tool-paths.txt`](google_custom_search/legal-tool-paths.txt)
71- - A `.txt` provided by Timid Robot containing all legal tool paths. The data
72- from Google Custom Search will only cover 50+ general, most significant
73- categories of CC License for data collection quota constraint. As an
74- additional note, the order of precedence of license the collected data's
75- first column is sorted due to intermediate data analysis progress.
76- - [add list of all current CC legal tool paths by TimidRobot · Pull Request
77- #7 · creativecommons/quantifying][pr7]
78-
79- [pr7]: https://github.com/creativecommons/quantifying/pull/7
80-
81-
82- ### Flickr
83-
84- - The Flickr API exposes identifiers for users, photos, photosets and other
85- uniquely identifiable objects.
86- - The Flickr API consists of a set of callable methods, and some API endpoints.
87- - For more detailed description, visit: [API documentation - Flickr
88- Services](https://www.flickr.com/services/api/).
89- - The `hs.csv` file is a sample CSV of pulled data. Ideally the script will
90- generate final data CSVs.
91- - Each license will have a CSV to save the data.
92- - Due to memory limit, the license CSVs are not pushed into github.
93-
94-
95- ### Google Custom Search JSON API
96-
97- - The Custom Search JSON API allows user-defined detailed query and access
98- towards related query data using a programmable search engine.
99- - [Custom Search JSON API Reference | Programmable Search Engine | Google
100- Developers][googlejsonapi]
101- - [Method: cse.list | Custom Search JSON API | Google Developers][cselist]
102- - [`google_countries.tsv`](google_custom_search/google_countries.txt)
103- - Created by directly copy and pasting the `cr` parameter list from the
104- following link into a `.tsv` file as there were no reliable algorithmic way
105- for retrieving such data found in the process so far. The script itself
106- will take care of the formatting and country-selection process.
107- - [Country Collection Values | JSON API reference | Programmable Search
108- Engine | Google Developers][googlecountry]
109- - [`google_lang.txt`](google_custom_search/google_lang.txt)
110- - Created by directly copy and pasting the `lr` parameter list from the
111- following link into a `.txt` file as there were no reliable algorithmic way
112- for retrieving such data found in the process so far. The script itself
113- will take care of the data formatting and language-selection process.
114- - [Parameter: lr | Method: cse.list | Custom Search JSON API | Google
115- Developers][googlelang]
116-
117- [googlejsonapi]: https://developers.google.com/custom-search/v1
118- [cselist]: https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list
119- [googlecountry]: https://developers.google.com/custom-search/docs/json_api_reference#countryCollections
120- [googlelang]: https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list#body.QUERY_PARAMETERS.lr
121-
122-
123- ### Internet Archive Python Interface
124-
125- A python interface to archive.org to achieve API requests towards internet
126- archive.
127- - [`internetarchive.Search` - Internetarchive: A Python Interface to
128- archive.org][iasearch]
129-
130- [iasearch]: https://internetarchive.readthedocs.io/en/stable/internetarchive.html#internetarchive.Search
131-
132-
133- ### The Metropolitan Museum of Art Collection API
134-
135- An API endpoint for receiving Metropolitan Muesum of Art Collection's
136- CC-Licensed works.
137-
138- [Latest Updates | The Metropolitan Museum of Art Collection API][metapi]:
139- > The Metropolitan Museum of Art provides select datasets of information on
140- > more than 470,000 artworks in its Collection for unrestricted commercial and
141- > noncommercial use. To the extent possible under law, The Metropolitan Museum
142- > of Art has waived all copyright and related or neighboring rights to this
143- > dataset using the [Creative Commons Zero][cc-zero] license.
144-
145- [metapi]: https://metmuseum.github.io/
146- [cc-zero]: https://creativecommons.org/publicdomain/zero/1.0/
147-
148-
149- ### Vimeo API
150-
151- The Vimeo API allows users to perform filtered, advanced search on Vimeo
152- videos.
153- - [Getting Started with the Vimeo API][vimeostart]
154- - [Search for videos - Vimeo API Reference: Videos][vimeoapisearch]
155-
156- [vimeostart]: https://developer.vimeo.com/api/guides/start
157- [vimeoapisearch]: https://developer.vimeo.com/api/reference/videos#search_videos
158-
159-
160- ### MediaWiki API
161-
162- - The MediaWiki Action API is a web service that allows access to some wiki
163- features like authentication, page operations, and search. It can provide
164- meta information about the wiki and the logged-in user.
165- - Example query: https://commons.wikimedia.org/w/api.php?action=query&cmtitle=Category:CC-BY&list=categorymembers
166- - [`language-codes_csv.csv`](wikipedia/language-codes_csv.csv)
167- - A list of language codes in ISO 639-1 Format to access statistics of each
168- wikipedia main page across different languages. In the script, this file is
169- named as `language-codes_csv` to minimize the amount of manual work
170- required for running the script provided the same language encoding file.
171- The user would have to rename the header and file name of their `.csv` ISO
172- code list according to the concurrent file on Github if they would like to
173- use some list other than the concurrent one.
174- - This file that this script uses can be downloaded from:
175- https://datahub.io/core/language-codes
176-
177-
178- ### Youtube Data API
179-
180- An API from YouTube for platform users to upload videos, adjust video
181- parameters, and obtain search results.
182- - [Search: list | YouTube Data API | Google Developers][youtubeapi]
183-
184- [youtubeapi]: https://developers.google.com/youtube/v3/docs/search/list
84+ Kindly visit the [sources.md](sources.md) file for it.
18585
18686
18787## History
0 commit comments