host on cloud? which = free?
existing cloud storage (small, free) = google drive, github, etc
avoid hosting locally
existing, database sol = paid (eg google Cloud SQL)
mariadb?
arbitrary number of tags
number of columns: not fixed, can add later on
not the traditional key value system? eg company -> google
because most entries: may not have a company?
excel? but is it scalable?
large files? takes too long to run?
also how to implement tags?
worse case: save as eg .txt file on google drive
render by client
update database: push new file to google drive
but same as implementing database? eg efficient search, multiprocessing, etc
for performance (timewise): precompile lists for each categories
not scalable when there are many categories?
actually, key value pairs?
eg
journal
company
author
field
what if add more columns later on?
some columns empty for some rows (entries)?
scalable
what programming language?
python
but, need interpreter; not straightforward for mobile
also, slow?
javascript? integrates easily with web
implementation of hash tables in javascript?
https://www.freecodecamp.org/news/javascript-hash-table-associative-array-hashing-in-js/
object, map?
eg python dictionary
or, just create index for each column, instead of dictionary
also, need one file: maps paper name to all tags
do not implement this as a hash table? we want to enumerate all tags? So O(n) anyway
hash table: overhead?
2 types of entries
eg special, link: not searchable
to reduce file size: main file = hash table, name of paper to address?
address then to actual file for that paper, with searchable (tags) + non-searchable entries
actually, just use hashing function
instead of one large hash table
given paper name, load the corresponding file?
too slow?
index kind of structure
show all (combinations) of tags
(generate Venn diagram?)
preview high ranking papers in each category?
not enough support
need a lot of dependencies
can read, how to write?
https://docs.github.com/en/rest?apiVersion=2022-11-28
need Octokit.js?
"Create or update file contents"
https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#create-or-update-file-contents
3 versions of octokit
https://github.com/octokit
want to implement on js
https://github.com/octokit/octokit.js
Usage > Browsers > Load octokit directly from cdn.skypack.dev
this is allowed
next: does not allow null (ie local js file)
host on github.io
https://www.twistblogg.com/2020/06/use-github-for-hosting-files.html
(note: github js files updates after a while after each commit)
API: content = string in Base64
convert string to Base64
https://www.programiz.com/javascript/examples/encode-string-Base64
https://stackoverflow.com/questions/38134200/base64-encode-a-javascript-object
sha: commit hash
from html class="d-none d-md-inline"
below: Latest commit
actually, loading html is difficult? CORS?
actually github has a preferred way of this type of loading
https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#get-repository-content
https://api.github.com/repos/hpcfung/CodingProjects/contents/2023/sql_server/test/Jan09_test/test_upload.txt
https://stackoverflow.com/questions/20207594/how-to-find-a-github-file-s-sha-blob
how does github know what file format it is
contained in the base64?
no such thing? entirely dictated by the file extension in the path?
is prompt secure enough for token
eg can sth inspect variable value?
https://stackoverflow.com/questions/36530724/what-are-the-security-implications-of-storing-passwords-in-javascript-variables
raw file link?
https://drive.google.com/uc?id=1LHX3p6ySsbkn1M-JbdoF0RKxYc3GQy7y
https://stackoverflow.com/questions/24834877/google-drive-raw-data
is download link same as raw file link
https://stackoverflow.com/questions/67813895/retrieving-a-raw-file-url-from-the-google-drive-api
claim: "This is not possible."
can write? how to read?
gapi
https://github.com/google/google-api-javascript-client
if title is changed, hash file generated, becomes bloat?