Roland's Kitsune API scripts version 2
grep "fix-problems;" \
sorted-all-desktop-en-us-2020-07-28-2020-08-03-firefox-creator-answers-desktop-all-locales.csv\
> ff79-week1-fix-problems-28july-03august2020.csv
-
add header line to csv using vim
-
upload to Google drive and rename and remove product and locale columns and add Category and Subcategory columns
-
spreadsheet is ff79-week1-fix-slowness-crashes-error-messages-other-problems-28july-03august2020
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 7 28 2020 8 3
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-07-28-2020-08-03-firefox-creator-answers-desktop-all-locales.csv markdown
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-07-28-2020-08-03-firefox-creator-answers-desktop-all-locales.csv csv
% ../get-aaq-topic-counts.sh sorted-all-desktop-en-us-2020-07-28-2020-08-03-firefox-creator-answers-desktop-all-locales.csv
36
38
61
102
6
25
8
15
54
15
109
- 1. create spreadsheet csv
cd /home/roland/GIT/rt-kits-api2/202008
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 7 31 2020 8 3
../get-answers-from-questions-csv.rb 2020-07-31-2020-08-03-firefox-creator-answers-desktop-all-locales.csv
grep -iE "(ccleaner|sqlite\-)" with-flattened-answers-2020-07-31-2020-08-03-firefox-creator-answers-desktop-all-locales.csv |\
> ccleaner-mentions-with-flattened-answers-2020-07-31-2020-08-03-firefox-creator-answers-desktop-all-locales.csv
head -1 with-flattened-answers-2020-07-31-2020-08-03-firefox-creator-answers-desktop-all-locales.csv >\
header.csv
% cat header.csv
id,created,updated,title,content,tags,product,topic,locale,answers,creator,synthetic_answers
# add the header
sed -i '1s/^/id,created,updated,title,content,tags,product,topic,locale,answers,creator,synthetic_answers\n/' \
ccleaner-mentions-with-flattened-answers-2020-07-31-2020-08-03-firefox-creator-answers-desktop-all-locales.csv
- 2. upload ccleaner-mentions-with-flattened-answers-2020-07-31-2020-08-03-firefox-creator-answers-desktop-all-locales.csv to Google Drive and then change id from x to support.mozilla.org/questions/x and remove product column (since it's all desktop!) and remove locale column
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 7 7 2020 7 13
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-07-07-2020-07-13-firefox-creator-answers-desktop-all-locales.csv markdown
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-07-07-2020-07-13-firefox-creator-answers-desktop-all-locales.csv csv
../get-aaq-topic-counts.sh sorted-all-desktop-en-us-2020-07-07-2020-07-13-firefox-creator-answers-desktop-all-locales.csv
27
50
60
112
11
31
4
12
60
20
113
-
2. Manually copy them to a spreadsheet: Firefox 78 Desktop AAQ Question Counts by Week
-
3. Opened the fix problems, all 112 questions, in 112 tabs
grep "fix-problems;" \\nsorted-all-desktop-en-us-2020-07-07-2020-07-13-firefox-creator-answers-desktop-all-locales.csv |\
grep -o '^[0-9]*' | xargs -I {} -n 1 wsl-open "https://support.mozilla.org/questions/"{}
- 4. Saved the 112 questions into a spreadsheet
printf '%s\n%s\n' \
`head -1 sorted-all-desktop-en-us-2020-07-07-2020-07-13-firefox-creator-answers-desktop-all-locales.csv` \
"$(cat ff78-week2-fix-problems-7-13july2020.csv)" >ff78-week2-fix-problems-7-13july2020.csv
- 5. Upload the spreadsheet into google drive and delete product and locale and add category and sub-category:
- 1. get the questions
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 6 30 2020 7 6
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-06-30-2020-07-06-firefox-creator-answers-desktop-all-locales.csv markdown
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-06-30-2020-07-06-firefox-creator-answers-desktop-all-locales.csv csv
roland@DESKTOP-KT6DGHC ~/GIT/rt-kits-api2/202007
% ../get-aaq-topic-counts.sh sorted-all-desktop-en-us-2020-06-30-2020-07-06-firefox-creator-answers-desktop-all-locales.csv
15
45
76
89
12
24
4
21
59
31
118
-
2. Manually copy them to a spreadsheet: Firefox 78 Desktop AAQ Question Counts by Week
-
3. open the biggest category with 89 questions "Fix slowness, crashing, error messages and other problems" links in a browser and save the links to a spreadsheet for notes
grep "fix-problems;" \
sorted-all-desktop-en-us-2020-06-30-2020-07-06-firefox-creator-answers-desktop-all-locales.csv |\
grep -o '^[0-9]*' | xargs -I {} -n 1 wsl-open "https://support.mozilla.org/questions/"{}
grep "fix-problems;" \
sorted-all-desktop-en-us-2020-06-30-2020-07-06-firefox-creator-answers-desktop-all-locales.csv \
> ff78-week1-fix-problems-30june-06july2020.csv
printf '%s\n%s\n' \
`head -1 sorted-all-desktop-en-us-2020-06-30-2020-07-06-firefox-creator-answers-desktop-all-locales.csv` \
"$(cat ff78-week1-fix-problems-30june-06july2020.csv)" >f78-week1-fix-problems-30june-06july2020.csv
cd /home/roland/GIT/rt-kits-api2/FIRST_TWO_WEEKS_DESKTOP
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 2 11 2020 2 24 &
mv 2020-02-11-2020-02-24-firefox-creator-answers-desktop-all-locales.csv \
ff73-1st-2weeks-2020-02-11-2020-02-24-firefox-creator-answers-desktop-all-locales.csv
../get-answers-from-questions-csv.rb ff75-1st-2weeks-2020-04-07-2020-04-20-firefox-creator-answers-desktop-all-locales.csv
cd 202006
../get-by-updated-time-question-url-answers-for-arbitrary-time-period.rb \
2020 6 22 2020 6 25
cd ..
grep "escalate;" \
202006/updated-2020-06-22-2020-06-25-ff-desktop-creator-answers-desktop-all-locales.csv\
| ./with-title-email-escalations.rb
../get-answers-from-questions-csv.rb \
ff73-1st-2weeks-2020-02-11-2020-02-24-firefox-creator-answers-desktop-all-locales.csv
- 1. get the questions
cd 202006
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 6 9 2020 6 15 &
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-06-09-2020-06-15-firefox-creator-answers-desktop-all-locales.csv markdown
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-06-09-2020-06-15-firefox-creator-answers-desktop-all-locales.csv csv
../get-aaq-topic-counts.sh \
sorted-all-desktop-en-us-2020-06-09-2020-06-15-firefox-creator-answers-desktop-all-locales.csv
42
40
78
99
10
27
6
11
53
20
128
-
2. and manually copy them to a spreadsheet: Firefox 77 Desktop AAQ Question Counts by Week
-
3. open the "Fix slowness, crashing, error messages and other problems" links in a browser and save the links to a spreadsheet for notes
grep "fix-problems;" \
sorted-all-desktop-en-us-2020-06-09-2020-06-15-firefox-creator-answers-desktop-all-locales.csv |\
grep -o '^[0-9]*' | xargs -I {} -n 1 wsl-open "https://support.mozilla.org/questions/"{}
grep "fix-problems;" \
sorted-all-desktop-en-us-2020-06-09-2020-06-15-firefox-creator-answers-desktop-all-locales.csv \
> ff77-week2-fix-problems-09-15june2020.csv
printf '%s\n%s\n' \
`head -1 sorted-all-desktop-en-us-2020-06-09-2020-06-15-firefox-creator-answers-desktop-all-locales.csv` \
"$(cat ff77-week2-fix-problems-09-15june2020.csv)" >ff77-week2-fix-problems-09-15june2020.csv
- 4. upload CSV file to Google Sheets and add notes column and remove product and locale column which are always going to be firefox and en-us
cd 202006
../get-by-updated-time-question-url-answers-for-arbitrary-time-period.rb \
2020 6 8 2020 6 10
cd ..
grep "escalate;" \
202006/updated-2020-06-08-2020-06-10-ff-desktop-creator-answers-desktop-all-locales.csv\
| grep -o '^[0-9]*' | ./email-escalations.rb
- 1. get the questions
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 6 2 2020 6 8 &
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-06-02-2020-06-08-firefox-creator-answers-desktop-all-locales.csv markdown
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-06-02-2020-06-08-firefox-creator-answers-desktop-all-locales.csv csv
- 2. get the question counts
../get-aaq-topic-counts.sh sorted-all-desktop-en-us-2020-06-02-2020-06-08-firefox-creator-answers-desktop-all-locales.csv
# 120 is "Fix slowness, crashing, error messages and other problems", 166 is "other"
34
59
87
120
16
28
5
22
74
27
166
-
and manually copy them to a spreadsheet: Firefox 77 Desktop AAQ Question Counts by Week
-
3. open the "Fix slowness, crashing, error messages and other problems" links in a browser and save the links to a spreadsheet for notes
grep "fix-problems;" \
sorted-all-desktop-en-us-2020-06-02-2020-06-08-firefox-creator-answers-desktop-all-locales.csv |\
grep -o '^[0-9]*' | xargs -I {} -n 1 wsl-open "https://support.mozilla.org/questions/"{}
grep "fix-problems;" \
sorted-all-desktop-en-us-2020-06-02-2020-06-08-firefox-creator-answers-desktop-all-locales.csv \
> ff77-week1-fix-problems-02-08june2020.csv
printf '%s\n%s\n' \
`head -1 sorted-all-desktop-en-us-2020-06-02-2020-06-08-firefox-creator-answers-desktop-all-locales.csv` \
"$(cat ff77-week1-fix-problems-02-08june2020.csv)" >ff77-week1-fix-problems-02-08june2020.csv
- 4. upload CSV file to Google Sheets and add notes column and remove product and locale column which are always going to be firefox and en-us
cd ARBITRARY_TIME_PERIOD
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 1 1 2020 6 6 &
./print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb 2019-01-01-2020-06-06-firefox-creator-answers-desktop-all-locales.csv csv
# load cumulative-sum-unfaceted-january2019-06june2020-plot-num-questions-release-day-1-28.R into R Studio, run it and save plot
grep -o '^[^0-9]*[0-9]*' \
sorted-all-desktop-en-us-2020-06-02-2020-06-02-firefox-creator-answers-desktop-all-locales.md |\
grep -o '[0-9]*' | awk '$1 > 1289343' |\
xargs -I {} -n 1 wsl-open "https://support.mozilla.org/questions/"{}
- first get the questions by updated time i.e. updated may 28, 2020 and then open them in wsl
../get-by-updated-time-question-url-answers-for-arbitrary-time-period.rb 2020 5 28 2020 5 28
grep "escalate;" \
updated-2020-05-28-2020-05-28-ff-desktop-creator-answers-desktop-all-locales.csv\
| grep -o '^[0-9]*' |\
xargs -I {} -n 1 wsl-open "https://support.mozilla.org/questions/"{}
grep -o 'https*://support.mozilla.org/questions/[^)]*' \
sorted-all-desktop-en-us-2020-05-06-2020-05-06-firefox-creator-answers-desktop-all-locales.md\
| shuf | awk 'NR % 4 == 0' |xargs -n 1 wsl-open
grep -o 'https*://support.mozilla.org/questions/[^)]*' \
sorted-all-desktop-en-us-2020-05-06-2020-05-06-firefox-creator-answers-desktop-all-locales.md\
| xargs -n 1 wsl-open
- based on the stuff below, created this script:
roland@DESKTOP-KT6DGHC ~/GIT/rt-kits-api2/2020BYMONTH
% ../get-aaq-topic-counts.sh sorted-all-desktop-en-us-2020-04-01-2020-04-30-firefox-creator-answers-desktop-all-locales.csv
70
120
235
306
21
54
12
77
105
48
377
grep download-and-install_1 sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep privacy-and- sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep customize; sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "customize;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "fix-problems" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "tips;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "bookmarks;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "cookies;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "tabs;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "websites;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "sync;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
grep "other;" sorted-all-desktop-en-us-2020-01-01-2020-01-31-firefox-creator-answers-desktop-all-locales.csv | wc -l
GOAL: in python (with tests) get Firefox Desktop answers created for a certain period when Firefox questions were updated (not created) from B&E.
- 1. The following two ruby scripts does what you want but for
created
(see https://github.com/rtanglao/rt-kits-api2/blob/master/get-creator-answers-questions-for-arbitrary-time-period.rb#L61 ) time notupdated
and it's in ruby not python and there are no tests
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 3 22 2020 3 22
# which creates 2020-03-22-2020-03-22-firefox-creator-answers-desktop-all-locales.csv
../print-question-url-answer-id-answer-creator.rb \
2020-03-22-2020-03-22-firefox-creator-answers-desktop-all-locales.csv
> [questions-answers-with-times.csv]
- 2. I am not sure
updated__gt
andupdated__lt
works - 3. Relevant lines from get-creator-answers-questions-for-arbitrary-time-period.rb
url_params = {
:format => "json",
:product => "firefox",
:created__gt => greater_than_time,
:created__lt => less_than_time,
:ordering => "+created",
}
url = "https://support.mozilla.org/api/2/question/"
- 4. Relevant lines from print-question-url-answer-id-answer-creator.rb
url = "https://support.mozilla.org/api/2/answer/"
url_params = {
:format => "json",
:question => id
}
- 5. You should be able to combine the two ruby scripts into one script.I'm just lazy and minimized new work by using an old script,
get-creator-answers-questions-for-arbitrary-time-period.rb
- 6. For initial testing to make sure the Kitsune questions API works with
updated
, just usewget
orcurl
instead of writing a python script. - 7. Beware issue:3686-timezone issue with time always being Pacific My workaround in ruby:
# the following hack has to be done for all times returned by the Kitsune API until 3686 is fixed
answer_created = Time.parse(answer["created"].gsub("Z", "PST")) #issue 3686 time is in PST not UTC
- 8. delay 1 second between API calls
../get-creator-answers-questions-for-arbitrary-time-period.rb 2020 3 20 2020 3 22
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2020-03-20-2020-03-22-firefox-creator-answers-desktop-all-locales.csv csv # get it from the last 3 days
# remove first line and shuffle
sed '1d' sorted-all-desktop-en-us-2020-03-20-2020-03-22-firefox-creator-answers-desktop-all-locales.csv\
| shuf > shuffled-sorted-all-desktop-en-us-2020-03-20-2020-03-22-firefox-creator-answers-desktop-all-locales.csv
- 1. What is the bug? The bug is we don't remove carriage returns!
- 2. fix by using:
tr("\n"," ") # replace with space to ensure words are separated!
mkdir FOUR_FF73_QUESTIONS_FOR_CANOSP_MTURK
cd FOUR_FF73_QUESTIONS_FOR_CANOSP_MTURK
#create four-ids-for-canosp-mturk.txt (just a text file with 1 integer id per line
# https://github.com/rtanglao/rt-kits-api2/blob/master/FOUR_FF73_QUESTIONS_FOR_CANOSP_MTURK/four-ids-for-canosp-mturk.txt
../get-by-id-creator-answers-questions.rb four-ids-for-canosp-mturk.txt
# the above script creates:
#https://github.com/rtanglao/rt-kits-api2/blob/master/FOUR_FF73_QUESTIONS_FOR_CANOSP_MTURK/id-1281304-unixtime-1583475446-by-id-firefox-creator-answers-desktop-all-locales.csv
../print-all-questions-just-title-content.rb id-1281304-unixtime-1583475446-by-id-firefox-creator-answers-desktop-all-locales.csv
# the above script creates:
# https://github.com/rtanglao/rt-kits-api2/blob/master/FOUR_FF73_QUESTIONS_FOR_CANOSP_MTURK/title-parsed-content-id-1281304-unixtime-1583475446-by-id-firefox-creator-answers-desktop-all-locales.csv
cd /home/rtanglao/GIT/rt-kits-api2/PRODUCT_INTEGRITY_4WEEK_RELEASE_CYCLE
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 11 26 \
2020 3 2
mv 2019-11-26-2020-03-02-firefox-creator-answers-desktop-all-locales.csv part-1-2019-11-26-2020-03-02-firefox-creator-answers-desktop-all-locales.csv
mv part-1-2019-11-26-2020-03-02-firefox-creator-answers-desktop-all-locales.csv part-2-2019-11-26-2020-03-02-firefox-creator-answers-desktop-all-locales.csv
mv 2018-11-01-2019-11-25-firefox-creator-answers-desktop-all-locales.csv part-1-2018-11-01-2019-11-25-firefox-creator-answers-desktop-all-locales.csv
head -1 part-1-2018-11-01-2019-11-25-firefox-creator-answers-desktop-all-locales.csv > concat-2019-11-01-2020-03-02-firefox-creator-answers-desktop-all-locales.csv
for filename in $(ls part-*.csv); do sed 1d $filename >> concat-2019-11-01-2020-03-02-firefox-creator-answers-desktop-all-locales.csv ; done
../print-csv-num-en-us-questions-by-product-integrity-week.rb concat-2019-11-01-2020-03-02-firefox-creator-answers-desktop-all-locales.csv 2018-2021-12-19-product_integrity_dates.txt >2018-11-01-2020-03-02-num-ff-destop-aaq-questions-created-2020-03-02.csv
mv 2018-11-01-2020-03-02-num-ff-destop-aaq-questions-created-2020-03-02.csv 2018-11-01-2020-03-02-num-ff-desktop-aaq-questions-created-2020-03-02.csv
01march2020 from the csv file of questions by id: for mturk, cut out title and content and parse out the HTML
./print-all-questions-just-title-content.rb \
id-1279731-unixtime-1583100833-by-id-firefox-creator-answers-desktop-all-locales.csv
which outputs a parsed csv file of form title-parsed-content-<csv-filename>
title,content
Restore session doesn't work after update,"I have a very high tab count, and when restoring Firefox I usually get the ""warning:unresponsive script"" pop up. I press continue, it pops up again, I press continue again, and my tabs are restored. All is well.
However, when I restarted Firefox today, it updated, and rather than the unresponsive script box, I get a blank pop up. I cannot do anything, and my tabs cannot be restored.
I tried a refresh and a clean install, but that does nothing.
"
echo '1279731' | ./get-by-id-creator-answers-questions.rb
which outputs sample file of the form id-<first-id>-unixtime-<unixtime i.e. int-when-created>.csv
:
e.g. id-1279731-unixtime-1583100833-by-id-firefox-creator-answers-desktop-all-locales.csv
and if you only want title and text (but with html; html has to be parsed out):
mlr --csv cut -f title,content id-1279731-unixtime-1583100833-by-id-firefox-creator-answers-desktop-all-locales.csv
title,content
Restore session doesn't work after update,"<p>I have a very high tab count, and when restoring Firefox I usually get the ""warning:unresponsive script"" pop up. I press continue, it pops up again, I press continue again, and my tabs are restored. All is well.
However, when I restarted Firefox today, it updated, and rather than the unresponsive script box, I get a blank pop up. I cannot do anything, and my tabs cannot be restored.
I tried a refresh and a clean install, but that does nothing.
</p>"
23february2020 getting the people who answered the question (don't include answers from the question creator i.e. the original post)
../print-question-url-answer-id-answer-creator.rb \
[csv file created by get-creator-answers-questions-for-arbitrary-time-period.r]\
> [questions-answers-with-times.csv]
e.g.
cd 202002
../print-question-url-answer-id-answer-creator.rb 2020-02-20-2020-02-20-firefox-creator-answers-desktop-all-locales.csv > /tmp/answers-scratch.txt
../print-product-integrity-week-start-dates.rb > 2018-2021-12-19-product_integrity_dates.txt
../print-csv-num-en-us-questions-by-product-integrity-week.rb 2018-11-01-2019-11-25-firefox-creator-answers-desktop-all-locales.csv 2018-2021-12-19-product_integrity_dates.txt >2018-11-26-num-ff-desktop-aaq-questions-01nov2018-25nov2019.csv
mv 2018-11-26-num-ff-desktop-aaq-questions-01nov2018-25nov2019.csv 2018-11-26-num-ff-desktop-en-us-aaq-questions-01nov2018-25nov2019.csv
- on Windows with WSL1 or WSL2, Linux or OS X install python 2.6 or newer
- clone the repo:
git clone https://github.com/rtanglao/rt-kits-api2.git
- and then run the scripts (change the dates appropriately e.g. change
11 3
and11 9
to the start and end of the week) and get the number of questions:
cd PRODUCT_INTEGRITY_4WEEK_RELEASE_CYCLE
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 11 3 2019 11 9
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2019-11-03-2019-11-09-firefox-creator-answers-desktop-all-locales.csv markdown
wc -l sorted-all-desktop-en-us-2019-11-03-2019-11-09-firefox-creator-answers-desktop-all-locales.md
295 sorted-all-desktop-en-us-2019-11-03-2019-11-09-firefox-creator-answers-desktop-all-locales.md
# actual number of question is 295 - 4 = 291 questions the week of November 3-9, 2019
cd /home/rtanglao/GIT/rt-kits-api2/PRODUCT_INTEGRITY_4WEEK_RELEASE_CYCLE
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 11 3 2019 11 9
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2019-11-03-2019-11-09-firefox-creator-answers-desktop-all-locales.csv markdown
- All times returned by the API are now PST (even though they say 'Z') and all URL parameters are now PST (see mozilla/kitsune#3946 and mozilla/kitsune#3961 )
cd /home/rtanglao/GIT/rt-kits-api2/201911
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 11 10 2019 11 10
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb 2019-11-10-2019-11-10-firefox-creator-answers-desktop-all-locales.csv markdown
./test-time-question-1271141.rb >./test-time-question-1271141-stdout.txt
- created time in the API is: `
"created" => "2019-10-23T00:02:46Z
- but the web page shows
Posted 10/22/19, 5:02 PM
: - If the API time is in UTC and correct, shouldn't the web page show
Posted 10/22/19, 7:46 PM
if the web page is in Pacific?
cd /home/rtanglao/GIT/rt-kits-api2/201910
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 10 22 2019 10 22
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb 2019-10-22-2019-10-22-firefox-creator-answers-desktop-all-locales.csv markdown
- where
contribution
= a reply by somebody other than the original poster of the support question
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 1 1 2019 10 19
../print-desktop-contributors.rb 2019-01-01-2019-10-19-firefox-creator-answers-desktop-all-locales.csv >01january-19october2019-contributors.txt &
cat 01january-19october2019-contributors.txt | sort | uniq -c | sort -nr > 29january-19october2019-sorted-contributors.txt
20October2019 get all the questions for an arbitary time period including answerids and question creator
cd /home/rtanglao/GIT/rt-kits-api2/ARBITRARY_TIME_PERIOD
../get-creator-answers-questions-for-arbitrary-time-period.rb 2019 1 1 2019 10 19
# output is:
# 2019-01-01-2019-10-19-firefox-creator-answers-desktop-all-locales.csv
- fixed get-questions-for-bitrary-time-period.rb to work with issue 3686 and new issue mozilla/kitsune#3946, all other ruby scripts haven't been updated for 3686 and 3946
e.g. january 1, 2019 - october 18, 2019
./get-questions-for-bitrary-time-period.rb 2019 1 1 2019 10 18
./print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb\
2019-01-01-2019-10-18-firefox-desktop-all-locales.csv csv
- output is here:
cd 201910
../get-questions-for-1-day.rb 2019 10 6
../print-desktop-en-us-all-oses-increasing-ids-time-url-title-content.rb \
2019-10-06-firefox-desktop-all-locales.csv markdown
cd 201907
../get-questions-for-1-month.rb 2019 7
../print-desktop-en-us-osx-increasing-ids-time-url-title-content.rb \
2019-07-firefox-desktop-all-locales.csv 2>/tmp/foo.txt
output:
cd 201907
../get-questions-for-1-day.rb 2019 7 9
../print-all-ids-increasing-order-desktop-english-sumo-questions.rb\
2019-07-09-firefox-desktop-all-locales.csv ids >2019-07-09-en-us-desktop-ids.txt
cat 2019-07-09-en-us-desktop-ids.txt | ../open-ids-in-browser.rb
export BROWSER='/mnt/c/Program\ Files/Firefox\ Nightly/firefox.exe'
echo 1262479 | ./open-ids-in-browser.rb
../print-random-order-desktop-english-sumo-questions.rb \
2019-05-29-firefox-desktop-all-locales.csv 2019-05-29-firefox-desktop-all-locales.csv\
>randomized-2019-05-29-firefox-desktop-all-locales.csv
cd /home/rtanglao/GIT/rt-kits-api2/201905
../get-questions-for-1-day.rb 2019 5 29