pariyatti / kosa Goto Github PK
View Code? Open in Web Editor NEWDigital library service
License: GNU Affero General Public License v3.0
Digital library service
License: GNU Affero General Public License v3.0
Don't just dump JSON back to the browser... show something nice.
An Editor should be able to create a Pilgrimage
card to announce news about Pariyatti-organized pilgrimages to sites in India, Nepal, and Myanmar.
And Editor should be able to add multiple translations to a Pali Word Card when creating one manually.
This should be a dynamically-sized list which matches the has_many
relationship on PaliWordCard (in Rails). The Editor should only be able to add a translation for any one of the predefined Standard Languages.
spec
? only the boundaries like HTTP and Crux inserts? or elsewhere as well?looped_xyz/db.clj
duplicationxyz/db.clj
duplicationpublish_job.clj
duplication:db
or :integration
q
This is obviously an epic, but the Resources
tab should provide a full-text search of the Pariyatti library and return meaningful results before any search feature is released.
Triage
to the kosa GitHub repov1
cards: https://github.com/pariyatti/kosa/projects/1#kosa
Discord channel
Editor should be able to see a dynamic preview of the card she's creating / modifying / publishing, as per @vrnpi Whimsical wireframes:
eng
, hin
, etc.)hans
vs. hant
)
zho-hant
or zho-hans
, but nothing else. Audio content is keyed as cmn
, yue
, nan
, or hak
.zho-hant
or zho-hans
and the second-most-preferred language will be the spoken Chinese language (of cmn
, yue
, nan
, or hak
). Chinese users also get a final backup of English.The complete list of languages currently supported by Pariyatti:
It seems that ISO 639-3 (an extension of ISO 639-3) has reasonably comprehensive support:
hans
/ hant
instead of _CN
/ _TW
?)
My current thinking is ISO 639-3 + (optional) region specifier. Alternatively, some BCP 47 subset... but it's just so complicated.
Wikipedia uses a number of hacks to get around BCP 47 limitations:
cmn
, nan
, hak
but always uses zho-hant
nan
and hak
but always use zho-hans
https://www.chineseconverter.com/en/convert/find-out-if-simplified-or-traditional-chinese
My first round of research turned up this:
A Language should have three fields: IANA code, English name ("Hindi"), Actual name ("हिंदी")
IANA tag registry is here: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Prefer tag combinations were are nearest matches to the Gettext locale standard, wherever possible:
https://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html#Locale-Names
Ooooohhhkkkayyyyy. It looks like THIS is maybe the standard way to do this? At least according to friends at Wikipedia:
https://github.com/unicode-org/cldr/tree/release-37/common/main
The canonical ICU webpage is here: http://site.icu-project.org/home
The Ruby library is listed here (gem icu
): http://site.icu-project.org/related
There is a Dart package: https://pub.dev/packages/icu
Clojure: https://github.com/Vincit/satakieli (wraps ICU4J)
Java: http://site.icu-project.org (ICU4J)
When an editor attaches an image to a card, kosa should take whatever actions are appropriate to make the image display attractively on all devices. This should include rejecting the image for being too small. Only oversized images can be downsized, not the other way around.
:published-at
=> :type/published-at
:updated-at
=> :type/updated-at
:type
=> :kuti/type
put
to save!
[entity :type/attr value]
?
:type
key anyway?
:type/attr
everywhere:modified-at
:updated-at
:published-at
#uuid
Not sure why I assumed we needed to build this ourselves. There are two projects we could probably use quite happily:
https://github.com/macourtney/drift
https://github.com/juxt/joplin
image-handler
hash
AWS Lightsail will be our production environment. We will deploy to Lightsail when we are ready to beta test with Pariyatti staff and internal (old meditator) users.
Note: these tasks have moved to #55
#kosa
on discord)provision.yml
deploy.yml
seeds.yml
(but only once).kdbx
(if possible) within scripts ... or pull scripted secrets into VaultLet's clean up some messes we made when we started the Crux spike.
resources
macro testcages.dispatch
=> kutis.dispatch
kosa.crux
=> kutis.record
kosa-crux
=> kosa
nscard
CSSfont-family
body CSSRead through: https://www.braveclojure.com/quests/deploy/
Look at old Ansible deployment: https://github.com/pariyatti/kosa-rails/tree/master/deployment
Write a script to purge old uploaded files which don't have a corresponding kutis.storage
document in Crux.
kosa.mobile
should add poller to kosa.library
, not the other way aroundAn Editor should be able to create a "Staff Pick" card for books, audiobooks, and videos.
This is a meta-issue, since we should rename the primary (trunk) branch from master
to main
in all the repos:
Red herring. The db migrations weren't being applied correctly.
On first Ansible deploy, the Terraform script fails because DNS hasn't propagated yet. It resolves for the Pariyatti nameserver and 8.8.8.8, though. Can we work around or figure out why resolution is taking so long?
A new LTS of Ubuntu was released on April 21st. By mid-May it should be safe to upgrade (create new Lightsail VMs and redeploy). As of 2023-04-09, our upgrade process probably looks like:
An editor should be able to queue up a number of cards created in advance to self-publish on a schedule.
This appears to be a silly mistake we wouldn't have made if we had a CI box set up. The resources/storage
directory doesn't exist by default. There is a second issue which is that we don't actually initialize kutis.storage
... it was always initialized automatically in the dev environment but it's nil for make run
.
Fix:
resources/storage
should exist in a new clonekutis.storage
on startup:looped-pali-word
s after ingest?N / M ingested
) during ingestion;; from pali_word/txt_job.clj — (old notes)
;; 1. lookup word by `:pali-word/pali`
;; (a) lookup translation for the current language
;; (b) add translation if (a) fails
;; 2. add word if (1) fails
;; (a) lookup largest "looped" index
;; (b) add "largest + 1" as index
;; ...but if largest = nil, index is 0
;; (c) download and attach audio
;; 3. daily job creates "published on today" cards at 00:00:00:
;;
;; (def looped-card-count 220)
;; (def days-since-epoch (t/days (t/between (t/epoch) (t/now))))
;; (def days-since-perl (- days-since-epoch 12902))
;; (def todays-word (mod days-since-perl looped-card-count))
kosa.pariyatti.app
for production
authorized_keys
from ubuntu user to kosa-user: provision with ubuntu, deploy and seed with kosa-userTriage
to the kosa GitHub repov1
cards: https://github.com/pariyatti/kosa/projects/1Build a generic "media search" (images, videos, mp3s, etc.) widget from this spike:
https://github.com/pariyatti/reagent-playground/blob/main/src-cljs/forms_example/mediabox.cljs
A Librarian or Editor should be able to "reconcile" the kosa library contents with the contents available on the https://pariyatti.org website. This will include www.pariyatti.org and store.pariyatti.org but possibly others.
An Editor should be able to create a Topic-of-the-Week
card.
An Editor should be able to create a Recommended Reading
card. Is this just a variation on a Staff Pick
card? Do we really need both?
We should configure some basic continuous integration with GitHub Actions. The Asana comment is a little out of date, as it would be relatively easy to move whatever we set up on GitHub to another provider anyway. This seems worth doing before our v1 release.
lein test
Should we consider CircleCI instead? Circle can pull from multiple repos (in case that's ever something we want to do).
From Asana:
Doing this will tie us to GitHub since GitHub Actions don't conform to an open standard. Actions are free for open source projects, though. Let's consider this an extremely low priority until there are more developers working on kosa. For now, it's not hard for developers to run the build locally.
An Editor should be able to customize what shows up in the Resources
tab. Carousels, categories, etc. should be easy to modify in an admin interface that roughly resembles what the user will see, in terms of layout. These are determined by metadata types like Topic
, Collection
, etc.
These will probably need to be broken out into their own tasks eventually:
Topic
Collection
Audience
As shown in @vrnpi Whimiscal wireframes:
https://whimsical.com/6LN2LDkv1bRyyuojyiJ8oV
The Editor should be able to search for an image inline while creating a new Card.
Reagent looks promisingly simple:
https://github.com/reagent-project/reagent-forms#typeahead
Relevant conversation in Discord:
https://discord.com/channels/629724558735310889/745936918663004160/794675843720937532
;; from pali_word/txt_job.clj —
;; 1. lookup word by `:words-of-buddha/words`
;; (a) lookup translation for the current language
;; (b) add translation if (a) fails
;; 2. add word if (1) fails
;; (a) lookup largest "looped" index
;; (b) add "largest + 1" as index
;; ...but if largest = nil, index is 0
;; (c) download and attach audio
TODO: sanity-check against Perl script
Plugins: can pariyatti-specific domain entities live in their own .jar
?
Search will be another API endpoint entirely.
Triage
to the kosa GitHub repov1
cards: https://github.com/pariyatti/kosa/projects/1spec
generative testscrux-schema
or spec
for tabular entities for mobile app front-end API data
valid-time
)clr-icons
from npm
during deployment rather than vendoring otherwise we get source map errors/config/config.test.edn
etc)reitit
route conflict handling. ... checked off, but I did not actually finish this since it's not of immediate value to the Pariyatti project. - @deobaldFrom ikitommi in #reitit clojurians slack:
the conflict resolver could be smarter and know that
[["/kikka/kikka"]
["/kikka/:id"]]
actually is not conflicting as the fixed term(s) comes first. PR welcome :)
Not really a "hack" per se... but we're overriding the SHA1 algorithm using environment variables everywhere at the moment (throughout the Makefile
) which is messy. It would be nice to apply this change universally — preferably somewhere other than lein
/ project.clj
.
User should be able to purchase a book from within the app.
This is super low priority for now. I'm creating this card because I noticed this and we'll have to take care of it when we (eventually) add this feature:
https://support.google.com/googleplay/android-developer/answer/6223646#JP
The search has broken a few times (due to JSON serialization weirdness) now without me noticing. The only way to test this properly is with a high-level acceptance test, of which we should really have a few anyway. Headless Selenium is probably the way to go here.
:looped-words-of-buddha/audio-url
to :looped-words-of-buddha/original-audio-url
as a related breaking changeA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.